sound/hda/codecs/realtek/alc662.c
Source file repositories/reference/linux-study-clean/sound/hda/codecs/realtek/alc662.c
File Facts
- System
- Linux kernel
- Corpus path
sound/hda/codecs/realtek/alc662.c- Extension
.c- Size
- 38545 bytes
- Lines
- 1134
- 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.
- 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 alc662_parse_auto_configfunction alc272_fixup_mariofunction gpio_led_power_filterfunction alc662_fixup_led_gpio1function alc662_usi_automute_hookfunction alc662_fixup_usi_headset_micfunction alc662_aspire_ethos_mute_speakersfunction alc662_fixup_aspire_ethos_hpfunction alc671_fixup_hp_headset_mic2function alc897_hp_automute_hookfunction alc897_fixup_lenovo_headset_micfunction alc897_fixup_lenovo_headset_modefunction alc668_restore_default_valuefunction alc_fixup_headset_mode_alc662function alc_fixup_headset_mode_alc668function alc662_fixup_csl_ampfunction alc662_probe
Annotated Snippet
switch (codec->core.vendor_id) {
case 0x10ec0662:
err = set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
break;
case 0x10ec0272:
case 0x10ec0663:
case 0x10ec0665:
case 0x10ec0668:
err = set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
break;
case 0x10ec0273:
err = set_beep_amp(spec, 0x0b, 0x03, HDA_INPUT);
break;
}
if (err < 0)
goto error;
}
snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
return 0;
error:
snd_hda_gen_remove(codec);
return err;
}
static const struct hda_codec_ops alc662_codec_ops = {
.probe = alc662_probe,
.remove = snd_hda_gen_remove,
.build_controls = alc_build_controls,
.build_pcms = snd_hda_gen_build_pcms,
.init = alc_init,
.unsol_event = snd_hda_jack_unsol_event,
.resume = alc_resume,
.suspend = alc_suspend,
.check_power_status = snd_hda_gen_check_power_status,
.stream_pm = snd_hda_gen_stream_pm,
};
/*
* driver entries
*/
static const struct hda_device_id snd_hda_id_alc662[] = {
HDA_CODEC_ID(0x10ec0272, "ALC272"),
HDA_CODEC_ID_REV(0x10ec0662, 0x100101, "ALC662 rev1"),
HDA_CODEC_ID_REV(0x10ec0662, 0x100300, "ALC662 rev3"),
HDA_CODEC_ID(0x10ec0663, "ALC663"),
HDA_CODEC_ID(0x10ec0665, "ALC665"),
HDA_CODEC_ID(0x10ec0667, "ALC667"),
HDA_CODEC_ID(0x10ec0668, "ALC668"),
HDA_CODEC_ID(0x10ec0670, "ALC670"),
HDA_CODEC_ID(0x10ec0671, "ALC671"),
HDA_CODEC_ID(0x10ec0867, "ALC891"),
HDA_CODEC_ID(0x10ec0892, "ALC892"),
HDA_CODEC_ID(0x10ec0897, "ALC897"),
{} /* terminator */
};
MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_alc662);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Realtek ALC662 and compatible HD-audio codec");
MODULE_IMPORT_NS("SND_HDA_CODEC_REALTEK");
static struct hda_codec_driver alc662_driver = {
.id = snd_hda_id_alc662,
.ops = &alc662_codec_ops,
};
module_hda_codec_driver(alc662_driver);
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `realtek.h`.
- Detected declarations: `function alc662_parse_auto_config`, `function alc272_fixup_mario`, `function gpio_led_power_filter`, `function alc662_fixup_led_gpio1`, `function alc662_usi_automute_hook`, `function alc662_fixup_usi_headset_mic`, `function alc662_aspire_ethos_mute_speakers`, `function alc662_fixup_aspire_ethos_hp`, `function alc671_fixup_hp_headset_mic2`, `function alc897_hp_automute_hook`.
- Atlas domain: Driver Families / sound/hda.
- Implementation status: source implementation candidate.
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.