]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rk3399_gru_sound: Add DAPM pins, kcontrols for jack detection
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>
Tue, 21 Jul 2020 18:27:10 +0000 (21:27 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 30 Jul 2020 21:54:39 +0000 (22:54 +0100)
commit41a4972ebf2fa9b84a0d96acc5d0fa45d534b652
tree2de053ecd6c9ca466f00337039597e35cd9294ba
parent3f5fc9f3969677b1e35c91750706cb9588dca96f
ASoC: rk3399_gru_sound: Add DAPM pins, kcontrols for jack detection

PulseAudio (and perhaps other userspace utilities) can not detect any
jack for rk3399_gru_sound as the driver doesn't expose related Jack
kcontrols.

This patch adds two DAPM pins to the headset jack, where the
snd_soc_card_jack_new() call automatically creates "Headphones Jack" and
"Headset Mic Jack" kcontrols from them.

With an appropriate ALSA UCM config specifying JackControl fields for
the "Headphones" and "Headset" (mic) devices, PulseAudio can detect
plug/unplug events for both of them after this patch.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/r/20200721182709.6895-1-alpernebiyasak@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/rockchip/rk3399_gru_sound.c