summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_esai_mix.h
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2020-09-07 20:47:01 +0800
committerShengjiu Wang <shengjiu.wang@nxp.com>2020-09-10 13:47:24 +0800
commita38e0a4eddab3196317501081ccc29276c6c3906 (patch)
treeb46df7e14a90d0420bba19d2bda7a4b48914ee80 /sound/soc/fsl/fsl_esai_mix.h
parent566b2e7bde025e3dff961dba4c8c2e261c7b8bd2 (diff)
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 <shengjiu.wang@nxp.com> Reviewed-by: Peng Zhang <peng.zhang_8@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_esai_mix.h')
-rw-r--r--sound/soc/fsl/fsl_esai_mix.h6
1 files changed, 5 insertions, 1 deletions
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;