Loading asoc/codecs/wcd937x/internal.h +4 −0 Original line number Original line Diff line number Diff line Loading @@ -133,6 +133,7 @@ enum { WCD_BOLERO_EVT_RX_MUTE = 1, /* for RX mute/unmute */ WCD_BOLERO_EVT_RX_MUTE = 1, /* for RX mute/unmute */ WCD_BOLERO_EVT_IMPED_TRUE, /* for imped true */ WCD_BOLERO_EVT_IMPED_TRUE, /* for imped true */ WCD_BOLERO_EVT_IMPED_FALSE, /* for imped false */ WCD_BOLERO_EVT_IMPED_FALSE, /* for imped false */ WCD_BOLERO_EVT_BCS_CLK_OFF, }; }; enum { enum { Loading Loading @@ -164,6 +165,9 @@ enum { WCD937X_NUM_IRQS, WCD937X_NUM_IRQS, }; }; extern void wcd937x_disable_bcs_before_slow_insert( struct snd_soc_component *component, bool bcs_disable); extern struct wcd937x_mbhc *wcd937x_soc_get_mbhc( extern struct wcd937x_mbhc *wcd937x_soc_get_mbhc( struct snd_soc_component *component); struct snd_soc_component *component); extern int wcd937x_mbhc_micb_adjust_voltage(struct snd_soc_component *component, extern int wcd937x_mbhc_micb_adjust_voltage(struct snd_soc_component *component, Loading asoc/codecs/wcd937x/wcd937x-mbhc.c +10 −0 Original line number Original line Diff line number Diff line Loading @@ -810,6 +810,15 @@ static void wcd937x_mbhc_moisture_polling_ctrl(struct wcd_mbhc *mbhc, 0x04, (enable << 2)); 0x04, (enable << 2)); } } static void wcd937x_mbhc_bcs_enable(struct wcd_mbhc *mbhc, bool bcs_enable) { if (bcs_enable) wcd937x_disable_bcs_before_slow_insert(mbhc->component, false); else wcd937x_disable_bcs_before_slow_insert(mbhc->component, true); } static const struct wcd_mbhc_cb mbhc_cb = { static const struct wcd_mbhc_cb mbhc_cb = { .request_irq = wcd937x_mbhc_request_irq, .request_irq = wcd937x_mbhc_request_irq, .irq_control = wcd937x_mbhc_irq_control, .irq_control = wcd937x_mbhc_irq_control, Loading @@ -834,6 +843,7 @@ static const struct wcd_mbhc_cb mbhc_cb = { .mbhc_get_moisture_status = wcd937x_mbhc_get_moisture_status, .mbhc_get_moisture_status = wcd937x_mbhc_get_moisture_status, .mbhc_moisture_polling_ctrl = wcd937x_mbhc_moisture_polling_ctrl, .mbhc_moisture_polling_ctrl = wcd937x_mbhc_moisture_polling_ctrl, .mbhc_moisture_detect_en = wcd937x_mbhc_moisture_detect_en, .mbhc_moisture_detect_en = wcd937x_mbhc_moisture_detect_en, .bcs_enable = wcd937x_mbhc_bcs_enable, }; }; static int wcd937x_get_hph_type(struct snd_kcontrol *kcontrol, static int wcd937x_get_hph_type(struct snd_kcontrol *kcontrol, Loading asoc/codecs/wcd937x/wcd937x.c +15 −0 Original line number Original line Diff line number Diff line Loading @@ -1517,6 +1517,21 @@ int wcd937x_micbias_control(struct snd_soc_component *component, } } EXPORT_SYMBOL(wcd937x_micbias_control); EXPORT_SYMBOL(wcd937x_micbias_control); void wcd937x_disable_bcs_before_slow_insert(struct snd_soc_component *component, bool bcs_disable) { struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component); if (wcd937x->update_wcd_event) { if (bcs_disable) wcd937x->update_wcd_event(wcd937x->handle, WCD_BOLERO_EVT_BCS_CLK_OFF, 0); else wcd937x->update_wcd_event(wcd937x->handle, WCD_BOLERO_EVT_BCS_CLK_OFF, 1); } } static int wcd937x_get_logical_addr(struct swr_device *swr_dev) static int wcd937x_get_logical_addr(struct swr_device *swr_dev) { { int ret = 0; int ret = 0; Loading Loading
asoc/codecs/wcd937x/internal.h +4 −0 Original line number Original line Diff line number Diff line Loading @@ -133,6 +133,7 @@ enum { WCD_BOLERO_EVT_RX_MUTE = 1, /* for RX mute/unmute */ WCD_BOLERO_EVT_RX_MUTE = 1, /* for RX mute/unmute */ WCD_BOLERO_EVT_IMPED_TRUE, /* for imped true */ WCD_BOLERO_EVT_IMPED_TRUE, /* for imped true */ WCD_BOLERO_EVT_IMPED_FALSE, /* for imped false */ WCD_BOLERO_EVT_IMPED_FALSE, /* for imped false */ WCD_BOLERO_EVT_BCS_CLK_OFF, }; }; enum { enum { Loading Loading @@ -164,6 +165,9 @@ enum { WCD937X_NUM_IRQS, WCD937X_NUM_IRQS, }; }; extern void wcd937x_disable_bcs_before_slow_insert( struct snd_soc_component *component, bool bcs_disable); extern struct wcd937x_mbhc *wcd937x_soc_get_mbhc( extern struct wcd937x_mbhc *wcd937x_soc_get_mbhc( struct snd_soc_component *component); struct snd_soc_component *component); extern int wcd937x_mbhc_micb_adjust_voltage(struct snd_soc_component *component, extern int wcd937x_mbhc_micb_adjust_voltage(struct snd_soc_component *component, Loading
asoc/codecs/wcd937x/wcd937x-mbhc.c +10 −0 Original line number Original line Diff line number Diff line Loading @@ -810,6 +810,15 @@ static void wcd937x_mbhc_moisture_polling_ctrl(struct wcd_mbhc *mbhc, 0x04, (enable << 2)); 0x04, (enable << 2)); } } static void wcd937x_mbhc_bcs_enable(struct wcd_mbhc *mbhc, bool bcs_enable) { if (bcs_enable) wcd937x_disable_bcs_before_slow_insert(mbhc->component, false); else wcd937x_disable_bcs_before_slow_insert(mbhc->component, true); } static const struct wcd_mbhc_cb mbhc_cb = { static const struct wcd_mbhc_cb mbhc_cb = { .request_irq = wcd937x_mbhc_request_irq, .request_irq = wcd937x_mbhc_request_irq, .irq_control = wcd937x_mbhc_irq_control, .irq_control = wcd937x_mbhc_irq_control, Loading @@ -834,6 +843,7 @@ static const struct wcd_mbhc_cb mbhc_cb = { .mbhc_get_moisture_status = wcd937x_mbhc_get_moisture_status, .mbhc_get_moisture_status = wcd937x_mbhc_get_moisture_status, .mbhc_moisture_polling_ctrl = wcd937x_mbhc_moisture_polling_ctrl, .mbhc_moisture_polling_ctrl = wcd937x_mbhc_moisture_polling_ctrl, .mbhc_moisture_detect_en = wcd937x_mbhc_moisture_detect_en, .mbhc_moisture_detect_en = wcd937x_mbhc_moisture_detect_en, .bcs_enable = wcd937x_mbhc_bcs_enable, }; }; static int wcd937x_get_hph_type(struct snd_kcontrol *kcontrol, static int wcd937x_get_hph_type(struct snd_kcontrol *kcontrol, Loading
asoc/codecs/wcd937x/wcd937x.c +15 −0 Original line number Original line Diff line number Diff line Loading @@ -1517,6 +1517,21 @@ int wcd937x_micbias_control(struct snd_soc_component *component, } } EXPORT_SYMBOL(wcd937x_micbias_control); EXPORT_SYMBOL(wcd937x_micbias_control); void wcd937x_disable_bcs_before_slow_insert(struct snd_soc_component *component, bool bcs_disable) { struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component); if (wcd937x->update_wcd_event) { if (bcs_disable) wcd937x->update_wcd_event(wcd937x->handle, WCD_BOLERO_EVT_BCS_CLK_OFF, 0); else wcd937x->update_wcd_event(wcd937x->handle, WCD_BOLERO_EVT_BCS_CLK_OFF, 1); } } static int wcd937x_get_logical_addr(struct swr_device *swr_dev) static int wcd937x_get_logical_addr(struct swr_device *swr_dev) { { int ret = 0; int ret = 0; Loading