diff mbox

ALSA: hda - fix an external mic jack problem on a HP machine

Message ID 1406689908-3054-1-git-send-email-hui.wang@canonical.com (mailing list archive)
State Accepted
Commit 7440850c20b69658f322119d20a94dc914127cc7
Delegated to: Takashi Iwai
Headers show

Commit Message

Hui Wang July 30, 2014, 3:11 a.m. UTC
ON the machine, two pin complex (0xb and 0xe) are both routed to
the same external right-side mic jack, this makes the jack can't work.

To fix this problem, set the 0xe to "not connected".

BugLink: https://bugs.launchpad.net/bugs/1350148
Tested-by: Franz Hsieh <franz.hsieh@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
 sound/pci/hda/patch_sigmatel.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Takashi Iwai July 30, 2014, 5:22 a.m. UTC | #1
At Wed, 30 Jul 2014 11:11:48 +0800,
Hui Wang wrote:
> 
> ON the machine, two pin complex (0xb and 0xe) are both routed to
> the same external right-side mic jack, this makes the jack can't work.
> 
> To fix this problem, set the 0xe to "not connected".
> 
> BugLink: https://bugs.launchpad.net/bugs/1350148
> Tested-by: Franz Hsieh <franz.hsieh@canonical.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Hui Wang <hui.wang@canonical.com>

Applied, thanks.


Takashi

> ---
>  sound/pci/hda/patch_sigmatel.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
> index 8dc6815..ea823e1 100644
> --- a/sound/pci/hda/patch_sigmatel.c
> +++ b/sound/pci/hda/patch_sigmatel.c
> @@ -84,6 +84,7 @@ enum {
>  	STAC_DELL_EQ,
>  	STAC_ALIENWARE_M17X,
>  	STAC_92HD89XX_HP_FRONT_JACK,
> +	STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK,
>  	STAC_92HD73XX_MODELS
>  };
>  
> @@ -1810,6 +1811,11 @@ static const struct hda_pintbl stac92hd89xx_hp_front_jack_pin_configs[] = {
>  	{}
>  };
>  
> +static const struct hda_pintbl stac92hd89xx_hp_z1_g2_right_mic_jack_pin_configs[] = {
> +	{ 0x0e, 0x400000f0 },
> +	{}
> +};
> +
>  static void stac92hd73xx_fixup_ref(struct hda_codec *codec,
>  				   const struct hda_fixup *fix, int action)
>  {
> @@ -1932,6 +1938,10 @@ static const struct hda_fixup stac92hd73xx_fixups[] = {
>  	[STAC_92HD89XX_HP_FRONT_JACK] = {
>  		.type = HDA_FIXUP_PINS,
>  		.v.pins = stac92hd89xx_hp_front_jack_pin_configs,
> +	},
> +	[STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK] = {
> +		.type = HDA_FIXUP_PINS,
> +		.v.pins = stac92hd89xx_hp_z1_g2_right_mic_jack_pin_configs,
>  	}
>  };
>  
> @@ -1992,6 +2002,8 @@ static const struct snd_pci_quirk stac92hd73xx_fixup_tbl[] = {
>  		      "Alienware M17x", STAC_ALIENWARE_M17X),
>  	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490,
>  		      "Alienware M17x R3", STAC_DELL_EQ),
> +	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1927,
> +				"HP Z1 G2", STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK),
>  	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2b17,
>  				"unknown HP", STAC_92HD89XX_HP_FRONT_JACK),
>  	{} /* terminator */
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 8dc6815..ea823e1 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -84,6 +84,7 @@  enum {
 	STAC_DELL_EQ,
 	STAC_ALIENWARE_M17X,
 	STAC_92HD89XX_HP_FRONT_JACK,
+	STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK,
 	STAC_92HD73XX_MODELS
 };
 
@@ -1810,6 +1811,11 @@  static const struct hda_pintbl stac92hd89xx_hp_front_jack_pin_configs[] = {
 	{}
 };
 
+static const struct hda_pintbl stac92hd89xx_hp_z1_g2_right_mic_jack_pin_configs[] = {
+	{ 0x0e, 0x400000f0 },
+	{}
+};
+
 static void stac92hd73xx_fixup_ref(struct hda_codec *codec,
 				   const struct hda_fixup *fix, int action)
 {
@@ -1932,6 +1938,10 @@  static const struct hda_fixup stac92hd73xx_fixups[] = {
 	[STAC_92HD89XX_HP_FRONT_JACK] = {
 		.type = HDA_FIXUP_PINS,
 		.v.pins = stac92hd89xx_hp_front_jack_pin_configs,
+	},
+	[STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = stac92hd89xx_hp_z1_g2_right_mic_jack_pin_configs,
 	}
 };
 
@@ -1992,6 +2002,8 @@  static const struct snd_pci_quirk stac92hd73xx_fixup_tbl[] = {
 		      "Alienware M17x", STAC_ALIENWARE_M17X),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490,
 		      "Alienware M17x R3", STAC_DELL_EQ),
+	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1927,
+				"HP Z1 G2", STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2b17,
 				"unknown HP", STAC_92HD89XX_HP_FRONT_JACK),
 	{} /* terminator */