sound/hda/codecs/realtek/alc882.c
Source file repositories/reference/linux-study-clean/sound/hda/codecs/realtek/alc882.c
File Facts
- System
- Linux kernel
- Corpus path
sound/hda/codecs/realtek/alc882.c- Extension
.c- Size
- 30166 bytes
- Lines
- 884
- Domain
- Driver Families
- Bucket
- sound/hda
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/module.hrealtek.h
Detected Declarations
function alc889_fixup_coeffunction alc885_fixup_macpro_gpiofunction correctlyfunction alc889_fixup_mbp_vreffunction alc889_fixup_mac_pinsfunction alc889_fixup_imac91_vreffunction alc889_fixup_mba11_vreffunction alc889_fixup_mba21_vreffunction alc882_fixup_no_primary_hpfunction alc1220_fixup_gb_x570function alc1220_fixup_clevo_p950function alc1220_fixup_clevo_pb51edfunction alc898_fixup_clevo_p775tm1function alc887_asus_hp_automute_hookfunction alc887_fixup_asus_jackfunction alc882_parse_auto_configfunction alc882_probe
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
//
// Realtek ALC882/883/885/888/889 codec support
//
// ALC882 is almost identical with ALC880 but has cleaner and more flexible
// configuration. Each pin widget can choose any input DACs and a mixer.
// Each ADC is connected from a mixer of all inputs. This makes possible
// 6-channel independent captures.
//
// In addition, an independent DAC for the multi-playback (not used in this
// driver yet).
//
#include <linux/init.h>
#include <linux/module.h>
#include "realtek.h"
/*
* Pin config fixes
*/
enum {
ALC882_FIXUP_ABIT_AW9D_MAX,
ALC882_FIXUP_LENOVO_Y530,
ALC882_FIXUP_PB_M5210,
ALC882_FIXUP_ACER_ASPIRE_7736,
ALC882_FIXUP_ASUS_W90V,
ALC889_FIXUP_CD,
ALC889_FIXUP_FRONT_HP_NO_PRESENCE,
ALC889_FIXUP_VAIO_TT,
ALC888_FIXUP_EEE1601,
ALC886_FIXUP_EAPD,
ALC882_FIXUP_EAPD,
ALC883_FIXUP_EAPD,
ALC883_FIXUP_ACER_EAPD,
ALC882_FIXUP_GPIO1,
ALC882_FIXUP_GPIO2,
ALC882_FIXUP_GPIO3,
ALC889_FIXUP_COEF,
ALC882_FIXUP_ASUS_W2JC,
ALC882_FIXUP_ACER_ASPIRE_4930G,
ALC882_FIXUP_ACER_ASPIRE_8930G,
ALC882_FIXUP_ASPIRE_8930G_VERBS,
ALC885_FIXUP_MACPRO_GPIO,
ALC889_FIXUP_DAC_ROUTE,
ALC889_FIXUP_MBP_VREF,
ALC889_FIXUP_IMAC91_VREF,
ALC889_FIXUP_MBA11_VREF,
ALC889_FIXUP_MBA21_VREF,
ALC889_FIXUP_MP11_VREF,
ALC889_FIXUP_MP41_VREF,
ALC882_FIXUP_INV_DMIC,
ALC882_FIXUP_NO_PRIMARY_HP,
ALC887_FIXUP_ASUS_BASS,
ALC887_FIXUP_BASS_CHMAP,
ALC1220_FIXUP_GB_DUAL_CODECS,
ALC1220_FIXUP_GB_X570,
ALC1220_FIXUP_CLEVO_P950,
ALC1220_FIXUP_CLEVO_PB51ED,
ALC1220_FIXUP_CLEVO_PB51ED_PINS,
ALC887_FIXUP_ASUS_AUDIO,
ALC887_FIXUP_ASUS_HMIC,
ALCS1200A_FIXUP_MIC_VREF,
ALC888VD_FIXUP_MIC_100VREF,
ALC898_FIXUP_CLEVO_P775TM1,
};
static void alc889_fixup_coef(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
if (action != HDA_FIXUP_ACT_INIT)
return;
alc_update_coef_idx(codec, 7, 0, 0x2030);
}
/* set up GPIO at initialization */
static void alc885_fixup_macpro_gpio(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
struct alc_spec *spec = codec->spec;
spec->gpio_write_delay = true;
alc_fixup_gpio3(codec, fix, action);
}
/* Fix the connection of some pins for ALC889:
* At least, Acer Aspire 5935 shows the connections to DAC3/4 don't
* work correctly (bko#42740)
*/
static void alc889_fixup_dac_route(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `realtek.h`.
- Detected declarations: `function alc889_fixup_coef`, `function alc885_fixup_macpro_gpio`, `function correctly`, `function alc889_fixup_mbp_vref`, `function alc889_fixup_mac_pins`, `function alc889_fixup_imac91_vref`, `function alc889_fixup_mba11_vref`, `function alc889_fixup_mba21_vref`, `function alc882_fixup_no_primary_hp`, `function alc1220_fixup_gb_x570`.
- Atlas domain: Driver Families / sound/hda.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.