The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/conexant: Set mic pin VREF to 0x24 on headset mic plug
@ 2026-08-25  2:38 songxiebing
  2026-08-25  8:22 ` Takashi Iwai
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: songxiebing @ 2026-08-25  2:38 UTC (permalink / raw)
  To: tiwai, perex; +Cc: linux-sound, linux-kernel, songxiebing

From: Bob Song <songxiebing@kylinos.cn>

For 3-pole headset microphones, the mic pin VREF must always be
configured to 0x24 regardless of the headset type, otherwise the
mic will not be able to record audio. Move the setting of the mic
pin widget control to a common path.

Signed-off-by: Bob Song <songxiebing@kylinos.cn>
---
 sound/hda/codecs/conexant.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/hda/codecs/conexant.c b/sound/hda/codecs/conexant.c
index 40da2832ba66..a18091a2866f 100644
--- a/sound/hda/codecs/conexant.c
+++ b/sound/hda/codecs/conexant.c
@@ -225,13 +225,12 @@ static void cx_process_headset_plugin(struct hda_codec *codec)
 	val = snd_hda_codec_read(codec, 0x1c, 0, 0xcb0, 0x0);
 	if (val & 0x800) {
 		codec_dbg(codec, "headset plugin, type is CTIA\n");
-		snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24);
 	} else if (val & 0x400) {
 		codec_dbg(codec, "headset plugin, type is OMTP\n");
-		snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24);
 	} else {
-		codec_dbg(codec, "headphone plugin\n");
+		codec_dbg(codec, "mic plugin\n");
 	}
+	snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24);
 }
 
 static void cx_update_headset_mic_vref(struct hda_codec *codec, struct hda_jack_callback *event)
-- 
2.25.1


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

end of thread, other threads:[~2026-08-26  8:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25  2:38 [PATCH] ALSA: hda/conexant: Set mic pin VREF to 0x24 on headset mic plug songxiebing
2026-08-25  8:22 ` Takashi Iwai
2026-08-25  9:13 ` songxiebing
2026-08-25  9:28   ` Takashi Iwai
2026-08-25  9:45 ` songxiebing
2026-08-25  9:55   ` Takashi Iwai
2026-08-26  1:12 ` songxiebing
2026-08-26  1:45 ` [PATCH v2] ALSA: hda/conexant: Refactor headset plug detection songxiebing
2026-08-26  8:48   ` Takashi Iwai

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