asoc: mbhc: ignore mbhc event report during ssr
When ssr is in progress, during some race conditions mbhc events are getting reported when codec is still coming up. Ignore such events without reporting. Change-Id: I3d3f78f97c2b855fc36a480f38c166bda2d979f0 Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
ec7e65b420
commit
3dd07e6937
@@ -776,6 +776,11 @@ void wcd_mbhc_find_plug_and_report(struct wcd_mbhc *mbhc,
|
||||
bool anc_mic_found = false;
|
||||
enum snd_jack_types jack_type;
|
||||
|
||||
if (mbhc->deinit_in_progress) {
|
||||
pr_info("%s: mbhc deinit in progess: ignore report\n");
|
||||
return;
|
||||
}
|
||||
|
||||
pr_debug("%s: enter current_plug(%d) new_plug(%d)\n",
|
||||
__func__, mbhc->current_plug, plug_type);
|
||||
|
||||
@@ -1882,6 +1887,7 @@ int wcd_mbhc_init(struct wcd_mbhc *mbhc, struct snd_soc_codec *codec,
|
||||
goto err_hphr_ocp_irq;
|
||||
}
|
||||
|
||||
mbhc->deinit_in_progress = false;
|
||||
pr_debug("%s: leave ret %d\n", __func__, ret);
|
||||
return ret;
|
||||
|
||||
|
Reference in New Issue
Block a user