summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-plug-route.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/alsa/alsa-plug-route.c')
-rw-r--r--plugins/alsa/alsa-plug-route.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/alsa/alsa-plug-route.c b/plugins/alsa/alsa-plug-route.c
index d3f22a7..df39698 100644
--- a/plugins/alsa/alsa-plug-route.c
+++ b/plugins/alsa/alsa-plug-route.c
@@ -23,6 +23,14 @@
ALSA_PLUG_PROTO(route);
+static void routeConfigClean(SoftMixerT *mixer, void * arg) {
+ snd_config_t * routeConfig = arg;
+ AFB_API_DEBUG(mixer->api, "%s... route config", __func__);
+ snd_config_delete(routeConfig);
+ snd_config_update();
+}
+
+
typedef struct {
const char *uid;
const char *cardid;
@@ -81,7 +89,7 @@ OnErrorExit:
}
PUBLIC AlsaPcmCtlT* AlsaCreateRoute(SoftMixerT *mixer, AlsaSndZoneT *zone, int open) {
- snd_config_t *routeConfig, *elemConfig, *slaveConfig, *tableConfig, *pcmConfig;
+ snd_config_t *routeConfig = NULL, *elemConfig, *slaveConfig, *tableConfig, *pcmConfig;
int error = 0;
ChannelCardPortT slave, channelCardPort;
AlsaPcmCtlT *pcmRoute = NULL;
@@ -279,7 +287,8 @@ PUBLIC AlsaPcmCtlT* AlsaCreateRoute(SoftMixerT *mixer, AlsaSndZoneT *zone, int o
goto fail;
}
- zone->routeConfig = routeConfig;
+ pcmRoute->private_data = routeConfig;
+ pcmRoute->private_data_clean = routeConfigClean;
// Debug config & pcm
AFB_ApiNotice(mixer->api, "%s: zone(%s) DONE", __func__, zone->uid);