aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-plug-route.c
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2018-05-17 21:43:24 +0200
committerFulup Ar Foll <fulup@iot.bzh>2018-05-17 21:43:24 +0200
commit253df14bd84f535a54f4d12c95399899e1343c20 (patch)
tree16093cc86d2874afb3311124613e69e23e74acbc /plugins/alsa/alsa-plug-route.c
parent29f5fc4e093b8793eaeeef056d0b998182269718 (diff)
Initial version with dynamic APIs
Diffstat (limited to 'plugins/alsa/alsa-plug-route.c')
-rw-r--r--plugins/alsa/alsa-plug-route.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/alsa/alsa-plug-route.c b/plugins/alsa/alsa-plug-route.c
index 8fa5de8..d2ca223 100644
--- a/plugins/alsa/alsa-plug-route.c
+++ b/plugins/alsa/alsa-plug-route.c
@@ -48,17 +48,20 @@ OnErrorExit:
}
PUBLIC AlsaPcmInfoT* AlsaCreateRoute(CtlSourceT *source, AlsaSndZoneT *zone, int open) {
-
+ SoftMixerHandleT *mixerHandle = (SoftMixerHandleT*) source->context;
snd_config_t *routeConfig, *elemConfig, *slaveConfig, *tableConfig, *pcmConfig;
int error = 0;
AlsaPcmInfoT *pcmPlug = calloc(1, sizeof (AlsaPcmInfoT));
pcmPlug->uid = zone->uid;
pcmPlug->cardid = zone->uid;
+
+ assert(mixerHandle);
- AlsaPcmInfoT *pcmBackend = Softmixer->sndcardCtl;
- AlsaPcmInfoT* pcmSlave=Softmixer->multiPcm;
+ AlsaPcmInfoT *pcmBackend = mixerHandle->backend;
+ AlsaPcmInfoT* pcmSlave=mixerHandle->multiPcm;
if (!pcmBackend || !pcmSlave) {
- AFB_ApiError(source->api, "AlsaCreateRoute:zone(%s)(zone) No Sound Card Ctl find [should register snd_cards first]", zone->uid);
+ AFB_ApiError(source->api, "AlsaCreateRoute: mixer=%s zone(%s)(zone) No Sound Card Ctl find [should register snd_cards first]"
+ , mixerHandle->uid, zone->uid);
goto OnErrorExit;
}