audio DMA : dma_period is not an integer multiple of dma_size support
author邱建斌 <qjb@rock-chips.com>
Thu, 14 Mar 2013 03:42:36 +0000 (11:42 +0800)
committer邱建斌 <qjb@rock-chips.com>
Thu, 14 Mar 2013 03:42:36 +0000 (11:42 +0800)
sound/soc/rk29/rk29_pcm.c

index d936b2653d0943d031684da01dd1f5065f1ce25b..69b871a3bd98968be85cd78c30930c9da3422a00 100755 (executable)
@@ -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)