dsp: codecs: Add synchronization between SSR and native encoder decoder
Add change to use global lock to make synchronization between SSR and native encoder decoder. Change-Id: I6c1f48c32d4c8290de8bf3dfa86e022abe2b34bc Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

vanhempi
68f58b0d09
commit
d8a0703a77
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2012-2013, 2015-2017, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2013, 2015-2017, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -21,6 +21,11 @@ void q6asm_in_cb(uint32_t opcode, uint32_t token,
|
||||
struct q6audio_in *audio = (struct q6audio_in *)priv;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock(&enc_dec_lock);
|
||||
if (audio == NULL) {
|
||||
pr_err("%s: failed to get q6audio value\n", __func__);
|
||||
goto error;
|
||||
}
|
||||
pr_debug("%s:session id %d: opcode[0x%x]\n", __func__,
|
||||
audio->ac->session, opcode);
|
||||
|
||||
@@ -58,6 +63,8 @@ void q6asm_in_cb(uint32_t opcode, uint32_t token,
|
||||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(&audio->dsp_lock, flags);
|
||||
error:
|
||||
spin_unlock(&enc_dec_lock);
|
||||
}
|
||||
|
||||
void audio_in_get_dsp_frames(void *priv,
|
||||
|
Viittaa uudesa ongelmassa
Block a user