aboutsummaryrefslogtreecommitdiffstats
path: root/sound/firewire
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-06-12 17:44:14 +0900
committerTakashi Iwai <tiwai@suse.de>2019-06-12 15:26:54 +0200
commitda2af86d51ac32067c77759e40a162d684690a43 (patch)
treef9bfd25ad9ee39fb6a25e2089e039550ffdc05b2 /sound/firewire
parentALSA: fireworks: don't set XRUN in stop streaming (diff)
downloadlinux-dev-da2af86d51ac32067c77759e40a162d684690a43.tar.xz
linux-dev-da2af86d51ac32067c77759e40a162d684690a43.zip
ALSA: oxfw: code refactoring for stop condition of packet streaming
This commit unifies stop condition due to queueing error and unmatched state of the target device. 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/oxfw/oxfw-stream.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/firewire/oxfw/oxfw-stream.c b/sound/firewire/oxfw/oxfw-stream.c
index f230a9e44c3c..34ff673e6ff8 100644
--- a/sound/firewire/oxfw/oxfw-stream.c
+++ b/sound/firewire/oxfw/oxfw-stream.c
@@ -288,10 +288,6 @@ int snd_oxfw_stream_start_simplex(struct snd_oxfw *oxfw,
if (err < 0)
goto end;
- /* packet queueing error */
- if (amdtp_streaming_error(stream))
- stop_stream(oxfw, stream);
-
err = snd_oxfw_stream_get_current_formation(oxfw, dir, &formation);
if (err < 0)
goto end;
@@ -300,7 +296,8 @@ int snd_oxfw_stream_start_simplex(struct snd_oxfw *oxfw,
if (pcm_channels == 0)
pcm_channels = formation.pcm;
- if ((formation.rate != rate) || (formation.pcm != pcm_channels)) {
+ if (formation.rate != rate || formation.pcm != pcm_channels ||
+ amdtp_streaming_error(stream)) {
if (opposite != NULL) {
err = check_connection_used_by_others(oxfw, opposite);
if (err < 0)