linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ALSA: hda/realtek - Enable the bass speaker of ASUS UX431FLC
@ 2019-12-27 10:08 Chris Chiu
  2019-12-28  8:05 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Chiu @ 2019-12-27 10:08 UTC (permalink / raw)
  To: perex, tiwai, kailang, hui.wang, tomas.espeleta
  Cc: alsa-devel, linux-kernel, linux, Jian-Hong Pan

ASUS reported that there's an bass speaker in addition to internal
speaker and it uses DAC 0x02. It was not enabled in the commit
436e25505f34 ("ALSA: hda/realtek - Enable internal speaker of ASUS
UX431FLC") which only enables the amplifier for the front speaker.
This commit enables the bass speaker on top of the aforementioned
work to improve the acoustic experience.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
---

Notes:
  v2: 
   - Use existing alc285_fixup_speaker2_to_dac1 instead of new fixup function
   - Correct the commit hash number in the commit message 
   - Remove the redundant fixup ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC

 sound/pci/hda/patch_realtek.c | 26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 5bc1a6d24333..9c5c65396b3c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5905,9 +5905,9 @@ enum {
 	ALC256_FIXUP_ASUS_HEADSET_MIC,
 	ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
 	ALC299_FIXUP_PREDATOR_SPK,
-	ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC,
 	ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
-	ALC294_FIXUP_ASUS_INTSPK_GPIO,
+	ALC294_FIXUP_ASUS_DUAL_SPEAKERS,
+	ALC294_FIXUP_SPEAKER2_TO_DAC1,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -6982,16 +6982,6 @@ static const struct hda_fixup alc269_fixups[] = {
 			{ }
 		}
 	},
-	[ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC] = {
-		.type = HDA_FIXUP_PINS,
-		.v.pins = (const struct hda_pintbl[]) {
-			{ 0x14, 0x411111f0 }, /* disable confusing internal speaker */
-			{ 0x19, 0x04a11150 }, /* use as headset mic, without its own jack detect */
-			{ }
-		},
-		.chained = true,
-		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
-	},
 	[ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE] = {
 		.type = HDA_FIXUP_PINS,
 		.v.pins = (const struct hda_pintbl[]) {
@@ -7002,12 +6992,18 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
 	},
-	[ALC294_FIXUP_ASUS_INTSPK_GPIO] = {
+	[ALC294_FIXUP_SPEAKER2_TO_DAC1] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc285_fixup_speaker2_to_dac1,
+		.chained = true,
+		.chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
+	},
+	[ALC294_FIXUP_ASUS_DUAL_SPEAKERS] = {
 		.type = HDA_FIXUP_FUNC,
 		/* The GPIO must be pulled to initialize the AMP */
 		.v.func = alc_fixup_gpio4,
 		.chained = true,
-		.chain_id = ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC
+		.chain_id = ALC294_FIXUP_SPEAKER2_TO_DAC1
 	},
 };
 
@@ -7168,7 +7164,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
 	SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
 	SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
-	SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_INTSPK_GPIO),
+	SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPEAKERS),
 	SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
 	SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
-- 
2.23.0


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

* Re: [PATCH v2] ALSA: hda/realtek - Enable the bass speaker of ASUS UX431FLC
  2019-12-27 10:08 [PATCH v2] ALSA: hda/realtek - Enable the bass speaker of ASUS UX431FLC Chris Chiu
@ 2019-12-28  8:05 ` Takashi Iwai
  2019-12-30  3:12   ` Chris Chiu
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2019-12-28  8:05 UTC (permalink / raw)
  To: Chris Chiu
  Cc: perex, tiwai, kailang, hui.wang, tomas.espeleta, alsa-devel,
	linux-kernel, linux, Jian-Hong Pan

On Fri, 27 Dec 2019 11:08:25 +0100,
Chris Chiu wrote:
> 
> ASUS reported that there's an bass speaker in addition to internal
> speaker and it uses DAC 0x02. It was not enabled in the commit
> 436e25505f34 ("ALSA: hda/realtek - Enable internal speaker of ASUS
> UX431FLC") which only enables the amplifier for the front speaker.
> This commit enables the bass speaker on top of the aforementioned
> work to improve the acoustic experience.
> 
> Signed-off-by: Chris Chiu <chiu@endlessm.com>
> Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
> ---
> 
> Notes:
>   v2: 
>    - Use existing alc285_fixup_speaker2_to_dac1 instead of new fixup function
>    - Correct the commit hash number in the commit message 
>    - Remove the redundant fixup ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC

Could you rebase on the latest for-linus branch?  This patch isn't
applied cleanly any longer.


thanks,

Takashi

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

* Re: [PATCH v2] ALSA: hda/realtek - Enable the bass speaker of ASUS UX431FLC
  2019-12-28  8:05 ` Takashi Iwai
@ 2019-12-30  3:12   ` Chris Chiu
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Chiu @ 2019-12-30  3:12 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: perex, tiwai, Kailang, Hui Wang, tomas.espeleta, alsa-devel,
	Linux Kernel, Linux Upstreaming Team, Jian-Hong Pan

On Sat, Dec 28, 2019 at 4:05 PM Takashi Iwai <tiwai@suse.de> wrote:
>
> On Fri, 27 Dec 2019 11:08:25 +0100,
> Chris Chiu wrote:
> >
> > ASUS reported that there's an bass speaker in addition to internal
> > speaker and it uses DAC 0x02. It was not enabled in the commit
> > 436e25505f34 ("ALSA: hda/realtek - Enable internal speaker of ASUS
> > UX431FLC") which only enables the amplifier for the front speaker.
> > This commit enables the bass speaker on top of the aforementioned
> > work to improve the acoustic experience.
> >
> > Signed-off-by: Chris Chiu <chiu@endlessm.com>
> > Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
> > ---
> >
> > Notes:
> >   v2:
> >    - Use existing alc285_fixup_speaker2_to_dac1 instead of new fixup function
> >    - Correct the commit hash number in the commit message
> >    - Remove the redundant fixup ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC
>
> Could you rebase on the latest for-linus branch?  This patch isn't
> applied cleanly any longer.
>
>
> thanks,
>
> Takashi

Got it. I'll prepare a v3 to rebase on latest for-lnus.

Chris

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

end of thread, other threads:[~2019-12-30  3:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-27 10:08 [PATCH v2] ALSA: hda/realtek - Enable the bass speaker of ASUS UX431FLC Chris Chiu
2019-12-28  8:05 ` Takashi Iwai
2019-12-30  3:12   ` Chris Chiu

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).