aboutsummaryrefslogtreecommitdiffstats
path: root/sound/firewire
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-06-17 17:15:06 +0900
committerTakashi Iwai <tiwai@suse.de>2019-06-18 08:45:30 +0200
commite63a15185a7a5ac1fd65dd368de52196d66c0cac (patch)
tree2a17b243d126dcf916fcd8d7c84572c9a511f8a1 /sound/firewire
parentALSA: firewire-motu: rename helper functions to begin/finish streaming session (diff)
downloadlinux-dev-e63a15185a7a5ac1fd65dd368de52196d66c0cac.tar.xz
linux-dev-e63a15185a7a5ac1fd65dd368de52196d66c0cac.zip
ALSA: firewire-motu: minor code refactoring to stop isochronous context
The helper function to stop isochronous context is superfluous. This commit removes it with simpler codes. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire')
-rw-r--r--sound/firewire/motu/motu-stream.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/sound/firewire/motu/motu-stream.c b/sound/firewire/motu/motu-stream.c
index cb01f1d784f1..4fbec35eaad5 100644
--- a/sound/firewire/motu/motu-stream.c
+++ b/sound/firewire/motu/motu-stream.c
@@ -142,19 +142,6 @@ static int start_isoc_ctx(struct snd_motu *motu, struct amdtp_stream *stream)
return 0;
}
-static void stop_isoc_ctx(struct snd_motu *motu, struct amdtp_stream *stream)
-{
- struct fw_iso_resources *resources;
-
- if (stream == &motu->rx_stream)
- resources = &motu->rx_resources;
- else
- resources = &motu->tx_resources;
-
- amdtp_stream_stop(stream);
- fw_iso_resources_free(resources);
-}
-
int snd_motu_stream_cache_packet_formats(struct snd_motu *motu)
{
int err;
@@ -292,11 +279,11 @@ stop_streams:
void snd_motu_stream_stop_duplex(struct snd_motu *motu)
{
if (motu->substreams_counter == 0) {
- if (amdtp_stream_running(&motu->tx_stream))
- stop_isoc_ctx(motu, &motu->tx_stream);
+ amdtp_stream_stop(&motu->tx_stream);
+ amdtp_stream_stop(&motu->rx_stream);
- if (amdtp_stream_running(&motu->rx_stream))
- stop_isoc_ctx(motu, &motu->rx_stream);
+ fw_iso_resources_free(&motu->tx_resources);
+ fw_iso_resources_free(&motu->rx_resources);
}
}