]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: fireface: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 2 Jun 2019 07:12:56 +0000 (16:12 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 11 Jun 2019 09:36:24 +0000 (11:36 +0200)
commitfac2feb0d2a992c5eb2e8f892d642cbf53850728
tree0c01e296830b295488d829a81725d24447b540aa
parentb862f0d480eaca0d2e32d4f0c6fd29eced326112
ALSA: fireface: 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/fireface/ff-pcm.c
sound/firewire/fireface/ff-stream.c
sound/firewire/fireface/ff.h