mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
core: Support memfd transport; bump protocol version
Now that all layers in the stack support memfd blocks, add memfd support for the daemon's global core mempool. Also introduce "enable-memfd=" daemon argument and configuration option. For now, memfd support is an opt-in feature to be activated only when daemon's enable-memfd= is set to yes. Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
This commit is contained in:
parent
b1d47d60fc
commit
d2a6afcab3
13 changed files with 122 additions and 24 deletions
|
|
@ -63,6 +63,7 @@ enum {
|
|||
ARG_CHECK,
|
||||
ARG_NO_CPU_LIMIT,
|
||||
ARG_DISABLE_SHM,
|
||||
ARG_ENABLE_MEMFD,
|
||||
ARG_DUMP_RESAMPLE_METHODS,
|
||||
ARG_SYSTEM,
|
||||
ARG_CLEANUP_SHM,
|
||||
|
|
@ -100,6 +101,7 @@ static const struct option long_options[] = {
|
|||
{"system", 2, 0, ARG_SYSTEM},
|
||||
{"no-cpu-limit", 2, 0, ARG_NO_CPU_LIMIT},
|
||||
{"disable-shm", 2, 0, ARG_DISABLE_SHM},
|
||||
{"enable-memfd", 2, 0, ARG_ENABLE_MEMFD},
|
||||
{"dump-resample-methods", 2, 0, ARG_DUMP_RESAMPLE_METHODS},
|
||||
{"cleanup-shm", 2, 0, ARG_CLEANUP_SHM},
|
||||
{NULL, 0, 0, 0}
|
||||
|
|
@ -152,7 +154,8 @@ void pa_cmdline_help(const char *argv0) {
|
|||
" --use-pid-file[=BOOL] Create a PID file\n"
|
||||
" --no-cpu-limit[=BOOL] Do not install CPU load limiter on\n"
|
||||
" platforms that support it.\n"
|
||||
" --disable-shm[=BOOL] Disable shared memory support.\n\n"
|
||||
" --disable-shm[=BOOL] Disable shared memory support.\n"
|
||||
" --enable-memfd[=BOOL] Enable memfd shared memory support.\n\n"
|
||||
|
||||
"STARTUP SCRIPT:\n"
|
||||
" -L, --load=\"MODULE ARGUMENTS\" Load the specified plugin module with\n"
|
||||
|
|
@ -389,6 +392,14 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
|
|||
conf->disable_shm = !!b;
|
||||
break;
|
||||
|
||||
case ARG_ENABLE_MEMFD:
|
||||
if ((b = optarg ? pa_parse_boolean(optarg) : 1) < 0) {
|
||||
pa_log(_("--enable-memfd expects boolean argument"));
|
||||
goto fail;
|
||||
}
|
||||
conf->disable_memfd = !b;
|
||||
break;
|
||||
|
||||
default:
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue