diff options
Diffstat (limited to 'meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl')
8 files changed, 60 insertions, 211 deletions
diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.conf b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.conf index ebd0b6004..9077e3f45 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.conf +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.conf @@ -6,7 +6,7 @@ context.properties = { application.name = "WirePlumber Bluetooth" log.level = 2 wireplumber.script-engine = lua-scripting - wireplumber.export-core = false + wireplumber.export-core = true #mem.mlock-all = false #support.dbus = true 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/host.lua.d/30-alsa-monitor.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/30-alsa-monitor.lua index 75a169675..d07f7ab85 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/30-alsa-monitor.lua +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/30-alsa-monitor.lua @@ -8,7 +8,7 @@ alsa_monitor.properties = { } alsa_monitor.rules = { - -- disable ACP (PulseAudio-like profiles) + -- enable ACP (PulseAudio-like profiles) { matches = { { @@ -16,7 +16,7 @@ alsa_monitor.rules = { }, }, apply_properties = { - ["api.alsa.use-acp"] = false, + ["api.alsa.use-acp"] = true, }, }, diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/40-device-defaults.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/40-device-defaults.lua index 365bab59a..e0d332422 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/40-device-defaults.lua +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/40-device-defaults.lua @@ -14,7 +14,7 @@ function device_defaults.enable() -- Selects appropriate default routes ("ports" in pulseaudio terminology) -- and enables saving and restoring them together with -- their properties (per-route/port volume levels, channel maps, etc) - load_script("default-routes.lua", device_defaults.properties) + load_script("policy-device-routes.lua", device_defaults.properties) if device_defaults.properties["use-persistent-storage"] then -- Enables functionality to save and restore default device profiles diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/90-enable-all.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/90-enable-all.lua index f6d73a3f1..ecb7da476 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/90-enable-all.lua +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/90-enable-all.lua @@ -4,7 +4,7 @@ load_module("metadata") -- Load devices alsa_monitor.enable() ---v4l2_monitor.enable() +v4l2_monitor.enable() -- Track/store/restore user choices about devices device_defaults.enable() @@ -13,7 +13,7 @@ device_defaults.enable() load_script("suspend-node.lua") -- Automatically sets device profiles to 'On' -load_module("device-activation") +load_script("policy-device-profile.lua") -- Mute ALSA sinks when requested by pipewire-ic-ipc load_module("mixer-api") diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.conf b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.conf deleted file mode 100644 index 42f714849..000000000 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.conf +++ /dev/null @@ -1,73 +0,0 @@ -# WirePlumber daemon context configuration # - -context.properties = { - ## Properties to configure the PipeWire context and some modules - - application.name = "WirePlumber Policy" - log.level = 2 - wireplumber.script-engine = lua-scripting - wireplumber.export-core = false - - #mem.mlock-all = false - #support.dbus = true -} - -context.spa-libs = { - #<factory-name regex> = <library-name> - # - # Used to find spa factory names. It maps an spa factory name - # regular expression to a library name that should contain - # that factory. - # - audio.convert.* = audioconvert/libspa-audioconvert - support.* = support/libspa-support -} - -context.modules = [ - #{ name = <module-name> - # [ args = { <key> = <value> ... } ] - # [ flags = [ [ ifexists ] [ nofail ] ] - #} - # - # PipeWire modules to load. - # If ifexists is given, the module is ignored when it is not found. - # If nofail is given, module initialization failures are ignored. - # - - # The native communication protocol. - { name = libpipewire-module-protocol-native } - - # Allows creating nodes that run in the context of the - # client. Is used by all clients that want to provide - # data to PipeWire. - { name = libpipewire-module-client-node } - - # Allows creating devices that run in the context of the - # client. Is used by the session manager. - { name = libpipewire-module-client-device } - - # Makes a factory for wrapping nodes in an adapter with a - # converter and resampler. - { name = libpipewire-module-adapter } - - # Allows applications to create metadata objects. It creates - # a factory for Metadata objects. - { name = libpipewire-module-metadata } - - # Provides factories to make session manager objects. - { name = libpipewire-module-session-manager } -] - -wireplumber.components = [ - #{ name = <component-name>, type = <component-type> } - # - # WirePlumber components to load - # - - # The lua scripting engine - { name = libwireplumber-module-lua-scripting, type = module } - - # The lua configuration file - # Other components are loaded from there - { name = policy.lua, type = config/lua } -] 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 deleted file mode 100644 index f70f38b1f..000000000 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.lua.d/10-default-policy.lua +++ /dev/null @@ -1,122 +0,0 @@ --- Policy config file -- - -policy_config = {} - -policy_config.endpoints = { - -- [endpoint name] = { endpoint properties } - - ["endpoint.multimedia"] = { - ["media.class"] = "Audio/Sink", - ["role"] = "Multimedia", - }, - ["endpoint.speech_low"] = { - ["media.class"] = "Audio/Sink", - ["role"] = "Speech-Low", - }, - ["endpoint.custom_low"] = { - ["media.class"] = "Audio/Sink", - ["role"] = "Custom-Low", - }, - ["endpoint.navigation"] = { - ["media.class"] = "Audio/Sink", - ["role"] = "Navigation", - }, - ["endpoint.speech_high"] = { - ["media.class"] = "Audio/Sink", - ["role"] = "Speech-High", - }, - ["endpoint.custom_high"] = { - ["media.class"] = "Audio/Sink", - ["role"] = "Custom-High", - }, - ["endpoint.communication"] = { - ["media.class"] = "Audio/Sink", - ["role"] = "Communication", - }, - ["endpoint.emergency"] = { - ["media.class"] = "Audio/Sink", - ["role"] = "Emergency", - }, -} - -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 - - -- 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, - - ["roles"] = { - ["Multimedia"] = { - ["alias"] = { "Movie", "Music", "Game" }, - ["priority"] = 25, - ["action.default"] = "cork", - }, - ["Speech-Low"] = { - ["priority"] = 30, - ["action.default"] = "cork", - ["action.Speech-Low"] = "mix", - }, - ["Custom-Low"] = { - ["priority"] = 35, - ["action.default"] = "cork", - ["action.Custom-Low"] = "mix", - }, - ["Navigation"] = { - ["priority"] = 50, - ["action.default"] = "duck", - ["action.Navigation"] = "mix", - }, - ["Speech-High"] = { - ["priority"] = 60, - ["action.default"] = "cork", - ["action.Speech-High"] = "mix", - }, - ["Custom-High"] = { - ["priority"] = 65, - ["action.default"] = "cork", - ["action.Custom-High"] = "mix", - }, - ["Communication"] = { - ["priority"] = 75, - ["action.default"] = "cork", - ["action.Communication"] = "mix", - }, - ["Emergency"] = { - ["alias"] = { "Alert" }, - ["priority"] = 99, - ["action.default"] = "cork", - ["action.Emergency"] = "mix", - }, - }, -} - --- Session item factories, building blocks for the session management graph --- Do not disable these unless you really know what you are doing -load_module("si-node") -load_module("si-audio-adapter") -load_module("si-standard-link") -load_module("si-audio-endpoint") - --- API to access default nodes from scripts -load_module("default-nodes-api") - --- API to access mixer controls, needed for volume ducking -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") - --- Link nodes to each other to make media flow in the graph -load_script("policy-node.lua", policy_config.policy) - --- Link client nodes with endpoints to make media flow in the graph -load_script("policy-endpoint-client.lua", policy_config.policy) -load_script("policy-endpoint-client-links.lua", policy_config.policy) - --- Link endpoints with device nodes to make media flow in the graph -load_script("policy-endpoint-device.lua", policy_config.policy) diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/wireplumber.conf b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/wireplumber.conf index 680a791f3..46ad11302 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/wireplumber.conf +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/wireplumber.conf @@ -57,6 +57,47 @@ context.modules = [ # Provides factories to make session manager objects. { name = libpipewire-module-session-manager } + + { name = libpipewire-module-filter-chain + args = { + node.description = "Equalizer Sink" + media.name = "Equalizer Sink" + filter.graph = { + nodes = [ + { + type = builtin + name = bass + label = bq_lowshelf + # the cut off freq of the bass filter can be adjusted here. + control = { "Freq" = 250.0 "Q" = 1.0 "Gain" = 0.0 } + } + { + type = builtin + name = treble + label = bq_peaking + # the cut off freq of the treble filter can be adjusted here. + control = { "Freq" = 6000.0 "Q" = 1.0 "Gain" = 0.0 } + } + ] + links = [ + { output = "bass:Out" input = "treble:In" } + ] + } + audio.channels = 2 + audio.position = [ FL FR ] + capture.props = { + node.name = "eq-sink" + media.class = Audio/Sink + # select the endpoint to which the node is attached + target.endpoint = "endpoint.multimedia" + node.passive = true + } + playback.props = { + node.name = "eq-output-stream" + node.passive = true + } + } + } ] wireplumber.components = [ |