提交 4012ade9 编写于 作者: T Takashi Iwai

ALSA: hda - Restore GPIO1 properly at resume with AD1984A

The commit 099db17e introduced a
regression at suspend/resume where the GPIO1 bit isn't properly
restored, thus the speaker output gets muted initially after resume.

The fix is simple, use the cached write for storing GPIO data.

Reference: Novell bnc#522764
	https://bugzilla.novell.com/show_bug.cgi?id=522764Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 86de7416
...@@ -3742,7 +3742,7 @@ static int ad1884a_mobile_master_sw_put(struct snd_kcontrol *kcontrol, ...@@ -3742,7 +3742,7 @@ static int ad1884a_mobile_master_sw_put(struct snd_kcontrol *kcontrol,
int mute = (!ucontrol->value.integer.value[0] && int mute = (!ucontrol->value.integer.value[0] &&
!ucontrol->value.integer.value[1]); !ucontrol->value.integer.value[1]);
/* toggle GPIO1 according to the mute state */ /* toggle GPIO1 according to the mute state */
snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, snd_hda_codec_write_cache(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
mute ? 0x02 : 0x0); mute ? 0x02 : 0x0);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册