mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
ALSA: hda/realtek: Update default depop procedure
[ Upstream commit e3ea2757c312e51bbf62ebc434a6f7df1e3a201f ]
Old procedure has a chance to meet Headphone no output.
Fixes: c2d6af53a4
("ALSA: hda/realtek - Add default procedure for suspend and resume state")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/17b717a0a0b04a77aea4a8ec820cba13@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f965dc0f09
commit
66921a4d8e
1 changed files with 17 additions and 21 deletions
|
@ -3857,20 +3857,18 @@ static void alc_default_init(struct hda_codec *codec)
|
|||
|
||||
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
|
||||
|
||||
if (hp_pin_sense)
|
||||
if (hp_pin_sense) {
|
||||
msleep(2);
|
||||
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
|
||||
|
||||
if (hp_pin_sense)
|
||||
msleep(85);
|
||||
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
|
||||
|
||||
if (hp_pin_sense)
|
||||
msleep(100);
|
||||
msleep(75);
|
||||
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
|
||||
msleep(75);
|
||||
}
|
||||
}
|
||||
|
||||
static void alc_default_shutup(struct hda_codec *codec)
|
||||
|
@ -3886,22 +3884,20 @@ static void alc_default_shutup(struct hda_codec *codec)
|
|||
|
||||
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
|
||||
|
||||
if (hp_pin_sense)
|
||||
if (hp_pin_sense) {
|
||||
msleep(2);
|
||||
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
|
||||
|
||||
if (hp_pin_sense)
|
||||
msleep(85);
|
||||
msleep(75);
|
||||
|
||||
if (!spec->no_shutup_pins)
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
|
||||
|
||||
if (hp_pin_sense)
|
||||
msleep(100);
|
||||
|
||||
msleep(75);
|
||||
}
|
||||
alc_auto_setup_eapd(codec, false);
|
||||
alc_shutup_pins(codec);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue