diff options
Diffstat (limited to 'meta-pipewire/recipes-multimedia/wireplumber')
5 files changed, 229 insertions, 15 deletions
diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.lua.d/30-bluez-monitor.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.lua.d/30-bluez-monitor.lua index 36fe749bb..530f4cc62 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.lua.d/30-bluez-monitor.lua +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.lua.d/30-bluez-monitor.lua @@ -3,13 +3,15 @@ bluez_monitor = {} bluez_monitor.properties = { - -- Enable mSBC support, disabled by default. Be aware that - -- mSBC is not expected to work on all headset + adapter combinations. - -- This can be overloaded for a specific device and native backend - -- in rules section. - --["bluez5.msbc-support"] = false, + -- These features do not work on all headsets, so they are enabled + -- by default based on the hardware database. They can also be + -- forced on/off for all devices by the following options: - --["bluez5.sbc-xq-support"] = true, + --["bluez5.enable-sbc-xq"] = true, + --["bluez5.enable-msbc"] = true, + --["bluez5.enable-hw-volume"] = true, + + -- See bluez-hardware.conf for the hardware database. -- Enabled headset roles (default: [ hsp_hs hfp_ag ]), this -- property only applies to native backend. Currently some headsets @@ -23,7 +25,11 @@ bluez_monitor.properties = { ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]", -- Enabled A2DP codecs (default: all). - --["bluez5.codecs"] = "[ sbc aac ldac aptx aptx_hd ]", + --["bluez5.codecs"] = "[ sbc sbc_xq aac ldac aptx aptx_hd aptx_ll aptx_ll_duplex faststream faststream_duplex ]", + + -- HFP/HSP backend (default: native). + -- Available values: any, none, hsphfpd, ofono, native + ["bluez5.hfphsp-backend"] = "ofono", -- Properties for the A2DP codec configuration --["bluez5.default.rate"] = 48000, @@ -50,9 +56,6 @@ bluez_monitor.rules = { --["bluez5.auto-connect"] = "[ hfp_hf hsp_hs a2dp_sink hfp_ag hsp_ag a2dp_source ]", ["bluez5.auto-connect"] = "[ hfp_hf hsp_hs a2dp_sink ]", - -- Overload mSBC support for native backend and a specific device. - --["bluez5.msbc-support"] = false, - -- Hardware volume control (default: [ hfp_ag hsp_ag a2dp_source ]) --["bluez5.hw-volume"] = "[ hfp_hf hsp_hs a2dp_sink hfp_ag hsp_ag a2dp_source ]", diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.lua.d/10-default-policy.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.lua.d/10-default-policy.lua index f70f38b1f..82f5bb055 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.lua.d/10-default-policy.lua +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.lua.d/10-default-policy.lua @@ -43,6 +43,11 @@ policy_config.policy = { ["move"] = false, -- moves session items when metadata target.node changes ["follow"] = true, -- moves session items to the default device when it has changed + -- Set to 'true' to disable channel splitting & merging on nodes and enable + -- passthrough of audio in the same format as the format of the device. + -- Note that this breaks JACK support; it is generally not recommended + ["audio.no-dsp"] = false, + -- how much to lower the volume of lower priority streams when ducking -- note that this is a linear volume modifier (not cubic as in pulseaudio) ["duck.level"] = 0.2, @@ -108,8 +113,8 @@ load_module("mixer-api") -- Create endpoints statically at startup load_script("static-endpoints.lua", policy_config.endpoints) --- Create items for nodes that appear in the graph -load_script("create-item.lua") + -- Create session items for nodes that appear in the graph + load_script("create-item.lua", default_policy.policy) -- Link nodes to each other to make media flow in the graph load_script("policy-node.lua", policy_config.policy) 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 new file mode 100644 index 000000000..37b43571d --- /dev/null +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-wp-uninstalled-build-this-script-with-the-mes.patch @@ -0,0 +1,63 @@ +From 1d39b68d88e967739d6beb3c9be7f4644b5d4077 Mon Sep 17 00:00:00 2001 +From: Ashok Sidipotu <ashok.sidipotu@collabora.com> +Date: Thu, 2 Dec 2021 16:23:09 +0530 +Subject: [PATCH] Revert "wp-uninstalled: build this script with the meson dirs + filled in" + +This reverts commit 52aaf96179584292f493c4b329bc2c409e6d3dee. +--- + meson.build | 18 ------------------ + wp-uninstalled.sh | 11 ++--------- + 2 files changed, 2 insertions(+), 27 deletions(-) + +diff --git a/meson.build b/meson.build +index 1affbc1..f2ca16c 100644 +--- a/meson.build ++++ b/meson.build +@@ -120,21 +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@'], +-) +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 new file mode 100644 index 000000000..07ddb746b --- /dev/null +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-tests-add-pipewire-env-variables-when-running.patch @@ -0,0 +1,136 @@ +From 4ea8ddc256df636208479a5b64bf8bdc6e413aca Mon Sep 17 00:00:00 2001 +From: Ashok Sidipotu <ashok.sidipotu@collabora.com> +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. +--- + 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_git.bb b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb index 6f21b258c..7df199e01 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb @@ -14,9 +14,16 @@ DEPENDS = "glib-2.0 glib-2.0-native pipewire lua" SRC_URI = "\ git://gitlab.freedesktop.org/pipewire/wireplumber.git;protocol=https;branch=master \ " -SRCREV = "4af7e2bd68c4862bb707b62edf7557df56dad10f" +# v0.4.5 +SRCREV = "3946457a7942a179c0f61c60de8cb8fc643391dd" -PV = "0.4.0" +# 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 \ +" + +PV = "0.4.5" S = "${WORKDIR}/git" WPAPI="0.4" @@ -38,7 +45,7 @@ PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd-system-service=true -Dsyst do_configure:prepend() { # relax meson version requirement # we only need 0.54 when building with -Dsystem-lua=false - sed "s/meson_version : '>= 0.54.0'/meson_version : '>= 0.51.0'/" ${S}/meson.build > ${S}/tmp.build + sed "s/meson_version : '>= 0.56.0'/meson_version : '>= 0.53.2'/" ${S}/meson.build > ${S}/tmp.build mv -f ${S}/tmp.build ${S}/meson.build } |