Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4e11ac7 authored by Meng Wang's avatar Meng Wang Committed by Gerrit - the friendly Code Review server
Browse files

asoc: wcd-dsp-mgr: reinit ssr ready flag for adsp/wdsp ssr



When adsp/wdsp SSR happens, WDSP_SSR_TYPE_WDSP_DOWN/WDSP_SSR_TYPE_CDC_DOWN
would get received by wcd-dsp-mgr. wcd-dsp-mgr would clear current work and
init wdsp when adsp is up and ready_compl flag is set to ready. Sometimes
ready_compl flag is not cleared and wdsp initialization would happen when
adsp/wdsp is down which would cause kernel panic.
Reinit ready_compl flag when adsp/wdsp SSR happens.

Change-Id: I45186abba7992ee6912c5b0da171ef37b04e2e71
Signed-off-by: default avatarMeng Wang <mengw@codeaurora.org>
parent 4d83b35b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -802,6 +802,7 @@ static int wdsp_ssr_handler(struct wdsp_mgr_priv *wdsp, void *arg,
		__wdsp_clr_ready_locked(wdsp, WDSP_SSR_STATUS_WDSP_READY);
		wdsp_broadcast_event_downseq(wdsp, WDSP_EVENT_PRE_SHUTDOWN,
					     NULL);
		reinit_completion(&wdsp->ready_compl);
		schedule_work(&wdsp->ssr_work);
		break;

@@ -818,7 +819,7 @@ static int wdsp_ssr_handler(struct wdsp_mgr_priv *wdsp, void *arg,
						     WDSP_EVENT_PRE_SHUTDOWN,
						     NULL);
		}

		reinit_completion(&wdsp->ready_compl);
		schedule_work(&wdsp->ssr_work);
		break;