Skip to contentSkip to conversation

ALSA: asihpi - fix pcm dma pointer tracking

PATCH In review [email protected] 2 participants 2 messages Dec 21, 2011 – Dec 22, 2011 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: asihpi - fix pcm dma pointer tracking

From: Eliot Blennerhassett <[email protected]>

Elapsed counter should only count data committed to snd_pcm_period_elapsed, rather than all data available

---
 sound/pci/asihpi/asihpi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
sound/pci/asihpi/asihpi.c +2 -2
index e9de799..322ddfe 100644
@@ -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);
 		}
 	}
Signature · 1 line
1.7.0.4
#1 lore raw

At Thu, 22 Dec 2011 11:54:02 +1300,

Quoted 16 lines · [email protected] wrote:

From: Eliot Blennerhassett <[email protected]>

Elapsed counter should only count data committed to snd_pcm_period_elapsed, rather than all data available

---
 sound/pci/asihpi/asihpi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
sound/pci/asihpi/asihpi.c +0 -0
index e9de799..322ddfe 100644

sound/pci/asihpi/asihpi.c static void snd_card_asihpi_timer_function(unsigned long data) · line 891

Quoted 6 lines
sound/pci/asihpi/asihpi.c +1 -2
@@ -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;

A typo here. I applied the patch with the fix now.

thanks,

Takashi

Quoted 7 lines
sound/pci/asihpi/asihpi.c +1 -0
+			ds->pcm_buf_elapsed_dma_ofs += xfercount;
 			snd_pcm_period_elapsed(s);
 		}
 	}
Signature · 1 line
1.7.0.4