summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-api-streams.c
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-06-06 09:01:12 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2018-06-06 09:09:11 +0200
commit38b5a2d09ae3ac33a31434a480549e778b16242d (patch)
tree53122ca1a8288c66a232b24e349dad384cf6fa73 /plugins/alsa/alsa-api-streams.c
parenta05bd6782eab1692e87fa365be1491fbe47b41d4 (diff)
Fixed the MixerInfoAction reply
Make it robust to empty source, and set the source when input is a direct capture device. Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'plugins/alsa/alsa-api-streams.c')
-rw-r--r--plugins/alsa/alsa-api-streams.c3
1 files changed, 1 insertions, 2 deletions
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