[alsa-devel] PulseAudio and SNDRV_PCM_INFO_BATCH

Alexander E. Patrakov patrakov at gmail.com
Sat Jun 27 19:58:42 CEST 2015


27.06.2015 22:15, Clemens Ladisch wrote:
> Alexander E. Patrakov wrote:
>> 15.06.2015 13:03, Lars-Peter Clausen wrote:
>>> So SNDRV_PCM_INFO_BLOCK_TRANSFER is mainly important for rewind handling
>>> and devices with that flag set might need additional headroom since the
>>> data up to one period after the pointer position has already been copied
>>> to the dedicated memory and hence can no longer be overwritten.
>>
>> In kernel sources, sound/pci/hda/hda_controller.c mentions
>> SNDRV_PCM_INFO_BLOCK_TRANSFER. However, sub-period rewinds work fine
>> on this driver, and the avail granularity is something like 64 bytes.
>
> HDA is a very typical PCI controller; if this flag were correct here,
> pretty much _every_ driver would need it.

Well, there are more PCI drivers with this flag than without it. So it 
looks like a "typical error".

aep at aep-haswell /usr/src/linux/sound $ grep -l 
SNDRV_PCM_INFO_BLOCK_TRANSFER `grep -rl SNDRV_PCM_INFO_MMAP_VALID pci` | 
wc -l
48
aep at aep-haswell /usr/src/linux/sound $ grep -L 
SNDRV_PCM_INFO_BLOCK_TRANSFER `grep -rl SNDRV_PCM_INFO_MMAP_VALID pci` | 
wc -l
15


I guess I should write a program that tests sub-period rewinds and post 
it to the list.

> Some (older) HDA controllers have problems with position reporting
> (with workarounds in the drivers), but those problems are with the
> timing, not with the granularity.
>
> As far as I can see, snd-hda-intel should just drop this flag.

-- 
Alexander E. Patrakov


More information about the Alsa-devel mailing list