summaryrefslogtreecommitdiff
path: root/sound/firewire/bebob
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-09-19 05:21:52 +0300
committerTakashi Iwai <tiwai@suse.de>2015-09-29 13:35:47 +0300
commit20e445771ea109bc0ce9e717cbf2475e56a141a8 (patch)
tree1d1f76e75bc8fbd49761a41ddaf4f99706541ae2 /sound/firewire/bebob
parent6a4e89ff0f4e46c1a9d0c28e786952e70516a5f4 (diff)
downloadlinux-20e445771ea109bc0ce9e717cbf2475e56a141a8.tar.xz
ALSA: firewire-lib: add helper functions as interfaces between packet streaming layer and data block processing layer
ALSA PCM framework uses PCM buffer with a concept of 'period' to synchronize userspace operations to hardware for nearly-realtime processing. Each driver implements snd_pcm_period_elapsed() to tell across of the period boundary to ALSA PCM middleware. To call the function, some drivers utilize hardware interrupt handlers, the others count handled PCM frames. Drivers for sound units on IEEE 1394 bus are the latter. They use two buffers; PCM buffer and DMA buffer for IEEE 1394 isochronous packet. PCM frames are copied between these two buffers and 'amdtp_stream' structure counts the handled PCM frames. Then, snd_pcm_period_elapsed() is called if required. Essentially, packet streaming layer should not be responsible for PCM frame processing. The PCM frame processing should be handled in each data block processing layer as a result of handling data blocks. Although, PCM frame counting is a common work for all of protocols which ALSA firewire stack is going to support. This commit adds two new helper functions as interfaces between packet streaming layer to data block processing layer. In future, each data block processing layer implements these functions. The packet streaming layer calls data block processing layer per packet by calling the functions. The data block processing layer processes data blocks and PCM frames, and returns the number of processed PCM frames. Then the packet streaming layer calculates handled PCM frames and calls snd_pcm_period_elapsed(). Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/bebob')
0 files changed, 0 insertions, 0 deletions