unsupported k�пÎkFile not found. mˆ¾Ë ƒh¹¿Îmunsupported oˆ¾Ë ƒh¹¿Îo0 :qˆl–Ãa¾”ÔD¨ µÕÆ™¸ÛªbÑ¿Ì „ Ͷïa–Ðz¾””ÔD¨ Å�Á4¦-ÿÐ?÷q-- WirePlumber -- -- Copyright © 2021 Collabora Ltd. -- @author George Kiagiadakis -- -- SPDX-License-Identifier: MIT COMBINE_OFFSET = 64 LOOPBACK_SOURCE_ID = 128 DEVICE_SOURCE_ID = 0 cutils = require ("common-utils") log = Log.open_topic ("s-monitors") config = {} config.seat_monitoring = Core.test_feature ("monitor.bluez.seat-monitoring") config.properties = Conf.get_section_as_properties ("monitor.bluez.properties") config.rules = Conf.get_section_as_json ("monitor.bluez.rules", Json.Array {}) -- This is not a setting, it must always be enabled config.properties["api.bluez5.connection-info"] = true -- Properties used for previously creating a SCO source node. key: SPA device id sco_source_node_properties = {} devices_om = ObjectManager { Interest { type = "device", } } nodes_om = ObjectManager { Interest { type = "node", Constraint { "node.name", "#", "*.bluez_*put*"}, Constraint { "device.id", "+" }, } } function setOffloadActive(device, value) local pod = Pod.Object { "Spa:Pod:Object:Param:Props", "Props", bluetoothOffloadActive = value } device:set_params("Props", pod) end nodes_om:connect("object-added", function(_, node) node:connect("state-changed", function(node, old_state, cur_state) local interest = Interest { type = "device", Constraint { "object.id", "=", node.properties["device.id"]} } for d in devices_om:iterate (interest) do if cur_state == "running" then setOffloadActive(d, true) else setOffloadActive(d, false) end end end) end) function createOffloadScoNode(parent, id, type, factory, properties) local dev_props = parent.properties local args = { ["audio.channels"] = 1, ["audio.position"] = "[MONO]", } local desc = dev_props["device.description"] or dev_props["device.name"] or dev_props["device.nick"] or dev_props["device.alias"] or "bluetooth-device" -- sanitize description, replace ':' with ' ' args["node.description"] = desc:gsub("(:)", " ") if factory:find("sink") then local capture_args = { ["device.id"] = parent["bound-id"], ["media.class"] = "Audio/Sink", ["node.pause-on-idle"] = false, } for k, v in pairs(properties) do capture_args[k] = v end local name = "bluez_output" .. "." .. (properties["api.bluez5.address"] or dev_props["device.name"]) .. "." .. tostring(id) args["node.name"] = name:gsub("([^%w_%-%.])", "_") args["capture.props"] = Json.Object(capture_args) args["playback.props"] = Json.Object { ["node.passive"] = true, ["node.pause-on-idle"] = false, ["state.restore-props"] = false, } elseif factory:find("source") then local playback_args = { ["device.id"] = parent["bound-id"], ["media.class"] = "Audio/Source", ["node.pause-on-idle"] = false, } for k, v in pairs(properties) do playback_args[k] = v end local name = "bluez_input" .. "." .. (properties["api.bluez5.address"] or dev_props["device.name"]) .. "." .. tostring(id) args["node.name"] = name:gsub("([^%w_%-%.])", "_") args["capture.props"] = Json.Object { ["node.passive"] = true, ["node.pause-on-idle"] = false, ["state.restore-props"] = false, } args["playback.props"] = Json.Object(playback_args) else log:warning(parent, "Unsupported factory: " .. factory) return end -- Transform 'args' to a json object here local args_json = Json.Object(args) -- and get the final JSON as a string from the json object local args_string = args_json:get_data() local loopback_properties = {} local loopback = LocalModule("libpipewire-module-loopback", args_string, loopback_properties) parent:store_managed_object(id, loopback) end device_set_nodes_om = ObjectManager { In