Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/conexant: Add quirk for SWS JS201D
@ 2024-02-04  4:53 bo liu
  2024-02-04 12:27 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: bo liu @ 2024-02-04  4:53 UTC (permalink / raw)
  To: perex, tiwai; +Cc: linux-sound, linux-kernel, bo liu

The SWS JS201D need a different pinconfig from windows driver.
Add a quirk to use a specific pinconfig to SWS JS201D.

Signed-off-by: bo liu <bo.liu@senarytech.com>
---
 sound/pci/hda/patch_conexant.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index e8819e8a9876..a0bb4d91502b 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -344,6 +344,7 @@ enum {
 	CXT_FIXUP_HP_ZBOOK_MUTE_LED,
 	CXT_FIXUP_HEADSET_MIC,
 	CXT_FIXUP_HP_MIC_NO_PRESENCE,
+	CXT_PINCFG_SWS_JS201D,
 };
 
 /* for hda_fixup_thinkpad_acpi() */
@@ -841,6 +842,17 @@ static const struct hda_pintbl cxt_pincfg_lemote[] = {
 	{}
 };
 
+/* SuoWoSi/South-holding JS201D with sn6140 */
+static const struct hda_pintbl cxt_pincfg_sws_js201d[] = {
+	{ 0x16, 0x03211040 }, /* hp out */
+	{ 0x17, 0x91170110 }, /* SPK/Class_D */
+	{ 0x18, 0x95a70130 }, /* Internal mic */
+	{ 0x19, 0x03a11020 }, /* Headset Mic */
+	{ 0x1a, 0x40f001f0 }, /* Not used */
+	{ 0x21, 0x40f001f0 }, /* Not used */
+	{}
+};
+
 static const struct hda_fixup cxt_fixups[] = {
 	[CXT_PINCFG_LENOVO_X200] = {
 		.type = HDA_FIXUP_PINS,
@@ -996,6 +1008,10 @@ static const struct hda_fixup cxt_fixups[] = {
 		.chained = true,
 		.chain_id = CXT_FIXUP_HEADSET_MIC,
 	},
+	[CXT_PINCFG_SWS_JS201D] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = cxt_pincfg_sws_js201d,
+	},
 };
 
 static const struct snd_pci_quirk cxt5045_fixups[] = {
@@ -1091,6 +1107,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
 	SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI),
 	SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004),
 	SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205),
+	SND_PCI_QUIRK(0x14f1, 0x0265, "SWS JS201D", CXT_PINCFG_SWS_JS201D),
 	{}
 };
 
@@ -1109,6 +1126,7 @@ static const struct hda_model_fixup cxt5066_fixup_models[] = {
 	{ .id = CXT_FIXUP_HP_ZBOOK_MUTE_LED, .name = "hp-zbook-mute-led" },
 	{ .id = CXT_FIXUP_HP_MIC_NO_PRESENCE, .name = "hp-mic-fix" },
 	{ .id = CXT_PINCFG_LENOVO_NOTEBOOK, .name = "lenovo-20149" },
+	{ .id = CXT_PINCFG_SWS_JS201D, .name = "sws-js201d" },
 	{}
 };
 
-- 
2.34.1


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

* Re: [PATCH] ALSA: hda/conexant: Add quirk for SWS JS201D
  2024-02-04  4:53 [PATCH] ALSA: hda/conexant: Add quirk for SWS JS201D bo liu
@ 2024-02-04 12:27 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2024-02-04 12:27 UTC (permalink / raw)
  To: bo liu; +Cc: perex, tiwai, linux-sound, linux-kernel

On Sun, 04 Feb 2024 05:53:44 +0100,
bo liu wrote:
> 
> The SWS JS201D need a different pinconfig from windows driver.
> Add a quirk to use a specific pinconfig to SWS JS201D.
> 
> Signed-off-by: bo liu <bo.liu@senarytech.com>
> ---
>  sound/pci/hda/patch_conexant.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
> index e8819e8a9876..a0bb4d91502b 100644
> --- a/sound/pci/hda/patch_conexant.c
> +++ b/sound/pci/hda/patch_conexant.c
> @@ -344,6 +344,7 @@ enum {
>  	CXT_FIXUP_HP_ZBOOK_MUTE_LED,
>  	CXT_FIXUP_HEADSET_MIC,
>  	CXT_FIXUP_HP_MIC_NO_PRESENCE,
> +	CXT_PINCFG_SWS_JS201D,
>  };
>  
>  /* for hda_fixup_thinkpad_acpi() */
> @@ -841,6 +842,17 @@ static const struct hda_pintbl cxt_pincfg_lemote[] = {
>  	{}
>  };
>  
> +/* SuoWoSi/South-holding JS201D with sn6140 */
> +static const struct hda_pintbl cxt_pincfg_sws_js201d[] = {
> +	{ 0x16, 0x03211040 }, /* hp out */
> +	{ 0x17, 0x91170110 }, /* SPK/Class_D */
> +	{ 0x18, 0x95a70130 }, /* Internal mic */
> +	{ 0x19, 0x03a11020 }, /* Headset Mic */
> +	{ 0x1a, 0x40f001f0 }, /* Not used */
> +	{ 0x21, 0x40f001f0 }, /* Not used */
> +	{}
> +};
> +
>  static const struct hda_fixup cxt_fixups[] = {
>  	[CXT_PINCFG_LENOVO_X200] = {
>  		.type = HDA_FIXUP_PINS,
> @@ -996,6 +1008,10 @@ static const struct hda_fixup cxt_fixups[] = {
>  		.chained = true,
>  		.chain_id = CXT_FIXUP_HEADSET_MIC,
>  	},
> +	[CXT_PINCFG_SWS_JS201D] = {
> +		.type = HDA_FIXUP_PINS,
> +		.v.pins = cxt_pincfg_sws_js201d,
> +	},
>  };
>  
>  static const struct snd_pci_quirk cxt5045_fixups[] = {
> @@ -1091,6 +1107,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
>  	SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI),
>  	SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004),
>  	SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205),
> +	SND_PCI_QUIRK(0x14f1, 0x0265, "SWS JS201D", CXT_PINCFG_SWS_JS201D),
>  	{}
>  };

The table is sorted in PCI SSID order.  Please try to put at the right
position.


thanks,

Takashi

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

end of thread, other threads:[~2024-02-04 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-04  4:53 [PATCH] ALSA: hda/conexant: Add quirk for SWS JS201D bo liu
2024-02-04 12:27 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox