[PATCH 5/5] ASoC: Intel: bytcr_rt5640: Add support for external GPIO jack-detect
Stephan Gerhold
stephan at gerhold.net
Thu Dec 30 19:56:26 CET 2021
On Mon, Dec 27, 2021 at 04:33:44PM +0100, Hans de Goede wrote:
> Some boards have the codec IRQ hooked-up as normally, so the driver can
> still do things like headset vs headphones and button-press detection,
> but instead of using one of the JD pins of the codec, an external GPIO
> is used to report the jack-presence switch status of the jack.
>
> Add support for boards which have this setup and which specify which
> external GPIO to use in the special Android AMCR0F28 ACPI device.
>
> And add a quirk for the Asus TF103C tablet which uses this setup.
>
Can you clarify what exactly is the difference between the setup on
ME176C and the TF103C? I'm a bit confused why you're using the GpioInt
as GPIO for TF103C and as IRQ for ME176C. It's GPO2 pin 0x0004 for both
of them as far as I can tell.
If I remember correctly the vendor kernel from ASUS also used it as
simple GPIO on ME176C. I'm not sure if it actually belongs to the
RT5640, I just tried using it in a way that is compatible with your
headphone detection code. :)
Before I switched to your code I was actually using it as simple GPIO
similar to your changes here (this could only detect headphones though):
https://github.com/me176c-dev/linux-me176c/commit/ea3de8e47414371fdeeae819c686f737c02fac7d#diff-28a5a6c5e3db2a315d022023f3cda69ef0475ef036e22dd5ffa0fb4af31c9f81
In other words, my question is: Should we also use BYT_RT5640_JD_SRC_EXT_GPIO
for ME176C? Or can TF103C also use the same setup as ME176C?
Thanks,
Stephan
More information about the Alsa-devel
mailing list