diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-02-16 05:51:19 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-02-16 05:51:19 -0500 |
commit | ca8f04247eaaec554528279686a514c6ce087bb9 (patch) | |
tree | c1dd665d14e6866de6ba888b7c28db3409a53f8e /sound/pci | |
parent | 1565cc358585be40608b46f18f7ac431a1aae2bc (diff) |
ALSA: hda/realtek - Add the fixup codes for ALC260 model=will
The model=will for ALC260 requires the pin 0x0f to be a headphone and
some special verbs for the COEF to turn on the amp. Now added these as
fixup entries and removed the static model quirk.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/alc260_quirks.c | 43 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 27 |
2 files changed, 24 insertions, 46 deletions
diff --git a/sound/pci/hda/alc260_quirks.c b/sound/pci/hda/alc260_quirks.c index 3b5170b9700f..79aaae8e0d9c 100644 --- a/sound/pci/hda/alc260_quirks.c +++ b/sound/pci/hda/alc260_quirks.c | |||
@@ -9,7 +9,6 @@ enum { | |||
9 | ALC260_BASIC, | 9 | ALC260_BASIC, |
10 | ALC260_FUJITSU_S702X, | 10 | ALC260_FUJITSU_S702X, |
11 | ALC260_ACER, | 11 | ALC260_ACER, |
12 | ALC260_WILL, | ||
13 | ALC260_REPLACER_672V, | 12 | ALC260_REPLACER_672V, |
14 | ALC260_FAVORIT100, | 13 | ALC260_FAVORIT100, |
15 | #ifdef CONFIG_SND_DEBUG | 14 | #ifdef CONFIG_SND_DEBUG |
@@ -236,23 +235,6 @@ static const struct snd_kcontrol_new alc260_favorit100_mixer[] = { | |||
236 | { } /* end */ | 235 | { } /* end */ |
237 | }; | 236 | }; |
238 | 237 | ||
239 | /* Packard bell V7900 ALC260 pin usage: HP = 0x0f, Mic jack = 0x12, | ||
240 | * Line In jack = 0x14, CD audio = 0x16, pc beep = 0x17. | ||
241 | */ | ||
242 | static const struct snd_kcontrol_new alc260_will_mixer[] = { | ||
243 | HDA_CODEC_VOLUME("Master Playback Volume", 0x08, 0x0, HDA_OUTPUT), | ||
244 | HDA_BIND_MUTE("Master Playback Switch", 0x08, 0x2, HDA_INPUT), | ||
245 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x07, 0x0, HDA_INPUT), | ||
246 | HDA_CODEC_MUTE("Mic Playback Switch", 0x07, 0x0, HDA_INPUT), | ||
247 | ALC_PIN_MODE("Mic Jack Mode", 0x12, ALC_PIN_DIR_IN), | ||
248 | HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT), | ||
249 | HDA_CODEC_MUTE("Line Playback Switch", 0x07, 0x02, HDA_INPUT), | ||
250 | ALC_PIN_MODE("Line Jack Mode", 0x14, ALC_PIN_DIR_INOUT), | ||
251 | HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), | ||
252 | HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT), | ||
253 | { } /* end */ | ||
254 | }; | ||
255 | |||
256 | /* Replacer 672V ALC260 pin usage: Mic jack = 0x12, | 238 | /* Replacer 672V ALC260 pin usage: Mic jack = 0x12, |
257 | * Line In jack = 0x14, ATAPI Mic = 0x13, speaker = 0x0f. | 239 | * Line In jack = 0x14, ATAPI Mic = 0x13, speaker = 0x0f. |
258 | */ | 240 | */ |
@@ -590,16 +572,6 @@ static const struct hda_verb alc260_favorit100_init_verbs[] = { | |||
590 | { } | 572 | { } |
591 | }; | 573 | }; |
592 | 574 | ||
593 | static const struct hda_verb alc260_will_verbs[] = { | ||
594 | {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
595 | {0x0b, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
596 | {0x0d, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
597 | {0x0f, AC_VERB_SET_EAPD_BTLENABLE, 0x02}, | ||
598 | {0x1a, AC_VERB_SET_COEF_INDEX, 0x07}, | ||
599 | {0x1a, AC_VERB_SET_PROC_COEF, 0x3040}, | ||
600 | {} | ||
601 | }; | ||
602 | |||
603 | static const struct hda_verb alc260_replacer_672v_verbs[] = { | 575 | static const struct hda_verb alc260_replacer_672v_verbs[] = { |
604 | {0x0f, AC_VERB_SET_EAPD_BTLENABLE, 0x02}, | 576 | {0x0f, AC_VERB_SET_EAPD_BTLENABLE, 0x02}, |
605 | {0x1a, AC_VERB_SET_COEF_INDEX, 0x07}, | 577 | {0x1a, AC_VERB_SET_COEF_INDEX, 0x07}, |
@@ -851,7 +823,6 @@ static const char * const alc260_models[ALC260_MODEL_LAST] = { | |||
851 | [ALC260_BASIC] = "basic", | 823 | [ALC260_BASIC] = "basic", |
852 | [ALC260_FUJITSU_S702X] = "fujitsu", | 824 | [ALC260_FUJITSU_S702X] = "fujitsu", |
853 | [ALC260_ACER] = "acer", | 825 | [ALC260_ACER] = "acer", |
854 | [ALC260_WILL] = "will", | ||
855 | [ALC260_REPLACER_672V] = "replacer", | 826 | [ALC260_REPLACER_672V] = "replacer", |
856 | [ALC260_FAVORIT100] = "favorit100", | 827 | [ALC260_FAVORIT100] = "favorit100", |
857 | #ifdef CONFIG_SND_DEBUG | 828 | #ifdef CONFIG_SND_DEBUG |
@@ -862,7 +833,6 @@ static const char * const alc260_models[ALC260_MODEL_LAST] = { | |||
862 | 833 | ||
863 | static const struct snd_pci_quirk alc260_cfg_tbl[] = { | 834 | static const struct snd_pci_quirk alc260_cfg_tbl[] = { |
864 | SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_ACER), | 835 | SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_ACER), |
865 | SND_PCI_QUIRK(0x1025, 0x007f, "Acer", ALC260_WILL), | ||
866 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), | 836 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), |
867 | SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100), | 837 | SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100), |
868 | SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_BASIC), | 838 | SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_BASIC), |
@@ -871,7 +841,6 @@ static const struct snd_pci_quirk alc260_cfg_tbl[] = { | |||
871 | SND_PCI_QUIRK(0x10cf, 0x1326, "Fujitsu S702X", ALC260_FUJITSU_S702X), | 841 | SND_PCI_QUIRK(0x10cf, 0x1326, "Fujitsu S702X", ALC260_FUJITSU_S702X), |
872 | SND_PCI_QUIRK(0x152d, 0x0729, "CTL U553W", ALC260_BASIC), | 842 | SND_PCI_QUIRK(0x152d, 0x0729, "CTL U553W", ALC260_BASIC), |
873 | SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_REPLACER_672V), | 843 | SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_REPLACER_672V), |
874 | SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_WILL), | ||
875 | {} | 844 | {} |
876 | }; | 845 | }; |
877 | 846 | ||
@@ -924,18 +893,6 @@ static const struct alc_config_preset alc260_presets[] = { | |||
924 | .num_mux_defs = ARRAY_SIZE(alc260_favorit100_capture_sources), | 893 | .num_mux_defs = ARRAY_SIZE(alc260_favorit100_capture_sources), |
925 | .input_mux = alc260_favorit100_capture_sources, | 894 | .input_mux = alc260_favorit100_capture_sources, |
926 | }, | 895 | }, |
927 | [ALC260_WILL] = { | ||
928 | .mixers = { alc260_will_mixer }, | ||
929 | .init_verbs = { alc260_init_verbs, alc260_will_verbs }, | ||
930 | .num_dacs = ARRAY_SIZE(alc260_dac_nids), | ||
931 | .dac_nids = alc260_dac_nids, | ||
932 | .num_adc_nids = ARRAY_SIZE(alc260_adc_nids), | ||
933 | .adc_nids = alc260_adc_nids, | ||
934 | .dig_out_nid = ALC260_DIGOUT_NID, | ||
935 | .num_channel_mode = ARRAY_SIZE(alc260_modes), | ||
936 | .channel_mode = alc260_modes, | ||
937 | .input_mux = &alc260_capture_source, | ||
938 | }, | ||
939 | [ALC260_REPLACER_672V] = { | 896 | [ALC260_REPLACER_672V] = { |
940 | .mixers = { alc260_replacer_672v_mixer }, | 897 | .mixers = { alc260_replacer_672v_mixer }, |
941 | .init_verbs = { alc260_init_verbs, alc260_replacer_672v_verbs }, | 898 | .init_verbs = { alc260_init_verbs, alc260_replacer_672v_verbs }, |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 30ef877e6284..f5f371036234 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4207,21 +4207,42 @@ static const struct hda_amp_list alc260_loopbacks[] = { | |||
4207 | * Pin config fixes | 4207 | * Pin config fixes |
4208 | */ | 4208 | */ |
4209 | enum { | 4209 | enum { |
4210 | PINFIX_HP_DC5750, | 4210 | ALC260_FIXUP_HP_DC5750, |
4211 | ALC260_FIXUP_HP_PIN_0F, | ||
4212 | ALC260_FIXUP_COEF, | ||
4211 | }; | 4213 | }; |
4212 | 4214 | ||
4213 | static const struct alc_fixup alc260_fixups[] = { | 4215 | static const struct alc_fixup alc260_fixups[] = { |
4214 | [PINFIX_HP_DC5750] = { | 4216 | [ALC260_FIXUP_HP_DC5750] = { |
4215 | .type = ALC_FIXUP_PINS, | 4217 | .type = ALC_FIXUP_PINS, |
4216 | .v.pins = (const struct alc_pincfg[]) { | 4218 | .v.pins = (const struct alc_pincfg[]) { |
4217 | { 0x11, 0x90130110 }, /* speaker */ | 4219 | { 0x11, 0x90130110 }, /* speaker */ |
4218 | { } | 4220 | { } |
4219 | } | 4221 | } |
4220 | }, | 4222 | }, |
4223 | [ALC260_FIXUP_HP_PIN_0F] = { | ||
4224 | .type = ALC_FIXUP_PINS, | ||
4225 | .v.pins = (const struct alc_pincfg[]) { | ||
4226 | { 0x0f, 0x01214000 }, /* HP */ | ||
4227 | { } | ||
4228 | } | ||
4229 | }, | ||
4230 | [ALC260_FIXUP_COEF] = { | ||
4231 | .type = ALC_FIXUP_VERBS, | ||
4232 | .v.verbs = (const struct hda_verb[]) { | ||
4233 | { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, | ||
4234 | { 0x20, AC_VERB_SET_PROC_COEF, 0x3040 }, | ||
4235 | { } | ||
4236 | }, | ||
4237 | .chained = true, | ||
4238 | .chain_id = ALC260_FIXUP_HP_PIN_0F, | ||
4239 | }, | ||
4221 | }; | 4240 | }; |
4222 | 4241 | ||
4223 | static const struct snd_pci_quirk alc260_fixup_tbl[] = { | 4242 | static const struct snd_pci_quirk alc260_fixup_tbl[] = { |
4224 | SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", PINFIX_HP_DC5750), | 4243 | SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF), |
4244 | SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), | ||
4245 | SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF), | ||
4225 | {} | 4246 | {} |
4226 | }; | 4247 | }; |
4227 | 4248 | ||