From e609b8428a2abd372ad63872c6e2dbf5c97b106c Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=82=B1=E5=BB=BA=E6=96=8C?= Date: Thu, 14 Mar 2013 11:42:36 +0800 Subject: [PATCH] audio DMA : dma_period is not an integer multiple of dma_size support --- sound/soc/rk29/rk29_pcm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/rk29/rk29_pcm.c b/sound/soc/rk29/rk29_pcm.c index d936b2653d09..69b871a3bd98 100755 --- a/sound/soc/rk29/rk29_pcm.c +++ b/sound/soc/rk29/rk29_pcm.c @@ -114,15 +114,14 @@ static void rockchip_pcm_enqueue(struct snd_pcm_substream *substream) limit = prtd->dma_limit; if (DMA_INFIN_LOOP()) { - if(prtd->dma_period % prtd->params->dma_size*16){ - WARN_ON(1); + if(prtd->dma_period % (prtd->params->dma_size*16)){ + printk("dma_period(%d) is not an integer multiple of dma_size(%d)",prtd->dma_period,prtd->params->dma_size*16); rk29_dma_config(prtd->params->channel, prtd->params->dma_size, 1); } else rk29_dma_config(prtd->params->channel, prtd->params->dma_size, 16); - ret = rk29_dma_enqueue_ring(prtd->params->channel, substream, pos, prtd->dma_period, limit ,true); if (ret == 0) -- 2.34.1