diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-11-14 11:42:11 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-11-14 11:43:17 -0500 |
commit | 5671087ffa80ea7fcc254c08de9697551fecedcf (patch) | |
tree | e207e05f38e2aeb63dacb43c26c106e86ad370cb /sound | |
parent | b25396994b90f69c5fc6d7cd448174d7eea69f14 (diff) |
ALSA: hda/realtek - Move ALC885 macpro and imac24 models to auto-parser
The ALC882 macpro and imac24 static configs can be transferred to the
auto-parser with the additional GPIO setup.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/alc882_quirks.c | 174 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 57 |
2 files changed, 56 insertions, 175 deletions
diff --git a/sound/pci/hda/alc882_quirks.c b/sound/pci/hda/alc882_quirks.c index 403e30a36599..bdf0ed4ab3e2 100644 --- a/sound/pci/hda/alc882_quirks.c +++ b/sound/pci/hda/alc882_quirks.c | |||
@@ -6,12 +6,10 @@ | |||
6 | /* ALC882 models */ | 6 | /* ALC882 models */ |
7 | enum { | 7 | enum { |
8 | ALC882_AUTO, | 8 | ALC882_AUTO, |
9 | ALC885_MACPRO, | ||
10 | ALC885_MBA21, | 9 | ALC885_MBA21, |
11 | ALC885_MBP3, | 10 | ALC885_MBP3, |
12 | ALC885_MB5, | 11 | ALC885_MB5, |
13 | ALC885_MACMINI3, | 12 | ALC885_MACMINI3, |
14 | ALC885_IMAC24, | ||
15 | ALC885_IMAC91, | 13 | ALC885_IMAC91, |
16 | ALC889A_MB31, | 14 | ALC889A_MB31, |
17 | ALC882_MODEL_LAST, | 15 | ALC882_MODEL_LAST, |
@@ -311,71 +309,6 @@ static const struct hda_verb alc882_base_init_verbs[] = { | |||
311 | 309 | ||
312 | #define alc883_init_verbs alc882_base_init_verbs | 310 | #define alc883_init_verbs alc882_base_init_verbs |
313 | 311 | ||
314 | /* Mac Pro test */ | ||
315 | static const struct snd_kcontrol_new alc882_macpro_mixer[] = { | ||
316 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
317 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
318 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x18, 0x0, HDA_OUTPUT), | ||
319 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
320 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
321 | /* FIXME: this looks suspicious... | ||
322 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
323 | HDA_CODEC_MUTE("Beep Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
324 | */ | ||
325 | { } /* end */ | ||
326 | }; | ||
327 | |||
328 | static const struct hda_verb alc882_macpro_init_verbs[] = { | ||
329 | /* Front mixer: unmute input/output amp left and right (volume = 0) */ | ||
330 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | ||
331 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
332 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | ||
333 | /* Front Pin: output 0 (0x0c) */ | ||
334 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
335 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
336 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
337 | /* Front Mic pin: input vref at 80% */ | ||
338 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
339 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
340 | /* Speaker: output */ | ||
341 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
342 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
343 | {0x1a, AC_VERB_SET_CONNECT_SEL, 0x04}, | ||
344 | /* Headphone output (output 0 - 0x0c) */ | ||
345 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
346 | {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
347 | {0x18, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
348 | |||
349 | /* FIXME: use matrix-type input source selection */ | ||
350 | /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */ | ||
351 | /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */ | ||
352 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
353 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, | ||
354 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, | ||
355 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, | ||
356 | /* Input mixer2 */ | ||
357 | {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
358 | {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, | ||
359 | {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, | ||
360 | {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, | ||
361 | /* Input mixer3 */ | ||
362 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
363 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, | ||
364 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, | ||
365 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, | ||
366 | /* ADC1: mute amp left and right */ | ||
367 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
368 | {0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
369 | /* ADC2: mute amp left and right */ | ||
370 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
371 | {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
372 | /* ADC3: mute amp left and right */ | ||
373 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
374 | {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
375 | |||
376 | { } | ||
377 | }; | ||
378 | |||
379 | /* Macbook 5,1 */ | 312 | /* Macbook 5,1 */ |
380 | static const struct hda_verb alc885_mb5_init_verbs[] = { | 313 | static const struct hda_verb alc885_mb5_init_verbs[] = { |
381 | /* DACs */ | 314 | /* DACs */ |
@@ -614,34 +547,6 @@ static const struct hda_verb alc885_imac91_init_verbs[] = { | |||
614 | { } | 547 | { } |
615 | }; | 548 | }; |
616 | 549 | ||
617 | /* iMac 24 mixer. */ | ||
618 | static const struct snd_kcontrol_new alc885_imac24_mixer[] = { | ||
619 | HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x00, HDA_OUTPUT), | ||
620 | HDA_CODEC_MUTE("Master Playback Switch", 0x0c, 0x00, HDA_INPUT), | ||
621 | { } /* end */ | ||
622 | }; | ||
623 | |||
624 | /* iMac 24 init verbs. */ | ||
625 | static const struct hda_verb alc885_imac24_init_verbs[] = { | ||
626 | /* Internal speakers: output 0 (0x0c) */ | ||
627 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
628 | {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
629 | {0x18, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
630 | /* Internal speakers: output 0 (0x0c) */ | ||
631 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
632 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
633 | {0x1a, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
634 | /* Headphone: output 0 (0x0c) */ | ||
635 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
636 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
637 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
638 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN}, | ||
639 | /* Front Mic: input vref at 80% */ | ||
640 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
641 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
642 | { } | ||
643 | }; | ||
644 | |||
645 | /* Toggle speaker-output according to the hp-jack state */ | 550 | /* Toggle speaker-output according to the hp-jack state */ |
646 | static void alc885_imac24_setup(struct hda_codec *codec) | 551 | static void alc885_imac24_setup(struct hda_codec *codec) |
647 | { | 552 | { |
@@ -687,53 +592,6 @@ static void alc885_imac91_setup(struct hda_codec *codec) | |||
687 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | 592 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); |
688 | } | 593 | } |
689 | 594 | ||
690 | /* toggle speaker-output according to the hp-jack state */ | ||
691 | static void alc882_gpio_mute(struct hda_codec *codec, int pin, int muted) | ||
692 | { | ||
693 | unsigned int gpiostate, gpiomask, gpiodir; | ||
694 | |||
695 | gpiostate = snd_hda_codec_read(codec, codec->afg, 0, | ||
696 | AC_VERB_GET_GPIO_DATA, 0); | ||
697 | |||
698 | if (!muted) | ||
699 | gpiostate |= (1 << pin); | ||
700 | else | ||
701 | gpiostate &= ~(1 << pin); | ||
702 | |||
703 | gpiomask = snd_hda_codec_read(codec, codec->afg, 0, | ||
704 | AC_VERB_GET_GPIO_MASK, 0); | ||
705 | gpiomask |= (1 << pin); | ||
706 | |||
707 | gpiodir = snd_hda_codec_read(codec, codec->afg, 0, | ||
708 | AC_VERB_GET_GPIO_DIRECTION, 0); | ||
709 | gpiodir |= (1 << pin); | ||
710 | |||
711 | |||
712 | snd_hda_codec_write(codec, codec->afg, 0, | ||
713 | AC_VERB_SET_GPIO_MASK, gpiomask); | ||
714 | snd_hda_codec_write(codec, codec->afg, 0, | ||
715 | AC_VERB_SET_GPIO_DIRECTION, gpiodir); | ||
716 | |||
717 | msleep(1); | ||
718 | |||
719 | snd_hda_codec_write(codec, codec->afg, 0, | ||
720 | AC_VERB_SET_GPIO_DATA, gpiostate); | ||
721 | } | ||
722 | |||
723 | /* set up GPIO at initialization */ | ||
724 | static void alc885_macpro_init_hook(struct hda_codec *codec) | ||
725 | { | ||
726 | alc882_gpio_mute(codec, 0, 0); | ||
727 | alc882_gpio_mute(codec, 1, 0); | ||
728 | } | ||
729 | |||
730 | /* set up GPIO and update auto-muting at initialization */ | ||
731 | static void alc885_imac24_init_hook(struct hda_codec *codec) | ||
732 | { | ||
733 | alc885_macpro_init_hook(codec); | ||
734 | alc_hp_automute(codec); | ||
735 | } | ||
736 | |||
737 | /* 2ch mode (Speaker:front, Subwoofer:CLFE, Line:input, Headphones:front) */ | 595 | /* 2ch mode (Speaker:front, Subwoofer:CLFE, Line:input, Headphones:front) */ |
738 | static const struct hda_verb alc889A_mb31_ch2_init[] = { | 596 | static const struct hda_verb alc889A_mb31_ch2_init[] = { |
739 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP as front */ | 597 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP as front */ |
@@ -876,12 +734,10 @@ static void alc889A_mb31_unsol_event(struct hda_codec *codec, unsigned int res) | |||
876 | * configuration and preset | 734 | * configuration and preset |
877 | */ | 735 | */ |
878 | static const char * const alc882_models[ALC882_MODEL_LAST] = { | 736 | static const char * const alc882_models[ALC882_MODEL_LAST] = { |
879 | [ALC885_MACPRO] = "macpro", | ||
880 | [ALC885_MB5] = "mb5", | 737 | [ALC885_MB5] = "mb5", |
881 | [ALC885_MACMINI3] = "macmini3", | 738 | [ALC885_MACMINI3] = "macmini3", |
882 | [ALC885_MBA21] = "mba21", | 739 | [ALC885_MBA21] = "mba21", |
883 | [ALC885_MBP3] = "mbp3", | 740 | [ALC885_MBP3] = "mbp3", |
884 | [ALC885_IMAC24] = "imac24", | ||
885 | [ALC885_IMAC91] = "imac91", | 741 | [ALC885_IMAC91] = "imac91", |
886 | [ALC889A_MB31] = "mb31", | 742 | [ALC889A_MB31] = "mb31", |
887 | [ALC882_AUTO] = "auto", | 743 | [ALC882_AUTO] = "auto", |
@@ -892,16 +748,12 @@ static const struct snd_pci_quirk alc882_ssid_cfg_tbl[] = { | |||
892 | SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC885_MBP3), | 748 | SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC885_MBP3), |
893 | SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC885_MBP3), | 749 | SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC885_MBP3), |
894 | SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC885_MBP3), | 750 | SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC885_MBP3), |
895 | SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC885_MACPRO), | ||
896 | SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_IMAC24), | ||
897 | SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_IMAC24), | ||
898 | SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC885_MBP3), | 751 | SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC885_MBP3), |
899 | SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889A_MB31), | 752 | SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889A_MB31), |
900 | SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC885_MBP3), | 753 | SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC885_MBP3), |
901 | SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC885_MBA21), | 754 | SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC885_MBA21), |
902 | SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889A_MB31), | 755 | SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889A_MB31), |
903 | SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3), | 756 | SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3), |
904 | SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24), | ||
905 | SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC885_IMAC91), | 757 | SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC885_IMAC91), |
906 | SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5), | 758 | SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5), |
907 | SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC885_MB5), | 759 | SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC885_MB5), |
@@ -973,32 +825,6 @@ static const struct alc_config_preset alc882_presets[] = { | |||
973 | .setup = alc885_macmini3_setup, | 825 | .setup = alc885_macmini3_setup, |
974 | .init_hook = alc_hp_automute, | 826 | .init_hook = alc_hp_automute, |
975 | }, | 827 | }, |
976 | [ALC885_MACPRO] = { | ||
977 | .mixers = { alc882_macpro_mixer }, | ||
978 | .init_verbs = { alc882_macpro_init_verbs }, | ||
979 | .num_dacs = ARRAY_SIZE(alc882_dac_nids), | ||
980 | .dac_nids = alc882_dac_nids, | ||
981 | .dig_out_nid = ALC882_DIGOUT_NID, | ||
982 | .dig_in_nid = ALC882_DIGIN_NID, | ||
983 | .num_channel_mode = ARRAY_SIZE(alc882_ch_modes), | ||
984 | .channel_mode = alc882_ch_modes, | ||
985 | .input_mux = &alc882_capture_source, | ||
986 | .init_hook = alc885_macpro_init_hook, | ||
987 | }, | ||
988 | [ALC885_IMAC24] = { | ||
989 | .mixers = { alc885_imac24_mixer }, | ||
990 | .init_verbs = { alc885_imac24_init_verbs }, | ||
991 | .num_dacs = ARRAY_SIZE(alc882_dac_nids), | ||
992 | .dac_nids = alc882_dac_nids, | ||
993 | .dig_out_nid = ALC882_DIGOUT_NID, | ||
994 | .dig_in_nid = ALC882_DIGIN_NID, | ||
995 | .num_channel_mode = ARRAY_SIZE(alc882_ch_modes), | ||
996 | .channel_mode = alc882_ch_modes, | ||
997 | .input_mux = &alc882_capture_source, | ||
998 | .unsol_event = alc_sku_unsol_event, | ||
999 | .setup = alc885_imac24_setup, | ||
1000 | .init_hook = alc885_imac24_init_hook, | ||
1001 | }, | ||
1002 | [ALC885_IMAC91] = { | 828 | [ALC885_IMAC91] = { |
1003 | .mixers = {alc885_imac91_mixer}, | 829 | .mixers = {alc885_imac91_mixer}, |
1004 | .init_verbs = { alc885_imac91_init_verbs, | 830 | .init_verbs = { alc885_imac91_init_verbs, |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 41590e3a20f5..fb480858ec65 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4296,6 +4296,7 @@ enum { | |||
4296 | ALC882_FIXUP_ACER_ASPIRE_4930G, | 4296 | ALC882_FIXUP_ACER_ASPIRE_4930G, |
4297 | ALC882_FIXUP_ACER_ASPIRE_8930G, | 4297 | ALC882_FIXUP_ACER_ASPIRE_8930G, |
4298 | ALC882_FIXUP_ASPIRE_8930G_VERBS, | 4298 | ALC882_FIXUP_ASPIRE_8930G_VERBS, |
4299 | ALC885_FIXUP_MACPRO_GPIO, | ||
4299 | }; | 4300 | }; |
4300 | 4301 | ||
4301 | static void alc889_fixup_coef(struct hda_codec *codec, | 4302 | static void alc889_fixup_coef(struct hda_codec *codec, |
@@ -4306,6 +4307,49 @@ static void alc889_fixup_coef(struct hda_codec *codec, | |||
4306 | alc889_coef_init(codec); | 4307 | alc889_coef_init(codec); |
4307 | } | 4308 | } |
4308 | 4309 | ||
4310 | /* toggle speaker-output according to the hp-jack state */ | ||
4311 | static void alc882_gpio_mute(struct hda_codec *codec, int pin, int muted) | ||
4312 | { | ||
4313 | unsigned int gpiostate, gpiomask, gpiodir; | ||
4314 | |||
4315 | gpiostate = snd_hda_codec_read(codec, codec->afg, 0, | ||
4316 | AC_VERB_GET_GPIO_DATA, 0); | ||
4317 | |||
4318 | if (!muted) | ||
4319 | gpiostate |= (1 << pin); | ||
4320 | else | ||
4321 | gpiostate &= ~(1 << pin); | ||
4322 | |||
4323 | gpiomask = snd_hda_codec_read(codec, codec->afg, 0, | ||
4324 | AC_VERB_GET_GPIO_MASK, 0); | ||
4325 | gpiomask |= (1 << pin); | ||
4326 | |||
4327 | gpiodir = snd_hda_codec_read(codec, codec->afg, 0, | ||
4328 | AC_VERB_GET_GPIO_DIRECTION, 0); | ||
4329 | gpiodir |= (1 << pin); | ||
4330 | |||
4331 | |||
4332 | snd_hda_codec_write(codec, codec->afg, 0, | ||
4333 | AC_VERB_SET_GPIO_MASK, gpiomask); | ||
4334 | snd_hda_codec_write(codec, codec->afg, 0, | ||
4335 | AC_VERB_SET_GPIO_DIRECTION, gpiodir); | ||
4336 | |||
4337 | msleep(1); | ||
4338 | |||
4339 | snd_hda_codec_write(codec, codec->afg, 0, | ||
4340 | AC_VERB_SET_GPIO_DATA, gpiostate); | ||
4341 | } | ||
4342 | |||
4343 | /* set up GPIO at initialization */ | ||
4344 | static void alc885_fixup_macpro_gpio(struct hda_codec *codec, | ||
4345 | const struct alc_fixup *fix, int action) | ||
4346 | { | ||
4347 | if (action != ALC_FIXUP_ACT_INIT) | ||
4348 | return; | ||
4349 | alc882_gpio_mute(codec, 0, 0); | ||
4350 | alc882_gpio_mute(codec, 1, 0); | ||
4351 | } | ||
4352 | |||
4309 | static const struct alc_fixup alc882_fixups[] = { | 4353 | static const struct alc_fixup alc882_fixups[] = { |
4310 | [ALC882_FIXUP_ABIT_AW9D_MAX] = { | 4354 | [ALC882_FIXUP_ABIT_AW9D_MAX] = { |
4311 | .type = ALC_FIXUP_PINS, | 4355 | .type = ALC_FIXUP_PINS, |
@@ -4449,6 +4493,10 @@ static const struct alc_fixup alc882_fixups[] = { | |||
4449 | { } | 4493 | { } |
4450 | } | 4494 | } |
4451 | }, | 4495 | }, |
4496 | [ALC885_FIXUP_MACPRO_GPIO] = { | ||
4497 | .type = ALC_FIXUP_FUNC, | ||
4498 | .v.func = alc885_fixup_macpro_gpio, | ||
4499 | }, | ||
4452 | }; | 4500 | }; |
4453 | 4501 | ||
4454 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { | 4502 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
@@ -4479,7 +4527,14 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
4479 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), | 4527 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), |
4480 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), | 4528 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), |
4481 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), | 4529 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), |
4482 | SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), /* codec SSID */ | 4530 | |
4531 | /* All Apple entries are in codec SSIDs */ | ||
4532 | SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC885_FIXUP_MACPRO_GPIO), | ||
4533 | SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_FIXUP_MACPRO_GPIO), | ||
4534 | SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_FIXUP_MACPRO_GPIO), | ||
4535 | SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), | ||
4536 | SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO), | ||
4537 | |||
4483 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD), | 4538 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD), |
4484 | SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), | 4539 | SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), |
4485 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), | 4540 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), |