[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-test7-101-g991cb06

Lennart Poettering gitmailer-noreply at 0pointer.de
Thu Apr 9 17:27:14 PDT 2009


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  80e18c8da35eb988d10ccada436ab11710c298f6 (commit)

- Log -----------------------------------------------------------------
991cb06 set fixed latencies at more places where appropriate
-----------------------------------------------------------------------

Summary of changes:
 src/modules/alsa/alsa-sink.c     |   10 +++++-----
 src/modules/alsa/alsa-source.c   |    7 ++++---
 src/modules/module-pipe-sink.c   |    1 +
 src/modules/module-pipe-source.c |    1 +
 src/modules/module-sine-source.c |    4 +++-
 src/modules/oss/module-oss.c     |    2 ++
 6 files changed, 16 insertions(+), 9 deletions(-)

-----------------------------------------------------------------------

commit 991cb0613488a81be2eb7d8ed1a8f1b891eb9f13
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Apr 10 02:26:59 2009 +0200

    set fixed latencies at more places where appropriate

diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index c18c34e..401b003 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1703,14 +1703,13 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
                 (double) pa_bytes_to_usec(u->hwbuf_size, &ss) / PA_USEC_PER_MSEC);
 
     pa_sink_set_max_request(u->sink, u->hwbuf_size);
+    pa_sink_set_max_rewind(u->sink, u->hwbuf_size);
 
     if (u->use_tsched) {
-        fix_min_sleep_wakeup(u);
-        fix_tsched_watermark(u);
-
         u->watermark_step = pa_usec_to_bytes(TSCHED_WATERMARK_STEP_USEC, &u->sink->sample_spec);
 
-        pa_sink_set_max_rewind(u->sink, u->hwbuf_size);
+        fix_min_sleep_wakeup(u);
+        fix_tsched_watermark(u);
 
         pa_sink_set_latency_range(u->sink,
                                   0,
@@ -1718,7 +1717,8 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
 
         pa_log_info("Time scheduling watermark is %0.2fms",
                     (double) pa_bytes_to_usec(u->tsched_watermark, &ss) / PA_USEC_PER_MSEC);
-    }
+    } else
+        u->sink->fixed_latency = pa_bytes_to_usec(u->hwbuf_size, &ss);
 
     reserve_update(u);
 
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index 9cbd79f..99e825c 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -1558,18 +1558,19 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
                 (double) pa_bytes_to_usec(u->hwbuf_size, &ss) / PA_USEC_PER_MSEC);
 
     if (u->use_tsched) {
+        u->watermark_step = pa_usec_to_bytes(TSCHED_WATERMARK_STEP_USEC, &u->source->sample_spec);
+
         fix_min_sleep_wakeup(u);
         fix_tsched_watermark(u);
 
-        u->watermark_step = pa_usec_to_bytes(TSCHED_WATERMARK_STEP_USEC, &u->source->sample_spec);
-
         pa_source_set_latency_range(u->source,
                                     0,
                                     pa_bytes_to_usec(u->hwbuf_size, &ss));
 
         pa_log_info("Time scheduling watermark is %0.2fms",
                     (double) pa_bytes_to_usec(u->tsched_watermark, &ss) / PA_USEC_PER_MSEC);
-    }
+    } else
+        u->source->fixed_latency = pa_bytes_to_usec(u->hwbuf_size, &ss);
 
     reserve_update(u);
 
diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index 26b6b96..9d3e55d 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -293,6 +293,7 @@ int pa__init(pa_module*m) {
     pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
     pa_sink_set_rtpoll(u->sink, u->rtpoll);
     pa_sink_set_max_request(u->sink, PIPE_BUF);
+    u->sink->fixed_latency = pa_bytes_to_usec(PIPE_BUF, &u->sink->sample_spec);
 
     u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1);
     pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c
index 3d40fdf..df72d79 100644
--- a/src/modules/module-pipe-source.c
+++ b/src/modules/module-pipe-source.c
@@ -277,6 +277,7 @@ int pa__init(pa_module*m) {
 
     pa_source_set_asyncmsgq(u->source, u->thread_mq.inq);
     pa_source_set_rtpoll(u->source, u->rtpoll);
+    u->source->fixed_latency = pa_bytes_to_usec(PIPE_BUF, &u->source->sample_spec);
 
     u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1);
     pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
diff --git a/src/modules/module-sine-source.c b/src/modules/module-sine-source.c
index 50e4730..a5f1ce7 100644
--- a/src/modules/module-sine-source.c
+++ b/src/modules/module-sine-source.c
@@ -260,10 +260,12 @@ int pa__init(pa_module*m) {
     u->source->update_requested_latency = source_update_requested_latency_cb;
     u->source->userdata = u;
 
+    u->block_usec = BLOCK_USEC;
+
     pa_source_set_asyncmsgq(u->source, u->thread_mq.inq);
     pa_source_set_rtpoll(u->source, u->rtpoll);
+    u->source->fixed_latency = u->block_usec;
 
-    u->block_usec = BLOCK_USEC;
 
     if (!(u->thread = pa_thread_new(thread_func, u))) {
         pa_log("Failed to create thread.");
diff --git a/src/modules/oss/module-oss.c b/src/modules/oss/module-oss.c
index f67f47e..855e8a3 100644
--- a/src/modules/oss/module-oss.c
+++ b/src/modules/oss/module-oss.c
@@ -1326,6 +1326,7 @@ int pa__init(pa_module*m) {
         pa_source_set_asyncmsgq(u->source, u->thread_mq.inq);
         pa_source_set_rtpoll(u->source, u->rtpoll);
         u->source->refresh_volume = TRUE;
+        u->source->fixed_latency = pa_bytes_to_usec(u->in_hwbuf_size, &u->source->sample_spec);
 
         if (use_mmap)
             u->in_mmap_memblocks = pa_xnew0(pa_memblock*, u->in_nfrags);
@@ -1387,6 +1388,7 @@ int pa__init(pa_module*m) {
         pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
         pa_sink_set_rtpoll(u->sink, u->rtpoll);
         u->sink->refresh_volume = TRUE;
+        u->sink->fixed_latency = pa_bytes_to_usec(u->out_hwbuf_size, &u->sink->sample_spec);
 
         pa_sink_set_max_request(u->sink, u->out_hwbuf_size);
 

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list