alsa-lib: mmap API disables blocking I/O or sw_params

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

 



I'm swapping out a vanilla loop based on RW_INTERLEAVED for 
MMAP_INTERLEAVED, to reduce memory copies:

The equivalent code becomes:

  snd_pcm_avail_update()
  snd_pcm_mmap_begin()
  snd_pcm_mmap_commit()

but what I find no longer works:

* Blocking I/O: it's necessary to make explicit calls to snd_pcm_wait()  
  with syscall overhead of poll()

* Automatic start (and perhaps others): so I have to count the frames 
  committed and call snd_pcm_start() explicitly.

I don't think these are conceptually incompatible with mmap, so is this 
the intended behaviour and an important omission from the docs? Or is the 
mmap API not widely used and I'm stumbling on bugs?

-- 
Mark



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux