summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/alsa/alsa-api-mixer.c11
-rw-r--r--plugins/alsa/alsa-api-streams.c3
2 files changed, 5 insertions, 9 deletions
diff --git a/plugins/alsa/alsa-api-mixer.c b/plugins/alsa/alsa-api-mixer.c
index c97f8c6..112adbb 100644
--- a/plugins/alsa/alsa-api-mixer.c
+++ b/plugins/alsa/alsa-api-mixer.c
@@ -106,15 +106,12 @@ STATIC void MixerInfoAction(AFB_ReqT request, json_object *argsJ) {
if (quiet) {
json_object_array_add(streamsJ, json_object_new_string(streams[idx]->uid));
} else {
- json_object *numidJ;
- wrap_json_pack(&numidJ, "{si,si}"
- , "volume", streams[idx]->volume
- , "mute", streams[idx]->mute
- );
- wrap_json_pack(&valueJ, "{ss,ss, so}"
+ wrap_json_pack(&valueJ, "{ss,ss?,s{si,si}}"
, "uid", streams[idx]->uid
, "alsa", streams[idx]->source
- , "numid", numidJ
+ , "numid"
+ , "volume", streams[idx]->volume
+ , "mute", streams[idx]->mute
);
json_object_array_add(streamsJ, valueJ);
}
diff --git a/plugins/alsa/alsa-api-streams.c b/plugins/alsa/alsa-api-streams.c
index e2f3252..487b0fe 100644
--- a/plugins/alsa/alsa-api-streams.c
+++ b/plugins/alsa/alsa-api-streams.c
@@ -271,11 +271,10 @@ PUBLIC int CreateOneStream(SoftMixerT *mixer, AlsaStreamAudioT *stream) {
}
}
- // return alsa URI only when loopback is used
if (loop) {
(void) asprintf((char**)&stream->source, "hw:%d,%d,%d", captureDev->cardidx, loop->playback, capturePcm->cid.subdev);
} else {
- stream->source=NULL;
+ (void) asprintf((char**)&stream->source, "hw:%d,%d,%d", captureDev->cardidx, captureDev->device, captureDev->subdev);
}
// create a dedicated verb for this stream