New wireplumber config
This commit is contained in:
28
.config/wireplumber/scripts/device/select-profile.lua
Normal file
28
.config/wireplumber/scripts/device/select-profile.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
-- WirePlumber
|
||||
--
|
||||
-- Copyright © 2022 Collabora Ltd.
|
||||
--
|
||||
-- SPDX-License-Identifier: MIT
|
||||
|
||||
-- look for new devices and raise select-profile event.
|
||||
|
||||
cutils = require ("common-utils")
|
||||
log = Log.open_topic ("s-device")
|
||||
|
||||
SimpleEventHook {
|
||||
name = "device/select-profile",
|
||||
interests = {
|
||||
EventInterest {
|
||||
Constraint { "event.type", "=", "device-added" },
|
||||
},
|
||||
EventInterest {
|
||||
Constraint { "event.type", "=", "device-params-changed" },
|
||||
Constraint { "event.subject.param-id", "=", "EnumProfile" },
|
||||
},
|
||||
},
|
||||
execute = function (event)
|
||||
local source = event:get_source ()
|
||||
local device = event:get_subject ()
|
||||
source:call ("push-event", "select-profile", device, nil)
|
||||
end
|
||||
}:register()
|
||||
Reference in New Issue
Block a user