[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>
This commit is contained in:
parent
675b4e5981
commit
505cb341ef
@ -786,13 +786,8 @@ static int stac92xx_auto_create_hp_ctls(struct hda_codec *codec, struct auto_pin
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
wid_caps = get_wcaps(codec, pin);
|
wid_caps = get_wcaps(codec, pin);
|
||||||
if (wid_caps & AC_WCAP_UNSOL_CAP) {
|
if (wid_caps & AC_WCAP_UNSOL_CAP)
|
||||||
/* Enable unsolicited responses on the HP widget */
|
|
||||||
snd_hda_codec_write(codec, pin, 0,
|
|
||||||
AC_VERB_SET_UNSOLICITED_ENABLE,
|
|
||||||
STAC_UNSOL_ENABLE);
|
|
||||||
spec->hp_detect = 1;
|
spec->hp_detect = 1;
|
||||||
}
|
|
||||||
|
|
||||||
nid = snd_hda_codec_read(codec, pin, 0, AC_VERB_GET_CONNECT_LIST, 0) & 0xff;
|
nid = snd_hda_codec_read(codec, pin, 0, AC_VERB_GET_CONNECT_LIST, 0) & 0xff;
|
||||||
for (i = 0; i < cfg->line_outs; i++) {
|
for (i = 0; i < cfg->line_outs; i++) {
|
||||||
@ -915,13 +910,8 @@ static int stac9200_auto_create_hp_ctls(struct hda_codec *codec,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
wid_caps = get_wcaps(codec, pin);
|
wid_caps = get_wcaps(codec, pin);
|
||||||
if (wid_caps & AC_WCAP_UNSOL_CAP) {
|
if (wid_caps & AC_WCAP_UNSOL_CAP)
|
||||||
/* Enable unsolicited responses on the HP widget */
|
|
||||||
snd_hda_codec_write(codec, pin, 0,
|
|
||||||
AC_VERB_SET_UNSOLICITED_ENABLE,
|
|
||||||
STAC_UNSOL_ENABLE);
|
|
||||||
spec->hp_detect = 1;
|
spec->hp_detect = 1;
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -963,6 +953,10 @@ static int stac92xx_init(struct hda_codec *codec)
|
|||||||
|
|
||||||
/* set up pins */
|
/* set up pins */
|
||||||
if (spec->hp_detect) {
|
if (spec->hp_detect) {
|
||||||
|
/* Enable unsolicited responses on the HP widget */
|
||||||
|
snd_hda_codec_write(codec, cfg->hp_pin, 0,
|
||||||
|
AC_VERB_SET_UNSOLICITED_ENABLE,
|
||||||
|
STAC_UNSOL_ENABLE);
|
||||||
/* fake event to set up pins */
|
/* fake event to set up pins */
|
||||||
codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26);
|
codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user