Loading sound/soc/codecs/wcd9335.c +16 −0 Original line number Original line Diff line number Diff line Loading @@ -1250,6 +1250,21 @@ complete_zdet: tasha->zdet_gpio_cb(codec, false); tasha->zdet_gpio_cb(codec, false); } } static void tasha_mbhc_gnd_det_ctrl(struct snd_soc_codec *codec, bool enable) { if (enable) { snd_soc_update_bits(codec, WCD9335_ANA_MBHC_MECH, 0x02, 0x02); snd_soc_update_bits(codec, WCD9335_ANA_MBHC_MECH, 0x40, 0x40); } else { snd_soc_update_bits(codec, WCD9335_ANA_MBHC_MECH, 0x40, 0x00); snd_soc_update_bits(codec, WCD9335_ANA_MBHC_MECH, 0x02, 0x00); } } static const struct wcd_mbhc_cb mbhc_cb = { static const struct wcd_mbhc_cb mbhc_cb = { .request_irq = tasha_mbhc_request_irq, .request_irq = tasha_mbhc_request_irq, .irq_control = tasha_mbhc_irq_control, .irq_control = tasha_mbhc_irq_control, Loading @@ -1268,6 +1283,7 @@ static const struct wcd_mbhc_cb mbhc_cb = { .get_hwdep_fw_cal = tasha_get_hwdep_fw_cal, .get_hwdep_fw_cal = tasha_get_hwdep_fw_cal, .mbhc_micb_ctrl_thr_mic = tasha_mbhc_micb_ctrl_threshold_mic, .mbhc_micb_ctrl_thr_mic = tasha_mbhc_micb_ctrl_threshold_mic, .compute_impedance = tasha_wcd_mbhc_calc_impedance, .compute_impedance = tasha_wcd_mbhc_calc_impedance, .mbhc_gnd_det_ctrl = tasha_mbhc_gnd_det_ctrl, }; }; static int tasha_get_anc_slot(struct snd_kcontrol *kcontrol, static int tasha_get_anc_slot(struct snd_kcontrol *kcontrol, Loading Loading
sound/soc/codecs/wcd9335.c +16 −0 Original line number Original line Diff line number Diff line Loading @@ -1250,6 +1250,21 @@ complete_zdet: tasha->zdet_gpio_cb(codec, false); tasha->zdet_gpio_cb(codec, false); } } static void tasha_mbhc_gnd_det_ctrl(struct snd_soc_codec *codec, bool enable) { if (enable) { snd_soc_update_bits(codec, WCD9335_ANA_MBHC_MECH, 0x02, 0x02); snd_soc_update_bits(codec, WCD9335_ANA_MBHC_MECH, 0x40, 0x40); } else { snd_soc_update_bits(codec, WCD9335_ANA_MBHC_MECH, 0x40, 0x00); snd_soc_update_bits(codec, WCD9335_ANA_MBHC_MECH, 0x02, 0x00); } } static const struct wcd_mbhc_cb mbhc_cb = { static const struct wcd_mbhc_cb mbhc_cb = { .request_irq = tasha_mbhc_request_irq, .request_irq = tasha_mbhc_request_irq, .irq_control = tasha_mbhc_irq_control, .irq_control = tasha_mbhc_irq_control, Loading @@ -1268,6 +1283,7 @@ static const struct wcd_mbhc_cb mbhc_cb = { .get_hwdep_fw_cal = tasha_get_hwdep_fw_cal, .get_hwdep_fw_cal = tasha_get_hwdep_fw_cal, .mbhc_micb_ctrl_thr_mic = tasha_mbhc_micb_ctrl_threshold_mic, .mbhc_micb_ctrl_thr_mic = tasha_mbhc_micb_ctrl_threshold_mic, .compute_impedance = tasha_wcd_mbhc_calc_impedance, .compute_impedance = tasha_wcd_mbhc_calc_impedance, .mbhc_gnd_det_ctrl = tasha_mbhc_gnd_det_ctrl, }; }; static int tasha_get_anc_slot(struct snd_kcontrol *kcontrol, static int tasha_get_anc_slot(struct snd_kcontrol *kcontrol, Loading