linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL
@ 2019-09-02 10:00 Jian-Hong Pan
  2019-09-02 11:41 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Jian-Hong Pan @ 2019-09-02 10:00 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel, linux-kernel, linux, Jian-Hong Pan

Original pin node values of ASUS UX431FL with ALC294:

0x12 0xb7a60140
0x13 0x40000000
0x14 0x90170110
0x15 0x411111f0
0x16 0x411111f0
0x17 0x90170111
0x18 0x411111f0
0x19 0x411111f0
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x4066852d
0x1e 0x411111f0
0x1f 0x411111f0
0x21 0x04211020

1. Has duplicated internal speakers (0x14 & 0x17) which makes the output
   route become confused. So, the output volume cannot be changed by
   setting.
2. Misses the headset mic pin node.

This patch disables the confusing speaker (NID 0x14) and enables the
headset mic (NID 0x19).

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
---
 sound/pci/hda/patch_realtek.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index e333b3e30e31..0a1fa99a6723 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5797,6 +5797,7 @@ enum {
 	ALC286_FIXUP_ACER_AIO_HEADSET_MIC,
 	ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
 	ALC299_FIXUP_PREDATOR_SPK,
+	ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -6837,6 +6838,16 @@ 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
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -6995,6 +7006,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_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
 	SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
 	SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
-- 
2.20.1


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

* Re: [PATCH] ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL
  2019-09-02 10:00 [PATCH] ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL Jian-Hong Pan
@ 2019-09-02 11:41 ` Takashi Iwai
  2019-09-03  5:30   ` Jian-Hong Pan
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2019-09-02 11:41 UTC (permalink / raw)
  To: Jian-Hong Pan; +Cc: Jaroslav Kysela, alsa-devel, linux, linux-kernel

On Mon, 02 Sep 2019 12:00:56 +0200,
Jian-Hong Pan wrote:
> 
> Original pin node values of ASUS UX431FL with ALC294:
> 
> 0x12 0xb7a60140
> 0x13 0x40000000
> 0x14 0x90170110
> 0x15 0x411111f0
> 0x16 0x411111f0
> 0x17 0x90170111
> 0x18 0x411111f0
> 0x19 0x411111f0
> 0x1a 0x411111f0
> 0x1b 0x411111f0
> 0x1d 0x4066852d
> 0x1e 0x411111f0
> 0x1f 0x411111f0
> 0x21 0x04211020
> 
> 1. Has duplicated internal speakers (0x14 & 0x17) which makes the output
>    route become confused. So, the output volume cannot be changed by
>    setting.
> 2. Misses the headset mic pin node.
> 
> This patch disables the confusing speaker (NID 0x14) and enables the
> headset mic (NID 0x19).

Is 0x14 really a dead pin?  Or is a surround/bass speaker or such?


thanks,

Takashi

> 
> Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
> ---
>  sound/pci/hda/patch_realtek.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index e333b3e30e31..0a1fa99a6723 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -5797,6 +5797,7 @@ enum {
>  	ALC286_FIXUP_ACER_AIO_HEADSET_MIC,
>  	ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
>  	ALC299_FIXUP_PREDATOR_SPK,
> +	ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC,
>  };
>  
>  static const struct hda_fixup alc269_fixups[] = {
> @@ -6837,6 +6838,16 @@ 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
> +	},
>  };
>  
>  static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> @@ -6995,6 +7006,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_HEADSET_MIC),
>  	SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
>  	SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
>  	SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
> -- 
> 2.20.1
> 
> 

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

* Re: [PATCH] ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL
  2019-09-02 11:41 ` Takashi Iwai
@ 2019-09-03  5:30   ` Jian-Hong Pan
  2019-09-03  5:53     ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Jian-Hong Pan @ 2019-09-03  5:30 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Jaroslav Kysela, alsa-devel, Linux Upstreaming Team, Linux Kernel

Takashi Iwai <tiwai@suse.de> 於 2019年9月2日 週一 下午7:41寫道:
>
> On Mon, 02 Sep 2019 12:00:56 +0200,
> Jian-Hong Pan wrote:
> >
> > Original pin node values of ASUS UX431FL with ALC294:
> >
> > 0x12 0xb7a60140
> > 0x13 0x40000000
> > 0x14 0x90170110
> > 0x15 0x411111f0
> > 0x16 0x411111f0
> > 0x17 0x90170111
> > 0x18 0x411111f0
> > 0x19 0x411111f0
> > 0x1a 0x411111f0
> > 0x1b 0x411111f0
> > 0x1d 0x4066852d
> > 0x1e 0x411111f0
> > 0x1f 0x411111f0
> > 0x21 0x04211020
> >
> > 1. Has duplicated internal speakers (0x14 & 0x17) which makes the output
> >    route become confused. So, the output volume cannot be changed by
> >    setting.
> > 2. Misses the headset mic pin node.
> >
> > This patch disables the confusing speaker (NID 0x14) and enables the
> > headset mic (NID 0x19).
>
> Is 0x14 really a dead pin?  Or is a surround/bass speaker or such?

I checked Windows (updated to latest and including Realtek MEDIA) on
ASUS UX431FL laptop again.  Although it has two internal speaker pins,
there is only one set of internal speaker including left/right
channels.  And the audio test (Speaker Setup) only shows left/right
channels.  So, NID 0x14 can be disabled.

Jain-Hong Pan

> >
> > Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
> > ---
> >  sound/pci/hda/patch_realtek.c | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> > index e333b3e30e31..0a1fa99a6723 100644
> > --- a/sound/pci/hda/patch_realtek.c
> > +++ b/sound/pci/hda/patch_realtek.c
> > @@ -5797,6 +5797,7 @@ enum {
> >       ALC286_FIXUP_ACER_AIO_HEADSET_MIC,
> >       ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
> >       ALC299_FIXUP_PREDATOR_SPK,
> > +     ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC,
> >  };
> >
> >  static const struct hda_fixup alc269_fixups[] = {
> > @@ -6837,6 +6838,16 @@ 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
> > +     },
> >  };
> >
> >  static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> > @@ -6995,6 +7006,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_HEADSET_MIC),
> >       SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
> >       SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
> >       SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
> > --
> > 2.20.1
> >
> >

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

* Re: [PATCH] ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL
  2019-09-03  5:30   ` Jian-Hong Pan
@ 2019-09-03  5:53     ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2019-09-03  5:53 UTC (permalink / raw)
  To: Jian-Hong Pan
  Cc: Jaroslav Kysela, alsa-devel, Linux Upstreaming Team, Linux Kernel

On Tue, 03 Sep 2019 07:30:04 +0200,
Jian-Hong Pan wrote:
> 
> Takashi Iwai <tiwai@suse.de> 於 2019年9月2日 週一 下午7:41寫道:
> >
> > On Mon, 02 Sep 2019 12:00:56 +0200,
> > Jian-Hong Pan wrote:
> > >
> > > Original pin node values of ASUS UX431FL with ALC294:
> > >
> > > 0x12 0xb7a60140
> > > 0x13 0x40000000
> > > 0x14 0x90170110
> > > 0x15 0x411111f0
> > > 0x16 0x411111f0
> > > 0x17 0x90170111
> > > 0x18 0x411111f0
> > > 0x19 0x411111f0
> > > 0x1a 0x411111f0
> > > 0x1b 0x411111f0
> > > 0x1d 0x4066852d
> > > 0x1e 0x411111f0
> > > 0x1f 0x411111f0
> > > 0x21 0x04211020
> > >
> > > 1. Has duplicated internal speakers (0x14 & 0x17) which makes the output
> > >    route become confused. So, the output volume cannot be changed by
> > >    setting.
> > > 2. Misses the headset mic pin node.
> > >
> > > This patch disables the confusing speaker (NID 0x14) and enables the
> > > headset mic (NID 0x19).
> >
> > Is 0x14 really a dead pin?  Or is a surround/bass speaker or such?
> 
> I checked Windows (updated to latest and including Realtek MEDIA) on
> ASUS UX431FL laptop again.  Although it has two internal speaker pins,
> there is only one set of internal speaker including left/right
> channels.  And the audio test (Speaker Setup) only shows left/right
> channels.  So, NID 0x14 can be disabled.

OK, thanks for clarification.
I applied the patch now.


Takashi

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

end of thread, other threads:[~2019-09-03  5:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02 10:00 [PATCH] ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL Jian-Hong Pan
2019-09-02 11:41 ` Takashi Iwai
2019-09-03  5:30   ` Jian-Hong Pan
2019-09-03  5:53     ` 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).