Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/conexant: Add quirk for Acer TravelLite TL05-41M
@ 2026-11-06 10:23 Devajith Jijush
  2026-11-06 14:34 ` Takashi Iwai
  2026-11-06 15:08 ` [PATCH v2] " Devajith Jijush
  0 siblings, 2 replies; 4+ messages in thread
From: Devajith Jijush @ 2026-11-06 10:23 UTC (permalink / raw)
  To: linux-sound; +Cc: Jaroslav Kysela, Takashi Iwai

The Acer TravelLite TL05-41M (subsystem 0x1558a600) uses a Conexant
CX11880 codec whose analog output amplifier is enabled by codec GPIO
bit 1.  The driver has no quirk for this machine, so the line is never
raised and both the internal speakers and the 3.5 mm combo jack stay
silent, while the microphone on the same jack, USB and Bluetooth audio
work normally.

Add a fixup that sets GPIO bit 1 on this subsystem ID.  It is applied
from the HDA_FIXUP_ACT_INIT hook, since the codec loses the GPIO state
on a power transition and the line would otherwise stay off after the
first runtime power save.

Note that the existing CXT_FIXUP_GPIO1 fixup raises GPIO bit 0, which
has no effect on this board.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=222238
Signed-off-by: Devajith Jijush <devajuice@zohomail.in>
---
Note for reviewers: the GPIO behaviour was verified on the affected
machine with hda-verb; I have not built a kernel with this patch, so the
code path itself is untested.  Setting the same three GPIO bits from
userspace makes both the internal speakers and the headphone jack work.

 sound/hda/codecs/conexant.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/sound/hda/codecs/conexant.c b/sound/hda/codecs/conexant.c
index a141c94..623e466 100644
--- a/sound/hda/codecs/conexant.c
+++ b/sound/hda/codecs/conexant.c
@@ -289,6 +289,7 @@ enum {
 	CXT_FIXUP_HEADPHONE_MIC_PIN,
 	CXT_FIXUP_HEADPHONE_MIC,
 	CXT_FIXUP_GPIO1,
+	CXT_FIXUP_AMP_GPIO1,
 	CXT_FIXUP_ASPIRE_DMIC,
 	CXT_FIXUP_THINKPAD_ACPI,
 	CXT_FIXUP_LENOVO_XPAD_ACPI,
@@ -826,6 +827,17 @@ static void cxt_fixup_hp_a_u(struct hda_codec *codec,
 		cxt_setup_gpio_unmute(codec, 0x2);
 }
 
+/* Acer TravelLite TL05-41M: the analog output amplifier is enabled by
+ * codec GPIO bit 1.  The codec loses the GPIO state on a power
+ * transition, so this must be applied on every init, not only at probe.
+ */
+static void cxt_fixup_amp_gpio1(struct hda_codec *codec,
+				const struct hda_fixup *fix, int action)
+{
+	if (action == HDA_FIXUP_ACT_INIT)
+		snd_hda_codec_set_gpio(codec, 0x02, 0x02, 0x02, 0);
+}
+
 /* Huawei MateBook 14 (SN6140): the speaker output follows the headphone
  * pin's connection select in hardware.  Both pins must be routed to the
  * shared DAC 0x10, which carries the playback stream; the generic
@@ -1001,6 +1013,10 @@ static const struct hda_fixup cxt_fixups[] = {
 			{ }
 		},
 	},
+	[CXT_FIXUP_AMP_GPIO1] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = cxt_fixup_amp_gpio1,
+	},
 	[CXT_FIXUP_ASPIRE_DMIC] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = cxt_fixup_stereo_dmic,
@@ -1222,6 +1238,8 @@ static const struct hda_quirk cxt5066_fixups[] = {
 	SND_PCI_QUIRK(0x14f1, 0x0252, "MBX-Z60MR100", CXT_FIXUP_HP_A_U),
 	SND_PCI_QUIRK(0x14f1, 0x0265, "SWS JS201D", CXT_PINCFG_SWS_JS201D),
 	SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO),
+	SND_PCI_QUIRK(0x1558, 0xa600, "Acer TravelLite TL05-41M",
+		      CXT_FIXUP_AMP_GPIO1),
 	SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
 	SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410),
 	SND_PCI_QUIRK(0x17aa, 0x215f, "Lenovo T510", CXT_PINCFG_LENOVO_TP410),
@@ -1255,6 +1273,7 @@ static const struct hda_quirk cxt5066_fixups[] = {
 static const struct hda_model_fixup cxt5066_fixup_models[] = {
 	{ .id = CXT_FIXUP_STEREO_DMIC, .name = "stereo-dmic" },
 	{ .id = CXT_FIXUP_GPIO1, .name = "gpio1" },
+	{ .id = CXT_FIXUP_AMP_GPIO1, .name = "amp-gpio1" },
 	{ .id = CXT_FIXUP_HEADPHONE_MIC_PIN, .name = "headphone-mic-pin" },
 	{ .id = CXT_PINCFG_LENOVO_TP410, .name = "tp410" },
 	{ .id = CXT_FIXUP_THINKPAD_ACPI, .name = "thinkpad" },
-- 
2.56.0


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

* Re: [PATCH] ALSA: hda/conexant: Add quirk for Acer TravelLite TL05-41M
  2026-11-06 10:23 [PATCH] ALSA: hda/conexant: Add quirk for Acer TravelLite TL05-41M Devajith Jijush
@ 2026-11-06 14:34 ` Takashi Iwai
  2026-11-06 15:08 ` [PATCH v2] " Devajith Jijush
  1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2026-11-06 14:34 UTC (permalink / raw)
  To: Devajith Jijush; +Cc: linux-sound, Jaroslav Kysela, Takashi Iwai

On Fri, 06 Nov 2026 11:23:45 +0100,
Devajith Jijush wrote:
> 
> The Acer TravelLite TL05-41M (subsystem 0x1558a600) uses a Conexant
> CX11880 codec whose analog output amplifier is enabled by codec GPIO
> bit 1.  The driver has no quirk for this machine, so the line is never
> raised and both the internal speakers and the 3.5 mm combo jack stay
> silent, while the microphone on the same jack, USB and Bluetooth audio
> work normally.
> 
> Add a fixup that sets GPIO bit 1 on this subsystem ID.  It is applied
> from the HDA_FIXUP_ACT_INIT hook, since the codec loses the GPIO state
> on a power transition and the line would otherwise stay off after the
> first runtime power save.
> 
> Note that the existing CXT_FIXUP_GPIO1 fixup raises GPIO bit 0, which
> has no effect on this board.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=222238
> Signed-off-by: Devajith Jijush <devajuice@zohomail.in>
> ---
> Note for reviewers: the GPIO behaviour was verified on the affected
> machine with hda-verb; I have not built a kernel with this patch, so the
> code path itself is untested.  Setting the same three GPIO bits from
> userspace makes both the internal speakers and the headphone jack work.
> 
>  sound/hda/codecs/conexant.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/sound/hda/codecs/conexant.c b/sound/hda/codecs/conexant.c
> index a141c94..623e466 100644
> --- a/sound/hda/codecs/conexant.c
> +++ b/sound/hda/codecs/conexant.c
> @@ -289,6 +289,7 @@ enum {
>  	CXT_FIXUP_HEADPHONE_MIC_PIN,
>  	CXT_FIXUP_HEADPHONE_MIC,
>  	CXT_FIXUP_GPIO1,
> +	CXT_FIXUP_AMP_GPIO1,
>  	CXT_FIXUP_ASPIRE_DMIC,
>  	CXT_FIXUP_THINKPAD_ACPI,
>  	CXT_FIXUP_LENOVO_XPAD_ACPI,
> @@ -826,6 +827,17 @@ static void cxt_fixup_hp_a_u(struct hda_codec *codec,
>  		cxt_setup_gpio_unmute(codec, 0x2);
>  }
>  
> +/* Acer TravelLite TL05-41M: the analog output amplifier is enabled by
> + * codec GPIO bit 1.  The codec loses the GPIO state on a power
> + * transition, so this must be applied on every init, not only at probe.
> + */
> +static void cxt_fixup_amp_gpio1(struct hda_codec *codec,
> +				const struct hda_fixup *fix, int action)
> +{
> +	if (action == HDA_FIXUP_ACT_INIT)
> +		snd_hda_codec_set_gpio(codec, 0x02, 0x02, 0x02, 0);
> +}
> +
>  /* Huawei MateBook 14 (SN6140): the speaker output follows the headphone
>   * pin's connection select in hardware.  Both pins must be routed to the
>   * shared DAC 0x10, which carries the playback stream; the generic
> @@ -1001,6 +1013,10 @@ static const struct hda_fixup cxt_fixups[] = {
>  			{ }
>  		},
>  	},
> +	[CXT_FIXUP_AMP_GPIO1] = {
> +		.type = HDA_FIXUP_FUNC,
> +		.v.func = cxt_fixup_amp_gpio1,
> +	},

There is already a GPIO bit 0 setup (called gpio1)

	[CXT_FIXUP_GPIO1] = {
		.type = HDA_FIXUP_VERBS,
		.v.verbs = (const struct hda_verb[]) {
			{ 0x01, AC_VERB_SET_GPIO_MASK, 0x01 },
			{ 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01 },
			{ 0x01, AC_VERB_SET_GPIO_DATA, 0x01 },
			{ }
		},
	},

so you can implement similarly,

	[CXT_FIXUP_GPIO2] = {
		.type = HDA_FIXUP_VERBS,
		.v.verbs = (const struct hda_verb[]) {
			{ 0x01, AC_VERB_SET_GPIO_MASK, 0x02 },
			{ 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x02 },
			{ 0x01, AC_VERB_SET_GPIO_DATA, 0x02 },
			{ }
		},
	},

and use this in the quirk, instead.  Then you don't need to create a
function.

> @@ -1255,6 +1273,7 @@ static const struct hda_quirk cxt5066_fixups[] = {
>  static const struct hda_model_fixup cxt5066_fixup_models[] = {
>  	{ .id = CXT_FIXUP_STEREO_DMIC, .name = "stereo-dmic" },
>  	{ .id = CXT_FIXUP_GPIO1, .name = "gpio1" },
> +	{ .id = CXT_FIXUP_AMP_GPIO1, .name = "amp-gpio1" },
>  	{ .id = CXT_FIXUP_HEADPHONE_MIC_PIN, .name = "headphone-mic-pin" },
>  	{ .id = CXT_PINCFG_LENOVO_TP410, .name = "tp410" },
>  	{ .id = CXT_FIXUP_THINKPAD_ACPI, .name = "thinkpad" },

Please avoid adding a new model string unless needed inevitably.
We can apply the existing quirk with the alias (xxxx:yyyy), too.


thanks,

Takashi

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

* [PATCH v2] ALSA: hda/conexant: Add quirk for Acer TravelLite TL05-41M
  2026-11-06 10:23 [PATCH] ALSA: hda/conexant: Add quirk for Acer TravelLite TL05-41M Devajith Jijush
  2026-11-06 14:34 ` Takashi Iwai
@ 2026-11-06 15:08 ` Devajith Jijush
  2026-11-07  9:01   ` Takashi Iwai
  1 sibling, 1 reply; 4+ messages in thread
From: Devajith Jijush @ 2026-11-06 15:08 UTC (permalink / raw)
  To: linux-sound; +Cc: Jaroslav Kysela, Takashi Iwai

The Acer TravelLite TL05-41M (subsystem 0x1558a600) uses a Conexant
CX11880 codec whose analog output amplifier is enabled by codec GPIO
bit 1.  The driver has no quirk for this machine, so the line is never
raised and both the internal speakers and the 3.5 mm combo jack stay
silent, while the microphone on the same jack, USB and Bluetooth audio
work normally.

Add a CXT_FIXUP_GPIO2 fixup that raises GPIO bit 1 for this subsystem
ID.  The verbs are registered as init verbs, so they are replayed after
every codec resume, which matters because the codec loses the GPIO
state on a power transition.

Note that the existing CXT_FIXUP_GPIO1 fixup raises GPIO bit 0, which
has no effect on this board.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=222238
Signed-off-by: Devajith Jijush <devajuice@zohomail.in>
---
v2:
- Use HDA_FIXUP_VERBS like the existing CXT_FIXUP_GPIO1 fixup and drop
  the helper function, as suggested by Takashi Iwai.
- Drop the new model string; the quirk can be selected with the SSID
  alias model=1558:a600 instead.
- The verbs are registered as init verbs and replayed after codec
  resume, so the GPIO state is restored without a separate init hook.

 sound/hda/codecs/conexant.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sound/hda/codecs/conexant.c b/sound/hda/codecs/conexant.c
index a141c94..b0fa1cb 100644
--- a/sound/hda/codecs/conexant.c
+++ b/sound/hda/codecs/conexant.c
@@ -289,6 +289,7 @@ enum {
 	CXT_FIXUP_HEADPHONE_MIC_PIN,
 	CXT_FIXUP_HEADPHONE_MIC,
 	CXT_FIXUP_GPIO1,
+	CXT_FIXUP_GPIO2,
 	CXT_FIXUP_ASPIRE_DMIC,
 	CXT_FIXUP_THINKPAD_ACPI,
 	CXT_FIXUP_LENOVO_XPAD_ACPI,
@@ -1001,6 +1002,15 @@ static const struct hda_fixup cxt_fixups[] = {
 			{ }
 		},
 	},
+	[CXT_FIXUP_GPIO2] = {
+		.type = HDA_FIXUP_VERBS,
+		.v.verbs = (const struct hda_verb[]) {
+			{ 0x01, AC_VERB_SET_GPIO_MASK, 0x02 },
+			{ 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x02 },
+			{ 0x01, AC_VERB_SET_GPIO_DATA, 0x02 },
+			{ }
+		},
+	},
 	[CXT_FIXUP_ASPIRE_DMIC] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = cxt_fixup_stereo_dmic,
@@ -1222,6 +1232,8 @@ static const struct hda_quirk cxt5066_fixups[] = {
 	SND_PCI_QUIRK(0x14f1, 0x0252, "MBX-Z60MR100", CXT_FIXUP_HP_A_U),
 	SND_PCI_QUIRK(0x14f1, 0x0265, "SWS JS201D", CXT_PINCFG_SWS_JS201D),
 	SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO),
+	SND_PCI_QUIRK(0x1558, 0xa600, "Acer TravelLite TL05-41M",
+		      CXT_FIXUP_GPIO2),
 	SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
 	SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410),
 	SND_PCI_QUIRK(0x17aa, 0x215f, "Lenovo T510", CXT_PINCFG_LENOVO_TP410),
-- 
2.56.0


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

* Re: [PATCH v2] ALSA: hda/conexant: Add quirk for Acer TravelLite TL05-41M
  2026-11-06 15:08 ` [PATCH v2] " Devajith Jijush
@ 2026-11-07  9:01   ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2026-11-07  9:01 UTC (permalink / raw)
  To: Devajith Jijush; +Cc: linux-sound, Jaroslav Kysela, Takashi Iwai

On Fri, 06 Nov 2026 16:08:49 +0100,
Devajith Jijush wrote:
> 
> The Acer TravelLite TL05-41M (subsystem 0x1558a600) uses a Conexant
> CX11880 codec whose analog output amplifier is enabled by codec GPIO
> bit 1.  The driver has no quirk for this machine, so the line is never
> raised and both the internal speakers and the 3.5 mm combo jack stay
> silent, while the microphone on the same jack, USB and Bluetooth audio
> work normally.
> 
> Add a CXT_FIXUP_GPIO2 fixup that raises GPIO bit 1 for this subsystem
> ID.  The verbs are registered as init verbs, so they are replayed after
> every codec resume, which matters because the codec loses the GPIO
> state on a power transition.
> 
> Note that the existing CXT_FIXUP_GPIO1 fixup raises GPIO bit 0, which
> has no effect on this board.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=222238
> Signed-off-by: Devajith Jijush <devajuice@zohomail.in>

Applied now.  Thanks.


Takashi

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

end of thread, other threads:[~2026-11-07  9:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06 10:23 [PATCH] ALSA: hda/conexant: Add quirk for Acer TravelLite TL05-41M Devajith Jijush
2026-11-06 14:34 ` Takashi Iwai
2026-11-06 15:08 ` [PATCH v2] " Devajith Jijush
2026-11-07  9:01   ` Takashi Iwai

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