From: Jaechul Lee Date: Fri, 26 Jul 2024 07:33:54 +0000 (+0900) Subject: Add default-monitor-time-sec X-Git-Tag: accepted/tizen/9.0/unified/20241030.231101^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_unified;p=platform%2Fupstream%2Fpulseaudio.git Add default-monitor-time-sec [Version] 15.0-33 [Issue Type] Update Change-Id: Iee3772aeb7c801613927d81f1d8041cb12435b22 Signed-off-by: Jaechul Lee --- diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c index 7c6da82..c095ac0 100644 --- a/src/daemon/daemon-conf.c +++ b/src/daemon/daemon-conf.c @@ -66,6 +66,9 @@ static const pa_daemon_conf default_conf = { .nice_level = -11, .realtime_scheduling = true, .realtime_priority = 5, /* Half of JACK's default rtprio */ +#ifdef __TIZEN__ + .default_monitor_time_sec = 3, +#endif #ifdef TIZEN_EMPTY_POP .empty_pop_threshold = 60, #endif @@ -590,6 +593,9 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) { { "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 }, +#ifdef __TIZEN__ + { "default-monitor-time-sec", pa_config_parse_int, &c->default_monitor_time_sec, NULL }, +#endif #ifdef TIZEN_EMPTY_POP { "empty-pop-threshold", pa_config_parse_unsigned, &c->empty_pop_threshold, NULL }, #endif @@ -804,6 +810,9 @@ char *pa_daemon_conf_dump(pa_daemon_conf *c) { pa_strbuf_printf(s, "nice-level = %i\n", c->nice_level); pa_strbuf_printf(s, "realtime-scheduling = %s\n", pa_yes_no(c->realtime_scheduling)); pa_strbuf_printf(s, "realtime-priority = %i\n", c->realtime_priority); +#ifdef __TIZEN__ + pa_strbuf_printf(s, "default-monitor-time-sec= %s\n", c->default_monitor_time_sec); +#endif #ifdef TIZEN_EMPTY_POP pa_strbuf_printf(s, "empty-pop-threshold = %u\n", c->empty_pop_threshold); #endif diff --git a/src/daemon/daemon-conf.h b/src/daemon/daemon-conf.h index 3093d2b..6248c22 100644 --- a/src/daemon/daemon-conf.h +++ b/src/daemon/daemon-conf.h @@ -92,6 +92,7 @@ typedef struct pa_daemon_conf { unsigned log_backtrace; char *config_file; #ifdef __TIZEN__ + unsigned default_monitor_time_sec; unsigned empty_pop_threshold; #endif diff --git a/src/daemon/main.c b/src/daemon/main.c index 72c4227..e2e75e7 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -1265,6 +1265,9 @@ int main(int argc, char *argv[]) { #ifdef HAVE_DBUS c->server_type = conf->local_server_type; #endif +#ifdef __TIZEN__ + c->default_monitor_time_sec = conf->default_monitor_time_sec; +#endif #ifdef TIZEN_EMPTY_POP c->empty_pop_threshold = conf->empty_pop_threshold; #endif diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c index 0dbfb37..307551a 100644 --- a/src/pulsecore/core.c +++ b/src/pulsecore/core.c @@ -204,6 +204,9 @@ pa_core* pa_core_new(pa_mainloop_api *m, bool shared, bool enable_memfd, size_t #ifdef TIZEN_PCM_DUMP c->pcm_dump = 0; #endif +#ifdef __TIZEN__ + c->default_monitor_time_sec = 3; +#endif #ifdef TIZEN_EMPTY_POP c->empty_pop_threshold = 60; /* will be updated by pa_daemon_conf_load() */ #endif diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h index 43f2e34..5af3641 100644 --- a/src/pulsecore/core.h +++ b/src/pulsecore/core.h @@ -253,6 +253,7 @@ struct pa_core { pa_hook hooks[PA_CORE_HOOK_MAX]; #ifdef __TIZEN__ uint32_t pcm_dump; + unsigned default_monitor_time_sec; unsigned empty_pop_threshold; #endif };