From 297aa8309743d570b801e917f637937c0fc904c7 Mon Sep 17 00:00:00 2001 From: Thierry Bultel Date: Wed, 13 Feb 2019 11:59:45 +0100 Subject: pcm plugs: rework the alsa config cleanup The alsa config (for softvol, routes, rate conversion ...) was cleaned up by the owner stream or zone, at their deletion time. This was a mistake, because when the stream or zone creation was not complete, the cleanup of the configuration was not done. Instead of doing that, the config is attached to the plug objects as private data (in the AlsaPcmCtlT structure). Since the AlsaPcmCtlT are always recorded in the creation transaction, it is easy to call the cleaning callback (when it exists) when the transaction is deleted. Change-Id: I952871518a20bfe0be6398887bc747338cf574fb Signed-off-by: Thierry Bultel --- plugins/alsa/alsa-api-streams.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'plugins/alsa/alsa-api-streams.c') diff --git a/plugins/alsa/alsa-api-streams.c b/plugins/alsa/alsa-api-streams.c index 92e00c0..f577b69 100644 --- a/plugins/alsa/alsa-api-streams.c +++ b/plugins/alsa/alsa-api-streams.c @@ -687,19 +687,6 @@ static void streamDestroy(SoftMixerT * mixer, void * arg) { AlsaPcmCopyStop(mixer, stream->copy); freemem: - if (stream->softvolConfig) { - AFB_API_DEBUG(mixer->api, "%s... %s delete softvol config", __func__, stream->uid); - snd_config_delete(stream->softvolConfig); - snd_config_update(); - stream->softvolConfig = NULL; - } - - if (stream->rateConfig) { - AFB_API_DEBUG(mixer->api, "%s... %s delete rate config", __func__, stream->uid); - snd_config_delete(stream->rateConfig); - snd_config_update(); - stream->rateConfig = NULL; - } free((char*)stream->uid); free((char*)stream->playback); -- cgit 1.2.3-korg