summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-03-04 15:35:55 +0100
committerMark Brown <broonie@kernel.org>2018-03-07 12:54:00 +0000
commit4b4a373c0212e084045530e47071374a87a3761e (patch)
treef2ab4fd410e24444afa15a08a5fe2a2068d3cc01
parent1b1ad83539a701a6bdcb25dc9160386e71f6016e (diff)
downloadlinux-4b4a373c0212e084045530e47071374a87a3761e.tar.gz
linux-4b4a373c0212e084045530e47071374a87a3761e.tar.xz
ASoC: rt5651: Enable Platform Clock during jack-type detect
When using RCCLK instead of MCLK / PLL1 the OVCD status often gets stuck at its last value, which breaks jack-type detection. This commit fixes this by force-enabling the platform clock when doing jack-type detection. Tested-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/rt5651.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c
index 62918f7e8270..873af6798d7a 100644
--- a/sound/soc/codecs/rt5651.c
+++ b/sound/soc/codecs/rt5651.c
@@ -1563,6 +1563,8 @@ static void rt5651_enable_micbias1_for_ovcd(struct snd_soc_component *component)
snd_soc_dapm_mutex_lock(dapm);
snd_soc_dapm_force_enable_pin_unlocked(dapm, "LDO");
snd_soc_dapm_force_enable_pin_unlocked(dapm, "micbias1");
+ /* OVCD is unreliable when used with RCCLK as sysclk-source */
+ snd_soc_dapm_force_enable_pin_unlocked(dapm, "Platform Clock");
snd_soc_dapm_sync_unlocked(dapm);
snd_soc_dapm_mutex_unlock(dapm);
}
@@ -1572,6 +1574,7 @@ static void rt5651_disable_micbias1_for_ovcd(struct snd_soc_component *component
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
snd_soc_dapm_mutex_lock(dapm);
+ snd_soc_dapm_disable_pin_unlocked(dapm, "Platform Clock");
snd_soc_dapm_disable_pin_unlocked(dapm, "micbias1");
snd_soc_dapm_disable_pin_unlocked(dapm, "LDO");
snd_soc_dapm_sync_unlocked(dapm);