* [PATCH] ALSA: hda/realtek: Add ALC235 support for headset mode
@ 2026-09-26 14:03 Zeyu Li
[not found] ` <20260926135800.27347-1-13776528859@163.com>
0 siblings, 1 reply; 5+ messages in thread
From: Zeyu Li @ 2026-09-26 14:03 UTC (permalink / raw)
To: linux-sound; +Cc: Takashi Iwai, Jaroslav Kysela, Zeyu Li
The ALC235 (0x10ec0235) is registered as the ALC255 codec variant in
patch_alc269(), but the headset mode functions were missing a case
for it, so the CTIA/OMTP jack type detection and routing never ran
on this codec. As a result, a plugged-in headset is detected (jack
presence works) but the microphone signal is never routed, leaving
the capture stream permanently silent.
Verified on an ASUS M5451GA laptop (HDA:10ec0235,10431814): with the
ALC255 coef sequence applied, the headset microphone works correctly.
Signed-off-by: Zeyu Li <13776528859@163.com>
---
sound/hda/codecs/realtek/realtek.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/hda/codecs/realtek/realtek.c b/sound/hda/codecs/realtek/realtek.c
index db365a746..bc5226fad 100644
--- a/sound/hda/codecs/realtek/realtek.c
+++ b/sound/hda/codecs/realtek/realtek.c
@@ -1292,6 +1292,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
}
switch (codec->core.vendor_id) {
+ case 0x10ec0235:
case 0x10ec0255:
alc_process_coef_fw(codec, coef0255);
break;
@@ -1407,6 +1408,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
};
switch (codec->core.vendor_id) {
+ case 0x10ec0235:
case 0x10ec0255:
alc_write_coef_idx(codec, 0x45, 0xc489);
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
@@ -1562,6 +1564,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
alc_process_coef_fw(codec, coef0225);
alc_hp_enable_unmute(codec, 75);
break;
+ case 0x10ec0235:
case 0x10ec0255:
alc_process_coef_fw(codec, coef0255);
break;
@@ -1663,6 +1666,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
};
switch (codec->core.vendor_id) {
+ case 0x10ec0235:
case 0x10ec0255:
alc_process_coef_fw(codec, coef0255);
break;
@@ -1780,6 +1784,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
};
switch (codec->core.vendor_id) {
+ case 0x10ec0235:
case 0x10ec0255:
alc_process_coef_fw(codec, coef0255);
break;
@@ -1881,6 +1886,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
}
switch (codec->core.vendor_id) {
+ case 0x10ec0235:
case 0x10ec0255:
alc_process_coef_fw(codec, coef0255);
msleep(300);
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <20260926135800.27347-1-13776528859@163.com>]
* Re: [PATCH] ALSA: hda/realtek: Add ALC235 support for headset mode [not found] ` <20260926135800.27347-1-13776528859@163.com> @ 2026-09-28 12:50 ` Takashi Iwai 2026-09-28 14:12 ` Zeyu Li 2026-10-01 6:18 ` Kailang 0 siblings, 2 replies; 5+ messages in thread From: Takashi Iwai @ 2026-09-28 12:50 UTC (permalink / raw) To: Zeyu Li; +Cc: linux-sound, Takashi Iwai, Jaroslav Kysela, Kailang On Sat, 26 Sep 2026 15:58:00 +0200, Zeyu Li wrote: > > The ALC235 (0x10ec0235) is registered as the ALC255 codec variant in > patch_alc269(), but the headset mode functions were missing a case > for it, so the CTIA/OMTP jack type detection and routing never ran > on this codec. As a result, a plugged-in headset is detected (jack > presence works) but the microphone signal is never routed, leaving > the capture stream permanently silent. > > Verified on an ASUS M5451GA laptop (HDA:10ec0235,10431814): with the > ALC255 coef sequence applied, the headset microphone works correctly. > > Signed-off-by: Zeyu Li <13776528859@163.com> > --- > sound/hda/codecs/realtek/realtek.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/sound/hda/codecs/realtek/realtek.c b/sound/hda/codecs/realtek/realtek.c > index db365a746..bc5226fad 100644 > --- a/sound/hda/codecs/realtek/realtek.c > +++ b/sound/hda/codecs/realtek/realtek.c > @@ -1292,6 +1292,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) > } > > switch (codec->core.vendor_id) { > + case 0x10ec0235: > case 0x10ec0255: > alc_process_coef_fw(codec, coef0255); > break; > @@ -1407,6 +1408,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, > }; > > switch (codec->core.vendor_id) { > + case 0x10ec0235: > case 0x10ec0255: > alc_write_coef_idx(codec, 0x45, 0xc489); > snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); > @@ -1562,6 +1564,7 @@ static void alc_headset_mode_default(struct hda_codec *codec) > alc_process_coef_fw(codec, coef0225); > alc_hp_enable_unmute(codec, 75); > break; > + case 0x10ec0235: > case 0x10ec0255: > alc_process_coef_fw(codec, coef0255); > break; > @@ -1663,6 +1666,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec) > }; > > switch (codec->core.vendor_id) { > + case 0x10ec0235: > case 0x10ec0255: > alc_process_coef_fw(codec, coef0255); > break; > @@ -1780,6 +1784,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec) > }; > > switch (codec->core.vendor_id) { > + case 0x10ec0235: > case 0x10ec0255: > alc_process_coef_fw(codec, coef0255); > break; > @@ -1881,6 +1886,7 @@ static void alc_determine_headset_type(struct hda_codec *codec) > } > > switch (codec->core.vendor_id) { > + case 0x10ec0235: > case 0x10ec0255: > alc_process_coef_fw(codec, coef0255); > msleep(300); I'm not sure whether it's 100% safe to apply this, and I'd like to hear from Realtek. Kailang, could you check it? Can ALC235 be fully compatible in this manner? thanks, Takashi ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ALSA: hda/realtek: Add ALC235 support for headset mode 2026-09-28 12:50 ` Takashi Iwai @ 2026-09-28 14:12 ` Zeyu Li 2026-10-01 7:15 ` Takashi Iwai 2026-10-01 6:18 ` Kailang 1 sibling, 1 reply; 5+ messages in thread From: Zeyu Li @ 2026-09-28 14:12 UTC (permalink / raw) To: Takashi Iwai; +Cc: Kailang Yang, Jaroslav Kysela, linux-sound Hi Takashi, Thanks for picking this up. To confirm the test setup: this was verified on an ASUS M5451GA laptop (codec HDA:10ec0235,10431814). Before the change, plugging in a CTIA headset was detected by jack sense (mic presence and VREF bias were set correctly), but the capture stream stayed permanently silent. After applying the ALC255 coefficient sequence (COEF 0x45=0xd489, 0x1b=0x0c2b), the headset microphone captures audio correctly. I'm happy to test any alternative coefficient values if Realtek suggests a different sequence for the ALC235. Best regards, Zeyu Li ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ALSA: hda/realtek: Add ALC235 support for headset mode 2026-09-28 14:12 ` Zeyu Li @ 2026-10-01 7:15 ` Takashi Iwai 0 siblings, 0 replies; 5+ messages in thread From: Takashi Iwai @ 2026-10-01 7:15 UTC (permalink / raw) To: Zeyu Li; +Cc: Takashi Iwai, Kailang Yang, Jaroslav Kysela, linux-sound On Mon, 28 Sep 2026 16:12:00 +0200, Zeyu Li wrote: > > Hi Takashi, > > Thanks for picking this up. > > To confirm the test setup: this was verified on an ASUS M5451GA laptop > (codec HDA:10ec0235,10431814). Before the change, plugging in a CTIA > headset was detected by jack sense (mic presence and VREF bias were > set correctly), but the capture stream stayed permanently silent. > After applying the ALC255 coefficient sequence (COEF 0x45=0xd489, > 0x1b=0x0c2b), the headset microphone captures audio correctly. > > I'm happy to test any alternative coefficient values if Realtek > suggests a different sequence for the ALC235. I applied the patch now. thanks, Takashi ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] ALSA: hda/realtek: Add ALC235 support for headset mode 2026-09-28 12:50 ` Takashi Iwai 2026-09-28 14:12 ` Zeyu Li @ 2026-10-01 6:18 ` Kailang 1 sibling, 0 replies; 5+ messages in thread From: Kailang @ 2026-10-01 6:18 UTC (permalink / raw) To: Takashi Iwai, Zeyu Li Cc: linux-sound@vger.kernel.org, Takashi Iwai, Jaroslav Kysela -----Original Message----- From: Takashi Iwai <tiwai@suse.de> Sent: Monday, September 28, 2026 8:50 PM To: Zeyu Li <13776528859@163.com> Cc: linux-sound@vger.kernel.org; Takashi Iwai <tiwai@suse.com>; Jaroslav Kysela <perex@perex.cz>; Kailang <kailang@realtek.com> Subject: Re: [PATCH] ALSA: hda/realtek: Add ALC235 support for headset mode External mail : This email originated from outside the organization. Do not reply, click links, or open attachments unless you recognize the sender and know the content is safe. On Sat, 26 Sep 2026 15:58:00 +0200, Zeyu Li wrote: > > The ALC235 (0x10ec0235) is registered as the ALC255 codec variant in > patch_alc269(), but the headset mode functions were missing a case for > it, so the CTIA/OMTP jack type detection and routing never ran on this > codec. As a result, a plugged-in headset is detected (jack presence > works) but the microphone signal is never routed, leaving the capture > stream permanently silent. > > Verified on an ASUS M5451GA laptop (HDA:10ec0235,10431814): with the > ALC255 coef sequence applied, the headset microphone works correctly. > > Signed-off-by: Zeyu Li <13776528859@163.com> > --- > sound/hda/codecs/realtek/realtek.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/sound/hda/codecs/realtek/realtek.c > b/sound/hda/codecs/realtek/realtek.c > index db365a746..bc5226fad 100644 > --- a/sound/hda/codecs/realtek/realtek.c > +++ b/sound/hda/codecs/realtek/realtek.c > @@ -1292,6 +1292,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) > } > > switch (codec->core.vendor_id) { > + case 0x10ec0235: > case 0x10ec0255: > alc_process_coef_fw(codec, coef0255); > break; > @@ -1407,6 +1408,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, > }; > > switch (codec->core.vendor_id) { > + case 0x10ec0235: > case 0x10ec0255: > alc_write_coef_idx(codec, 0x45, 0xc489); > snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); @@ -1562,6 > +1564,7 @@ static void alc_headset_mode_default(struct hda_codec *codec) > alc_process_coef_fw(codec, coef0225); > alc_hp_enable_unmute(codec, 75); > break; > + case 0x10ec0235: > case 0x10ec0255: > alc_process_coef_fw(codec, coef0255); > break; > @@ -1663,6 +1666,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec) > }; > > switch (codec->core.vendor_id) { > + case 0x10ec0235: > case 0x10ec0255: > alc_process_coef_fw(codec, coef0255); > break; > @@ -1780,6 +1784,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec) > }; > > switch (codec->core.vendor_id) { > + case 0x10ec0235: > case 0x10ec0255: > alc_process_coef_fw(codec, coef0255); > break; > @@ -1881,6 +1886,7 @@ static void alc_determine_headset_type(struct hda_codec *codec) > } > > switch (codec->core.vendor_id) { > + case 0x10ec0235: > case 0x10ec0255: > alc_process_coef_fw(codec, coef0255); > msleep(300); >I'm not sure whether it's 100% safe to apply this, and I'd like to hear from Realtek. >Kailang, could you check it? Can ALC235 be fully compatible in this manner? Yes, it's compatible. >thanks, >Takashi ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-01 7:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-26 14:03 [PATCH] ALSA: hda/realtek: Add ALC235 support for headset mode Zeyu Li
[not found] ` <20260926135800.27347-1-13776528859@163.com>
2026-09-28 12:50 ` Takashi Iwai
2026-09-28 14:12 ` Zeyu Li
2026-10-01 7:15 ` Takashi Iwai
2026-10-01 6:18 ` Kailang
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).