aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-11-07 06:23:55 -0500
committerTakashi Iwai <tiwai@suse.de>2011-11-08 02:59:34 -0500
commitea4e7af1221237e7173ede198a817097d99e084b (patch)
treed4d569f0ad2d6d12470683eeefd2bd81cfab1c76 /sound/pci
parentdccc1810f41b42773a2e359907f05a7fd10910bd (diff)
ALSA: hda/realtek - Convert alc262 model=tyan to a fixup-list
Use the auto-parser for ALC262 model=tyan with a pin-config fix-up and drop the static configuration. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/alc262_quirks.c59
-rw-r--r--sound/pci/hda/patch_realtek.c21
2 files changed, 15 insertions, 65 deletions
diff --git a/sound/pci/hda/alc262_quirks.c b/sound/pci/hda/alc262_quirks.c
index 7894b2b5aacf..e53f49025f8b 100644
--- a/sound/pci/hda/alc262_quirks.c
+++ b/sound/pci/hda/alc262_quirks.c
@@ -17,7 +17,6 @@ enum {
17 ALC262_NEC, 17 ALC262_NEC,
18 ALC262_TOSHIBA_S06, 18 ALC262_TOSHIBA_S06,
19 ALC262_TOSHIBA_RX1, 19 ALC262_TOSHIBA_RX1,
20 ALC262_TYAN,
21 ALC262_MODEL_LAST /* last tag */ 20 ALC262_MODEL_LAST /* last tag */
22}; 21};
23 22
@@ -177,48 +176,6 @@ static const struct snd_kcontrol_new alc262_benq_t31_mixer[] = {
177 { } /* end */ 176 { } /* end */
178}; 177};
179 178
180static const struct snd_kcontrol_new alc262_tyan_mixer[] = {
181 HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
182 HDA_BIND_MUTE("Master Playback Switch", 0x0c, 2, HDA_INPUT),
183 HDA_CODEC_VOLUME("Aux Playback Volume", 0x0b, 0x06, HDA_INPUT),
184 HDA_CODEC_MUTE("Aux Playback Switch", 0x0b, 0x06, HDA_INPUT),
185 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
186 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
187 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
188 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
189 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT),
190 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT),
191 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT),
192 HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT),
193 { } /* end */
194};
195
196static const struct hda_verb alc262_tyan_verbs[] = {
197 /* Headphone automute */
198 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
199 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
200 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
201
202 /* P11 AUX_IN, white 4-pin connector */
203 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
204 {0x14, AC_VERB_SET_CONFIG_DEFAULT_BYTES_1, 0xe1},
205 {0x14, AC_VERB_SET_CONFIG_DEFAULT_BYTES_2, 0x93},
206 {0x14, AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0x19},
207
208 {}
209};
210
211/* unsolicited event for HP jack sensing */
212static void alc262_tyan_setup(struct hda_codec *codec)
213{
214 struct alc_spec *spec = codec->spec;
215
216 spec->autocfg.hp_pins[0] = 0x1b;
217 spec->autocfg.speaker_pins[0] = 0x15;
218 alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP);
219}
220
221
222#define alc262_capture_mixer alc882_capture_mixer 179#define alc262_capture_mixer alc882_capture_mixer
223#define alc262_capture_alt_mixer alc882_capture_alt_mixer 180#define alc262_capture_alt_mixer alc882_capture_alt_mixer
224 181
@@ -686,7 +643,6 @@ static const char * const alc262_models[ALC262_MODEL_LAST] = {
686 [ALC262_ULTRA] = "ultra", 643 [ALC262_ULTRA] = "ultra",
687 [ALC262_LENOVO_3000] = "lenovo-3000", 644 [ALC262_LENOVO_3000] = "lenovo-3000",
688 [ALC262_NEC] = "nec", 645 [ALC262_NEC] = "nec",
689 [ALC262_TYAN] = "tyan",
690 [ALC262_AUTO] = "auto", 646 [ALC262_AUTO] = "auto",
691}; 647};
692 648
@@ -698,7 +654,6 @@ static const struct snd_pci_quirk alc262_cfg_tbl[] = {
698 SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06), 654 SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06),
699 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), 655 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU),
700 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), 656 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU),
701 SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_TYAN),
702 SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc032, "Samsung Q1", 657 SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc032, "Samsung Q1",
703 ALC262_ULTRA), 658 ALC262_ULTRA),
704 SND_PCI_QUIRK(0x144d, 0xc510, "Samsung Q45", ALC262_HIPPO), 659 SND_PCI_QUIRK(0x144d, 0xc510, "Samsung Q45", ALC262_HIPPO),
@@ -857,19 +812,5 @@ static const struct alc_config_preset alc262_presets[] = {
857 .setup = alc262_hippo_setup, 812 .setup = alc262_hippo_setup,
858 .init_hook = alc_inithook, 813 .init_hook = alc_inithook,
859 }, 814 },
860 [ALC262_TYAN] = {
861 .mixers = { alc262_tyan_mixer },
862 .init_verbs = { alc262_init_verbs, alc262_tyan_verbs},
863 .num_dacs = ARRAY_SIZE(alc262_dac_nids),
864 .dac_nids = alc262_dac_nids,
865 .hp_nid = 0x02,
866 .dig_out_nid = ALC262_DIGOUT_NID,
867 .num_channel_mode = ARRAY_SIZE(alc262_modes),
868 .channel_mode = alc262_modes,
869 .input_mux = &alc262_capture_source,
870 .unsol_event = alc_sku_unsol_event,
871 .setup = alc262_tyan_setup,
872 .init_hook = alc_hp_automute,
873 },
874}; 815};
875 816
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 308bb575bc06..013a760e9955 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4339,12 +4339,13 @@ static int alc262_parse_auto_config(struct hda_codec *codec)
4339 * Pin config fixes 4339 * Pin config fixes
4340 */ 4340 */
4341enum { 4341enum {
4342 PINFIX_FSC_H270, 4342 ALC262_FIXUP_FSC_H270,
4343 PINFIX_HP_Z200, 4343 ALC262_FIXUP_HP_Z200,
4344 ALC262_FIXUP_TYAN,
4344}; 4345};
4345 4346
4346static const struct alc_fixup alc262_fixups[] = { 4347static const struct alc_fixup alc262_fixups[] = {
4347 [PINFIX_FSC_H270] = { 4348 [ALC262_FIXUP_FSC_H270] = {
4348 .type = ALC_FIXUP_PINS, 4349 .type = ALC_FIXUP_PINS,
4349 .v.pins = (const struct alc_pincfg[]) { 4350 .v.pins = (const struct alc_pincfg[]) {
4350 { 0x14, 0x99130110 }, /* speaker */ 4351 { 0x14, 0x99130110 }, /* speaker */
@@ -4353,18 +4354,26 @@ static const struct alc_fixup alc262_fixups[] = {
4353 { } 4354 { }
4354 } 4355 }
4355 }, 4356 },
4356 [PINFIX_HP_Z200] = { 4357 [ALC262_FIXUP_HP_Z200] = {
4357 .type = ALC_FIXUP_PINS, 4358 .type = ALC_FIXUP_PINS,
4358 .v.pins = (const struct alc_pincfg[]) { 4359 .v.pins = (const struct alc_pincfg[]) {
4359 { 0x16, 0x99130120 }, /* internal speaker */ 4360 { 0x16, 0x99130120 }, /* internal speaker */
4360 { } 4361 { }
4361 } 4362 }
4362 }, 4363 },
4364 [ALC262_FIXUP_TYAN] = {
4365 .type = ALC_FIXUP_PINS,
4366 .v.pins = (const struct alc_pincfg[]) {
4367 { 0x14, 0x1993e1f0 }, /* int AUX */
4368 { }
4369 }
4370 },
4363}; 4371};
4364 4372
4365static const struct snd_pci_quirk alc262_fixup_tbl[] = { 4373static const struct snd_pci_quirk alc262_fixup_tbl[] = {
4366 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", PINFIX_HP_Z200), 4374 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200),
4367 SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", PINFIX_FSC_H270), 4375 SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_FIXUP_TYAN),
4376 SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", ALC262_FIXUP_FSC_H270),
4368 {} 4377 {}
4369}; 4378};
4370 4379