From 06f5b93af073e3b4d2437533e7054ff2ad1004a5 Mon Sep 17 00:00:00 2001 From: Bhalchandra Gajare Date: Tue, 25 Oct 2016 17:50:29 -0700 Subject: [PATCH] ASoC: wcd-dsp-mgr: fix restart logic when codec comes back online During subsystem restart, when restart of the codec DSP is attempted, the status is already moved to codec up whereas driver is checking for codec down. This causes the initialization of components to be skipped and codec dsp does not come back online. Change fixes the condition check to make sure the correct sequence is followed. CRs-Fixed: 1080392 Change-Id: I05345b8f5d108e59863ee4e37ed75fd32a284ee5 Signed-off-by: Bhalchandra Gajare --- sound/soc/codecs/wcd-dsp-mgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/wcd-dsp-mgr.c b/sound/soc/codecs/wcd-dsp-mgr.c index d9d413f0a80a..f51301d1ab08 100644 --- a/sound/soc/codecs/wcd-dsp-mgr.c +++ b/sound/soc/codecs/wcd-dsp-mgr.c @@ -717,8 +717,8 @@ static void wdsp_ssr_work_fn(struct work_struct *work) */ WDSP_CLEAR_STATUS(wdsp, WDSP_STATUS_CODE_DLOADED); - /* If codec went down, then all components must be re-initialized */ - if (wdsp->ssr_type == WDSP_SSR_TYPE_CDC_DOWN) { + /* If codec restarted, then all components must be re-initialized */ + if (wdsp->ssr_type == WDSP_SSR_TYPE_CDC_UP) { wdsp_deinit_components(wdsp); WDSP_CLEAR_STATUS(wdsp, WDSP_STATUS_INITIALIZED); }