[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-164-g8adf1d5
Lennart Poettering
gitmailer-noreply at 0pointer.de
Sat Jun 6 15:46:23 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 3a118f2a035d5c84deee0028627e06fe80cbffe8 (commit)
- Log -----------------------------------------------------------------
8adf1d5 man: document that tsched doesn't use fragment settings
3aefc45 man: document 24bit sample types in man page
5be1cc5 man: document log related daemon.conf options
78bccde conf: remove obsolete module-idle-time directive from default config file/man page
a9b38b3 daemon: optionally call mlockall() on startup
71ce195 udev: properly initialize userdata to 0
-----------------------------------------------------------------------
Summary of changes:
man/pulse-daemon.conf.5.xml.in | 49 +++++++++++++++++++++++++++-----------
src/daemon/daemon-conf.c | 19 +++++++-------
src/daemon/daemon-conf.h | 3 +-
src/daemon/daemon.conf.in | 5 +--
src/daemon/main.c | 15 +++++++++++
src/modules/module-udev-detect.c | 2 +-
6 files changed, 65 insertions(+), 28 deletions(-)
-----------------------------------------------------------------------
commit 71ce195d3bb2cc1f88210fd7e22495bc38d2f72d
Author: Lennart Poettering <lennart at poettering.net>
Date: Sun Jun 7 00:40:48 2009 +0200
udev: properly initialize userdata to 0
diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c
index b667cb4..1ad6fa2 100644
--- a/src/modules/module-udev-detect.c
+++ b/src/modules/module-udev-detect.c
@@ -340,7 +340,7 @@ int pa__init(pa_module *m) {
goto fail;
}
- m->userdata = u = pa_xnew(struct userdata, 1);
+ m->userdata = u = pa_xnew0(struct userdata, 1);
u->core = m->core;
u->devices = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
u->use_tsched = TRUE;
commit a9b38b3530318daf44d55c5fdfdd12b2299ef215
Author: Lennart Poettering <lennart at poettering.net>
Date: Sun Jun 7 00:43:03 2009 +0200
daemon: optionally call mlockall() on startup
diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
index afa7ca0..b4a7fdb 100644
--- a/man/pulse-daemon.conf.5.xml.in
+++ b/man/pulse-daemon.conf.5.xml.in
@@ -164,6 +164,14 @@ USA.
</option>
<option>
+ <p><opt>lock-memory=</opt> Locks the entire PulseAudio process
+ into memory. While this might increase drop-out safety when used
+ in conjunction with real-time scheduling this takes away a lot
+ of memory from other processes and might hence considerably slow
+ down your system. Defaults to <opt>no</opt>.</p>
+ </option>
+
+ <option>
<p><opt>flat-volumes=</opt> Enable 'flat' volumes, i.e. where
possible let the sink volume equal the maximum of the volumes of
the inputs connected to it. Takes a boolean argument, defaults
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index ac6cc8a..664e4fd 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
@@ -85,6 +85,7 @@ static const pa_daemon_conf default_conf = {
.system_instance = FALSE,
.no_cpu_limit = FALSE,
.disable_shm = FALSE,
+ .lock_memory = FALSE,
.default_n_fragments = 4,
.default_fragment_size_msec = 25,
.default_sample_spec = { .format = PA_SAMPLE_S16NE, .rate = 44100, .channels = 2 },
@@ -446,6 +447,7 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) {
{ "no-cpu-limit", pa_config_parse_bool, &c->no_cpu_limit, NULL },
{ "disable-shm", pa_config_parse_bool, &c->disable_shm, NULL },
{ "flat-volumes", pa_config_parse_bool, &c->flat_volumes, NULL },
+ { "lock-memory", pa_config_parse_bool, &c->lock_memory, NULL },
{ "exit-idle-time", pa_config_parse_int, &c->exit_idle_time, NULL },
{ "scache-idle-time", pa_config_parse_int, &c->scache_idle_time, NULL },
{ "realtime-priority", parse_rtprio, c, NULL },
@@ -595,16 +597,14 @@ FILE *pa_daemon_conf_open_default_script_file(pa_daemon_conf *c) {
return f;
}
-
-static const char* const log_level_to_string[] = {
- [PA_LOG_DEBUG] = "debug",
- [PA_LOG_INFO] = "info",
- [PA_LOG_NOTICE] = "notice",
- [PA_LOG_WARN] = "warning",
- [PA_LOG_ERROR] = "error"
-};
-
char *pa_daemon_conf_dump(pa_daemon_conf *c) {
+ static const char* const log_level_to_string[] = {
+ [PA_LOG_DEBUG] = "debug",
+ [PA_LOG_INFO] = "info",
+ [PA_LOG_NOTICE] = "notice",
+ [PA_LOG_WARN] = "warning",
+ [PA_LOG_ERROR] = "error"
+ };
pa_strbuf *s;
char cm[PA_CHANNEL_MAP_SNPRINT_MAX];
@@ -630,6 +630,7 @@ char *pa_daemon_conf_dump(pa_daemon_conf *c) {
pa_strbuf_printf(s, "no-cpu-limit = %s\n", pa_yes_no(c->no_cpu_limit));
pa_strbuf_printf(s, "disable-shm = %s\n", pa_yes_no(c->disable_shm));
pa_strbuf_printf(s, "flat-volumes = %s\n", pa_yes_no(c->flat_volumes));
+ pa_strbuf_printf(s, "lock-memory = %s\n", pa_yes_no(c->lock_memory));
pa_strbuf_printf(s, "exit-idle-time = %i\n", c->exit_idle_time);
pa_strbuf_printf(s, "scache-idle-time = %i\n", c->scache_idle_time);
pa_strbuf_printf(s, "dl-search-path = %s\n", pa_strempty(c->dl_search_path));
diff --git a/src/daemon/daemon-conf.h b/src/daemon/daemon-conf.h
index 9cec189..dd69e04 100644
--- a/src/daemon/daemon-conf.h
+++ b/src/daemon/daemon-conf.h
@@ -73,7 +73,8 @@ typedef struct pa_daemon_conf {
disallow_exit,
log_meta,
log_time,
- flat_volumes;
+ flat_volumes,
+ lock_memory;
int exit_idle_time,
scache_idle_time,
auto_log_target,
diff --git a/src/daemon/daemon.conf.in b/src/daemon/daemon.conf.in
index fcd2513..746ea76 100644
--- a/src/daemon/daemon.conf.in
+++ b/src/daemon/daemon.conf.in
@@ -27,6 +27,8 @@
; system-instance = no
; disable-shm = no
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
+; lock-memory = no
+; no-cpu-limit = no
; high-priority = yes
; nice-level = -11
@@ -55,8 +57,6 @@
; flat-volumes = yes
-; no-cpu-limit = no
-
; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 3e50baa..58f8d66 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -40,6 +40,10 @@
#include <liboil/liboil.h>
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
+
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
@@ -960,6 +964,17 @@ int main(int argc, char *argv[]) {
pa_rtsig_configure(SIGRTMIN, SIGRTMAX-1);
#endif
+ if (conf->lock_memory) {
+#ifdef HAVE_SYS_MMAN_H
+ if (mlockall(MCL_FUTURE) < 0)
+ pa_log_warn("mlockall() failed: %s", pa_cstrerror(errno));
+ else
+ pa_log_info("Sucessfully locked process into memory.");
+#else
+ pa_log_warn("Memory locking requested but not supported on platform.");
+#endif
+ }
+
pa_memtrap_install();
pa_assert_se(mainloop = pa_mainloop_new());
commit 78bccde2264c439702b103fd8491d9f56c79f54f
Author: Lennart Poettering <lennart at poettering.net>
Date: Sun Jun 7 00:44:16 2009 +0200
conf: remove obsolete module-idle-time directive from default config file/man page
diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
index b4a7fdb..a7c49a4 100644
--- a/man/pulse-daemon.conf.5.xml.in
+++ b/man/pulse-daemon.conf.5.xml.in
@@ -236,13 +236,6 @@ USA.
</option>
<option>
- <p><opt>module-idle-time=</opt> Unload autoloaded modules after
- being idle for this time in seconds. Defaults to 20. The
- <opt>--module-idle-time</opt> command line option takes
- precedence.</p>
- </option>
-
- <option>
<p><opt>scache-idle-time=</opt> Unload autoloaded sample cache
entries after being idle for this time in seconds. Defaults to
20. The <opt>--scache-idle-time</opt> command line option takes
diff --git a/src/daemon/daemon.conf.in b/src/daemon/daemon.conf.in
index 746ea76..d119716 100644
--- a/src/daemon/daemon.conf.in
+++ b/src/daemon/daemon.conf.in
@@ -37,7 +37,6 @@
; realtime-priority = 5
; exit-idle-time = 20
-; module-idle-time = 20
; scache-idle-time = 20
; dl-search-path = (depends on architecture)
commit 5be1cc52ffcc01c655f897fd7fdead4484bfd86b
Author: Lennart Poettering <lennart at poettering.net>
Date: Sun Jun 7 00:44:49 2009 +0200
man: document log related daemon.conf options
diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
index a7c49a4..fe30016 100644
--- a/man/pulse-daemon.conf.5.xml.in
+++ b/man/pulse-daemon.conf.5.xml.in
@@ -268,9 +268,9 @@ USA.
</option>
<option>
- <p><opt>default-script-file=</opt> Load the default
+ <p><opt>load-default-script-file=</opt> Load the default
configuration script file as specified
- in <opt>default-script-file=</opt>. Defaults to "yes".</p>
+ in <opt>default-script-file=</opt>. Defaults to <opt>yes</opt>.</p>
</option>
</section>
@@ -297,6 +297,23 @@ USA.
might alter this setting.</p>
</option>
+ <option>
+ <p><opt>log-meta=</opt> With each logged message log the code
+ location the message was generated from. Defaults to
+ <opt>no</opt>.</p>
+ </option>
+
+ <option>
+ <p><opt>log-time=</opt> With each logged messages log the
+ relative time since startup. Defaults to <opt>no</opt>.</p>
+ </option>
+
+ <option>
+ <p><opt>log-backtrace=</opt> When greater than 0, with each
+ logged message log a code stack trace up the the specified
+ number of stack frames. Defaults to <opt>0</opt>.</p>
+ </option>
+
</section>
<section name="Resource Limits">
commit 3aefc458839a8d72c9de95550339b049c2b7e730
Author: Lennart Poettering <lennart at poettering.net>
Date: Sun Jun 7 00:45:05 2009 +0200
man: document 24bit sample types in man page
diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
index fe30016..c23d8a7 100644
--- a/man/pulse-daemon.conf.5.xml.in
+++ b/man/pulse-daemon.conf.5.xml.in
@@ -389,11 +389,13 @@ USA.
<option>
<p><opt>default-sample-format=</opt> The default sampling
format. Specify one of <opt>u8</opt>, <opt>s16le</opt>,
- <opt>s16be</opt>, <opt>s32le</opt>,
- <opt>s32be</opt>, <opt>float32le</opt>, <opt>float32be</opt>,
+ <opt>s16be</opt>, <opt>s24le</opt>, <opt>s24be</opt>,
+ <opt>s24-32le</opt>, <opt>s24-32be</opt>, <opt>s32le</opt>,
+ <opt>s32be</opt> <opt>float32le</opt>, <opt>float32be</opt>,
<opt>ulaw</opt>, <opt>alaw</opt>. Depending on the endianess of
- the CPU the
- formats <opt>s16ne</opt>, <opt>s16re</opt>, <opt>s32ne</opt>, <opt>s32re</opt>,
+ the CPU the formats <opt>s16ne</opt>, <opt>s16re</opt>,
+ <opt>s24ne</opt>, <opt>s24re</opt>, <opt>s24-32ne</opt>,
+ <opt>s24-32re</opt>, <opt>s32ne</opt>, <opt>s32re</opt>,
<opt>float32ne</opt>, <opt>float32re</opt> (for native,
resp. reverse endian) are available as aliases.</p>
</option>
commit 8adf1d5eea0750cea52a5ce8fb75d4331bf8a7cc
Author: Lennart Poettering <lennart at poettering.net>
Date: Sun Jun 7 00:45:21 2009 +0200
man: document that tsched doesn't use fragment settings
diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
index c23d8a7..68bcb77 100644
--- a/man/pulse-daemon.conf.5.xml.in
+++ b/man/pulse-daemon.conf.5.xml.in
@@ -421,7 +421,8 @@ USA.
these buffer metrics for machines with high scheduling
latencies. Not all possible values that may be configured here are
available in all hardware. The driver will to find the nearest
- setting supported.</p>
+ setting supported. Modern drivers that support timer-based
+ scheduling ignore these options.</p>
<option>
<p><opt>default-fragments=</opt> The default number of
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list