ALSA: dice: 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: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Sakamoto
2019-06-18 22:26:19 +09:00
committed by Takashi Iwai
parent b9434540dd
commit 740680f22d
4 changed files with 2 additions and 9 deletions

View File

@@ -336,12 +336,6 @@ error:
return err;
}
void snd_dice_stream_release_duplex(struct snd_dice *dice)
{
if (dice->substreams_counter == 0)
release_resources(dice);
}
static int start_streams(struct snd_dice *dice, enum amdtp_stream_direction dir,
unsigned int rate, struct reg_params *params)
{
@@ -494,6 +488,8 @@ void snd_dice_stream_stop_duplex(struct snd_dice *dice)
if (dice->substreams_counter == 0) {
if (get_register_params(dice, &tx_params, &rx_params) >= 0)
finish_session(dice, &tx_params, &rx_params);
release_resources(dice);
}
}