From 15fffc6b9b8ab71e2bbed8caced567c61523afc1 Mon Sep 17 00:00:00 2001 From: Banajit Goswami Date: Sat, 21 Oct 2017 01:12:47 -0700 Subject: [PATCH] asoc: wcd934x: set bus down flag right when notification reaches Set bus_down_in_recovery flag as soon as possible when BUS down notification reaches codec driver. This is to avoid any unwanted slimbus transaction while BUS is still not recovered. Change-Id: I77917975372bf51e6aa881cbfc63c479478db375 Signed-off-by: Banajit Goswami --- asoc/codecs/wcd934x/wcd934x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asoc/codecs/wcd934x/wcd934x.c b/asoc/codecs/wcd934x/wcd934x.c index d6eb22d57951..1f751ec4b558 100644 --- a/asoc/codecs/wcd934x/wcd934x.c +++ b/asoc/codecs/wcd934x/wcd934x.c @@ -9203,13 +9203,13 @@ static int tavil_device_down(struct wcd9xxx *wcd9xxx) codec = (struct snd_soc_codec *)(wcd9xxx->ssr_priv); priv = snd_soc_codec_get_drvdata(codec); + for (count = 0; count < NUM_CODEC_DAIS; count++) + priv->dai[count].bus_down_in_recovery = true; if (priv->swr.ctrl_data) swrm_wcd_notify(priv->swr.ctrl_data[0].swr_pdev, SWR_DEVICE_DOWN, NULL); tavil_dsd_reset(priv->dsd_config); snd_soc_card_change_online_state(codec->component.card, 0); - for (count = 0; count < NUM_CODEC_DAIS; count++) - priv->dai[count].bus_down_in_recovery = true; wcd_dsp_ssr_event(priv->wdsp_cntl, WCD_CDC_DOWN_EVENT); wcd_resmgr_set_sido_input_src_locked(priv->resmgr, SIDO_SOURCE_INTERNAL);