[pulseaudio-commits] src/modules

Tanu Kaskinen tanuk at kemper.freedesktop.org
Fri Aug 4 06:10:08 UTC 2017


 src/modules/echo-cancel/module-echo-cancel.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 3979fba0ac01327664fd43397bbf91fb8169101d
Author: Tanu Kaskinen <tanuk at iki.fi>
Date:   Thu Aug 3 10:38:01 2017 +0300

    echo-cancel: don't set latency range if the device doesn't support dynamic latency
    
    pa_sink/source_set_latency_range() has an assertion that is triggered
    when setting the latency range on a fixed latency device.
    
    BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=102020

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index a1eeacee..b28d60a6 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -2054,11 +2054,13 @@ int pa__init(pa_module*m) {
 
     /* We don't want to deal with too many chunks at a time */
     blocksize_usec = pa_bytes_to_usec(u->source_blocksize, &u->source->sample_spec);
-    pa_source_set_latency_range(u->source, blocksize_usec, blocksize_usec * MAX_LATENCY_BLOCKS);
+    if (u->source->flags & PA_SOURCE_DYNAMIC_LATENCY)
+        pa_source_set_latency_range(u->source, blocksize_usec, blocksize_usec * MAX_LATENCY_BLOCKS);
     pa_source_output_set_requested_latency(u->source_output, blocksize_usec * MAX_LATENCY_BLOCKS);
 
     blocksize_usec = pa_bytes_to_usec(u->sink_blocksize, &u->sink->sample_spec);
-    pa_sink_set_latency_range(u->sink, blocksize_usec, blocksize_usec * MAX_LATENCY_BLOCKS);
+    if (u->sink->flags & PA_SINK_DYNAMIC_LATENCY)
+        pa_sink_set_latency_range(u->sink, blocksize_usec, blocksize_usec * MAX_LATENCY_BLOCKS);
     pa_sink_input_set_requested_latency(u->sink_input, blocksize_usec * MAX_LATENCY_BLOCKS);
 
     /* The order here is important. The input/output must be put first,



More information about the pulseaudio-commits mailing list