]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: dice: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 11 Jun 2019 13:21:16 +0000 (22:21 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 11 Jun 2019 14:02:09 +0000 (16:02 +0200)
commit16008d0dd9f813a0e1bab0494efbf98f0b667be0
tree12f84ce4d581a56b8c6eaca9cd8bc5dd266978cb
parent2436625d82f8a547d64ff555840e21a765c7c02d
ALSA: dice: 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 without releasing/allocating the resources.

There are two points to stop packet streaming; in pcm.hw_params and
pcm.prepare callbacks. The former point is a case that packet streaming
is already started for any MIDI substream then packet streaming is
requested with different sampling transfer frequency for any PCM
substream. The latter point is cases of any XRUN or packet queueing
error.

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