ASoC: Intel: bytcr_rt5640: Add support for HP Elite Pad 1000G2 jack-detect
authorHans de Goede <hdegoede@redhat.com>
Thu, 19 Aug 2021 19:05:43 +0000 (21:05 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 19 Aug 2021 22:28:00 +0000 (23:28 +0100)
commit9ba00856686ade106afee2884b5e8ac1e09d137a
tree715f1959ef215e3adf88442a712c5d596af1721e
parent0a61bcbba8737fe6d43dc34070ffa84a2f12e990
ASoC: Intel: bytcr_rt5640: Add support for HP Elite Pad 1000G2 jack-detect

The HP Elitepad 1000 G2 tablet has 2 headset jacks:

1. on the dock which uses the output of the codecs built-in HP-amp +
the standard IN2 input which is always used with the headset-jack.

2. on the tablet itself, this uses the line-out of the codec + an external
HP-amp, which gets enabled by the ALC5642 codec's GPIO1 pin; and IN1 for
the headset-mic.

The codec's GPIO1 is also its only IRQ output pin, so this means that
the codec's IRQ cannot be used on this tablet. Instead the jack-detect
is connected directly to GPIOs on the main SoC. The dock has a helper
chip which also detects if a headset-mic is present or not, so there
are 2 GPIOs for the jack-detect status of the dock. The tablet jack
uses a single GPIO which indicates if a jack is present or not.

Differentiating between headphones vs a headset on the tablet jack
is done by using the usual mic-bias over-current-detection mechanism.

Add support for this unique setup, this support gets enabled on this
tablet through a new BYT_RT5640_JD_HP_ELITEP_1000G2 quirk.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213415
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210819190543.784415-7-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bytcr_rt5640.c