Skip to contentSkip to conversation

HP NB right speaker no sound

PATCH Applied Kailang 2 participants 4 messages Jul 30, 2020 Sound

lore
Share & tools
lore

Kailang

author
#0 lore raw

Hi Takashi,

HP NB platform right side speaker no sound. Attach patch was help EC to initial I2S Amp normally. Thanks.

BR,
Kailang

From d5d720ae68d713f78afc4f8bf0e0897bb2ccf33c Mon Sep 17 00:00:00 2001
From: Kailang Yang <[email protected]>
Date: Wed, 29 Jul 2020 15:09:27 +0800
Subject: [PATCH] ALSA: hda/realtek - Fixed HP right speaker no sound

HP NB right speaker had no sound output.
This platform was connected to I2S Amp for speaker out.(None Realtek I2S Amp IC) EC need to check codec GPIO1 pin to initial I2S Amp.

sound/pci/hda/patch_realtek.c +18 -1
index e95fea8430b0..8afd7e07129c 100644
@@ -5963,6 +5963,16 @@ static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
 		snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
 }
 
+static void  alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec,
+			      const struct hda_fixup *fix, int action)
+{
+	if (action != HDA_FIXUP_ACT_INIT)
+		return;
+
+	msleep(100);
+	alc_write_coef_idx(codec, 0x65, 0x0);
+}
+
 /* for hda_fixup_thinkpad_acpi() */
 #include "thinkpad_helper.c"
 
@@ -6143,6 +6153,7 @@ enum {
 	ALC289_FIXUP_ASUS_GA401,
 	ALC289_FIXUP_ASUS_GA502,
 	ALC256_FIXUP_ACER_MIC_NO_PRESENCE,
+	ALC285_FIXUP_HP_GPIO_AMP_INIT,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -7375,6 +7386,12 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
 	},
+	[ALC285_FIXUP_HP_GPIO_AMP_INIT] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc285_fixup_hp_gpio_amp_init,
+		.chained = true,
+		.chain_id = ALC285_FIXUP_HP_GPIO_LED
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -7525,7 +7542,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
 	SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
 	SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
-	SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_LED),
+	SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
 	SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
 	SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
 	SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
Applied
#1 lore raw

On Thu, 30 Jul 2020 07:53:57 +0200,
Kailang wrote:

Quoted 12 lines · Kailang

Hi Takashi,

HP NB platform right side speaker no sound. Attach patch was help EC to initial I2S Amp normally. Thanks.

BR,
Kailang
[2 0000-alc285-hp-amp-init.patch <application/octet-stream (base64)>]

Quoted 8 lines

Hi Takashi,

HP NB platform right side speaker no sound. Attach patch was help EC to initial I2S Amp normally. Thanks.

BR,
Kailang

Thanks, applied now.

If I understand correctly from your patch description, it implies the GPIO1 high, and that's already done in the chained quirk?

Takashi

author
#2 lore raw
Quoted 31 lines

-----Original Message-----
From: Takashi Iwai <[email protected]>
Sent: Thursday, July 30, 2020 4:17 PM
To: Kailang <[email protected]>
Cc: ([email protected]) <[email protected]>
Subject: Re: HP NB right speaker no sound

On Thu, 30 Jul 2020 07:53:57 +0200,
Kailang wrote:

Quoted 18 lines · Kailang

Hi Takashi,

HP NB platform right side speaker no sound. Attach patch was help EC to initial I2S Amp normally. Thanks.

BR,
Kailang
[2 0000-alc285-hp-amp-init.patch <application/octet-stream (base64)>]

Hi Takashi,

HP NB platform right side speaker no sound. Attach patch was help EC to initial I2S Amp normally. Thanks.

Quoted 7 lines
Quoted 2 lines

BR,
Kailang

Thanks, applied now.

If I understand correctly from your patch description, it implies the GPIO1 high, and that's already done in the chained quirk?

No.
BIOS verb table had fill GPIO1 to high already.
BIOS verb table had fill PD pin to test mode.
It will cause GPIO1 to low.
This case just need to disable PD pin test mode. GPIO1 will return to high.

Quoted 5 lines

Takashi

------Please consider the environment before printing this e-mail.

#3 lore raw
Quoted 37 lines · Kailang
Quoted 37 lines

-----Original Message-----
From: Takashi Iwai <[email protected]>
Sent: Thursday, July 30, 2020 4:17 PM
To: Kailang <[email protected]>
Cc: ([email protected]) <[email protected]>
Subject: Re: HP NB right speaker no sound

On Thu, 30 Jul 2020 07:53:57 +0200,
Kailang wrote:

Quoted 12 lines · Kailang

Hi Takashi,

HP NB platform right side speaker no sound. Attach patch was help EC to initial I2S Amp normally. Thanks.

BR,
Kailang
[2 0000-alc285-hp-amp-init.patch <application/octet-stream (base64)>]

Quoted 8 lines

Hi Takashi,

HP NB platform right side speaker no sound. Attach patch was help EC to initial I2S Amp normally. Thanks.

BR,
Kailang

Thanks, applied now.

Quoted 7 lines
Quoted 2 lines

If I understand correctly from your patch description, it implies the GPIO1 high, and that's already done in the chained quirk?

No.
BIOS verb table had fill GPIO1 to high already.
BIOS verb table had fill PD pin to test mode.
It will cause GPIO1 to low.
This case just need to disable PD pin test mode. GPIO1 will return to high.

OK, thanks for the details.

Takashi