aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-10-10 04:04:26 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 10:51:08 -0400
commit1194b5b70a0a000a4ace54d94d8df5cc3ec6e3e0 (patch)
tree481421e3e06b1f4fb68df6f5d394fbcc796199da /sound/pci/hda/patch_sigmatel.c
parent5513b0c58222d21b704cf352c554d9ab86c3fd97 (diff)
[ALSA] hda-codec - Fix Gateway laptops with STAC9200
Fix the output of Gateway laptops with STAC9200 codec chip. They require the EAPD control for some pins. These pins shouldn't be powered down. To enable EAPD control, a new model 'gateway' was added to STAC9200. The known PCI SSIDs are included in the quirk list. The fix was originally suggested by Brian Hinz, in ALSA bug#2948. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 27360d278bcf..fe91b9b46b61 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -49,6 +49,7 @@ enum {
49 STAC_9200_DELL_M25, 49 STAC_9200_DELL_M25,
50 STAC_9200_DELL_M26, 50 STAC_9200_DELL_M26,
51 STAC_9200_DELL_M27, 51 STAC_9200_DELL_M27,
52 STAC_9200_GATEWAY,
52 STAC_9200_MODELS 53 STAC_9200_MODELS
53}; 54};
54 55
@@ -378,6 +379,13 @@ static struct hda_verb stac9200_core_init[] = {
378 {} 379 {}
379}; 380};
380 381
382static struct hda_verb stac9200_eapd_init[] = {
383 /* set dac0mux for dac converter */
384 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
385 {0x08, AC_VERB_SET_EAPD_BTLENABLE, 0x02},
386 {}
387};
388
381static struct hda_verb stac925x_core_init[] = { 389static struct hda_verb stac925x_core_init[] = {
382 /* set dac0mux for dac converter */ 390 /* set dac0mux for dac converter */
383 { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, 391 { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00},
@@ -693,6 +701,7 @@ static const char *stac9200_models[STAC_9200_MODELS] = {
693 [STAC_9200_DELL_M25] = "dell-m25", 701 [STAC_9200_DELL_M25] = "dell-m25",
694 [STAC_9200_DELL_M26] = "dell-m26", 702 [STAC_9200_DELL_M26] = "dell-m26",
695 [STAC_9200_DELL_M27] = "dell-m27", 703 [STAC_9200_DELL_M27] = "dell-m27",
704 [STAC_9200_GATEWAY] = "gateway",
696}; 705};
697 706
698static struct snd_pci_quirk stac9200_cfg_tbl[] = { 707static struct snd_pci_quirk stac9200_cfg_tbl[] = {
@@ -760,7 +769,12 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = {
760 "unknown Dell", STAC_9200_DELL_M26), 769 "unknown Dell", STAC_9200_DELL_M26),
761 /* Panasonic */ 770 /* Panasonic */
762 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-74", STAC_REF), 771 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-74", STAC_REF),
763 772 /* Gateway machines needs EAPD to be set on resume */
773 SND_PCI_QUIRK(0x107b, 0x0205, "Gateway S-7110M", STAC_9200_GATEWAY),
774 SND_PCI_QUIRK(0x107b, 0x0317, "Gateway MT3423, MX341*",
775 STAC_9200_GATEWAY),
776 SND_PCI_QUIRK(0x107b, 0x0318, "Gateway ML3019, MT3707",
777 STAC_9200_GATEWAY),
764 {} /* terminator */ 778 {} /* terminator */
765}; 779};
766 780
@@ -2492,7 +2506,10 @@ static int patch_stac9200(struct hda_codec *codec)
2492 spec->num_dmics = 0; 2506 spec->num_dmics = 0;
2493 spec->num_adcs = 1; 2507 spec->num_adcs = 1;
2494 2508
2495 spec->init = stac9200_core_init; 2509 if (spec->board_config == STAC_9200_GATEWAY)
2510 spec->init = stac9200_eapd_init;
2511 else
2512 spec->init = stac9200_core_init;
2496 spec->mixer = stac9200_mixer; 2513 spec->mixer = stac9200_mixer;
2497 2514
2498 err = stac9200_parse_auto_config(codec); 2515 err = stac9200_parse_auto_config(codec);