aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-03-27 05:51:52 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-31 10:58:57 -0500
commit505cb341ef39c0e75e074d49988a044b66fd4f99 (patch)
treefdf148186e01e9ad259b2ad2dfd38d8435befaa1
parent675b4e5981941be5e826ada99b86e65e517b84ce (diff)
[ALSA] hda-codec - Fix unsol event initialization at resume of stac92xx
Fix the re-initialization of unsolicited events at resume of stac92xx codecs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_sigmatel.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index e5fdb64eb02c..abe9493f0a2c 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -786,13 +786,8 @@ static int stac92xx_auto_create_hp_ctls(struct hda_codec *codec, struct auto_pin
786 return 0; 786 return 0;
787 787
788 wid_caps = get_wcaps(codec, pin); 788 wid_caps = get_wcaps(codec, pin);
789 if (wid_caps & AC_WCAP_UNSOL_CAP) { 789 if (wid_caps & AC_WCAP_UNSOL_CAP)
790 /* Enable unsolicited responses on the HP widget */
791 snd_hda_codec_write(codec, pin, 0,
792 AC_VERB_SET_UNSOLICITED_ENABLE,
793 STAC_UNSOL_ENABLE);
794 spec->hp_detect = 1; 790 spec->hp_detect = 1;
795 }
796 791
797 nid = snd_hda_codec_read(codec, pin, 0, AC_VERB_GET_CONNECT_LIST, 0) & 0xff; 792 nid = snd_hda_codec_read(codec, pin, 0, AC_VERB_GET_CONNECT_LIST, 0) & 0xff;
798 for (i = 0; i < cfg->line_outs; i++) { 793 for (i = 0; i < cfg->line_outs; i++) {
@@ -915,13 +910,8 @@ static int stac9200_auto_create_hp_ctls(struct hda_codec *codec,
915 return 0; 910 return 0;
916 911
917 wid_caps = get_wcaps(codec, pin); 912 wid_caps = get_wcaps(codec, pin);
918 if (wid_caps & AC_WCAP_UNSOL_CAP) { 913 if (wid_caps & AC_WCAP_UNSOL_CAP)
919 /* Enable unsolicited responses on the HP widget */
920 snd_hda_codec_write(codec, pin, 0,
921 AC_VERB_SET_UNSOLICITED_ENABLE,
922 STAC_UNSOL_ENABLE);
923 spec->hp_detect = 1; 914 spec->hp_detect = 1;
924 }
925 915
926 return 0; 916 return 0;
927} 917}
@@ -963,6 +953,10 @@ static int stac92xx_init(struct hda_codec *codec)
963 953
964 /* set up pins */ 954 /* set up pins */
965 if (spec->hp_detect) { 955 if (spec->hp_detect) {
956 /* Enable unsolicited responses on the HP widget */
957 snd_hda_codec_write(codec, cfg->hp_pin, 0,
958 AC_VERB_SET_UNSOLICITED_ENABLE,
959 STAC_UNSOL_ENABLE);
966 /* fake event to set up pins */ 960 /* fake event to set up pins */
967 codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26); 961 codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26);
968 } else { 962 } else {