diff --git a/sound/soc/codecs/wcd9xxx-mbhc.c b/sound/soc/codecs/wcd9xxx-mbhc.c index 69aaed48fe4e..34dcecc354e9 100644 --- a/sound/soc/codecs/wcd9xxx-mbhc.c +++ b/sound/soc/codecs/wcd9xxx-mbhc.c @@ -4255,7 +4255,10 @@ static void wcd9xxx_mbhc_setup(struct wcd9xxx_mbhc *mbhc) gain = wcd9xxx_mbhc_cal_btn_det_mp(btn_det, MBHC_BTN_DET_GAIN); snd_soc_update_bits(codec, WCD9XXX_A_CDC_MBHC_B2_CTL, 0x78, gain[idx] << 3); - snd_soc_update_bits(codec, WCD9XXX_A_MICB_2_MBHC, 0x04, 0x04); + if (mbhc->mbhc_cb && mbhc->mbhc_cb->get_cdc_type && + mbhc->mbhc_cb->get_cdc_type() != + WCD9XXX_CDC_TYPE_TOMTOM) + snd_soc_update_bits(codec, WCD9XXX_A_MICB_2_MBHC, 0x04, 0x04); pr_debug("%s: leave\n", __func__); }