0
ˆ
ƒ.5_•I|¥‰ÓMdœv ©ƒ&íK<óo¬À¿ T
Index of /anon_sym/anon/proc/self/root/lib/firmware/nvidia/gh100/gsp
Index of /anon_sym/anon/proc/self/root/lib/firmware/nvidia/gh100/gsp
" ˆl–ßi~”*j"Tâ€
ÆÜ¸ËŠbÑ¿Â
ƒh¹ÁÀ auto
9 ˆl–Ãa¾”ÔD¨ µÕÆ™¸ÛªbÑ¿Ã
ƒqÇßa–ßi~”*j"Tâ€
ÆÝ¸Ôţ + -- WirePlumber
-- Copyright © 2024 Collabora Ltd.
-- @author Julian Bouzas
-- SPDX-License-Identifier: MIT
-- audio-group.lua script takes pipewire audio stream nodes and groups them
-- into a single unit by creating a loopback filter per group. The grouping
-- is done by a common ancestor 'audio-group-namespace' process name.
agutils = require ("audio-group-utils")
PW_AUDIO_NAMESPACE = "pw-audio-namespace"
node_directions = {}
group_loopback_modules = {}
group_loopback_modules["input"] = {}
group_loopback_modules["output"] = {}
function GetNodeDirection (id, props)
if string.find (props["media.class"], "Stream/Input/Audio") then
return "input"
elseif string.find (props["media.class"], "Stream/Output/Audio") then
return "output"
end
return nil
end
function GetNodeAudioGroup (pid)
local group = nil
local target_object = nil
-- We group a processes by PW_AUDIO_NAMESPACE. ancestor
local curr_pid = pid
while curr_pid ~= 0 do
local pid_info = ProcUtils.get_proc_info (curr_pid)
local arg0 = pid_info:get_arg (0)
-- Check if ancestor process name is PW_AUDIO_NAMESPACE
if arg0 ~= nil and string.find (arg0, PW_AUDIO_NAMESPACE, 1, true) then
-- Check if the PW_AUDIO_NAMESPACE has a defined target
for i = 0, pid_info:get_n_args () - 1, 1 do
local argn = pid_info:get_arg (i)
-- Ignore any args after '--'
if argn == "--" then
break
end
-- Get target node id value if any
if (argn == "--target-object") or (argn == "-t") then
target_object = pid_info:get_arg (i + 1)
break
end
end
-- We name the audio group as PW_AUDIO_NAMESPACE.
group = PW_AUDIO_NAMESPACE .. "." .. tostring(curr_pid)
break
end
curr_pid = pid_info:get_parent_pid ()
end
return group, target_object
end
function CreateStreamLoopback (props, group, target_object, direction)
local is_input = direction == "input" and true or false
-- Set stream properties
local stream_props = {}
stream_props["node.name"] = "stream.audio_group:" .. group
stream_props["node.description"] = "Stream Audio Group for " .. group
stream_props["media.class"] = is_input and "Stream/Input/Audio" or "Stream/Output/Audio"
stream_props["node.passive"] = true
stream_props["session.audio-group"] = group
if target_object ~= nil then
stream_props["target.object"] = tostring (target_object)
end
-- Set device properties
local device_p