diff options
-rw-r--r-- | 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 98144f93dff9..39187828503d 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 | ||
2069 | static int stac92xx_init(struct hda_codec *codec) | 2069 | static 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 |
2237 | static int stac92xx_resume(struct hda_codec *codec) | 2237 | static 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 |