summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_asrc.h
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2018-08-07 15:02:34 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:48:33 +0800
commit9d607a7189bad77c8357a0646a353e5ee74d9d4c (patch)
treee24bdc403091198c954692a8e3dc495ac866bde9 /sound/soc/fsl/fsl_asrc.h
parent6e7c69f03b0d932d247dc88746b3c6d794f3d640 (diff)
MLK-19151: ASoC: fsl_asrc: fix dma timeout issue for imx8qxp
In the imx8qxp, the DMA is EDMA, which require the buffer size should be divided by burst size with no remainder, otherwise the remainder is not transferred by EDMA, so the input buffer is not consumed by ASRC, then there will be dma output timeout issue. This behavior is different with SDMA. This patch is to change the input burst size to be 1 to avoid the issue, and refine the last_period_size for output buffer. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_asrc.h')
-rw-r--r--sound/soc/fsl/fsl_asrc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_asrc.h b/sound/soc/fsl/fsl_asrc.h
index d65481c92107..45562aae89f0 100644
--- a/sound/soc/fsl/fsl_asrc.h
+++ b/sound/soc/fsl/fsl_asrc.h
@@ -367,11 +367,15 @@ struct fsl_asrc {
int asrc_rate;
int asrc_width;
+ int dma_type; /* 0 is sdma, 1 is edma */
u32 regcache_cfg;
char name[20];
};
+#define DMA_SDMA 0
+#define DMA_EDMA 1
+
#define DRV_NAME "fsl-asrc-dai"
extern struct snd_soc_component_driver fsl_asrc_component;
struct dma_chan *fsl_asrc_get_dma_channel(struct fsl_asrc_pair *pair, bool dir);