[pulseaudio-discuss] [PATCH 11/30] sink-input, source-output: Remove fallback routing code

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Thu Jan 16 07:02:37 PST 2014


That's now handled in pa_node_put().
---
 src/pulsecore/sink-input.c    | 18 ------------------
 src/pulsecore/source-output.c | 29 -----------------------------
 2 files changed, 47 deletions(-)

diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index c4ab115..fa67a13 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -397,24 +397,6 @@ int pa_sink_input_new(
         goto fail;
     }
 
-    if (!i->sink) {
-        pa_sink *sink = pa_namereg_get(core, NULL, PA_NAMEREG_SINK);
-
-        if (!sink) {
-            ret = -PA_ERR_NOENTITY;
-            goto fail;
-        }
-
-        r = pa_sink_input_set_initial_sink(i, sink);
-
-        if (r < 0) {
-            pa_log_info("Format negotiation between sink input \"%s\" and the default sink (%s) failed.",
-                        pa_sink_input_get_description(i), sink->name);
-            ret = r;
-            goto fail;
-        }
-    }
-
     pa_assert(i->sink);
     pa_assert(i->format);
 
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 92a4510..7d6f060 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -330,35 +330,6 @@ int pa_source_output_new(
         goto fail;
     }
 
-    if (!o->source) {
-        pa_source *source;
-
-        if (data->direct_on_input) {
-            source = data->direct_on_input->sink->monitor_source;
-
-            if (!source) {
-                ret = -PA_ERR_INVALID;
-                goto fail;
-            }
-        } else {
-            source = pa_namereg_get(core, NULL, PA_NAMEREG_SOURCE);
-
-            if (!source) {
-                ret = -PA_ERR_NOENTITY;
-                goto fail;
-            }
-        }
-
-        r = pa_source_output_set_initial_source(o, source);
-
-        if (r < 0) {
-            pa_log_info("Format negotiation between source output \"%s\" and the default source (%s) failed.",
-                        pa_source_output_get_description(o), source->name);
-            ret = r;
-            goto fail;
-        }
-    }
-
     pa_assert(o->source);
     pa_assert(o->format);
 
-- 
1.8.3.1



More information about the pulseaudio-discuss mailing list