aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Broch <tbroch@chromium.org>2010-12-07 19:51:05 -0500
committerTakashi Iwai <tiwai@suse.de>2010-12-09 01:33:36 -0500
commit6be7948ff4fa7662c1ee1994e1798074f8e832ed (patch)
tree6cd75594282fb8bd31c7b9ae15ff2906b9dfc12b
parente1eb5f10069b7c393174b3a272ad647537969862 (diff)
ALSA: hda: Add fixup for mario system
create fixup function for the mario model and override amp capabilities for NID 0x2 Signed-off-by: Todd Broch <tbroch@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_realtek.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 9ba4279c690d..cd2d3a5efa50 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -19332,9 +19332,21 @@ static void alc662_auto_init(struct hda_codec *codec)
19332 alc_inithook(codec); 19332 alc_inithook(codec);
19333} 19333}
19334 19334
19335static void alc272_fixup_mario(struct hda_codec *codec,
19336 const struct alc_fixup *fix, int pre_init) {
19337 if (snd_hda_override_amp_caps(codec, 0x2, HDA_OUTPUT,
19338 (0x3b << AC_AMPCAP_OFFSET_SHIFT) |
19339 (0x3b << AC_AMPCAP_NUM_STEPS_SHIFT) |
19340 (0x03 << AC_AMPCAP_STEP_SIZE_SHIFT) |
19341 (0 << AC_AMPCAP_MUTE_SHIFT)))
19342 printk(KERN_WARNING
19343 "hda_codec: failed to override amp caps for NID 0x2\n");
19344}
19345
19335enum { 19346enum {
19336 ALC662_FIXUP_ASPIRE, 19347 ALC662_FIXUP_ASPIRE,
19337 ALC662_FIXUP_IDEAPAD, 19348 ALC662_FIXUP_IDEAPAD,
19349 ALC272_FIXUP_MARIO,
19338}; 19350};
19339 19351
19340static const struct alc_fixup alc662_fixups[] = { 19352static const struct alc_fixup alc662_fixups[] = {
@@ -19350,6 +19362,9 @@ static const struct alc_fixup alc662_fixups[] = {
19350 { } 19362 { }
19351 } 19363 }
19352 }, 19364 },
19365 [ALC272_FIXUP_MARIO] = {
19366 .func = alc272_fixup_mario,
19367 }
19353}; 19368};
19354 19369
19355static struct snd_pci_quirk alc662_fixup_tbl[] = { 19370static struct snd_pci_quirk alc662_fixup_tbl[] = {
@@ -19360,6 +19375,10 @@ static struct snd_pci_quirk alc662_fixup_tbl[] = {
19360 {} 19375 {}
19361}; 19376};
19362 19377
19378static const struct alc_model_fixup alc662_fixup_models[] = {
19379 {.id = ALC272_FIXUP_MARIO, .name = "mario"},
19380 {}
19381};
19363 19382
19364 19383
19365static int patch_alc662(struct hda_codec *codec) 19384static int patch_alc662(struct hda_codec *codec)
@@ -19459,7 +19478,8 @@ static int patch_alc662(struct hda_codec *codec)
19459 codec->patch_ops = alc_patch_ops; 19478 codec->patch_ops = alc_patch_ops;
19460 if (board_config == ALC662_AUTO) { 19479 if (board_config == ALC662_AUTO) {
19461 spec->init_hook = alc662_auto_init; 19480 spec->init_hook = alc662_auto_init;
19462 alc_pick_fixup(codec, alc662_fixup_tbl, alc662_fixups, 0); 19481 alc_pick_fixup_model(codec, alc662_fixup_models,
19482 alc662_fixup_tbl, alc662_fixups, 0);
19463 } 19483 }
19464 19484
19465 alc_init_jacks(codec); 19485 alc_init_jacks(codec);