MLK-20096: ASoC: fsl_asrc_m2m: fix noise issue for 8k5c to 176k5c conversion
authorShengjiu Wang <shengjiu.wang@nxp.com>
Wed, 12 Dec 2018 11:14:21 +0000 (19:14 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit8fa23e1ae00c4127c2b31e55b752d956c497f916
tree308e6ab9c65437419b7000ea5ed070febc98a766
parent53ef730a484573059f6a556a111196960f335767
MLK-20096: ASoC: fsl_asrc_m2m: fix noise issue for 8k5c to 176k5c conversion

Compare with imx6, the conversion of 8kHz 5channel to 176kHz is ok.
And compare the output we found that about every 48K bytes, there will be
additional data be added, which cause noise.

In this case, there will be two sg_nodes, for the maxmum output size exceed
the ASRC_MAX_BUFFER_SIZE, each size is ASRC_MAX_BUFFER_SIZE, it is 49152.
the value can't be exact divided by channel * word_with * watermark = 40.
So the EDMA can't finish the copy with correct size.

There is limitation of EMDA described in commit 3519b67ac01c
("MLK-19151: ASoC: fsl_asrc: fix dma timeout issue for imx8qxp")

EDMA just copy 49120 bytes, there will 32 bytes wrong data.

According to this limitation, this commit is to change the maxburst to 1
for EDMA case, then EDMA can do what we expect correctly.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 3ed46932710cd8c15d7fa79555935be04d768e40)
sound/soc/fsl/fsl_asrc_m2m.c