Commit af26bacc authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai

ALSA: fireface: unify stop and release method for duplex streams

>From callbacks for pcm and rawmidi interfaces, the functions to stop
and release duplex streams are called at the same time. This commit
merges the two functions.
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9628fc82
...@@ -233,7 +233,6 @@ static int pcm_hw_free(struct snd_pcm_substream *substream) ...@@ -233,7 +233,6 @@ static int pcm_hw_free(struct snd_pcm_substream *substream)
--ff->substreams_counter; --ff->substreams_counter;
snd_ff_stream_stop_duplex(ff); snd_ff_stream_stop_duplex(ff);
snd_ff_stream_release_duplex(ff);
mutex_unlock(&ff->mutex); mutex_unlock(&ff->mutex);
......
...@@ -149,14 +149,6 @@ int snd_ff_stream_reserve_duplex(struct snd_ff *ff, unsigned int rate) ...@@ -149,14 +149,6 @@ int snd_ff_stream_reserve_duplex(struct snd_ff *ff, unsigned int rate)
return 0; return 0;
} }
void snd_ff_stream_release_duplex(struct snd_ff *ff)
{
if (ff->substreams_counter == 0) {
fw_iso_resources_free(&ff->tx_resources);
fw_iso_resources_free(&ff->rx_resources);
}
}
int snd_ff_stream_start_duplex(struct snd_ff *ff, unsigned int rate) int snd_ff_stream_start_duplex(struct snd_ff *ff, unsigned int rate)
{ {
int err; int err;
...@@ -217,8 +209,12 @@ int snd_ff_stream_start_duplex(struct snd_ff *ff, unsigned int rate) ...@@ -217,8 +209,12 @@ int snd_ff_stream_start_duplex(struct snd_ff *ff, unsigned int rate)
void snd_ff_stream_stop_duplex(struct snd_ff *ff) void snd_ff_stream_stop_duplex(struct snd_ff *ff)
{ {
if (ff->substreams_counter == 0) if (ff->substreams_counter == 0) {
finish_session(ff); finish_session(ff);
fw_iso_resources_free(&ff->tx_resources);
fw_iso_resources_free(&ff->rx_resources);
}
} }
void snd_ff_stream_update_duplex(struct snd_ff *ff) void snd_ff_stream_update_duplex(struct snd_ff *ff)
......
...@@ -139,7 +139,6 @@ int snd_ff_stream_get_multiplier_mode(enum cip_sfc sfc, ...@@ -139,7 +139,6 @@ int snd_ff_stream_get_multiplier_mode(enum cip_sfc sfc,
int snd_ff_stream_init_duplex(struct snd_ff *ff); int snd_ff_stream_init_duplex(struct snd_ff *ff);
void snd_ff_stream_destroy_duplex(struct snd_ff *ff); void snd_ff_stream_destroy_duplex(struct snd_ff *ff);
int snd_ff_stream_reserve_duplex(struct snd_ff *ff, unsigned int rate); int snd_ff_stream_reserve_duplex(struct snd_ff *ff, unsigned int rate);
void snd_ff_stream_release_duplex(struct snd_ff *ff);
int snd_ff_stream_start_duplex(struct snd_ff *ff, unsigned int rate); int snd_ff_stream_start_duplex(struct snd_ff *ff, unsigned int rate);
void snd_ff_stream_stop_duplex(struct snd_ff *ff); void snd_ff_stream_stop_duplex(struct snd_ff *ff);
void snd_ff_stream_update_duplex(struct snd_ff *ff); void snd_ff_stream_update_duplex(struct snd_ff *ff);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment