|
@@ -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,
|