alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda - Fix mono speakers and headset mic on Dell Vostro 5470
@ 2013-10-07  8:39 David Henningsson
  2013-10-07  8:51 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: David Henningsson @ 2013-10-07  8:39 UTC (permalink / raw)
  To: tiwai, alsa-devel; +Cc: kailang, 1236228, v3.10+, David Henningsson

On this machine, DAC on node 0x03 seems to give mono output.

Also, it needs additional patches for headset mic support.
It supports CTIA style headsets only.

Alsa-info available at the bug link below.

Cc: stable@kernel.org (v3.10+)
BugLink: https://bugs.launchpad.net/bugs/1236228
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 sound/pci/hda/patch_realtek.c |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 0e303b9..52c26d3 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3496,6 +3496,15 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec,
 	}
 }
 
+static void alc290_fixup_mono_speakers(struct hda_codec *codec,
+				       const struct hda_fixup *fix, int action)
+{
+	if (action == HDA_FIXUP_ACT_PRE_PROBE)
+		/* Remove DAC node 0x03, as it seems to be
+		   giving mono output */
+		snd_hda_override_wcaps(codec, 0x03, 0);
+}
+
 enum {
 	ALC269_FIXUP_SONY_VAIO,
 	ALC275_FIXUP_SONY_VAIO_GPIO2,
@@ -3522,6 +3531,7 @@ enum {
 	ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
 	ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
 	ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
+	ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
 	ALC269_FIXUP_HEADSET_MODE,
 	ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
 	ALC269_FIXUP_ASUS_X101_FUNC,
@@ -3535,6 +3545,7 @@ enum {
 	ALC283_FIXUP_CHROME_BOOK,
 	ALC282_FIXUP_ASUS_TX300,
 	ALC283_FIXUP_INT_MIC,
+	ALC290_FIXUP_MONO_SPEAKERS,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -3712,6 +3723,15 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
 	},
+	[ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
+			{ }
+		},
+		.chained = true,
+		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
+	},
 	[ALC269_FIXUP_HEADSET_MODE] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc_fixup_headset_mode,
@@ -3804,6 +3824,12 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
 	},
+	[ALC290_FIXUP_MONO_SPEAKERS] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc290_fixup_mono_speakers,
+		.chained = true,
+		.chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -3845,6 +3871,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
+	SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS),
 	SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
-- 
1.7.9.5

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

* Re: [PATCH] ALSA: hda - Fix mono speakers and headset mic on Dell Vostro 5470
  2013-10-07  8:39 [PATCH] ALSA: hda - Fix mono speakers and headset mic on Dell Vostro 5470 David Henningsson
@ 2013-10-07  8:51 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2013-10-07  8:51 UTC (permalink / raw)
  To: David Henningsson; +Cc: alsa-devel, kailang, 1236228, v3.10+

At Mon,  7 Oct 2013 10:39:59 +0200,
David Henningsson wrote:
> 
> On this machine, DAC on node 0x03 seems to give mono output.
> 
> Also, it needs additional patches for headset mic support.
> It supports CTIA style headsets only.
> 
> Alsa-info available at the bug link below.
> 
> Cc: stable@kernel.org (v3.10+)
> BugLink: https://bugs.launchpad.net/bugs/1236228
> Signed-off-by: David Henningsson <david.henningsson@canonical.com>

Thanks, applied.


Takashi

> ---
>  sound/pci/hda/patch_realtek.c |   27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index 0e303b9..52c26d3 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -3496,6 +3496,15 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec,
>  	}
>  }
>  
> +static void alc290_fixup_mono_speakers(struct hda_codec *codec,
> +				       const struct hda_fixup *fix, int action)
> +{
> +	if (action == HDA_FIXUP_ACT_PRE_PROBE)
> +		/* Remove DAC node 0x03, as it seems to be
> +		   giving mono output */
> +		snd_hda_override_wcaps(codec, 0x03, 0);
> +}
> +
>  enum {
>  	ALC269_FIXUP_SONY_VAIO,
>  	ALC275_FIXUP_SONY_VAIO_GPIO2,
> @@ -3522,6 +3531,7 @@ enum {
>  	ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
>  	ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
>  	ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
> +	ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
>  	ALC269_FIXUP_HEADSET_MODE,
>  	ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
>  	ALC269_FIXUP_ASUS_X101_FUNC,
> @@ -3535,6 +3545,7 @@ enum {
>  	ALC283_FIXUP_CHROME_BOOK,
>  	ALC282_FIXUP_ASUS_TX300,
>  	ALC283_FIXUP_INT_MIC,
> +	ALC290_FIXUP_MONO_SPEAKERS,
>  };
>  
>  static const struct hda_fixup alc269_fixups[] = {
> @@ -3712,6 +3723,15 @@ static const struct hda_fixup alc269_fixups[] = {
>  		.chained = true,
>  		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
>  	},
> +	[ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = {
> +		.type = HDA_FIXUP_PINS,
> +		.v.pins = (const struct hda_pintbl[]) {
> +			{ 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
> +			{ }
> +		},
> +		.chained = true,
> +		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
> +	},
>  	[ALC269_FIXUP_HEADSET_MODE] = {
>  		.type = HDA_FIXUP_FUNC,
>  		.v.func = alc_fixup_headset_mode,
> @@ -3804,6 +3824,12 @@ static const struct hda_fixup alc269_fixups[] = {
>  		.chained = true,
>  		.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
>  	},
> +	[ALC290_FIXUP_MONO_SPEAKERS] = {
> +		.type = HDA_FIXUP_FUNC,
> +		.v.func = alc290_fixup_mono_speakers,
> +		.chained = true,
> +		.chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
> +	},
>  };
>  
>  static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> @@ -3845,6 +3871,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
>  	SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
>  	SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
>  	SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
> +	SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS),
>  	SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
>  	SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
>  	SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
> -- 
> 1.7.9.5
> 

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

end of thread, other threads:[~2013-10-07  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-07  8:39 [PATCH] ALSA: hda - Fix mono speakers and headset mic on Dell Vostro 5470 David Henningsson
2013-10-07  8:51 ` 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).