diff options
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/cpulimit.c | 2 | ||||
-rw-r--r-- | src/daemon/daemon-conf.c | 36 | ||||
-rw-r--r-- | src/daemon/daemon-conf.h | 1 | ||||
-rw-r--r-- | src/daemon/daemon.conf.in | 1 | ||||
-rw-r--r-- | src/daemon/main.c | 12 |
5 files changed, 33 insertions, 19 deletions
diff --git a/src/daemon/cpulimit.c b/src/daemon/cpulimit.c index 59552828..a909600e 100644 --- a/src/daemon/cpulimit.c +++ b/src/daemon/cpulimit.c @@ -167,6 +167,8 @@ static void callback(pa_mainloop_api*m, pa_io_event*e, int fd, pa_io_event_flags pa_assert(e == io_event); pa_assert(fd == the_pipe[0]); + pa_log("Recevied request to terminate due to CPU overload."); + pa_read(the_pipe[0], &c, sizeof(c), NULL); m->quit(m, 1); /* Quit the main loop */ } diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c index 40e0a170..77da3f7e 100644 --- a/src/daemon/daemon-conf.c +++ b/src/daemon/daemon-conf.c @@ -76,6 +76,7 @@ static const pa_daemon_conf default_conf = { .log_level = PA_LOG_NOTICE, .resample_method = PA_RESAMPLER_AUTO, .disable_remixing = FALSE, + .disable_lfe_remixing = TRUE, .config_file = NULL, .use_pid_file = TRUE, .system_instance = FALSE, @@ -426,6 +427,7 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) { { "default-fragment-size-msec", parse_fragment_size_msec, NULL }, { "nice-level", parse_nice_level, NULL }, { "disable-remixing", pa_config_parse_bool, NULL }, + { "disable-lfe-remixing", pa_config_parse_bool, NULL }, { "load-default-script-file", pa_config_parse_bool, NULL }, #ifdef HAVE_SYS_RESOURCE_H { "rlimit-fsize", parse_rlimit, NULL }, @@ -490,66 +492,67 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) { table[24].data = c; table[25].data = c; table[26].data = &c->disable_remixing; - table[27].data = &c->load_default_script_file; + table[27].data = &c->disable_lfe_remixing; + table[28].data = &c->load_default_script_file; #ifdef HAVE_SYS_RESOURCE_H - table[28].data = &c->rlimit_fsize; - table[29].data = &c->rlimit_data; - table[30].data = &c->rlimit_stack; - table[31].data = &c->rlimit_as; - table[32].data = &c->rlimit_core; - table[33].data = &c->rlimit_nofile; - table[34].data = &c->rlimit_as; + table[29].data = &c->rlimit_fsize; + table[30].data = &c->rlimit_data; + table[31].data = &c->rlimit_stack; + table[32].data = &c->rlimit_as; + table[33].data = &c->rlimit_core; + table[34].data = &c->rlimit_nofile; + table[35].data = &c->rlimit_as; #ifdef RLIMIT_NPROC - table[35].data = &c->rlimit_nproc; + table[36].data = &c->rlimit_nproc; #endif #ifdef RLIMIT_MEMLOCK #ifndef RLIMIT_NPROC #error "Houston, we have a numbering problem!" #endif - table[36].data = &c->rlimit_memlock; + table[37].data = &c->rlimit_memlock; #endif #ifdef RLIMIT_LOCKS #ifndef RLIMIT_MEMLOCK #error "Houston, we have a numbering problem!" #endif - table[37].data = &c->rlimit_locks; + table[38].data = &c->rlimit_locks; #endif #ifdef RLIMIT_SIGPENDING #ifndef RLIMIT_LOCKS #error "Houston, we have a numbering problem!" #endif - table[38].data = &c->rlimit_sigpending; + table[39].data = &c->rlimit_sigpending; #endif #ifdef RLIMIT_MSGQUEUE #ifndef RLIMIT_SIGPENDING #error "Houston, we have a numbering problem!" #endif - table[39].data = &c->rlimit_msgqueue; + table[40].data = &c->rlimit_msgqueue; #endif #ifdef RLIMIT_NICE #ifndef RLIMIT_MSGQUEUE #error "Houston, we have a numbering problem!" #endif - table[40].data = &c->rlimit_nice; + table[41].data = &c->rlimit_nice; #endif #ifdef RLIMIT_RTPRIO #ifndef RLIMIT_NICE #error "Houston, we have a numbering problem!" #endif - table[41].data = &c->rlimit_rtprio; + table[42].data = &c->rlimit_rtprio; #endif #ifdef RLIMIT_RTTIME #ifndef RLIMIT_RTTIME #error "Houston, we have a numbering problem!" #endif - table[42].data = &c->rlimit_rttime; + table[43].data = &c->rlimit_rttime; #endif #endif @@ -661,6 +664,7 @@ char *pa_daemon_conf_dump(pa_daemon_conf *c) { pa_strbuf_printf(s, "log-level = %s\n", log_level_to_string[c->log_level]); pa_strbuf_printf(s, "resample-method = %s\n", pa_resample_method_to_string(c->resample_method)); pa_strbuf_printf(s, "disable-remixing = %s\n", pa_yes_no(c->disable_remixing)); + pa_strbuf_printf(s, "disable-lfe-remixing = %s\n", pa_yes_no(c->disable_lfe_remixing)); pa_strbuf_printf(s, "default-sample-format = %s\n", pa_sample_format_to_string(c->default_sample_spec.format)); pa_strbuf_printf(s, "default-sample-rate = %u\n", c->default_sample_spec.rate); pa_strbuf_printf(s, "default-sample-channels = %u\n", c->default_sample_spec.channels); diff --git a/src/daemon/daemon-conf.h b/src/daemon/daemon-conf.h index c42984f9..309a1428 100644 --- a/src/daemon/daemon-conf.h +++ b/src/daemon/daemon-conf.h @@ -66,6 +66,7 @@ typedef struct pa_daemon_conf { no_cpu_limit, disable_shm, disable_remixing, + disable_lfe_remixing, load_default_script_file, disallow_exit; int exit_idle_time, diff --git a/src/daemon/daemon.conf.in b/src/daemon/daemon.conf.in index 33b1d61d..ea09fe09 100644 --- a/src/daemon/daemon.conf.in +++ b/src/daemon/daemon.conf.in @@ -47,6 +47,7 @@ ; resample-method = speex-float-3 ; disable-remixing = no +; disable-lfe-remixing = yes ; no-cpu-limit = no diff --git a/src/daemon/main.c b/src/daemon/main.c index c8eda398..a9e8ed46 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -65,8 +65,8 @@ #include <pulse/timeval.h> #include <pulse/xmalloc.h> #include <pulse/i18n.h> -#include <pulse/lock-autospawn.h> +#include <pulsecore/lock-autospawn.h> #include <pulsecore/winsock.h> #include <pulsecore/core-error.h> #include <pulsecore/core.h> @@ -778,8 +778,15 @@ int main(int argc, char *argv[]) { pa_set_env("PULSE_SYSTEM", conf->system_instance ? "1" : "0"); pa_log_info(_("This is PulseAudio %s"), PACKAGE_VERSION); + pa_log_debug(_("Compilation host: %s"), CANONICAL_HOST); pa_log_debug(_("Compilation CFLAGS: %s"), PA_CFLAGS); + s = pa_uname_string(); + pa_log_debug(_("Running on host: %s"), s); + pa_xfree(s); + + pa_log_info(_("Page size is %lu bytes"), (unsigned long) PA_PAGE_SIZE); + #ifdef HAVE_VALGRIND_MEMCHECK_H pa_log_debug(_("Compiled with Valgrind support: yes")); #else @@ -792,8 +799,6 @@ int main(int argc, char *argv[]) { pa_log_debug(_("Optimized build: no")); #endif - pa_log_info(_("Page size is %lu bytes"), (unsigned long) PA_PAGE_SIZE); - if (!(s = pa_machine_id())) { pa_log(_("Failed to get machine ID")); goto finish; @@ -864,6 +869,7 @@ int main(int argc, char *argv[]) { c->realtime_priority = conf->realtime_priority; c->realtime_scheduling = !!conf->realtime_scheduling; c->disable_remixing = !!conf->disable_remixing; + c->disable_lfe_remixing = !!conf->disable_lfe_remixing; c->running_as_daemon = !!conf->daemonize; c->disallow_exit = conf->disallow_exit; |