From debe203be9bf5e842b082751f53cb0502be02db1 Mon Sep 17 00:00:00 2001 From: Ashok Sidipotu Date: Thu, 24 Feb 2022 11:46:15 +0530 Subject: pipewire: Update pw to v0.3.47 and wp to v0.4.8 Highlights of Pipewire. - Removed check and warnings to catch leaked listeners on the proxy. - Fix critical bug where alsa devices would not show when the kernel was compiled without VERBOSE_PROCFS - Almost all limits on number of ports, clients and nodes are removed. - Many more bug fixes and imporovements. Highlights of Wireplumber. - Added bluetooth profile auto-switching support between A2DP and HFP modes - Better default audio sources and sinks selection - Backported a fix for a known issue with selecting the default devices on top of 0.4.8 (ae6c9a5e) - Many more bug fixes and imporovements. Change-Id: Id5414aed065593893a237437a8c77645cbf15804 Signed-off-by: Ashok Sidipotu Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/27220 Reviewed-by: Jan-Simon Moeller Tested-by: Jan-Simon Moeller --- ...s-add-pipewire-env-variables-when-running.patch | 139 +++++++++++++ ...ninstalled-build-this-script-with-the-mes.patch | 78 -------- ...s-add-pipewire-env-variables-when-running.patch | 138 ------------- ...ninstalled-build-this-script-with-the-mes.patch | 77 ++++++++ ...x-va_list-APIs-for-different-architecture.patch | 214 +++++++++++++++++++++ .../wireplumber/wireplumber_git.bb | 11 +- 6 files changed, 436 insertions(+), 221 deletions(-) create mode 100644 meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-tests-add-pipewire-env-variables-when-running.patch delete mode 100644 meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-wp-uninstalled-build-this-script-with-the-mes.patch delete mode 100644 meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-tests-add-pipewire-env-variables-when-running.patch create mode 100644 meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-wp-uninstalled-build-this-script-with-the-mes.patch create mode 100644 meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0003-spa-json-fix-va_list-APIs-for-different-architecture.patch (limited to 'meta-pipewire/recipes-multimedia/wireplumber') diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-tests-add-pipewire-env-variables-when-running.patch b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-tests-add-pipewire-env-variables-when-running.patch new file mode 100644 index 000000000..88301d56f --- /dev/null +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-tests-add-pipewire-env-variables-when-running.patch @@ -0,0 +1,139 @@ +From 1197f31d2b681d0cf0ca1309d50c8ab8ea80ac5e Mon Sep 17 00:00:00 2001 +From: Ashok Sidipotu +Date: Thu, 2 Dec 2021 16:57:54 +0530 +Subject: [PATCH 1/2] Revert "tests: add pipewire env variables when running + tests, tidy up common_env" + +This reverts commit c24db9f3539f9b7ebe9e74c991cc3037f28ea22c. + +Upstream-Status: Inappropriate[meson version dependent] +--- + tests/meson.build | 31 ------------------------------- + tests/modules/meson.build | 9 ++++++--- + tests/wp/meson.build | 10 +++++++--- + tests/wplua/meson.build | 15 +++++++++++---- + 4 files changed, 24 insertions(+), 41 deletions(-) + +diff --git a/tests/meson.build b/tests/meson.build +index 0e06568..9238d5b 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -28,37 +28,6 @@ if valgrind.found() + timeout_multiplier: 2) + endif + +-# The common test environment +-common_test_env = environment({ +- 'HOME': '/invalid', +- 'XDG_RUNTIME_DIR': '/invalid', +- 'PIPEWIRE_RUNTIME_DIR': '/tmp', +- 'XDG_CONFIG_HOME': meson.current_build_dir() / '.config', +- 'XDG_STATE_HOME': meson.current_build_dir() / '.local' / 'state', +- 'FILE_MONITOR_DIR': meson.current_build_dir() / '.local' / 'file_monitor', +- 'WIREPLUMBER_CONFIG_DIR': '/invalid', +- 'WIREPLUMBER_DATA_DIR': '/invalid', +- 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / 'modules', +- 'WIREPLUMBER_DEBUG': '7', +-}) +- +-spa_plugindir = spa_dep.get_variable( +- pkgconfig: 'plugindir', internal: 'plugindir', default_value: '') +-pipewire_moduledir = pipewire_dep.get_variable( +- pkgconfig: 'moduledir', internal: 'moduledir', default_value: '') +-pipewire_confdatadir = pipewire_dep.get_variable( +- pkgconfig: 'confdatadir', internal: 'confdatadir', default_value: '') +- +-if spa_plugindir != '' +- common_test_env.set('SPA_PLUGIN_DIR', spa_plugindir) +-endif +-if pipewire_moduledir != '' +- common_test_env.set('PIPEWIRE_MODULE_DIR', pipewire_moduledir) +-endif +-if pipewire_confdatadir != '' +- common_test_env.set('PIPEWIRE_CONFIG_DIR', pipewire_confdatadir) +-endif +- + subdir('wp') + subdir('wplua') + subdir('modules') +diff --git a/tests/modules/meson.build b/tests/modules/meson.build +index ffab80b..2fc46dc 100644 +--- a/tests/modules/meson.build ++++ b/tests/modules/meson.build +@@ -1,7 +1,10 @@ + common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep] +-common_env = common_test_env +-common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) +-common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) ++common_env = environment({ ++ 'G_TEST_SRCDIR': meson.current_source_dir(), ++ 'G_TEST_BUILDDIR': meson.current_build_dir(), ++ 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules', ++ 'WIREPLUMBER_DEBUG': '7', ++}) + common_args = [ + '-DG_LOG_USE_STRUCTURED', + ] +diff --git a/tests/wp/meson.build b/tests/wp/meson.build +index 178564d..b64ccae 100644 +--- a/tests/wp/meson.build ++++ b/tests/wp/meson.build +@@ -1,7 +1,11 @@ + common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep] +-common_env = common_test_env +-common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) +-common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) ++common_env = environment({ ++ 'G_TEST_SRCDIR': meson.current_source_dir(), ++ 'G_TEST_BUILDDIR': meson.current_build_dir(), ++ 'XDG_CONFIG_HOME': meson.current_build_dir() / '.config', ++ 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules', ++ 'WIREPLUMBER_DEBUG': '7', ++}) + common_args = [ + '-DG_LOG_USE_STRUCTURED', + ] +diff --git a/tests/wplua/meson.build b/tests/wplua/meson.build +index a7ff033..fcf4b51 100644 +--- a/tests/wplua/meson.build ++++ b/tests/wplua/meson.build +@@ -1,13 +1,18 @@ + common_deps = [wplua_dep, pipewire_dep, wp_dep] +-common_env = common_test_env +-common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) +-common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) +-common_env.set('WIREPLUMBER_DATA_DIR', meson.current_source_dir()) ++common_env = environment({ ++ 'G_TEST_SRCDIR': meson.current_source_dir(), ++ 'G_TEST_BUILDDIR': meson.current_build_dir(), ++ 'WIREPLUMBER_CONFIG_DIR': '/invalid', ++ 'WIREPLUMBER_DATA_DIR': meson.current_source_dir(), ++ 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules', ++ 'WIREPLUMBER_DEBUG': '7', ++}) + + test( + 'test-wplua', + executable('test-wplua', 'wplua.c', dependencies: common_deps), + env: common_env, ++ workdir : meson.current_source_dir(), + ) + + script_tester = executable('script-tester', +@@ -20,6 +25,7 @@ test( + script_tester, + args: ['pod.lua'], + env: common_env, ++ workdir : meson.current_source_dir(), + ) + test( + 'test-lua-json', +@@ -32,4 +38,5 @@ test( + script_tester, + args: ['monitor-rules.lua'], + env: common_env, ++ workdir : meson.current_source_dir(), + ) +-- +2.35.1 + diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-wp-uninstalled-build-this-script-with-the-mes.patch b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-wp-uninstalled-build-this-script-with-the-mes.patch deleted file mode 100644 index 658b89946..000000000 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-wp-uninstalled-build-this-script-with-the-mes.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 78cde5e91ba5d9aa7bfe918ce6bad3b4af30c796 Mon Sep 17 00:00:00 2001 -From: Ashok Sidipotu -Date: Fri, 14 Jan 2022 20:14:56 +0530 -Subject: [PATCH] Revert "wp-uninstalled: build this script with the meson dirs - filled in" - -This reverts commit 52aaf96179584292f493c4b329bc2c409e6d3dee. - -Upstream-Status: Inappropriate[meson version dependent] ---- - meson.build | 31 ------------------------------- - wp-uninstalled.sh | 11 ++--------- - 2 files changed, 2 insertions(+), 40 deletions(-) - -diff --git a/meson.build b/meson.build -index 1f9c9d8..7e02b29 100644 ---- a/meson.build -+++ b/meson.build -@@ -120,34 +120,3 @@ subdir('src') - if get_option('tests') - subdir('tests') - endif -- --conf_uninstalled = configuration_data() --conf_uninstalled.set('MESON', '') --conf_uninstalled.set('MESON_SOURCE_ROOT', meson.project_source_root()) --conf_uninstalled.set('MESON_BUILD_ROOT', meson.project_build_root()) -- --wp_uninstalled = configure_file( -- input : 'wp-uninstalled.sh', -- output : 'wp-uninstalled.sh.in', -- configuration : conf_uninstalled, --) -- --wireplumber_uninstalled = custom_target('wp-uninstalled', -- output : 'wp-uninstalled.sh', -- input : wp_uninstalled, -- build_by_default : true, -- command : ['cp', '@INPUT@', '@OUTPUT@'], --) -- --if meson.version().version_compare('>= 0.58') -- builddir = meson.project_build_root() -- srcdir = meson.project_source_root() -- -- devenv = environment({ -- 'WIREPLUMBER_MODULE_DIR': builddir / 'modules', -- 'WIREPLUMBER_CONFIG_DIR': srcdir / 'src' / 'config', -- 'WIREPLUMBER_DATA_DIR': srcdir / 'src', -- }) -- -- meson.add_devenv(devenv) --endif -diff --git a/wp-uninstalled.sh b/wp-uninstalled.sh -index 79e53f2..d6279ff 100755 ---- a/wp-uninstalled.sh -+++ b/wp-uninstalled.sh -@@ -2,15 +2,8 @@ - - set -e - --# This is unset by meson --# shellcheck disable=SC2157 --if [ -z "@MESON@" ]; then -- SOURCEDIR="@MESON_SOURCE_ROOT@" -- BUILDDIR="@MESON_BUILD_ROOT@" --else -- SOURCEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -- BUILDDIR=$(find "${SOURCEDIR}" -maxdepth 2 -name build.ninja -printf "%h\n" -quit 2>/dev/null || echo "${SOURCEDIR}/build") --fi -+SOURCEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -+BUILDDIR=${SOURCEDIR}/build - CONFIGDIR=config - - while getopts ":b:c:" opt; do --- -2.33.1 - diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-tests-add-pipewire-env-variables-when-running.patch b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-tests-add-pipewire-env-variables-when-running.patch deleted file mode 100644 index 7a24d1554..000000000 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-tests-add-pipewire-env-variables-when-running.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 4ea8ddc256df636208479a5b64bf8bdc6e413aca Mon Sep 17 00:00:00 2001 -From: Ashok Sidipotu -Date: Thu, 2 Dec 2021 16:57:54 +0530 -Subject: [PATCH] Revert "tests: add pipewire env variables when running tests, - tidy up common_env" - -This reverts commit c24db9f3539f9b7ebe9e74c991cc3037f28ea22c. - -Upstream-Status: Inappropriate[meson version dependent] ---- - tests/meson.build | 31 ------------------------------- - tests/modules/meson.build | 9 ++++++--- - tests/wp/meson.build | 10 +++++++--- - tests/wplua/meson.build | 15 +++++++++++---- - 4 files changed, 24 insertions(+), 41 deletions(-) - -diff --git a/tests/meson.build b/tests/meson.build -index 0e06568..9238d5b 100644 ---- a/tests/meson.build -+++ b/tests/meson.build -@@ -28,37 +28,6 @@ if valgrind.found() - timeout_multiplier: 2) - endif - --# The common test environment --common_test_env = environment({ -- 'HOME': '/invalid', -- 'XDG_RUNTIME_DIR': '/invalid', -- 'PIPEWIRE_RUNTIME_DIR': '/tmp', -- 'XDG_CONFIG_HOME': meson.current_build_dir() / '.config', -- 'XDG_STATE_HOME': meson.current_build_dir() / '.local' / 'state', -- 'FILE_MONITOR_DIR': meson.current_build_dir() / '.local' / 'file_monitor', -- 'WIREPLUMBER_CONFIG_DIR': '/invalid', -- 'WIREPLUMBER_DATA_DIR': '/invalid', -- 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / 'modules', -- 'WIREPLUMBER_DEBUG': '7', --}) -- --spa_plugindir = spa_dep.get_variable( -- pkgconfig: 'plugindir', internal: 'plugindir', default_value: '') --pipewire_moduledir = pipewire_dep.get_variable( -- pkgconfig: 'moduledir', internal: 'moduledir', default_value: '') --pipewire_confdatadir = pipewire_dep.get_variable( -- pkgconfig: 'confdatadir', internal: 'confdatadir', default_value: '') -- --if spa_plugindir != '' -- common_test_env.set('SPA_PLUGIN_DIR', spa_plugindir) --endif --if pipewire_moduledir != '' -- common_test_env.set('PIPEWIRE_MODULE_DIR', pipewire_moduledir) --endif --if pipewire_confdatadir != '' -- common_test_env.set('PIPEWIRE_CONFIG_DIR', pipewire_confdatadir) --endif -- - subdir('wp') - subdir('wplua') - subdir('modules') -diff --git a/tests/modules/meson.build b/tests/modules/meson.build -index ffab80b..2fc46dc 100644 ---- a/tests/modules/meson.build -+++ b/tests/modules/meson.build -@@ -1,7 +1,10 @@ - common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep] --common_env = common_test_env --common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) --common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) -+common_env = environment({ -+ 'G_TEST_SRCDIR': meson.current_source_dir(), -+ 'G_TEST_BUILDDIR': meson.current_build_dir(), -+ 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules', -+ 'WIREPLUMBER_DEBUG': '7', -+}) - common_args = [ - '-DG_LOG_USE_STRUCTURED', - ] -diff --git a/tests/wp/meson.build b/tests/wp/meson.build -index adc9cef..e75640c 100644 ---- a/tests/wp/meson.build -+++ b/tests/wp/meson.build -@@ -1,7 +1,11 @@ - common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep] --common_env = common_test_env --common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) --common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) -+common_env = environment({ -+ 'G_TEST_SRCDIR': meson.current_source_dir(), -+ 'G_TEST_BUILDDIR': meson.current_build_dir(), -+ 'XDG_CONFIG_HOME': meson.current_build_dir() / '.config', -+ 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules', -+ 'WIREPLUMBER_DEBUG': '7', -+}) - common_args = [ - '-DG_LOG_USE_STRUCTURED', - ] -diff --git a/tests/wplua/meson.build b/tests/wplua/meson.build -index 128cc30..cd45c1c 100644 ---- a/tests/wplua/meson.build -+++ b/tests/wplua/meson.build -@@ -1,13 +1,18 @@ - common_deps = [wplua_dep, pipewire_dep, wp_dep] --common_env = common_test_env --common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) --common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) --common_env.set('WIREPLUMBER_DATA_DIR', meson.current_source_dir()) -+common_env = environment({ -+ 'G_TEST_SRCDIR': meson.current_source_dir(), -+ 'G_TEST_BUILDDIR': meson.current_build_dir(), -+ 'WIREPLUMBER_CONFIG_DIR': '/invalid', -+ 'WIREPLUMBER_DATA_DIR': meson.current_source_dir(), -+ 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules', -+ 'WIREPLUMBER_DEBUG': '7', -+}) - - test( - 'test-wplua', - executable('test-wplua', 'wplua.c', dependencies: common_deps), - env: common_env, -+ workdir : meson.current_source_dir(), - ) - - script_tester = executable('script-tester', -@@ -20,10 +25,12 @@ test( - script_tester, - args: ['pod.lua'], - env: common_env, -+ workdir : meson.current_source_dir(), - ) - test( - 'test-lua-monitor-rules', - script_tester, - args: ['monitor-rules.lua'], - env: common_env, -+ workdir : meson.current_source_dir(), - ) --- -2.33.1 - diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-wp-uninstalled-build-this-script-with-the-mes.patch b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-wp-uninstalled-build-this-script-with-the-mes.patch new file mode 100644 index 000000000..d20634d8b --- /dev/null +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-wp-uninstalled-build-this-script-with-the-mes.patch @@ -0,0 +1,77 @@ +From 8e959b7894047030edca21a04dd91994e8868a1f Mon Sep 17 00:00:00 2001 +From: Ashok Sidipotu +Date: Fri, 25 Feb 2022 06:05:43 +0530 +Subject: [PATCH 2/2] Revert "wp-uninstalled: build this script with the meson + dirs filled in" + +This reverts commit 52aaf96179584292f493c4b329bc2c409e6d3dee. +Upstream-Status: Inappropriate[meson version dependent] +--- + meson.build | 31 ------------------------------- + wp-uninstalled.sh | 11 ++--------- + 2 files changed, 2 insertions(+), 40 deletions(-) + +diff --git a/meson.build b/meson.build +index e4323dc..185248f 100644 +--- a/meson.build ++++ b/meson.build +@@ -120,34 +120,3 @@ subdir('src') + if get_option('tests') + subdir('tests') + endif +- +-conf_uninstalled = configuration_data() +-conf_uninstalled.set('MESON', '') +-conf_uninstalled.set('MESON_SOURCE_ROOT', meson.project_source_root()) +-conf_uninstalled.set('MESON_BUILD_ROOT', meson.project_build_root()) +- +-wp_uninstalled = configure_file( +- input : 'wp-uninstalled.sh', +- output : 'wp-uninstalled.sh.in', +- configuration : conf_uninstalled, +-) +- +-wireplumber_uninstalled = custom_target('wp-uninstalled', +- output : 'wp-uninstalled.sh', +- input : wp_uninstalled, +- build_by_default : true, +- command : ['cp', '@INPUT@', '@OUTPUT@'], +-) +- +-if meson.version().version_compare('>= 0.58') +- builddir = meson.project_build_root() +- srcdir = meson.project_source_root() +- +- devenv = environment({ +- 'WIREPLUMBER_MODULE_DIR': builddir / 'modules', +- 'WIREPLUMBER_CONFIG_DIR': srcdir / 'src' / 'config', +- 'WIREPLUMBER_DATA_DIR': srcdir / 'src', +- }) +- +- meson.add_devenv(devenv) +-endif +diff --git a/wp-uninstalled.sh b/wp-uninstalled.sh +index 79e53f2..d6279ff 100755 +--- a/wp-uninstalled.sh ++++ b/wp-uninstalled.sh +@@ -2,15 +2,8 @@ + + set -e + +-# This is unset by meson +-# shellcheck disable=SC2157 +-if [ -z "@MESON@" ]; then +- SOURCEDIR="@MESON_SOURCE_ROOT@" +- BUILDDIR="@MESON_BUILD_ROOT@" +-else +- SOURCEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +- BUILDDIR=$(find "${SOURCEDIR}" -maxdepth 2 -name build.ninja -printf "%h\n" -quit 2>/dev/null || echo "${SOURCEDIR}/build") +-fi ++SOURCEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" ++BUILDDIR=${SOURCEDIR}/build + CONFIGDIR=config + + while getopts ":b:c:" opt; do +-- +2.35.1 + diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0003-spa-json-fix-va_list-APIs-for-different-architecture.patch b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0003-spa-json-fix-va_list-APIs-for-different-architecture.patch new file mode 100644 index 000000000..9d0c68d58 --- /dev/null +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0003-spa-json-fix-va_list-APIs-for-different-architecture.patch @@ -0,0 +1,214 @@ +From ae6c9a5e612c343dd307fe34a1a282b7a4f17a5c Mon Sep 17 00:00:00 2001 +From: Julian Bouzas +Date: Wed, 9 Feb 2022 07:59:59 -0500 +Subject: [PATCH 3/3] spa-json: fix va_list APIs for different architectures + +The va_list type might not always be a pointer in some architectures, so we +cannot guarantee it will be modified after using it for a second time in another +function. This fixes the issue by using macros so args does not get copied, and +always gets modified when using it more than once. + +Upstream-Status: Backport +--- + lib/wp/spa-json.c | 156 ++++++++++++++++++++++++---------------------- + 1 file changed, 80 insertions(+), 76 deletions(-) + +diff --git a/lib/wp/spa-json.c b/lib/wp/spa-json.c +index f14f395..c5e59a3 100644 +--- a/lib/wp/spa-json.c ++++ b/lib/wp/spa-json.c +@@ -363,33 +363,33 @@ wp_spa_json_new_string (const gchar *value) + wp_spa_json_builder_new_formatted ("\"%s\"", value)); + } + +-static void +-wp_spa_json_builder_add_value (WpSpaJsonBuilder *self, const gchar *fmt, +- va_list args) +-{ +- switch (*fmt) { +- case 'n': +- wp_spa_json_builder_add_null (self); +- break; +- case 'b': +- wp_spa_json_builder_add_boolean (self, va_arg(args, gboolean)); +- break; +- case 'i': +- wp_spa_json_builder_add_int (self, va_arg(args, gint)); +- break; +- case 'f': +- wp_spa_json_builder_add_float (self, (float)va_arg(args, double)); +- break; +- case 's': +- wp_spa_json_builder_add_string (self, va_arg(args, const gchar *)); +- break; +- case 'J': +- wp_spa_json_builder_add_json (self, va_arg(args, WpSpaJson *)); +- break; +- default: +- return; +- } +-} ++/* Args is not a pointer in some architectures, so this needs to be a macro to ++ * avoid args being copied */ ++#define wp_spa_json_builder_add_value(self,fmt,args) \ ++do { \ ++ switch (*fmt) { \ ++ case 'n': \ ++ wp_spa_json_builder_add_null (self); \ ++ break; \ ++ case 'b': \ ++ wp_spa_json_builder_add_boolean (self, va_arg(args, gboolean)); \ ++ break; \ ++ case 'i': \ ++ wp_spa_json_builder_add_int (self, va_arg(args, gint)); \ ++ break; \ ++ case 'f': \ ++ wp_spa_json_builder_add_float (self, (float)va_arg(args, double)); \ ++ break; \ ++ case 's': \ ++ wp_spa_json_builder_add_string (self, va_arg(args, const gchar *)); \ ++ break; \ ++ case 'J': \ ++ wp_spa_json_builder_add_json (self, va_arg(args, WpSpaJson *)); \ ++ break; \ ++ default: \ ++ break; \ ++ } \ ++} while(false) + + /*! + * \brief Creates a spa json of type array +@@ -724,48 +724,46 @@ wp_spa_json_parse_object_valist (WpSpaJson *self, va_list args) + return res; + } + +-static gboolean +-wp_spa_json_parse_value (const gchar *data, int len, const gchar *fmt, +- va_list args) +-{ +- switch (*fmt) { +- case 'n': +- if (!spa_json_is_null (data, len)) +- return FALSE; +- break; +- case 'b': +- if (!wp_spa_json_parse_boolean_internal (data, len, +- va_arg(args, gboolean *))) +- return FALSE; +- break; +- case 'i': +- if (spa_json_parse_int (data, len, va_arg(args, gint *)) < 0) +- return FALSE; +- break; +- case 'f': +- if (spa_json_parse_float (data, len, +- (float *)va_arg(args, double *)) < 0) +- return FALSE; +- break; +- case 's': { +- gchar *str = wp_spa_json_parse_string_internal (data, len); +- if (!str) +- return FALSE; +- *va_arg(args, gchar **) = str; +- break; +- } +- case 'J': { +- WpSpaJson *j = wp_spa_json_new (data, len); +- if (!j) +- return FALSE; +- *va_arg(args, WpSpaJson **) = j; +- break; +- } +- default: +- return FALSE; +- } +- return TRUE; +-} ++/* Args is not a pointer in some architectures, so this needs to be a macro to ++ * avoid args being copied */ ++#define wp_spa_json_parse_value(data,len,fmt,args) \ ++do { \ ++ switch (*fmt) { \ ++ case 'n': \ ++ if (!spa_json_is_null (data, len)) \ ++ return FALSE; \ ++ break; \ ++ case 'b': \ ++ if (!wp_spa_json_parse_boolean_internal (data, len, \ ++ va_arg(args, gboolean *))) \ ++ return FALSE; \ ++ break; \ ++ case 'i': \ ++ if (spa_json_parse_int (data, len, va_arg(args, gint *)) < 0) \ ++ return FALSE; \ ++ break; \ ++ case 'f': \ ++ if (spa_json_parse_float (data, len, va_arg(args, float *)) < 0) \ ++ return FALSE; \ ++ break; \ ++ case 's': { \ ++ gchar *str = wp_spa_json_parse_string_internal (data, len); \ ++ if (!str) \ ++ return FALSE; \ ++ *va_arg(args, gchar **) = str; \ ++ break; \ ++ } \ ++ case 'J': { \ ++ WpSpaJson *j = wp_spa_json_new (data, len); \ ++ if (!j) \ ++ return FALSE; \ ++ *va_arg(args, WpSpaJson **) = j; \ ++ break; \ ++ } \ ++ default: \ ++ return FALSE; \ ++ } \ ++} while(false) + + /*! + * \brief Parses the object property values of a spa json object +@@ -827,8 +825,7 @@ wp_spa_json_object_get_valist (WpSpaJson *self, va_list args) + value = g_value_get_boxed (&item); + + if (g_strcmp0 (key_str, lookup_key) == 0) { +- if (!wp_spa_json_parse_value (value->data, value->size, lookup_fmt, args)) +- return FALSE; ++ wp_spa_json_parse_value (value->data, value->size, lookup_fmt, args); + lookup_key = va_arg(args, const gchar *); + if (!lookup_key) + return TRUE; +@@ -1366,9 +1363,12 @@ gboolean + wp_spa_json_parser_get_value (WpSpaJsonParser *self, const gchar *fmt, + va_list args) + { +- return wp_spa_json_parser_advance (self) && +- wp_spa_json_parse_value (self->curr.cur, +- self->curr.end - self->curr.cur, fmt, args); ++ if (wp_spa_json_parser_advance (self)) { ++ wp_spa_json_parse_value (self->curr.cur, self->curr.end - self->curr.cur, ++ fmt, args); ++ return TRUE; ++ } ++ return FALSE; + } + + /*! +@@ -1419,9 +1419,13 @@ wp_spa_json_parser_get_valist (WpSpaJsonParser *self, va_list args) + if (!format) + return TRUE; + +- /* parse value */ +- if (!wp_spa_json_parser_get_value (self, format, args)) ++ /* advance */ ++ if (!wp_spa_json_parser_advance (self)) + return FALSE; ++ ++ /* parse value */ ++ wp_spa_json_parse_value (self->curr.cur, self->curr.end - self->curr.cur, ++ format, args); + } while (TRUE); + + return FALSE; +-- +2.35.1 + diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb index a08ebbbed..f42b12770 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb @@ -14,16 +14,17 @@ DEPENDS = "glib-2.0 glib-2.0-native pipewire lua" SRC_URI = "\ git://gitlab.freedesktop.org/pipewire/wireplumber.git;protocol=https;branch=master \ " -# v0.4.7 -SRCREV = "afb177b5e0840d54dc41d02920702c3c9580ce02" +# v0.4.8 +SRCREV = "e14bb72dcc85e2130d0ea96768e5ae3b375a041e" # patches to be able to compile with lower version of meson that is available in AGL. SRC_URI += "\ - file://0001-Revert-wp-uninstalled-build-this-script-with-the-mes.patch \ - file://0002-Revert-tests-add-pipewire-env-variables-when-running.patch \ + file://0001-Revert-tests-add-pipewire-env-variables-when-running.patch \ + file://0002-Revert-wp-uninstalled-build-this-script-with-the-mes.patch \ + file://0003-spa-json-fix-va_list-APIs-for-different-architecture.patch \ " -PV = "0.4.5" +PV = "0.4.8" S = "${WORKDIR}/git" WPAPI="0.4" -- cgit 1.2.3-korg