From 8b371e6be0767fc3726d7a1f70236529f7ccbc20 Mon Sep 17 00:00:00 2001 From: heyuanjie <943313837@qq.com> Date: Fri, 4 May 2018 18:29:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=95=B0=E6=8D=AE=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=AF=BC=E8=87=B4assert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/imxrt1052-evk/drivers/drv_codec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bsp/imxrt1052-evk/drivers/drv_codec.c b/bsp/imxrt1052-evk/drivers/drv_codec.c index 158772357a..69b731e99f 100644 --- a/bsp/imxrt1052-evk/drivers/drv_codec.c +++ b/bsp/imxrt1052-evk/drivers/drv_codec.c @@ -347,6 +347,11 @@ static rt_size_t icodec_transmit(struct rt_audio_device *audio, const void *writ xfer.data = (uint8_t *)writeBuf; xfer.dataSize = size; + if (size%32 == 0) + icodec->txHandle.count = 16; + else + icodec->txHandle.count = 1; + rt_hw_cpu_dcache_ops(RT_HW_CACHE_FLUSH, (void*)writeBuf, size); if (SAI_TransferSendEDMA(icodec->sai, &icodec->txHandle, &xfer) != kStatus_Success) return 0;