Loading asoc/codecs/wcd937x/internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ struct wcd937x_priv { int ear_rx_path; int ana_clk_count; struct mutex ana_tx_clk_lock; bool usbc_hs_status; }; struct wcd937x_micbias_setting { Loading asoc/codecs/wcd937x/wcd937x.c +15 −0 Original line number Diff line number Diff line Loading @@ -1566,6 +1566,17 @@ static int wcd937x_get_logical_addr(struct swr_device *swr_dev) return 0; } static bool get_usbc_hs_status(struct snd_soc_component *component, struct wcd_mbhc_config *mbhc_cfg) { if (mbhc_cfg->enable_usbc_analog) { if (!(snd_soc_component_read32(component, WCD937X_ANA_MBHC_MECH) & 0x20)) return true; } return false; } static int wcd937x_event_notify(struct notifier_block *block, unsigned long val, void *data) Loading Loading @@ -1601,6 +1612,8 @@ static int wcd937x_event_notify(struct notifier_block *block, case BOLERO_WCD_EVT_SSR_DOWN: wcd937x->mbhc->wcd_mbhc.deinit_in_progress = true; mbhc = &wcd937x->mbhc->wcd_mbhc; wcd937x->usbc_hs_status = get_usbc_hs_status(component, mbhc->mbhc_cfg); wcd937x_mbhc_ssr_down(wcd937x->mbhc, component); wcd937x_reset_low(wcd937x->dev); break; Loading @@ -1621,6 +1634,8 @@ static int wcd937x_event_notify(struct notifier_block *block, __func__); } else { wcd937x_mbhc_hs_detect(component, mbhc->mbhc_cfg); if (wcd937x->usbc_hs_status) mdelay(500); } wcd937x->mbhc->wcd_mbhc.deinit_in_progress = false; break; Loading asoc/codecs/wcd938x/internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ struct wcd938x_priv { int flyback_cur_det_disable; int ear_rx_path; bool dev_up; bool usbc_hs_status; }; struct wcd938x_micbias_setting { Loading asoc/codecs/wcd938x/wcd938x.c +15 −0 Original line number Diff line number Diff line Loading @@ -1973,6 +1973,17 @@ static int wcd938x_get_logical_addr(struct swr_device *swr_dev) return 0; } static bool get_usbc_hs_status(struct snd_soc_component *component, struct wcd_mbhc_config *mbhc_cfg) { if (mbhc_cfg->enable_usbc_analog) { if (!(snd_soc_component_read32(component, WCD938X_ANA_MBHC_MECH) & 0x20)) return true; } return false; } static int wcd938x_event_notify(struct notifier_block *block, unsigned long val, void *data) Loading Loading @@ -2018,6 +2029,8 @@ static int wcd938x_event_notify(struct notifier_block *block, wcd938x->dev_up = false; wcd938x->mbhc->wcd_mbhc.deinit_in_progress = true; mbhc = &wcd938x->mbhc->wcd_mbhc; wcd938x->usbc_hs_status = get_usbc_hs_status(component, mbhc->mbhc_cfg); wcd938x_mbhc_ssr_down(wcd938x->mbhc, component); wcd938x_reset_low(wcd938x->dev); break; Loading @@ -2040,6 +2053,8 @@ static int wcd938x_event_notify(struct notifier_block *block, __func__); } else { wcd938x_mbhc_hs_detect(component, mbhc->mbhc_cfg); if (wcd938x->usbc_hs_status) mdelay(500); } wcd938x->mbhc->wcd_mbhc.deinit_in_progress = false; wcd938x->dev_up = true; Loading Loading
asoc/codecs/wcd937x/internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ struct wcd937x_priv { int ear_rx_path; int ana_clk_count; struct mutex ana_tx_clk_lock; bool usbc_hs_status; }; struct wcd937x_micbias_setting { Loading
asoc/codecs/wcd937x/wcd937x.c +15 −0 Original line number Diff line number Diff line Loading @@ -1566,6 +1566,17 @@ static int wcd937x_get_logical_addr(struct swr_device *swr_dev) return 0; } static bool get_usbc_hs_status(struct snd_soc_component *component, struct wcd_mbhc_config *mbhc_cfg) { if (mbhc_cfg->enable_usbc_analog) { if (!(snd_soc_component_read32(component, WCD937X_ANA_MBHC_MECH) & 0x20)) return true; } return false; } static int wcd937x_event_notify(struct notifier_block *block, unsigned long val, void *data) Loading Loading @@ -1601,6 +1612,8 @@ static int wcd937x_event_notify(struct notifier_block *block, case BOLERO_WCD_EVT_SSR_DOWN: wcd937x->mbhc->wcd_mbhc.deinit_in_progress = true; mbhc = &wcd937x->mbhc->wcd_mbhc; wcd937x->usbc_hs_status = get_usbc_hs_status(component, mbhc->mbhc_cfg); wcd937x_mbhc_ssr_down(wcd937x->mbhc, component); wcd937x_reset_low(wcd937x->dev); break; Loading @@ -1621,6 +1634,8 @@ static int wcd937x_event_notify(struct notifier_block *block, __func__); } else { wcd937x_mbhc_hs_detect(component, mbhc->mbhc_cfg); if (wcd937x->usbc_hs_status) mdelay(500); } wcd937x->mbhc->wcd_mbhc.deinit_in_progress = false; break; Loading
asoc/codecs/wcd938x/internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ struct wcd938x_priv { int flyback_cur_det_disable; int ear_rx_path; bool dev_up; bool usbc_hs_status; }; struct wcd938x_micbias_setting { Loading
asoc/codecs/wcd938x/wcd938x.c +15 −0 Original line number Diff line number Diff line Loading @@ -1973,6 +1973,17 @@ static int wcd938x_get_logical_addr(struct swr_device *swr_dev) return 0; } static bool get_usbc_hs_status(struct snd_soc_component *component, struct wcd_mbhc_config *mbhc_cfg) { if (mbhc_cfg->enable_usbc_analog) { if (!(snd_soc_component_read32(component, WCD938X_ANA_MBHC_MECH) & 0x20)) return true; } return false; } static int wcd938x_event_notify(struct notifier_block *block, unsigned long val, void *data) Loading Loading @@ -2018,6 +2029,8 @@ static int wcd938x_event_notify(struct notifier_block *block, wcd938x->dev_up = false; wcd938x->mbhc->wcd_mbhc.deinit_in_progress = true; mbhc = &wcd938x->mbhc->wcd_mbhc; wcd938x->usbc_hs_status = get_usbc_hs_status(component, mbhc->mbhc_cfg); wcd938x_mbhc_ssr_down(wcd938x->mbhc, component); wcd938x_reset_low(wcd938x->dev); break; Loading @@ -2040,6 +2053,8 @@ static int wcd938x_event_notify(struct notifier_block *block, __func__); } else { wcd938x_mbhc_hs_detect(component, mbhc->mbhc_cfg); if (wcd938x->usbc_hs_status) mdelay(500); } wcd938x->mbhc->wcd_mbhc.deinit_in_progress = false; wcd938x->dev_up = true; Loading