Re: safe support for rewind in ALSA

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

 



Hi,

On Wed, 3 Feb 2010, Raymond Yau wrote:

>> - the 'only' change is to make sure the hw_ptr reported in .pointer is
>> NOT the number of samples pushed out to the interface. hw_ptr should
[...]
> if snd_xxx_pointer call back return the next read position , the hw_ptr will
> always be multiple of PCI/PCIe brust size

yep, that's the point I was trying to make in my longish earlier
mail yesterday:
http://article.gmane.org/gmane.linux.alsa.devel/70306

I also presented two solutions for this. So let hw_ptr be a multiple of 
burst/batch size, but compensate by:

1) driver updates runtime->delay in its pointer() callback, or
 	-> finegrained playout delay can be reported even if
 	   hw_ptr is a multiple of burst/batch size
2) use of snd_pcm_status_get_tstamp() (original idea from Eero)
         -> assumes runtime->delay is updated in sync with hw_ptr

Both are possible with existing ALSA infra, and driver and app developers
could just use these, but what is missing is the consensus whether this is 
a valid/allowed thing to do and rely on.
_______________________________________________
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