]> git.itanic.dy.fi Git - linux-stable/commit
ASoC: mediatek: mt8192-mt6359: Expose individual headset jack pins
authorNícolas F. R. A. Prado <nfraprado@collabora.com>
Thu, 22 Sep 2022 23:59:46 +0000 (19:59 -0400)
committerMark Brown <broonie@kernel.org>
Fri, 23 Sep 2022 12:56:04 +0000 (13:56 +0100)
commit194ff8db03782d1dae41b7b42ea65da5748884c2
treee18865122d6e85fcfc3098f755e832d51ac34835
parente2f0b9277810685f6a67201847082ec9852853bd
ASoC: mediatek: mt8192-mt6359: Expose individual headset jack pins

The rt5682 codec is able to distinguish between two event types:
headphone insertion/removal and headset microphone insertion/removal.
However, currently, the mt8192-mt6359 driver exposes a single kcontrol
for the headset jack, so userspace isn't able to differentiate between
the two events.

Add a definition for the headset jack pins, so that a separate jack
kcontrol is created for each one, allowing userspace to track and handle
them individually.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220922235951.252532-2-nfraprado@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c