}
 EXPORT_SYMBOL_GPL(rt5640_sel_asrc_clk_src);
 
-static void rt5640_enable_micbias1_for_ovcd(struct snd_soc_component *component)
+void rt5640_enable_micbias1_for_ovcd(struct snd_soc_component *component)
 {
        struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
 
        snd_soc_dapm_sync_unlocked(dapm);
        snd_soc_dapm_mutex_unlock(dapm);
 }
+EXPORT_SYMBOL_GPL(rt5640_enable_micbias1_for_ovcd);
 
-static void rt5640_disable_micbias1_for_ovcd(struct snd_soc_component *component)
+void rt5640_disable_micbias1_for_ovcd(struct snd_soc_component *component)
 {
        struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
 
        snd_soc_dapm_sync_unlocked(dapm);
        snd_soc_dapm_mutex_unlock(dapm);
 }
+EXPORT_SYMBOL_GPL(rt5640_disable_micbias1_for_ovcd);
 
 static void rt5640_enable_micbias1_ovcd_irq(struct snd_soc_component *component)
 {
        cancel_delayed_work_sync(&rt5640->bp_work);
 }
 
+void rt5640_set_ovcd_params(struct snd_soc_component *component)
+{
+       struct rt5640_priv *rt5640 = snd_soc_component_get_drvdata(component);
+
+       snd_soc_component_write(component, RT5640_PR_BASE + RT5640_BIAS_CUR4,
+               0xa800 | rt5640->ovcd_sf);
+
+       snd_soc_component_update_bits(component, RT5640_MICBIAS,
+               RT5640_MIC1_OVTH_MASK | RT5640_MIC1_OVCD_MASK,
+               rt5640->ovcd_th | RT5640_MIC1_OVCD_EN);
+
+       /*
+        * The over-current-detect is only reliable in detecting the absence
+        * of over-current, when the mic-contact in the jack is short-circuited,
+        * the hardware periodically retries if it can apply the bias-current
+        * leading to the ovcd status flip-flopping 1-0-1 with it being 0 about
+        * 10% of the time, as we poll the ovcd status bit we might hit that
+        * 10%, so we enable sticky mode and when checking OVCD we clear the
+        * status, msleep() a bit and then check to get a reliable reading.
+        */
+       snd_soc_component_update_bits(component, RT5640_IRQ_CTRL2,
+               RT5640_MB1_OC_STKY_MASK, RT5640_MB1_OC_STKY_EN);
+}
+EXPORT_SYMBOL_GPL(rt5640_set_ovcd_params);
+
 static void rt5640_disable_jack_detect(struct snd_soc_component *component)
 {
        struct rt5640_priv *rt5640 = snd_soc_component_get_drvdata(component);
        /* Enabling jd2 in general control 2 */
        snd_soc_component_write(component, RT5640_DUMMY2, 0x4001);
 
-       snd_soc_component_write(component, RT5640_PR_BASE + RT5640_BIAS_CUR4,
-               0xa800 | rt5640->ovcd_sf);
-
-       snd_soc_component_update_bits(component, RT5640_MICBIAS,
-               RT5640_MIC1_OVTH_MASK | RT5640_MIC1_OVCD_MASK,
-               rt5640->ovcd_th | RT5640_MIC1_OVCD_EN);
-
-       /*
-        * The over-current-detect is only reliable in detecting the absence
-        * of over-current, when the mic-contact in the jack is short-circuited,
-        * the hardware periodically retries if it can apply the bias-current
-        * leading to the ovcd status flip-flopping 1-0-1 with it being 0 about
-        * 10% of the time, as we poll the ovcd status bit we might hit that
-        * 10%, so we enable sticky mode and when checking OVCD we clear the
-        * status, msleep() a bit and then check to get a reliable reading.
-        */
-       snd_soc_component_update_bits(component, RT5640_IRQ_CTRL2,
-               RT5640_MB1_OC_STKY_MASK, RT5640_MB1_OC_STKY_EN);
+       rt5640_set_ovcd_params(component);
 
        /*
         * All IRQs get or-ed together, so we need the jack IRQ to report 0