]> asedeno.scripts.mit.edu Git - linux.git/commit
ASoC: es8316: Add jack-detect support
authorHans de Goede <hdegoede@redhat.com>
Thu, 3 Jan 2019 13:45:26 +0000 (14:45 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 4 Jan 2019 15:09:48 +0000 (15:09 +0000)
commit822257661031faa437336058d8a32bf1844ad9c6
tree355e47b95658608421764102308705606f5f502c
parente1de3d237b5083fcd0da6fcf600848a4cef9cc67
ASoC: es8316: Add jack-detect support

Adding jack-detect support may seem weird for a codec with only
a single output, but it is necessary. The ES8316 appnote showing
the intended usage uses a jack-receptacle which physically disconnects
the speakers from the output when a jack is plugged in.

But all 3 devices using the es8316 which I have (2 Cherry Trail
devices and one Bay Trail CR device), use an analog mux to disconnect
the speakers, driven by a GPIO. In order to enable/disable the speakers
at the right time, we need jack-detect.

The same goes for the microphone where we must correctly set the mux
for the single ADC to either the internal or the headset microphone.

All devices I have support the es8316's builtin jack-detect functionality.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/es8316.c
sound/soc/codecs/es8316.h