Re: Misusing snd_pcm_avail_update()

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

 



Lennart Poettering wrote:
> On Fri, 23.01.09 18:56, Clemens Ladisch (clemens@xxxxxxxxxx) wrote:
> > Instead of writing a callback in the USB driver to compute the time
> > until the next underrun, I'd rather rip out that fast start code.

(Done.)

> > So, no kernel computation is needed.  :-)
> 
> While I think it would be good not have this kind of double-buffering
> I wonder if this is really future-proof. i.e. can this done with every
> driver that uses 'fast starts'? 

Yes, because the USB driver was the only one that did this.

There are other drivers that use double-buffering (and the USB driver
still does), but there the playback speed does not change, i.e., the
stream is not more underrun-prone when starting.

> > * For many devices (legacy ISA, etc.), we just don't know the correct
> >   value.
> 
> But it should be possible to pick a safe boundary, shouldn't it?

In theory, the _safe_ boundary is one period.  In practice, ISA devices
cannot afford to prefetch much data due to the low bus bandwidth, so
one (frame) should be OK.  (And we _know_ devices that do whole-period
double-buffering because the code is right there in the driver.)


Best regards,
Clemens
_______________________________________________
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