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:
Saurav Kumar
2020-02-21 18:29:26 +05:30
committed by Gerrit - the friendly Code Review server
parent 68f58b0d09
commit d8a0703a77
6 changed files with 26 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2010-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2020, The Linux Foundation. All rights reserved.
*/
#include <linux/module.h>
@@ -943,8 +943,11 @@ int audio_in_release(struct inode *inode, struct file *file)
audio_in_disable(audio);
q6asm_audio_client_free(audio->ac);
mutex_unlock(&audio->lock);
spin_lock(&enc_dec_lock);
kfree(audio->enc_cfg);
kfree(audio->codec_cfg);
kfree(audio);
file->private_data = NULL;
spin_unlock(&enc_dec_lock);
return 0;
}