mutex_lock(&dg00x->mutex);
--dg00x->substreams_counter;
snd_dg00x_stream_stop_duplex(dg00x);
- snd_dg00x_stream_release_duplex(dg00x);
mutex_unlock(&dg00x->mutex);
snd_dg00x_stream_lock_release(dg00x);
--dg00x->substreams_counter;
snd_dg00x_stream_stop_duplex(dg00x);
- snd_dg00x_stream_release_duplex(dg00x);
mutex_unlock(&dg00x->mutex);
return 0;
}
-void snd_dg00x_stream_release_duplex(struct snd_dg00x *dg00x)
-{
- if (dg00x->substreams_counter == 0) {
- fw_iso_resources_free(&dg00x->tx_resources);
- fw_iso_resources_free(&dg00x->rx_resources);
- }
-}
-
int snd_dg00x_stream_start_duplex(struct snd_dg00x *dg00x)
{
unsigned int generation = dg00x->rx_resources.generation;
void snd_dg00x_stream_stop_duplex(struct snd_dg00x *dg00x)
{
- if (dg00x->substreams_counter == 0)
+ if (dg00x->substreams_counter == 0) {
finish_session(dg00x);
+
+ fw_iso_resources_free(&dg00x->tx_resources);
+ fw_iso_resources_free(&dg00x->rx_resources);
+ }
}
void snd_dg00x_stream_update_duplex(struct snd_dg00x *dg00x)
int snd_dg00x_stream_reserve_duplex(struct snd_dg00x *dg00x, unsigned int rate);
int snd_dg00x_stream_start_duplex(struct snd_dg00x *dg00x);
void snd_dg00x_stream_stop_duplex(struct snd_dg00x *dg00x);
-void snd_dg00x_stream_release_duplex(struct snd_dg00x *dg00x);
void snd_dg00x_stream_update_duplex(struct snd_dg00x *dg00x);
void snd_dg00x_stream_destroy_duplex(struct snd_dg00x *dg00x);