ALSA: asihpi - fix pcm dma pointer tracking
authorEliot Blennerhassett <eblennerhassett@audioscience.com>
Wed, 21 Dec 2011 22:54:02 +0000 (11:54 +1300)
committerTakashi Iwai <tiwai@suse.de>
Thu, 22 Dec 2011 07:12:52 +0000 (08:12 +0100)
Elapsed counter should only count data committed to snd_pcm_period_elapsed,
rather than all data available

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/asihpi/asihpi.c

index e9de799abd3836653fdf010ecd6cd3510248786d..1ba50e36929616c5fb942ef002689104ec5827ce 100644 (file)
@@ -888,8 +888,8 @@ static void snd_card_asihpi_timer_function(unsigned long data)
                                                        pd, xfer2));
                                }
                        }
-                       ds->pcm_buf_host_rw_ofs = ds->pcm_buf_host_rw_ofs + xfercount;
-                       ds->pcm_buf_elapsed_dma_ofs = pcm_buf_dma_ofs;
+                       ds->pcm_buf_host_rw_ofs += xfercount;
+                       ds->pcm_buf_elapsed_dma_ofs += xfercount;
                        snd_pcm_period_elapsed(s);
                }
        }