ASoC: Intel: bytcht_es8316: Add external speaker mux support
The ES8316 only has a single (amplified) output. 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. This commit adds support for this, modelling this as a separate speaker widget / dapm pin-switch which sets the mux to drive the speakers when selected. The intend is for userspace to use the recently added jack-detect support and then automatically select either the Headphone or Speaker output based on that. Note this commit includes a workaround for an ACPI table bug which is present on 2 of the 3 devices I have, see the added comment in the code. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment