mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
ALSA: hda/conexant: Simplify headset plugin type handling
Both the CTIA and OMTP branches of cx_process_headset_plugin() write the same value to the headset-mic pin, differing only in the debug message. Merge the two branches into a single one, leaving the codec write unchanged. No functional change. Signed-off-by: Zhang Heng <zhangheng@kylinos.cn> Link: https://patch.msgid.link/20260820073744.521680-1-zhangheng@kylinos.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -223,11 +223,9 @@ static void cx_process_headset_plugin(struct hda_codec *codec)
|
||||
count++;
|
||||
} while (count < 3);
|
||||
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");
|
||||
if (val & 0xc00) {
|
||||
codec_dbg(codec, "headset plugin, type is %s\n",
|
||||
val & 0x800 ? "CTIA" : "OMTP");
|
||||
snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24);
|
||||
} else {
|
||||
codec_dbg(codec, "headphone plugin\n");
|
||||
|
||||
Reference in New Issue
Block a user