1
0
Fork 0

MLK-18874: ASoC: fsl_asrc: fix noise issue with 5 channel conversion

The dma_len is the size that how many data dma should transmit. As
the asrc use channel as unit, so the dma_len should also in channel unit.
Otherwise the output data is not align in channel, there will be noise.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
pull/10/head
Shengjiu Wang 2018-07-24 14:10:55 +08:00 committed by Jason Liu
parent 30450fec9f
commit cddbaf363e
1 changed files with 4 additions and 1 deletions

View File

@ -279,8 +279,11 @@ static int fsl_asrc_prepare_io_buffer(struct fsl_asrc_pair *pair,
return -EFAULT;
*dma_len = buf_len;
if (dir == OUT)
if (dir == OUT) {
*dma_len -= last_period_size * word_size * pair->channels;
*dma_len = *dma_len / (word_size * pair->channels) *
(word_size * pair->channels);
}
*sg_nodes = *dma_len / ASRC_MAX_BUFFER_SIZE + 1;