Loading sound/soc/codecs/wcd-mbhc-v2.c +10 −3 Original line number Diff line number Diff line Loading @@ -898,6 +898,11 @@ static int wcd_check_cross_conn(struct wcd_mbhc *mbhc) if (mbhc->mbhc_cb->hph_pa_on_status(mbhc->codec)) return false; WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_L_DET_EN, 0); if (mbhc->mbhc_cb->hph_pull_down_ctrl) mbhc->mbhc_cb->hph_pull_down_ctrl(mbhc->codec, false); WCD_MBHC_REG_READ(WCD_MBHC_ELECT_SCHMT_ISRC, reg1); /* * Check if there is any cross connection, Loading Loading @@ -931,6 +936,11 @@ static int wcd_check_cross_conn(struct wcd_mbhc *mbhc) WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_ELECT_SCHMT_ISRC, reg1); pr_debug("%s: leave, plug type: %d\n", __func__, plug_type); if (mbhc->mbhc_cb->hph_pull_down_ctrl) mbhc->mbhc_cb->hph_pull_down_ctrl(mbhc->codec, true); WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_L_DET_EN, 1); return (plug_type == MBHC_PLUG_TYPE_GND_MIC_SWAP) ? true : false; } Loading Loading @@ -1459,9 +1469,6 @@ static void wcd_mbhc_detect_plug_type(struct wcd_mbhc *mbhc) pr_debug("%s: enter\n", __func__); WCD_MBHC_RSC_ASSERT_LOCKED(mbhc); if (mbhc->mbhc_cb->hph_pull_down_ctrl) mbhc->mbhc_cb->hph_pull_down_ctrl(codec, false); if (mbhc->mbhc_cb->micbias_enable_status) micbias1 = mbhc->mbhc_cb->micbias_enable_status(mbhc, MIC_BIAS_1); Loading sound/soc/codecs/wcd9335.c +6 −0 Original line number Diff line number Diff line Loading @@ -1813,6 +1813,9 @@ static void tasha_wcd_mbhc_calc_impedance(struct wcd_mbhc *mbhc, uint32_t *zl, wcd9xxx_reg_update_bits(&wcd9xxx->core_res, WCD9335_ANA_MBHC_MECH, 0x80, 0x00); if (mbhc->mbhc_cb->hph_pull_down_ctrl) mbhc->mbhc_cb->hph_pull_down_ctrl(codec, false); /* Enable AZ */ snd_soc_update_bits(codec, WCD9335_MBHC_CTL_1, 0x0C, 0x04); /* Turn off 100k pull down on HPHL */ Loading Loading @@ -1935,6 +1938,9 @@ zdet_complete: wcd9xxx_reg_update_bits(&wcd9xxx->core_res, WCD9335_ANA_MBHC_MECH, 0x01, 0x01); if (mbhc->mbhc_cb->hph_pull_down_ctrl) mbhc->mbhc_cb->hph_pull_down_ctrl(codec, true); /* For NO-jack, re-enable L_DET_EN after Z-det measurements */ if (mbhc->hphl_swh) wcd9xxx_reg_update_bits(&wcd9xxx->core_res, Loading Loading
sound/soc/codecs/wcd-mbhc-v2.c +10 −3 Original line number Diff line number Diff line Loading @@ -898,6 +898,11 @@ static int wcd_check_cross_conn(struct wcd_mbhc *mbhc) if (mbhc->mbhc_cb->hph_pa_on_status(mbhc->codec)) return false; WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_L_DET_EN, 0); if (mbhc->mbhc_cb->hph_pull_down_ctrl) mbhc->mbhc_cb->hph_pull_down_ctrl(mbhc->codec, false); WCD_MBHC_REG_READ(WCD_MBHC_ELECT_SCHMT_ISRC, reg1); /* * Check if there is any cross connection, Loading Loading @@ -931,6 +936,11 @@ static int wcd_check_cross_conn(struct wcd_mbhc *mbhc) WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_ELECT_SCHMT_ISRC, reg1); pr_debug("%s: leave, plug type: %d\n", __func__, plug_type); if (mbhc->mbhc_cb->hph_pull_down_ctrl) mbhc->mbhc_cb->hph_pull_down_ctrl(mbhc->codec, true); WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_L_DET_EN, 1); return (plug_type == MBHC_PLUG_TYPE_GND_MIC_SWAP) ? true : false; } Loading Loading @@ -1459,9 +1469,6 @@ static void wcd_mbhc_detect_plug_type(struct wcd_mbhc *mbhc) pr_debug("%s: enter\n", __func__); WCD_MBHC_RSC_ASSERT_LOCKED(mbhc); if (mbhc->mbhc_cb->hph_pull_down_ctrl) mbhc->mbhc_cb->hph_pull_down_ctrl(codec, false); if (mbhc->mbhc_cb->micbias_enable_status) micbias1 = mbhc->mbhc_cb->micbias_enable_status(mbhc, MIC_BIAS_1); Loading
sound/soc/codecs/wcd9335.c +6 −0 Original line number Diff line number Diff line Loading @@ -1813,6 +1813,9 @@ static void tasha_wcd_mbhc_calc_impedance(struct wcd_mbhc *mbhc, uint32_t *zl, wcd9xxx_reg_update_bits(&wcd9xxx->core_res, WCD9335_ANA_MBHC_MECH, 0x80, 0x00); if (mbhc->mbhc_cb->hph_pull_down_ctrl) mbhc->mbhc_cb->hph_pull_down_ctrl(codec, false); /* Enable AZ */ snd_soc_update_bits(codec, WCD9335_MBHC_CTL_1, 0x0C, 0x04); /* Turn off 100k pull down on HPHL */ Loading Loading @@ -1935,6 +1938,9 @@ zdet_complete: wcd9xxx_reg_update_bits(&wcd9xxx->core_res, WCD9335_ANA_MBHC_MECH, 0x01, 0x01); if (mbhc->mbhc_cb->hph_pull_down_ctrl) mbhc->mbhc_cb->hph_pull_down_ctrl(codec, true); /* For NO-jack, re-enable L_DET_EN after Z-det measurements */ if (mbhc->hphl_swh) wcd9xxx_reg_update_bits(&wcd9xxx->core_res, Loading