alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* HP NB right speaker no sound
@ 2020-07-30  5:53 Kailang
  2020-07-30  8:17 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Kailang @ 2020-07-30  5:53 UTC (permalink / raw)
  To: Takashi Iwai (tiwai@suse.de); +Cc:  (alsa-devel@alsa-project.org)

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

Hi Takashi,

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

BR,
Kailang

[-- Attachment #2: 0000-alc285-hp-amp-init.patch --]
[-- Type: application/octet-stream, Size: 2305 bytes --]

From d5d720ae68d713f78afc4f8bf0e0897bb2ccf33c Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
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.

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 e95fea8430b0..8afd7e07129c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -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),

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: HP NB right speaker no sound
  2020-07-30  5:53 HP NB right speaker no sound Kailang
@ 2020-07-30  8:17 ` Takashi Iwai
  2020-07-30  8:53   ` Kailang
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2020-07-30  8:17 UTC (permalink / raw)
  To: Kailang; +Cc:  (alsa-devel@alsa-project.org)

On Thu, 30 Jul 2020 07:53:57 +0200,
Kailang wrote:
On Thu, 30 Jul 2020 07:53:57 +0200,
Kailang wrote:
> 
> 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.
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: HP NB right speaker no sound
  2020-07-30  8:17 ` Takashi Iwai
@ 2020-07-30  8:53   ` Kailang
  2020-07-30 11:42     ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Kailang @ 2020-07-30  8:53 UTC (permalink / raw)
  To: Takashi Iwai; +Cc:  (alsa-devel@alsa-project.org)



> -----Original Message-----
> From: Takashi Iwai <tiwai@suse.de>
> Sent: Thursday, July 30, 2020 4:17 PM
> To: Kailang <kailang@realtek.com>
> Cc: (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> Subject: Re: HP NB right speaker no sound
> 
> On Thu, 30 Jul 2020 07:53:57 +0200,
> Kailang wrote:
> On Thu, 30 Jul 2020 07:53:57 +0200,
> Kailang wrote:
> >
> > 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.
> >
> > 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.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: HP NB right speaker no sound
  2020-07-30  8:53   ` Kailang
@ 2020-07-30 11:42     ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2020-07-30 11:42 UTC (permalink / raw)
  To: Kailang; +Cc:  (alsa-devel@alsa-project.org)

On Thu, 30 Jul 2020 10:53:35 +0200,
Kailang wrote:
> 
> 
> 
> > -----Original Message-----
> > From: Takashi Iwai <tiwai@suse.de>
> > Sent: Thursday, July 30, 2020 4:17 PM
> > To: Kailang <kailang@realtek.com>
> > Cc: (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> > Subject: Re: HP NB right speaker no sound
> > 
> > On Thu, 30 Jul 2020 07:53:57 +0200,
> > Kailang wrote:
> > On Thu, 30 Jul 2020 07:53:57 +0200,
> > Kailang wrote:
> > >
> > > 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.
> > >
> > > 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.

OK, thanks for the details.


Takashi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-30 11:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30  5:53 HP NB right speaker no sound Kailang
2020-07-30  8:17 ` Takashi Iwai
2020-07-30  8:53   ` Kailang
2020-07-30 11:42     ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).