ALSA: hda/conexant: Fix headset auto detect fail in cx8070 and SN6140
authorbo liu <bo.liu@senarytech.com>
Mon, 8 Jan 2024 11:02:35 +0000 (19:02 +0800)
committerTakashi Iwai <tiwai@suse.de>
Mon, 8 Jan 2024 13:08:35 +0000 (14:08 +0100)
commit7aeb259086487417f0fecf66e325bee133e8813a
tree40b1cef43e948313dfa20b6df76bee5bafda549a
parent0205f3753dbe15fe8b5c08302f44b69a80a83167
ALSA: hda/conexant: Fix headset auto detect fail in cx8070 and SN6140

When OMTP headset plugin the headset jack of CX8070 and SN6160 sound cards,
the headset type detection circuit will recognize the headset type as CTIA.
At this point, plugout and plugin the headset will get the correct headset
type as OMTP.
The reason for the failure of headset type recognition is that the sound
card creation will enable the VREF voltage of the headset mic, which
interferes with the headset type automatic detection circuit. Plugout and
plugin the headset will restart the headset detection and get the correct
headset type.
The patch is disable the VREF voltage when the headset is not present, and
will enable the VREF voltage when the headset is present.

Signed-off-by: bo liu <bo.liu@senarytech.com>
Link: https://lore.kernel.org/r/20240108110235.3867-1-bo.liu@senarytech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_conexant.c