summaryrefslogtreecommitdiff
path: root/sound/firewire/fireface/ff-stream.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-06-18 22:26:16 +0900
committerTakashi Iwai <tiwai@suse.de>2019-06-21 11:47:00 +0200
commitaf26bacc1c5ace50645b29aea148c6143753edd4 (patch)
treeb74bf9eaf4e1a3414b065206fe8470f21ac2f1e6 /sound/firewire/fireface/ff-stream.c
parent9628fc82f9feedfcb6b9756efb2966c00b3811ef (diff)
ALSA: fireface: unify stop and release method for duplex streams
>From callbacks for pcm and rawmidi interfaces, the functions to stop and release duplex streams are called at the same time. This commit merges the two functions. 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.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/firewire/fireface/ff-stream.c b/sound/firewire/fireface/ff-stream.c
index 884705ecf940..049920a6d43e 100644
--- a/sound/firewire/fireface/ff-stream.c
+++ b/sound/firewire/fireface/ff-stream.c
@@ -149,14 +149,6 @@ int snd_ff_stream_reserve_duplex(struct snd_ff *ff, unsigned int rate)
return 0;
}
-void snd_ff_stream_release_duplex(struct snd_ff *ff)
-{
- if (ff->substreams_counter == 0) {
- fw_iso_resources_free(&ff->tx_resources);
- fw_iso_resources_free(&ff->rx_resources);
- }
-}
-
int snd_ff_stream_start_duplex(struct snd_ff *ff, unsigned int rate)
{
int err;
@@ -217,8 +209,12 @@ error:
void snd_ff_stream_stop_duplex(struct snd_ff *ff)
{
- if (ff->substreams_counter == 0)
+ if (ff->substreams_counter == 0) {
finish_session(ff);
+
+ fw_iso_resources_free(&ff->tx_resources);
+ fw_iso_resources_free(&ff->rx_resources);
+ }
}
void snd_ff_stream_update_duplex(struct snd_ff *ff)