]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: firewire-tascam: reserve/release isochronous resources in pcm.hw_params/hw_free...
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 2 Jun 2019 07:12:48 +0000 (16:12 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 11 Jun 2019 09:36:19 +0000 (11:36 +0200)
commit4a58bdad8fa8a051dd7d026b3a9778244065e685
tree6bd96ddf307378cee08e2b3beb0499392ccdd8e5
parent93ffe0ed96c25272ff00bf7b024078293101aa67
ALSA: firewire-tascam: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks

Once allocated, isochronous resources are available for packet
streaming, even if the streaming is cancelled. For this reason,
current implementation handles allocation of the resources and
starting packet streaming at the same time. However, this brings
complicated procedure to start packet streaming.

This commit separates the allocation and starting. The allocation is
done in pcm.hw_params callback and available till pcm.hw_free callback.
Even if any XRUN occurs, pcm.prepare callback is done to restart
packet streaming for allocated the resources.

There are two points to stop packet streaming; in pcm.hw_params and
pcm.prepare callbacks.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/tascam/tascam-pcm.c
sound/firewire/tascam/tascam-stream.c
sound/firewire/tascam/tascam.h