]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda/realtek: fix a determine_headset_type issue for a Dell AIO
authorHui Wang <hui.wang@canonical.com>
Sat, 20 Mar 2021 09:15:41 +0000 (17:15 +0800)
committerTakashi Iwai <tiwai@suse.de>
Mon, 22 Mar 2021 11:19:17 +0000 (12:19 +0100)
commita0b9fb16ea21d11089b80f68632802b56ddde4a3
tree99f4cc424d35327e6a3f3000d8a479b22d998ad4
parent12e829dae7a15f7f6eb36f1c5738c6b22f4c3970
ALSA: hda/realtek: fix a determine_headset_type issue for a Dell AIO

We found a recording issue on a Dell AIO, users plug a headset-mic and
select headset-mic from UI, but can't record any sound from
headset-mic. The root cause is the determine_headset_type() returns a
wrong type, e.g. users plug a ctia type headset, but that function
returns omtp type.

On this machine, the internal mic is not connected to the codec, the
"Input Source" is headset mic by default. And when users plug a
headset, the determine_headset_type() will be called immediately, the
codec on this AIO is alc274, the delay time for this codec in the
determine_headset_type() is only 80ms, the delay is too short to
correctly determine the headset type, the fail rate is nearly 99% when
users plug the headset with the normal speed.

Other codecs set several hundred ms delay time, so here I change the
delay time to 850ms for alc2x4 series, after this change, the fail
rate is zero unless users plug the headset slowly on purpose.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20210320091542.6748-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_realtek.c