ALSA: oxfw: ensure to release isochronous resources in pcm.hw_params callback
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 18 Jun 2019 13:26:22 +0000 (22:26 +0900)
committerTakashi Iwai <tiwai@suse.de>
Fri, 21 Jun 2019 09:47:11 +0000 (11:47 +0200)
When stopping packet streaming in reserve function for duplex streams,
isochronous resources should be released.

Fixes: 7bc93821a70a ("ALSA: firewire-lib: split allocation of isochronous resources from establishment of connection")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/oxfw/oxfw-stream.c

index a8bc798..a750281 100644 (file)
@@ -283,10 +283,12 @@ int snd_oxfw_stream_reserve_duplex(struct snd_oxfw *oxfw,
        if (formation.rate != rate || formation.pcm != pcm_channels) {
                amdtp_stream_stop(&oxfw->rx_stream);
                cmp_connection_break(&oxfw->in_conn);
+               cmp_connection_release(&oxfw->in_conn);
 
                if (oxfw->has_output) {
                        amdtp_stream_stop(&oxfw->tx_stream);
                        cmp_connection_break(&oxfw->out_conn);
+                       cmp_connection_release(&oxfw->out_conn);
                }
        }