From a38e0a4eddab3196317501081ccc29276c6c3906 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Mon, 7 Sep 2020 20:47:01 +0800 Subject: MLK-24753-1: ASoC: fsl_esai_mix: Using workqueue for mix handler Previously doing mixing in softirq, the mixing causing too much time ( period size is 512 sample, the time is about 2.5ms), so move the mixing to workqueue to reduce irq loading Use 4 period instead of pingpong buffer for leverage instant loading. Signed-off-by: Shengjiu Wang Reviewed-by: Peng Zhang --- sound/soc/fsl/fsl_esai_mix.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sound/soc/fsl/fsl_esai_mix.h') diff --git a/sound/soc/fsl/fsl_esai_mix.h b/sound/soc/fsl/fsl_esai_mix.h index 7d117154b27a..ee69d2daf70c 100644 --- a/sound/soc/fsl/fsl_esai_mix.h +++ b/sound/soc/fsl/fsl_esai_mix.h @@ -28,7 +28,11 @@ struct fsl_esai_mix { struct snd_pcm_substream *fe_substream[MAX_CLIENT_NUM]; struct fsl_esai_client *client[MAX_CLIENT_NUM]; struct snd_dma_buffer dma_buffer; - u32 buffer_offset; + struct workqueue_struct *mix_wq; + struct work_struct work; + struct snd_pcm_substream *substream; + u32 buffer_read_offset; + u32 buffer_write_offset; u32 buffer_bytes; u32 period_bytes; u32 period_num; -- cgit v1.2.3