Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dc81bed127a93e20d2100624273a27369738ffc7
Commit:     dc81bed127a93e20d2100624273a27369738ffc7
Parent:     3a7788b751c488c11cdfa8e29f0bc3d8648142e6
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Mon Sep 3 09:36:36 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 15:59:40 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/hda/patch_sigmatel.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 98144f9..3918782 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,
                              unsigned int event)
 {
        if (get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP)
-               snd_hda_codec_write(codec, nid, 0,
-                                   AC_VERB_SET_UNSOLICITED_ENABLE,
-                                   (AC_USRSP_EN | event));
+               snd_hda_codec_write_cache(codec, nid, 0,
+                                         AC_VERB_SET_UNSOLICITED_ENABLE,
+                                         (AC_USRSP_EN | event));
 }
 
 static int stac92xx_init(struct hda_codec *codec)
@@ -2236,10 +2236,19 @@ static void stac92xx_unsol_event(struct hda_codec 
*codec, unsigned int res)
 #ifdef SND_HDA_NEEDS_RESUME
 static int stac92xx_resume(struct hda_codec *codec)
 {
+       struct sigmatel_spec *spec = codec->spec;
+
        stac92xx_set_config_regs(codec);
-       stac92xx_init(codec);
+       snd_hda_sequence_write(codec, spec->init);
+       if (spec->gpio_mute) {
+               stac922x_gpio_mute(codec, 0, 0);
+               stac922x_gpio_mute(codec, 1, 0);
+       }
        snd_hda_codec_resume_amp(codec);
        snd_hda_codec_resume_cache(codec);
+       /* invoke unsolicited event to reset the HP state */
+       if (spec->hp_detect)
+               codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26);
        return 0;
 }
 #endif
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to