Skip to contentSkip to conversation

ALSA: hda/realtek: Add ALC235 support for headset mode

PATCH In review Zeyu Li 3 participants 5 messages Sep 26 – Oct 1 Sound

lore
Share & tools
lore

Zeyu Li

author
#0 lore raw

PATCH 1/1 ALSA: hda/realtek: Add ALC235 support for headset mode

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.

---
 sound/hda/codecs/realtek/realtek.c | 6 ++++++
 1 file changed, 6 insertions(+)
sound/hda/codecs/realtek/realtek.c +6 -0
index db365a746..bc5226fad 100644
@@ -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);
Signature · 1 line
2.53.0
#1 lore raw
Quoted 61 lines · 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.

---
 sound/hda/codecs/realtek/realtek.c | 6 ++++++
 1 file changed, 6 insertions(+)
sound/hda/codecs/realtek/realtek.c +5 -0
index db365a746..bc5226fad 100644
@@ -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;

sound/hda/codecs/realtek/realtek.c static void alc_determine_headset_type(struct hda_codec *codec) · line 1892

Quoted 7 lines
sound/hda/codecs/realtek/realtek.c +1 -0
@@ -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

author
#2 lore raw

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

#3 lore raw
Quoted 12 lines · Zeyu Li

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.

Quoted 2 lines

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

#4 lore raw
In reply to Takashi Iwai

-----Original Message-----
From: Takashi Iwai <[email protected]>
Sent: Monday, September 28, 2026 8:50 PM
To: Zeyu Li <[email protected]>
Cc: [email protected]; Takashi Iwai <[email protected]>; Jaroslav Kysela <[email protected]>; Kailang <[email protected]>
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.

Quoted 70 lines · 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.

---
 sound/hda/codecs/realtek/realtek.c | 6 ++++++
 1 file changed, 6 insertions(+)
sound/hda/codecs/realtek/realtek.c +7 -0
index db365a746..bc5226fad 100644
@@ -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);
Quoted 3 lines

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.

Quoted 3 lines

thanks,

Takashi