[PATCH] ALSA: hda/conexant: Set mic pin VREF to 0x24 on headset mic plug

songxiebing <[email protected]>
Newsgroups gmane.linux.sound,gmane.linux.kernel
Message-ID <[email protected]>
From: Bob Song <[email protected]>

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 <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.