[alsa-devel] Master Plan on rewinding

Takashi Iwai tiwai at suse.de
Mon Sep 15 11:19:38 CEST 2014


At Sun, 14 Sep 2014 18:07:23 +0600,
Alexander E. Patrakov wrote:
> 
> 14.09.2014 17:37, Raymond Yau wrote:
> >
> >  >
> >  >
> >  >> === On the rewind safeguard ===
> >  >
> >  >
> >  > Result 1: it has been decided that the return value of
> > snd_pcm_rewindable() is not changed, and the safeguard is returned by a
> > separate function.
> >
> > It is unlikely to return any value which is safe, it is the
> > responsiability of the application to decide how much can be rewind
> 
> You are placing a responsibility on an application without giving it any 
> means to make an informed decision. E.g. 4 ms is OK on snd-hda-intel, 
> but definitely not OK on ymfpci even on infinitely fast CPU (because of 
> the fixed 5 ms interrupt interval). The whole question here is: how is 
> an application supposed to know that?

Well, maybe the word "safeguard" is somewhat confusing to be used as
a driver API.  There is no "safety" at all there.  There is only
"theoretically minimal" (and it often lies even if the hardware chip
says so).  How much value to be taken as "safeguard" is rather a
choice by each application or sound backend.

Right now, the only information we give from the sound driver is
INFO_BATCH flag.  And I agree with a bit more detailed information to
be exposed from the driver -- but only if possible.  This must be an
optional information and not mandatory.


Takashi


More information about the Alsa-devel mailing list