summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-plug-vol.c
diff options
context:
space:
mode:
authorfulup <fulup.arfoll@iot.bzh>2018-06-10 22:44:07 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-06-11 01:22:18 +0200
commit9c88fd2aaf454b4ab5d4cfcb5e510196da3b74b4 (patch)
tree0c1fbe9fe6902712d55e309912c3dcc02107170a /plugins/alsa/alsa-plug-vol.c
parent2838587fc0d118d504e6ef8e04b98f262f29a712 (diff)
Autorize direct zone to point on sndcard
Diffstat (limited to 'plugins/alsa/alsa-plug-vol.c')
-rw-r--r--plugins/alsa/alsa-plug-vol.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/plugins/alsa/alsa-plug-vol.c b/plugins/alsa/alsa-plug-vol.c
index 879901f..968ae73 100644
--- a/plugins/alsa/alsa-plug-vol.c
+++ b/plugins/alsa/alsa-plug-vol.c
@@ -22,26 +22,15 @@
ALSA_PLUG_PROTO(softvol); // stream uses softvol plugin
-PUBLIC AlsaPcmCtlT *AlsaCreateSoftvol(SoftMixerT *mixer, AlsaStreamAudioT *stream, AlsaSndZoneT *zone, AlsaSndCtlT *sndcard, char* ctlName, int max, int open) {
+PUBLIC AlsaPcmCtlT *AlsaCreateSoftvol(SoftMixerT *mixer, AlsaStreamAudioT *stream, char* slaveid, AlsaSndCtlT *sndcard, char* ctlName, int max, int open) {
snd_config_t *streamConfig, *elemConfig, *slaveConfig, *controlConfig,*pcmConfig;
AlsaPcmCtlT *pcmVol= calloc(1,sizeof(AlsaPcmCtlT));
int error = 0;
-
- // assert static/global softmixer handle get requited info
- AlsaSndZoneT **pcmZones = mixer->zones;
- if (!pcmZones) {
- AFB_ApiError(mixer->api, "AlsaCreateSoftvol:%s(stream) No Zone found [should Registry zones first]", stream->uid);
- goto OnErrorExit;
- }
-
+
char *cardid;
(void) asprintf(&cardid, "softvol-%s", stream->uid);
pcmVol->cid.cardid = (const char *) cardid;
- char *slaveid;
- (void)asprintf(&slaveid, "route-%s", zone->uid);
- // Fulup debug (void) asprintf(&slaveid, "dmix-%s", "8CH-USB");
-
// refresh global alsalib config and create PCM top config
snd_config_update();
error += snd_config_top(&streamConfig);