summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5640.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-08-19 21:05:41 +0200
committerMark Brown <broonie@kernel.org>2021-08-19 23:27:58 +0100
commite3f2a6603a982467601e0831d706786ed1ade833 (patch)
tree0e5f80e6aee84d22b96ca38d7e9c8ce3101f5db5 /sound/soc/codecs/rt5640.h
parentd21213b4503ea66777313e4345e116cc8a5366bf (diff)
downloadlinux-stable-e3f2a6603a982467601e0831d706786ed1ade833.tar.gz
linux-stable-e3f2a6603a982467601e0831d706786ed1ade833.tar.bz2
linux-stable-e3f2a6603a982467601e0831d706786ed1ade833.zip
ASoC: rt5640: Add rt5640_set_ovcd_params() helper
Some devices don't use the builtin jack-detect but can still benefit from the mic-bias-current over-current-detection to differentiate between headphones vs a headset. Move the ovcd init code from rt5640_enable_jack_detect() into a new rt5640_set_ovcd_params() helper and export this helper as well as a couple of related ovcd functions. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210819190543.784415-5-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5640.h')
-rw-r--r--sound/soc/codecs/rt5640.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5640.h b/sound/soc/codecs/rt5640.h
index 4d19997dd684..2c28f83e338a 100644
--- a/sound/soc/codecs/rt5640.h
+++ b/sound/soc/codecs/rt5640.h
@@ -2157,6 +2157,10 @@ int rt5640_dmic_enable(struct snd_soc_component *component,
bool dmic1_data_pin, bool dmic2_data_pin);
int rt5640_sel_asrc_clk_src(struct snd_soc_component *component,
unsigned int filter_mask, unsigned int clk_src);
+
+void rt5640_set_ovcd_params(struct snd_soc_component *component);
+void rt5640_enable_micbias1_for_ovcd(struct snd_soc_component *component);
+void rt5640_disable_micbias1_for_ovcd(struct snd_soc_component *component);
int rt5640_detect_headset(struct snd_soc_component *component, struct gpio_desc *hp_det_gpio);
#endif