mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
Merge "dsp: codecs: Add spin_lock_irqsave instead of spin_lock"
This commit is contained in:
commit
ca1d3b1231
4 changed files with 12 additions and 8 deletions
|
|
@ -936,6 +936,7 @@ ssize_t audio_in_write(struct file *file,
|
|||
|
||||
int audio_in_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
unsigned long flags = 0;
|
||||
struct q6audio_in *audio = file->private_data;
|
||||
|
||||
pr_info("%s: session id %d\n", __func__, audio->ac->session);
|
||||
|
|
@ -943,11 +944,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);
|
||||
spin_lock_irqsave(&enc_dec_lock, flags);
|
||||
kfree(audio->enc_cfg);
|
||||
kfree(audio->codec_cfg);
|
||||
kfree(audio);
|
||||
file->private_data = NULL;
|
||||
spin_unlock(&enc_dec_lock);
|
||||
spin_unlock_irqrestore(&enc_dec_lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -588,6 +588,7 @@ int enable_volume_ramp(struct q6audio_aio *audio)
|
|||
|
||||
int audio_aio_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
unsigned long flags = 0;
|
||||
struct q6audio_aio *audio = file->private_data;
|
||||
|
||||
pr_debug("%s[%pK]\n", __func__, audio);
|
||||
|
|
@ -631,11 +632,11 @@ int audio_aio_release(struct inode *inode, struct file *file)
|
|||
#ifdef CONFIG_DEBUG_FS
|
||||
debugfs_remove(audio->dentry);
|
||||
#endif
|
||||
spin_lock(&enc_dec_lock);
|
||||
spin_lock_irqsave(&enc_dec_lock, flags);
|
||||
kfree(audio->codec_cfg);
|
||||
kfree(audio);
|
||||
file->private_data = NULL;
|
||||
spin_unlock(&enc_dec_lock);
|
||||
spin_unlock_irqrestore(&enc_dec_lock, flags);
|
||||
mutex_unlock(&lock);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,9 @@ void q6asm_in_cb(uint32_t opcode, uint32_t token,
|
|||
{
|
||||
struct q6audio_in *audio = (struct q6audio_in *)priv;
|
||||
unsigned long flags;
|
||||
unsigned long en_de_flags;
|
||||
|
||||
spin_lock(&enc_dec_lock);
|
||||
spin_lock_irqsave(&enc_dec_lock, en_de_flags);
|
||||
if (audio == NULL) {
|
||||
pr_err("%s: failed to get q6audio value\n", __func__);
|
||||
goto error;
|
||||
|
|
@ -65,7 +66,7 @@ void q6asm_in_cb(uint32_t opcode, uint32_t token,
|
|||
}
|
||||
spin_unlock_irqrestore(&audio->dsp_lock, flags);
|
||||
error:
|
||||
spin_unlock(&enc_dec_lock);
|
||||
spin_unlock_irqrestore(&enc_dec_lock, en_de_flags);
|
||||
}
|
||||
|
||||
void audio_in_get_dsp_frames(void *priv,
|
||||
|
|
|
|||
|
|
@ -43,8 +43,9 @@ void audio_aio_cb(uint32_t opcode, uint32_t token,
|
|||
{
|
||||
struct q6audio_aio *audio = (struct q6audio_aio *)priv;
|
||||
union msm_audio_event_payload e_payload;
|
||||
unsigned long flags = 0;
|
||||
|
||||
spin_lock(&enc_dec_lock);
|
||||
spin_lock_irqsave(&enc_dec_lock, flags);
|
||||
if (audio == NULL) {
|
||||
pr_err("%s: failed to get q6audio value\n", __func__);
|
||||
goto error;
|
||||
|
|
@ -115,7 +116,7 @@ void audio_aio_cb(uint32_t opcode, uint32_t token,
|
|||
break;
|
||||
}
|
||||
error:
|
||||
spin_unlock(&enc_dec_lock);
|
||||
spin_unlock_irqrestore(&enc_dec_lock, flags);
|
||||
}
|
||||
|
||||
int extract_meta_out_info(struct q6audio_aio *audio,
|
||||
|
|
|
|||
Loading…
Reference in a new issue