Update default depop procedure
Hi Takashi,
Attach patch will solve issue which Headphone has a chance no sound. Many Thanks.
BR,
Kailang
From f73ce0d7ec1a05d3dbd0ebe008cefa7bdce3cdff Mon Sep 17 00:00:00 2001
From: Kailang Yang <[email protected]>
Date: Wed, 23 Oct 2024 16:13:10 +0800
Subject: [PATCH] ALSA: hda/realtek: Update default depop procedure
Old procedure has a chance to meet Headphone no output.
Signed-off-by Kailang Yang <[email protected]>
sound/pci/hda/patch_realtek.c +17 -21
@@ -3868,20 +3868,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 ); -snd_hda_codec_write (codec, hp_pin,0 , -AC_VERB_SET_PIN_WIDGET_CONTROL ,PIN_OUT ); +msleep (75 ); -if (hp_pin_sense) -msleep (100 ); +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)
@@ -3897,22 +3895,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 ); - -if (!spec->no_shutup_pins)snd_hda_codec_write (codec, hp_pin,0 , -AC_VERB_SET_PIN_WIDGET_CONTROL ,0x0 ); +AC_VERB_SET_AMP_GAIN_MUTE ,AMP_OUT_MUTE ); -if (hp_pin_sense) -msleep (100 ); +msleep (75 ); +if (!spec->no_shutup_pins) +snd_hda_codec_write (codec, hp_pin,0 , +AC_VERB_SET_PIN_WIDGET_CONTROL ,0x0 ); + +msleep (75 ); + }alc_auto_setup_eapd (codec, false);alc_shutup_pins (codec); }
Quoted 5 lines · Kailang
Hi Takashi,
Attach patch will solve issue which Headphone has a chance no sound. Many Thanks.
Applied now (with a proper Fixes tag).
thanks,
Takashi