diff options
author | Yannick Gicquel <yannick.gicquel@iot.bzh> | 2016-09-28 10:24:48 +0200 |
---|---|---|
committer | Yannick Gicquel <yannick.gicquel@iot.bzh> | 2016-10-11 17:09:07 +0200 |
commit | 952d404e87ca6001e546fe9105bdb6760c468760 (patch) | |
tree | f938d47ace434bf5f9dec0e34f47d3fc9d622234 /switch.c | |
parent | db43862074de2ac2177949f943997f16b2b2a1fd (diff) |
switch: explicit route supportHEADflounder_5.99.1flounder/5.99.1eel_5.0.3eel_5.0.2eel_5.0.1eel_5.0.0eel_4.99.5eel_4.99.4eel_4.99.3eel/5.0.3eel/5.0.2eel/5.0.1eel/5.0.0eel/4.99.5eel/4.99.4eel/4.99.35.99.15.0.35.0.25.0.15.0.04.99.54.99.44.99.3mastereel
- stream to device
Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
Diffstat (limited to 'switch.c')
-rw-r--r-- | switch.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -27,7 +27,7 @@ #include "switch.h" #include "node.h" -bool agl_switch_setup_link (struct userdata *u, agl_node *from, agl_node *to, bool explicit) +bool agl_switch_setup_link (struct userdata *u, agl_node *from, agl_node *to) { pa_core *core; pa_sink *sink; @@ -39,7 +39,7 @@ bool agl_switch_setup_link (struct userdata *u, agl_node *from, agl_node *to, bo /* EXPLICIT ROUTES/DEFAULT ROUTES */ /* 1) EXPLICIT ROUTES : "FROM" AND "TO" ARE DEFINED */ - if (explicit) { + if (from && to) { pa_assert (from); pa_assert (to); @@ -55,6 +55,14 @@ bool agl_switch_setup_link (struct userdata *u, agl_node *from, agl_node *to, bo case agl_device: //if (!setup_explicit_stream2dev_link (u, from, to)) // return false; + sink = agl_utils_get_alsa_sink (u, to->paname); + if (!sink) { + pa_log("sink output not found!!!!"); + sink = agl_utils_get_primary_alsa_sink (u); + //break; + } + source = agl_utils_get_null_source (u, from->nullsink); + from->loopnode = agl_loopnode_create (u, AGL_LOOPNODE_SINK, from->index, source->index, sink->index); break; /* DEFAULT */ default: |