hwdep addon for raw usb mmap from userspace against snd-usb-usx2y 0.8.0 in alsa-kernel tree
PATCH 1/1 hwdep addon for raw usb mmap from userspace against snd-usb-usx2y 0.8.0 in alsa-kernel tree
Summary: Addon patch to implement usb chunc mmaping from userspace by an
alsa hwdep device. The patch contains only the alsa side of what is outlined below.
Its usb's unableness to atomically handle power of 2 period sized data chuncs, at standard pcm sample rates 44100 & 48000 what led to:
This usx2y-alsa-jack driver pair uses a hardware dependant alsa-device for mmaped pcm transport.
Advantage achieved:
The usb_hcd places reads/writes pcm data into dma-memory.
That memory is mmaped by jackd's usx2y driver.
Jack's usx2y driver is the first/last to read/write pcm data. Read/write is a combination of power of 2 period shaping and float/int conversation.
Compared to mainline alsa/jack we leave out power of 2 period shaping inside snd-usb-* which needs memcpy() and additional buffers. As a side effect possible unwanted pcm-data coruption resulting of plain alsa's snd-usb-usx2y period shaping scheme falls away. Result is sane jack operation at buffering schemes down to 128frames, 2 periods.
plain usx2y alsa mode is able to achieve 64frames, 4periods, but only at the cost of easier triggered i.e. aeolus xruns (128 or 256frames, 2periods works but is useless cause of crackling).
New functionality would possibly be better integrated into mainlines at more apropriate places.
Target could be: jack mmaping power of 2 period sized float-pcm buffers and letting alsa (snd-usb-lib - alsa-lib - plugin) do power of 2 period shaping and float/int conversation.