ASoC: rt5645: The ALC3270 variant does not have a headset-mic pin
authorHans de Goede <hdegoede@redhat.com>
Sat, 6 Mar 2021 23:02:23 +0000 (00:02 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 10 Mar 2021 13:13:30 +0000 (13:13 +0000)
commit3f004d2dc118e5e5d0162a077618aaa4bff9e555
treec6097a4e733f7b990753a4903e8c9f80f47969e8
parent452801cabc0a0f0cb742e98617d3f0e8a2b11295
ASoC: rt5645: The ALC3270 variant does not have a headset-mic pin

The Asus T100HA and T101HA 2-in-1s use a rt5645 family codec and always
report that a headset (rather then headphones) are plugged in even when
regular headphones are plugged in.

And when a headset is used, then the headset-microphone does not work.
According to RealTek the ALC3270 variant used in these devices does not
support headsets only headphones.

Since the ALC3270 is a budget version of the regular ALC5645 codec,
I assume that it is using a package with less pins and the headset-mic
pin is simply not connected.

Detect if the codec is an ALC3270 based on the ACPI HID and if it is
an ALC3270 then always report SND_JACK_MICROPHONE as false, so that
userspace will not try to use the not-connected headset-mic.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210306230223.516566-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5645.c