Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kailang <kailang@realtek.com>
To: "Joseph C. Sible" <josephcsible@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>,
	Bagas Sanjaya <bagasdotme@gmail.com>,
	"regressions@lists.linux.dev" <regressions@lists.linux.dev>,
	"perex@perex.cz" <perex@perex.cz>,
	"tiwai@suse.com" <tiwai@suse.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: RE: Fwd: [Bug 217440] New: ALC236 audio disappears from HP 15z-fc000 on warm boot
Date: Wed, 7 Jun 2023 07:05:55 +0000	[thread overview]
Message-ID: <485f99149508488080d563144454040e@realtek.com> (raw)
In-Reply-To: <CABpewhFthKG97dPiQC4JhGx9sapX9Yu5rWABQjpY95TSA+eawA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

Hi Joseph,

Please try attach patch.
Please patch follow number sequence.

Thanks.

> -----Original Message-----
> From: Joseph C. Sible <josephcsible@gmail.com>
> Sent: Wednesday, June 7, 2023 1:47 PM
> To: Kailang <kailang@realtek.com>
> Cc: Takashi Iwai <tiwai@suse.de>; Bagas Sanjaya <bagasdotme@gmail.com>;
> regressions@lists.linux.dev; perex@perex.cz; tiwai@suse.com;
> alsa-devel@alsa-project.org
> Subject: Re: Fwd: [Bug 217440] New: ALC236 audio disappears from HP
> 15z-fc000 on warm boot
> 
> 
> External mail.
> 
> 
> 
> On Tue, Jun 6, 2023 at 2:55 AM Kailang <kailang@realtek.com> wrote:
> >
> > Could you run attach to get dump for me?
> >
> > ./alsa-info --no-upload
> 
> The result is attached.
> 
> Thanks,
> 
> Joseph C. Sible
> 
> ------Please consider the environment before printing this e-mail.

[-- Attachment #2: 0001-hp-alc236.patch --]
[-- Type: application/octet-stream, Size: 2261 bytes --]

From bd1335787ad9204532ebc172320777178c63bfea Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Wed, 7 Jun 2023 14:46:20 +0800
Subject: [PATCH] ALSA: hda/realtek - add combo jack restart for HP machine

HP 0x8b2f will lose headset MIC.
Add combo jack restart procedure will solve this issue.

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 7dcc04e185e6..5f5ab77e54c7 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6483,6 +6483,18 @@ static void alc295_fixup_chromebook(struct hda_codec *codec,
 	}
 }
 
+static void alc225_alc256_fixup_headset_mic(struct hda_codec *codec,
+				    const struct hda_fixup *fix, int action)
+{
+	struct alc_spec *spec = codec->spec;
+
+	switch (action) {
+	case HDA_FIXUP_ACT_INIT:
+		alc_combo_jack_hp_jd_restart(codec);
+		break;
+	}
+}
+
 static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
 				  const struct hda_fixup *fix, int action)
 {
@@ -7201,6 +7213,7 @@ enum {
 	ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN,
 	ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS,
 	ALC236_FIXUP_DELL_DUAL_CODECS,
+	ALC256_FIXUP_HEADSET_MIC,
 };
 
 /* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -9205,6 +9218,10 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
 	},
+	[ALC256_FIXUP_HEADSET_MIC] = {
+		.type = HDA_FIXUP_PINS,
+		.v.func = alc225_alc256_fixup_headset_mic,
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -9477,6 +9494,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x103c, 0x8abb, "HP ZBook Firefly 14 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8ad1, "HP EliteBook 840 14 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8ad2, "HP EliteBook 860 16 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
+	SND_PCI_QUIRK(0x103c, 0x8b2f, "HP 15z-fc000", ALC256_FIXUP_HEADSET_MIC),
 	SND_PCI_QUIRK(0x103c, 0x8b42, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8b43, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8b44, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),

[-- Attachment #3: 0000-alc236-cancel-3kpullLow.patch --]
[-- Type: application/octet-stream, Size: 1692 bytes --]

From a672159a3cd2d90b05a95991f1ab0cf24c1ca0b9 Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Tue, 6 Jun 2023 14:44:42 +0800
Subject: [PATCH] ALSA: hda/realtek - remove 3k pull low procedure

This was the ALC283 depop procedure.
Maybe this procedure wasn't suitable with new codec.
So, let remove it.

Signed-off-by: Kailang Yang <kailang@realtek.com>
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f10790ace5c1..7dcc04e185e6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3600,7 +3600,6 @@ static void alc256_init(struct hda_codec *codec)
 	if (hp_pin_sense || spec->ultra_low_power)
 		msleep(100);
 
-	alc_update_coef_idx(codec, 0x46, 3 << 12, 0);
 	alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
 	alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */
 	alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 0 << 15);
@@ -3627,6 +3626,8 @@ static void alc256_shutup(struct hda_codec *codec)
 	if (hp_pin_sense)
 		msleep(2);
 
+	alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
+
 	snd_hda_codec_write(codec, hp_pin, 0,
 			    AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
 
@@ -3638,9 +3639,6 @@ static void alc256_shutup(struct hda_codec *codec)
 	/* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
 	 * when booting with headset plugged. So skip setting it for the codec alc257
 	 */
-	if (codec->core.vendor_id != 0x10ec0236 &&
-	    codec->core.vendor_id != 0x10ec0257)
-		alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
 
 	if (!spec->no_shutup_pins)
 		snd_hda_codec_write(codec, hp_pin, 0,

  reply	other threads:[~2023-06-07  7:07 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-217440-225600@https.bugzilla.kernel.org/>
2023-05-13 19:52 ` Fwd: [Bug 217440] New: ALC236 audio disappears from HP 15z-fc000 on warm boot Joseph C. Sible
2023-05-14  5:41   ` Bagas Sanjaya
2023-05-14  6:46     ` Joseph C. Sible
2023-05-14  7:35       ` Takashi Iwai
2023-05-14 21:48         ` Joseph C. Sible
2023-05-15  2:23           ` Bagas Sanjaya
2023-05-15  3:03             ` Joseph C. Sible
2023-05-15 13:39           ` Takashi Iwai
2023-05-18  5:44             ` Kailang
2023-05-24 10:16               ` Takashi Iwai
2023-05-25  9:21                 ` Kailang
2023-05-25 10:17                   ` Takashi Iwai
2023-05-26  8:09                     ` Kailang
2023-05-26 14:58                       ` Joseph C. Sible
2023-06-05  7:14                         ` Takashi Iwai
2023-06-06  6:02                           ` Joseph C. Sible
2023-06-06  6:54                             ` Kailang
2023-06-07  5:47                               ` Joseph C. Sible
2023-06-07  7:05                                 ` Kailang [this message]
2023-06-07 18:36                                   ` Joseph C. Sible
2023-06-08  2:48                                     ` Kailang
2023-06-08  4:08                                       ` Joseph C. Sible
2023-06-08  6:28                                         ` Kailang
2023-06-08  6:32                                         ` Kailang
2023-06-08 14:43                                           ` Joseph C. Sible
2023-06-09  3:04                                             ` Kailang
2023-06-09  6:56                                               ` Takashi Iwai
2023-06-09  7:04                                                 ` Kailang
2023-06-09  7:34                                                   ` Joseph C. Sible
2023-06-09  8:12                                                     ` Takashi Iwai
2023-06-09  8:34                                                       ` Takashi Iwai
2023-06-09 16:47                                                         ` Joseph C. Sible
2023-06-10  7:09                                                           ` Takashi Iwai
2023-06-10 17:41                                                             ` Joseph C. Sible
2023-06-11  7:36                                                               ` Takashi Iwai
2023-06-24  1:36                                                                 ` Joseph C. Sible
2023-06-25  9:42                                                                   ` Takashi Iwai
2023-07-04  8:38                                                                     ` Kailang
2023-07-04  8:45                                                                       ` Takashi Iwai
2023-07-13  8:25                                                                         ` Kailang
2023-07-14  1:11                                                                           ` Joseph C. Sible
2023-07-14  2:46                                                                             ` Kailang
2023-07-14  5:58                                                                               ` Takashi Iwai
2023-07-31 16:14                                                                                 ` Takashi Iwai
2023-08-04 14:34                                                                                   ` Joseph C. Sible
2023-08-15  8:08                                                                                     ` Kailang
2023-08-15  9:08                                                                                       ` Takashi Iwai
2023-08-16 12:22                                                                                         ` Takashi Iwai
2023-08-02 10:49   ` Linux regression tracking #update (Thorsten Leemhuis)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=485f99149508488080d563144454040e@realtek.com \
    --to=kailang@realtek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bagasdotme@gmail.com \
    --cc=josephcsible@gmail.com \
    --cc=perex@perex.cz \
    --cc=regressions@lists.linux.dev \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox