File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1255,8 +1255,8 @@ static int inline vortex_adbdma_getlinearpos(vortex_t * vortex, int adbdma)
12551255 int temp ;
12561256
12571257 temp = hwread (vortex -> mmio , VORTEX_ADBDMA_STAT + (adbdma << 2 ));
1258- temp = (dma -> period_virt * dma -> period_bytes ) + (temp & POS_MASK );
1259- return ( temp ) ;
1258+ temp = (dma -> period_virt * dma -> period_bytes ) + (temp & ( dma -> period_bytes - 1 ) );
1259+ return temp ;
12601260}
12611261
12621262static void vortex_adbdma_startfifo (vortex_t * vortex , int adbdma )
@@ -1504,8 +1504,7 @@ static int inline vortex_wtdma_getlinearpos(vortex_t * vortex, int wtdma)
15041504 int temp ;
15051505
15061506 temp = hwread (vortex -> mmio , VORTEX_WTDMA_STAT + (wtdma << 2 ));
1507- //temp = (temp & POS_MASK) + (((temp>>WT_SUBBUF_SHIFT) & WT_SUBBUF_MASK)*(dma->cfg0&POS_MASK));
1508- temp = (temp & POS_MASK ) + ((dma -> period_virt ) * (dma -> period_bytes ));
1507+ temp = (dma -> period_virt * dma -> period_bytes ) + (temp & (dma -> period_bytes - 1 ));
15091508 return temp ;
15101509}
15111510
@@ -2441,7 +2440,8 @@ static irqreturn_t vortex_interrupt(int irq, void *dev_id)
24412440 spin_lock (& vortex -> lock );
24422441 for (i = 0 ; i < NR_ADB ; i ++ ) {
24432442 if (vortex -> dma_adb [i ].fifo_status == FIFO_START ) {
2444- if (vortex_adbdma_bufshift (vortex , i )) ;
2443+ if (!vortex_adbdma_bufshift (vortex , i ))
2444+ continue ;
24452445 spin_unlock (& vortex -> lock );
24462446 snd_pcm_period_elapsed (vortex -> dma_adb [i ].
24472447 substream );
You can’t perform that action at this time.
0 commit comments