[alsa-devel] [PATCH v2] ALSA: core: let low-level driver or userspace disable rewinds

Takashi Sakamoto o-takashi at sakamocchi.jp
Tue Jun 13 13:09:38 CEST 2017


Pierre-Louis,

On Jun 12 2017 21:09, Pierre-Louis Bossart wrote:
>> If describing the detail design of your hardware, you might get more
>> helps.
>>
>>  * I intentionally ignore discussion about burstness of data
>>    transmission and accuracy of hwptr.
> 
> You are probably reading too much into this.
> The intent is to optimize DMA operations where the hardware now knows
> both hw_ptr and appl_ptr. there is no use of the .ack() for copies into
> intermediate buffers

If this patch included enough explanation about the disadvantage of
rewind operation on your driver and hardware in a point of optimization
for DMA data transmission and power consumption, I would not have driven
my imagination so hard for the reviewing.

> and the code for rewind on capture is largely for
> consistency - we've never seen anyone using rewind on capture on
> DSP-based platforms.

I'm not a prophet, and you too. It's not better to change interfaces
with any forecast. Furthermore, once changing interfaces, it affects to
all of applications. Please have enough care of it.

# I can imagine a disadvantage of rewind operation for PCM capture
# substream. When rewinding, available space on PCM buffer for data
# transmission from hardware is reduced. Then, even if hardware already
# done sampling, it can't transfer the PCM frames. There's a delay and
# hardware needs extra buffering.


Regards

Takashi Sakamoto


More information about the Alsa-devel mailing list