aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-09-03 03:36:36 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:59:40 -0400
commitdc81bed127a93e20d2100624273a27369738ffc7 (patch)
tree6461674c9cdc0cc34d8bcb3cb4ac340e87c3a605 /sound/pci/hda/patch_sigmatel.c
parent3a7788b751c488c11cdfa8e29f0bc3d8648142e6 (diff)
[ALSA] hda-codec - Fix wrong pin-setup at resume of STAC codecs
The resume procedure for STAC codecs overrides the cached values and results in the wrong (reset) PIN state. The patch gets rid of the overriding part and simplifies the resume. 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.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 98144f93dff..39187828503 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -2061,9 +2061,9 @@ static void enable_pin_detect(struct hda_codec *codec, hda_nid_t nid,
2061 unsigned int event) 2061 unsigned int event)
2062{ 2062{
2063 if (get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP) 2063 if (get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP)
2064 snd_hda_codec_write(codec, nid, 0, 2064 snd_hda_codec_write_cache(codec, nid, 0,
2065 AC_VERB_SET_UNSOLICITED_ENABLE, 2065 AC_VERB_SET_UNSOLICITED_ENABLE,
2066 (AC_USRSP_EN | event)); 2066 (AC_USRSP_EN | event));
2067} 2067}
2068 2068
2069static int stac92xx_init(struct hda_codec *codec) 2069static int stac92xx_init(struct hda_codec *codec)
@@ -2236,10 +2236,19 @@ static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res)
2236#ifdef SND_HDA_NEEDS_RESUME 2236#ifdef SND_HDA_NEEDS_RESUME
2237static int stac92xx_resume(struct hda_codec *codec) 2237static int stac92xx_resume(struct hda_codec *codec)
2238{ 2238{
2239 struct sigmatel_spec *spec = codec->spec;
2240
2239 stac92xx_set_config_regs(codec); 2241 stac92xx_set_config_regs(codec);
2240 stac92xx_init(codec); 2242 snd_hda_sequence_write(codec, spec->init);
2243 if (spec->gpio_mute) {
2244 stac922x_gpio_mute(codec, 0, 0);
2245 stac922x_gpio_mute(codec, 1, 0);
2246 }
2241 snd_hda_codec_resume_amp(codec); 2247 snd_hda_codec_resume_amp(codec);
2242 snd_hda_codec_resume_cache(codec); 2248 snd_hda_codec_resume_cache(codec);
2249 /* invoke unsolicited event to reset the HP state */
2250 if (spec->hp_detect)
2251 codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26);
2243 return 0; 2252 return 0;
2244} 2253}
2245#endif 2254#endif