Skip to content

Commit 1d479f8

Browse files
committed
Merge branch 'topic/au88x0' into for-linus
* topic/au88x0: ALSA: au88x0: fix wrong period_elapsed() call ALSA: au88x0: fix .pointer callback
2 parents ba252af + e9ab33d commit 1d479f8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎sound/pci/au88x0/au88x0_core.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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

12621262
static 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);

0 commit comments

Comments
 (0)