diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c index d6a059ab3747..824d320b665b 100644 --- a/sound/drivers/aloop.c +++ b/sound/drivers/aloop.c @@ -412,11 +412,14 @@ static int loopback_check_format(struct loopback_cable *cable, int stream) runtime->channels != cruntime->channels || is_access_interleaved(runtime->access) != is_access_interleaved(cruntime->access); - if (!check) - return 0; - if (stream == SNDRV_PCM_STREAM_CAPTURE) + /* + * Matching params also go on to the update below, so that + * the setup controls follow a playback that joins an open + * capture. + */ + if (check && stream == SNDRV_PCM_STREAM_CAPTURE) return -EIO; - else if (cruntime->state == SNDRV_PCM_STATE_RUNNING) { + else if (check && cruntime->state == SNDRV_PCM_STATE_RUNNING) { /* close must not free the peer runtime below */ snd_refcount_get(&cable->stop_count); stop_capture = true;