diff mbox series

[SRU,Artful,OEM] ALSA: hda/realtek - Add headset mode support for Dell laptop

Message ID 1521687746-6543-2-git-send-email-hui.wang@canonical.com
State New
Headers show
Series [SRU,Artful,OEM] ALSA: hda/realtek - Add headset mode support for Dell laptop | expand

Commit Message

Hui Wang March 22, 2018, 3:02 a.m. UTC
From: Kailang Yang <kailang@realtek.com>

BugLink: https://bugs.launchpad.net/bugs/1757584

This platform was only one phone Jack.
Add dummy lineout verb to fix automute mode disable.
This just the workaround.

[ More background information:
  since the platform has only a headphone jack without speaker, the
  driver doesn't create the auto-mute control.  Meanwhile we do update
  the headset mode via the automute hook in the driver, thus with this
  setup, the headset won't be updated any longer.

  By adding a dummy line-out pin here, the auto-mute is added by the
  driver, and the headset update is triggered properly.

  Note that this is different from the other
  ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, which has the real line-out pin,
  while this quirk adds a dummy line-out pin.  -- tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit ae104a21e52b1f9aab342cf6924405177b720069)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
 sound/pci/hda/patch_realtek.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Aaron Ma March 27, 2018, 5:22 a.m. UTC | #1
Limited regression and clean cherry pick.

Acked-by: Aaron Ma <aaron.ma@canonical.com>
Stefan Bader March 28, 2018, 10:15 a.m. UTC | #2
On 22.03.2018 04:02, Hui Wang wrote:
> From: Kailang Yang <kailang@realtek.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1757584
> 
> This platform was only one phone Jack.
> Add dummy lineout verb to fix automute mode disable.
> This just the workaround.
> 
> [ More background information:
>   since the platform has only a headphone jack without speaker, the
>   driver doesn't create the auto-mute control.  Meanwhile we do update
>   the headset mode via the automute hook in the driver, thus with this
>   setup, the headset won't be updated any longer.
> 
>   By adding a dummy line-out pin here, the auto-mute is added by the
>   driver, and the headset update is triggered properly.
> 
>   Note that this is different from the other
>   ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, which has the real line-out pin,
>   while this quirk adds a dummy line-out pin.  -- tiwai ]
> 
> Signed-off-by: Kailang Yang <kailang@realtek.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> (cherry picked from commit ae104a21e52b1f9aab342cf6924405177b720069)
> Signed-off-by: Hui Wang <hui.wang@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>

> ---
>  sound/pci/hda/patch_realtek.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index 3b07373..6ef423e 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -5273,6 +5273,7 @@ enum {
>  	ALC233_FIXUP_LENOVO_MULTI_CODECS,
>  	ALC294_FIXUP_LENOVO_MIC_LOCATION,
>  	ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE,
> +	ALC255_FIXUP_DUMMY_LINEOUT_VERB,
>  };
>  
>  static const struct hda_fixup alc269_fixups[] = {
> @@ -6079,6 +6080,15 @@ static const struct hda_fixup alc269_fixups[] = {
>  		.chained = true,
>  		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
>  	},
> +	[ALC255_FIXUP_DUMMY_LINEOUT_VERB] = {
> +		.type = HDA_FIXUP_PINS,
> +		.v.pins = (const struct hda_pintbl[]) {
> +			{ 0x14, 0x0201101f },
> +			{ }
> +		},
> +		.chained = true,
> +		.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
> +	},
>  };
>  
>  static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> @@ -6129,6 +6139,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
>  	SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
>  	SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
>  	SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE),
> +	SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB),
>  	SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
>  	SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
>  	SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
>
Kleber Sacilotto de Souza March 29, 2018, 4:12 p.m. UTC | #3
On 03/22/18 04:02, Hui Wang wrote:
> From: Kailang Yang <kailang@realtek.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1757584
> 
> This platform was only one phone Jack.
> Add dummy lineout verb to fix automute mode disable.
> This just the workaround.
> 
> [ More background information:
>   since the platform has only a headphone jack without speaker, the
>   driver doesn't create the auto-mute control.  Meanwhile we do update
>   the headset mode via the automute hook in the driver, thus with this
>   setup, the headset won't be updated any longer.
> 
>   By adding a dummy line-out pin here, the auto-mute is added by the
>   driver, and the headset update is triggered properly.
> 
>   Note that this is different from the other
>   ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, which has the real line-out pin,
>   while this quirk adds a dummy line-out pin.  -- tiwai ]
> 
> Signed-off-by: Kailang Yang <kailang@realtek.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> (cherry picked from commit ae104a21e52b1f9aab342cf6924405177b720069)

This patch is clearly not a cherry-pick, but a backport instead. Both
patches on the series are marked as cherry-pick but none of them matches
the original mainline commit. When a patch cannot be applied with 'git
am', please mark them as "(backported from commit ...)".

Also, this patch didn't apply cleanly to artful/master-next branch, so I
fixed and marked as backported while applying.


Thanks,
Kleber

> Signed-off-by: Hui Wang <hui.wang@canonical.com>
> ---
>  sound/pci/hda/patch_realtek.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index 3b07373..6ef423e 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -5273,6 +5273,7 @@ enum {
>  	ALC233_FIXUP_LENOVO_MULTI_CODECS,
>  	ALC294_FIXUP_LENOVO_MIC_LOCATION,
>  	ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE,
> +	ALC255_FIXUP_DUMMY_LINEOUT_VERB,
>  };
>  
>  static const struct hda_fixup alc269_fixups[] = {
> @@ -6079,6 +6080,15 @@ static const struct hda_fixup alc269_fixups[] = {
>  		.chained = true,
>  		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
>  	},
> +	[ALC255_FIXUP_DUMMY_LINEOUT_VERB] = {
> +		.type = HDA_FIXUP_PINS,
> +		.v.pins = (const struct hda_pintbl[]) {
> +			{ 0x14, 0x0201101f },
> +			{ }
> +		},
> +		.chained = true,
> +		.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
> +	},
>  };
>  
>  static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> @@ -6129,6 +6139,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
>  	SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
>  	SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
>  	SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE),
> +	SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB),
>  	SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
>  	SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
>  	SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
>
diff mbox series

Patch

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3b07373..6ef423e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5273,6 +5273,7 @@  enum {
 	ALC233_FIXUP_LENOVO_MULTI_CODECS,
 	ALC294_FIXUP_LENOVO_MIC_LOCATION,
 	ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE,
+	ALC255_FIXUP_DUMMY_LINEOUT_VERB,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -6079,6 +6080,15 @@  static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
 	},
+	[ALC255_FIXUP_DUMMY_LINEOUT_VERB] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x14, 0x0201101f },
+			{ }
+		},
+		.chained = true,
+		.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -6129,6 +6139,7 @@  static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
 	SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
 	SND_PCI_QUIRK(0x1028, 0x080c, "Dell WYSE", ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE),
+	SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB),
 	SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),