1
0
Fork 0

MLK-23650-2: ASoC: fsl_asrc_m2m: Fix oops error

Don't need to add one more buffer, if the buffer
size is same as ASRC_MAX_BUFFER_SIZE.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Shengjiu Wang 2020-03-23 17:32:13 +08:00
parent 091d9d8e65
commit 6a895a2c4c
1 changed files with 3 additions and 1 deletions

View File

@ -307,7 +307,9 @@ static int fsl_asrc_prepare_io_buffer(struct fsl_asrc_pair *pair,
* (word_size * pair->channels * m2m->watermark[OUT]);
}
*sg_nodes = *dma_len / ASRC_MAX_BUFFER_SIZE + 1;
*sg_nodes = *dma_len / ASRC_MAX_BUFFER_SIZE;
if (*dma_len % ASRC_MAX_BUFFER_SIZE)
*sg_nodes += 1;
fifo_addr = asrc_priv->paddr + REG_ASRDx(dir, index);