From d211a9d51158f4a3a7ed519eff4f5250fa3fdd59 Mon Sep 17 00:00:00 2001 From: Kunlei Zhang Date: Mon, 18 Jan 2021 14:27:15 +0800 Subject: [PATCH] dsp: avoid start voice happens before unmap cal memory When unmap voice cal memory, start voice happens before unmap memory. It causes voice module still tries to access unmapped memory during the process. Fix it by remove start voice before unmap cal memory. Change-Id: I0e3205efd9bc6e7b1619d86899570bf5ec31eaef --- dsp/q6voice.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/dsp/q6voice.c b/dsp/q6voice.c index 17174d162332..05ed9bccedba 100644 --- a/dsp/q6voice.c +++ b/dsp/q6voice.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. */ #include #include @@ -3958,14 +3958,6 @@ static int voice_unmap_cal_memory(int32_t cal_type, else pr_err("%s: Invalid cal type %d!\n", __func__, cal_type); - - result2 = voice_send_start_voice_cmd(v); - if (result2) { - pr_err("%s: Voice_send_start_voice_cmd failed for session 0x%x, err %d!\n", - __func__, v->session_id, result2); - - result = result2; - } } if ((cal_block->map_data.q6map_handle != 0) &&