summaryrefslogtreecommitdiff
path: root/sound/firewire/fireface/ff-stream.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-06-02 16:12:52 +0900
committerTakashi Iwai <tiwai@suse.de>2019-06-11 11:36:22 +0200
commit47b87c8ed072b6d0fd54f1751ad0184e7c8e20e5 (patch)
treecc2bed336c00a161c69c2df6723d879bc7a75f25 /sound/firewire/fireface/ff-stream.c
parentd8f291b7b84c4d5eb7a250a4f56cc44ed5bef3cf (diff)
ALSA: fireface: add protocol-specific operation to allocate isochronous resources
This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. In ALSA fireface driver, the allocation of isochronous resources is programmed in each implementation of protocol. This commit adds protocol-specific operation for the allocation separated from the operation to begin session. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireface/ff-stream.c')
-rw-r--r--sound/firewire/fireface/ff-stream.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/firewire/fireface/ff-stream.c b/sound/firewire/fireface/ff-stream.c
index a8a90f1ae09e..740963e4e1c9 100644
--- a/sound/firewire/fireface/ff-stream.c
+++ b/sound/firewire/fireface/ff-stream.c
@@ -156,6 +156,10 @@ int snd_ff_stream_start_duplex(struct snd_ff *ff, unsigned int rate)
if (err < 0)
return err;
+ err = ff->spec->protocol->allocate_resources(ff, rate);
+ if (err < 0)
+ goto error;
+
err = ff->spec->protocol->begin_session(ff, rate);
if (err < 0)
goto error;