aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt1
-rw-r--r--sound/pci/hda/hda_codec.c16
-rw-r--r--sound/pci/hda/patch_sigmatel.c21
3 files changed, 35 insertions, 3 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 9268925f8e4..a035eb64042 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -972,6 +972,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
972 dell-m25 Dell Inspiron E1505n 972 dell-m25 Dell Inspiron E1505n
973 dell-m26 Dell Inspiron 1501 973 dell-m26 Dell Inspiron 1501
974 dell-m27 Dell Inspiron E1705/9400 974 dell-m27 Dell Inspiron E1705/9400
975 gateway Gateway laptops with EAPD control
975 976
976 STAC9205/9254 977 STAC9205/9254
977 ref Reference board 978 ref Reference board
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 239cdd855df..187533e477c 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1630,10 +1630,24 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg,
1630 1630
1631 nid = codec->start_nid; 1631 nid = codec->start_nid;
1632 for (i = 0; i < codec->num_nodes; i++, nid++) { 1632 for (i = 0; i < codec->num_nodes; i++, nid++) {
1633 if (get_wcaps(codec, nid) & AC_WCAP_POWER) 1633 if (get_wcaps(codec, nid) & AC_WCAP_POWER) {
1634 unsigned int pincap;
1635 /*
1636 * don't power down the widget if it controls eapd
1637 * and EAPD_BTLENABLE is set.
1638 */
1639 pincap = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP);
1640 if (pincap & AC_PINCAP_EAPD) {
1641 int eapd = snd_hda_codec_read(codec, nid,
1642 0, AC_VERB_GET_EAPD_BTLENABLE, 0);
1643 eapd &= 0x02;
1644 if (power_state == AC_PWRST_D3 && eapd)
1645 continue;
1646 }
1634 snd_hda_codec_write(codec, nid, 0, 1647 snd_hda_codec_write(codec, nid, 0,
1635 AC_VERB_SET_POWER_STATE, 1648 AC_VERB_SET_POWER_STATE,
1636 power_state); 1649 power_state);
1650 }
1637 } 1651 }
1638 1652
1639 if (power_state == AC_PWRST_D0) { 1653 if (power_state == AC_PWRST_D0) {
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 27360d278bc..fe91b9b46b6 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);