From 829cbb1de6847fddc9a58c4e1f8ab6406b1d7fb6 Mon Sep 17 00:00:00 2001 From: liaohj Date: Fri, 25 Aug 2023 14:01:03 +0800 Subject: [PATCH] q6fsm:add protect for fs1815 algo fs1815 algo need acdb include fsm module. if some scene acdb not fsm module, and afe call fsm algo, will casue adsp block and error. add protect for fs1815 algo. Change-Id: Ib4b77e85443049afc42cb4285d2ea79dce94a380 Signed-off-by: liaohj Reviewed-on: https://gerrit.mot.com/2720691 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wanlong Zhou Reviewed-by: Huosheng Liao Submit-Approved: Jira Key --- include/dsp/q6fsm-v3.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/dsp/q6fsm-v3.h b/include/dsp/q6fsm-v3.h index b313a6294fac..0cd53fc0f581 100644 --- a/include/dsp/q6fsm-v3.h +++ b/include/dsp/q6fsm-v3.h @@ -262,6 +262,10 @@ bool q6fsm_get_rx_status(void) uint32_t enable; int ret; + if(fsm_scene_status == false){ + return -EINVAL; + } + if (!q6fsm_check_dsp_ready()) { fsm_info("DSP not ready yet!"); return -EINVAL; @@ -290,6 +294,9 @@ int q6fsm_set_rx_enable(int enable) uint32_t param; int ret; + if(fsm_scene_status == false){ + return -EINVAL; + } if (!q6fsm_check_dsp_ready()) { fsm_info("DSP not ready yet!");