summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-plug-dmix.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/alsa/alsa-plug-dmix.c')
-rw-r--r--plugins/alsa/alsa-plug-dmix.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/alsa/alsa-plug-dmix.c b/plugins/alsa/alsa-plug-dmix.c
index 8dd9507..b625865 100644
--- a/plugins/alsa/alsa-plug-dmix.c
+++ b/plugins/alsa/alsa-plug-dmix.c
@@ -24,6 +24,13 @@ static int uniqueIpcIndex = 1024;
ALSA_PLUG_PROTO(dmix);
+static void dmixConfigClean(SoftMixerT *mixer, void * arg) {
+ snd_config_t * dmixConfig = arg;
+ AFB_API_DEBUG(mixer->api, "%s... ", __func__);
+ snd_config_delete(dmixConfig);
+ snd_config_update();
+}
+
PUBLIC AlsaPcmCtlT* AlsaCreateDmix(SoftMixerT *mixer, const char* pcmName, AlsaSndPcmT *pcmSlave, int open) {
@@ -92,7 +99,7 @@ PUBLIC AlsaPcmCtlT* AlsaCreateDmix(SoftMixerT *mixer, const char* pcmName, AlsaS
if (error) goto OnErrorExit;
}
- /* It is critical to set the right number of channels ... know.
+ /* It is critical to set the right number of channels ... now.
* Trying to set another value later leads to silent failure
* */
@@ -121,6 +128,9 @@ PUBLIC AlsaPcmCtlT* AlsaCreateDmix(SoftMixerT *mixer, const char* pcmName, AlsaS
goto OnErrorExit;
}
+ pcmPlug->private_data = dmixConfig;
+ pcmPlug->private_data_clean = dmixConfigClean;
+
// Debug config & pcm
AlsaDumpCtlConfig(mixer, "plug-dmix", dmixConfig, 1);
AFB_API_NOTICE(mixer->api, "%s: %s done", __func__, pcmPlug->cid.cardid);