more on appl_ptr and DMA overrun at end of stream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been reading Lennart's article on glitch free audio....

On my scatter/gather DMA hardware I generate an interrupt at the end
of each period. On the last period this causes ALSA to issue a
trigger(STOP). However, there is a latency from when that interrupt is
generated and when ALSA does the trigger(STOP). During that latency my
hardware starts playing the next buffer (which contains stale data).
Playing stale data causes a noise burst. I fixed this by programming
my DMA hardware to not overrun appl_ptr.

There's another solution. ALSA already knows the stream ends
mid-period and pads out the partial period with silence. If it simply
padded out the next period with silence too the overrun problem would
become non-audible and there would time to process trigger(STOP).

If padding out two periods at end of stream is possible, it then
becomes possible for me to turn off interrupts in my audio driver.

-- 
Jon Smirl
jonsmirl@xxxxxxxxx
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux