Loading sound/soc/codecs/wcd9xxx-mbhc.c +6 −0 Original line number Diff line number Diff line Loading @@ -3109,6 +3109,7 @@ static void wcd9xxx_correct_swch_plug(struct work_struct *work) mbhc = container_of(work, struct wcd9xxx_mbhc, correct_plug_swch); codec = mbhc->codec; mbhc->poll_swch_on = true; current_source_enable = (((mbhc->mbhc_cfg->cs_enable_flags & (1 << MBHC_CS_ENABLE_POLLING)) != 0) && Loading Loading @@ -3287,6 +3288,7 @@ static void wcd9xxx_correct_swch_plug(struct work_struct *work) WCD9XXX_BCL_UNLOCK(mbhc->resmgr); } pr_debug("%s: leave current_plug(%d)\n", __func__, mbhc->current_plug); mbhc->poll_swch_on = false; /* unlock sleep */ wcd9xxx_unlock_sleep(mbhc->resmgr->core_res); } Loading Loading @@ -3314,6 +3316,9 @@ static void wcd9xxx_swch_irq_handler(struct wcd9xxx_mbhc *mbhc) pr_debug("%s: Current plug type %d, insert %d\n", __func__, mbhc->current_plug, insert); if ((mbhc->current_plug == PLUG_TYPE_NONE) && insert) { if (mbhc->poll_swch_on) goto exit; mbhc->lpi_enabled = false; wmb(); /* cancel detect plug */ Loading Loading @@ -5358,6 +5363,7 @@ int wcd9xxx_mbhc_init(struct wcd9xxx_mbhc *mbhc, struct wcd9xxx_resmgr *resmgr, mbhc->current_plug = PLUG_TYPE_NONE; mbhc->lpi_enabled = false; mbhc->no_mic_headset_override = false; mbhc->poll_swch_on = false; mbhc->mbhc_last_resume = 0; mbhc->codec = codec; mbhc->resmgr = resmgr; Loading sound/soc/codecs/wcd9xxx-mbhc.h +1 −0 Original line number Diff line number Diff line Loading @@ -343,6 +343,7 @@ struct wcd9xxx_mbhc { u8 hphlocp_cnt; /* headphone left ocp retry */ u8 hphrocp_cnt; /* headphone right ocp retry */ bool poll_swch_on; /* Work to perform MBHC Firmware Read */ struct delayed_work mbhc_firmware_dwork; const struct firmware *mbhc_fw; Loading Loading
sound/soc/codecs/wcd9xxx-mbhc.c +6 −0 Original line number Diff line number Diff line Loading @@ -3109,6 +3109,7 @@ static void wcd9xxx_correct_swch_plug(struct work_struct *work) mbhc = container_of(work, struct wcd9xxx_mbhc, correct_plug_swch); codec = mbhc->codec; mbhc->poll_swch_on = true; current_source_enable = (((mbhc->mbhc_cfg->cs_enable_flags & (1 << MBHC_CS_ENABLE_POLLING)) != 0) && Loading Loading @@ -3287,6 +3288,7 @@ static void wcd9xxx_correct_swch_plug(struct work_struct *work) WCD9XXX_BCL_UNLOCK(mbhc->resmgr); } pr_debug("%s: leave current_plug(%d)\n", __func__, mbhc->current_plug); mbhc->poll_swch_on = false; /* unlock sleep */ wcd9xxx_unlock_sleep(mbhc->resmgr->core_res); } Loading Loading @@ -3314,6 +3316,9 @@ static void wcd9xxx_swch_irq_handler(struct wcd9xxx_mbhc *mbhc) pr_debug("%s: Current plug type %d, insert %d\n", __func__, mbhc->current_plug, insert); if ((mbhc->current_plug == PLUG_TYPE_NONE) && insert) { if (mbhc->poll_swch_on) goto exit; mbhc->lpi_enabled = false; wmb(); /* cancel detect plug */ Loading Loading @@ -5358,6 +5363,7 @@ int wcd9xxx_mbhc_init(struct wcd9xxx_mbhc *mbhc, struct wcd9xxx_resmgr *resmgr, mbhc->current_plug = PLUG_TYPE_NONE; mbhc->lpi_enabled = false; mbhc->no_mic_headset_override = false; mbhc->poll_swch_on = false; mbhc->mbhc_last_resume = 0; mbhc->codec = codec; mbhc->resmgr = resmgr; Loading
sound/soc/codecs/wcd9xxx-mbhc.h +1 −0 Original line number Diff line number Diff line Loading @@ -343,6 +343,7 @@ struct wcd9xxx_mbhc { u8 hphlocp_cnt; /* headphone left ocp retry */ u8 hphrocp_cnt; /* headphone right ocp retry */ bool poll_swch_on; /* Work to perform MBHC Firmware Read */ struct delayed_work mbhc_firmware_dwork; const struct firmware *mbhc_fw; Loading