summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_asrc.h
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2018-07-19 18:33:01 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:48:32 +0800
commit3b433c19d3da10d8e5e2ad00d4ff60208a0e2673 (patch)
tree1a969a526d2902b2234eaae0ee7f69708369fd05 /sound/soc/fsl/fsl_asrc.h
parent683763a08c7b0c03d7d4ab851d98e19a9174bb96 (diff)
MLK-18875: ASoC: fsl_asrc_m2m: refine the last period size
The output size of asrc for a dedicate input is uncertain. For example, if the input size is 1k, the output ratio is 2, so the output size should be 2k. but the actual output size is not 2k, is less than 2k. if we set the dma size to be 2k, the dma can't get enough data that can't finish the transmission, then there will be "output DMA task timeout" So we need to set the dma size a proper value but we don't know how many data less than expected. so we defined the last period size for assumption of reduced size. The last period size should not be too large, if it is large there will be "input DMA task timeout" The reason is the output FIFO is full, which will block the input data comsumption. In this patch, the last period size is set to the difference of configured buffer size and the expected output size, plus a fix size. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_asrc.h')
-rw-r--r--sound/soc/fsl/fsl_asrc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_asrc.h b/sound/soc/fsl/fsl_asrc.h
index d377955758be..d65481c92107 100644
--- a/sound/soc/fsl/fsl_asrc.h
+++ b/sound/soc/fsl/fsl_asrc.h
@@ -24,7 +24,7 @@
#define ASRC_DMA_BUFFER_SIZE (1024 * 48 * 4)
#define ASRC_MAX_BUFFER_SIZE (1024 * 48)
#define ASRC_OUTPUT_LAST_SAMPLE_MAX 32
-#define ASRC_OUTPUT_LAST_SAMPLE 16
+#define ASRC_OUTPUT_LAST_SAMPLE 4
#define IDEAL_RATIO_RATE 1000000