Re: [Alsa-user] driver approach
Brought to you by:
perex
|
From: Giuliano P. <po...@de...> - 2005-09-28 13:00:20
|
On Wed, 28 Sep 2005, Alfons Adriaensen wrote: > > Of course a decrease of the period size reduces the delay but also increases > > the danger of dropouts due to network jitter. Beside working on the network > > engineering I'm wondering if there's a way to tune the driver in a way that > > the capture delay's equal to the blocking delay and not twice of it. > > If by 'capture delay' you mean 'the maximum delay between a sample passing > thru the DAC and the time it is available to be read in user space', and by > 'blocking delay' you mean the period time, then the two should be equal > (ignoring interrupt and proces scheduling time). Actually, the time that passes from when the sound enters the card and when the data is available to the application is ADC delay + DSP delay (which includes internal buffering, mixing, etc.) + PCI transport + IRQ period + IRQ service time + schedule delay of your process. Assuming they all but IRQ period are 0 (which aren't) the minimum delay is as long one period. Do not undestimate the first two because they can be several tens of frames long. Furthermore, in case your soundcard cannot deliver an IRQ exactly at the end of each period, you have to sum that delay, too. -- Giuliano. |