hotfix: Fix audio scripts with the new format (#1187)

* Remove old lua scripts

* Remove old lua scripts pt 2

* Create new fs structure

* Add the remaining files
This commit is contained in:
Marco Rodolfi 2024-05-29 16:41:53 +02:00 committed by GitHub
parent d17320e172
commit bf4662b549
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 104 additions and 119 deletions

View File

@ -1,25 +0,0 @@
bluez_monitor.properties = {
-- we only want these audio profiles:
-- 0000110a-0000-1000-8000-00805f9b34fb Audio Source
-- 0000110b-0000-1000-8000-00805f9b34fb Audio Sink
-- 0000110d-0000-1000-8000-00805f9b34fb Advanced Audio Distribution
["bluez5.roles"] = "[ a2dp_sink a2dp_source ]",
-- And only this one headset related profile:
-- 00001112-0000-1000-8000-00805f9b34fb Headset
-- disabled: 00001108-0000-1000-8000-00805f9b34fb hsp_hs
-- disabled: 0000111e-0000-1000-8000-00805f9b34fb hfp_hs
-- disabled: 0000111f-0000-1000-8000-00805f9b34fb hfp_ag
-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-- NOTE: check hfphsp-backend below as that also affects hs/hf profiles
-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
["bluez5.headset-roles"] = "[ hsp_ag ]",
-- HFP/HSP backend (default: native).
-- Available values: any, none, hsphfpd, ofono, native
-- setting this to "none" disables all headset roles
["bluez5.hfphsp-backend"] = "none",
-- Disable dummy AVRCP player
["bluez5.dummy-avrcp-player"] = false
}

View File

@ -1,48 +0,0 @@
--ACP5X card hardware never hibernates, so remove the pops and lags.
table.insert (alsa_monitor.rules, {
matches = {
{
-- Matches all sources from card acp5x
{ "node.name", "matches", "alsa_input.*" },
{ "alsa.card_name", "matches", "acp5x" },
},
{
-- Matches all sources from card acp6x
{ "node.name", "matches", "alsa_input.*" },
{ "alsa.card_name", "matches", "acp6x" },
},
{
-- Matches all sources from SOF drivers
{ "node.name", "matches", "alsa_input.*" },
{ "alsa.card_name", "matches", "sof-nau8821-max" },
},
{
-- Matches all sinks from card acp5x
{ "node.name", "matches", "alsa_output.*" },
{ "alsa.card_name", "matches", "acp5x" },
},
{
-- Matches all sinks from card acp6x
{ "node.name", "matches", "alsa_output.*" },
{ "alsa.card_name", "matches", "acp6x" },
},
{
-- Matches all sinks from card acp6x
{ "node.name", "matches", "alsa_output.*" },
{ "alsa.card_name", "matches", "sof-nau8821-max" },
},
},
apply_properties = {
["session.suspend-timeout-seconds"] = 0,
["api.alsa.headroom"] = 1024,
}
})

View File

@ -1,25 +0,0 @@
-- HDMI output is always plugged in card 0 (HD_Audio Generic)
-- We always give higher priority to nodes from that card
-- Disable suspend timeout for HDMI to remove audio delay after idle
table.insert (alsa_monitor.rules, {
matches = {
{
-- Matches all sources from card HD-Audio Generic
{ "node.name", "matches", "alsa_input.*" },
{ "alsa.card_name", "matches", "HD-Audio Generic" },
},
{
-- Matches all sinks from card HD-Audio Generic
{ "node.name", "matches", "alsa_output.*" },
{ "alsa.card_name", "matches", "HD-Audio Generic" },
},
},
apply_properties = {
["priority.driver"] = 900,
["priority.session"] = 900,
["api.alsa.period-size"] = 256,
["api.alsa.headroom"] = 1024,
["session.suspend-timeout-seconds"] = 0
}
})

View File

@ -1,21 +0,0 @@
-- PS4/PS5 Controller output is always referenced as Wireless Controller
-- We always give the lowest priority to nodes from that card
table.insert (alsa_monitor.rules, {
matches = {
{
-- Matches all sources from card Controller
{ "node.name", "matches", "alsa_input.*" },
{ "alsa.card_name", "matches", "Wireless Controller" },
},
{
-- Matches all sinks from card Wireless Controller
{ "node.name", "matches", "alsa_output.*" },
{ "alsa.card_name", "matches", "Wireless Controller" },
},
},
apply_properties = {
["priority.driver"] = 99,
["priority.session"] = 99,
}
})

View File

@ -0,0 +1,23 @@
monitor.alsa.rules = [
{
matches = [
{
node.name = "~alsa_input.*"
alsa.card_name = "HD-Audio Generic"
}
{
node.name = "~alsa_output.*"
alsa.card_name = "HD-Audio Generic"
}
]
actions = {
update-props = {
priority.driver = 900
priority.session = 900
api.alsa.period-size = 256
api.alsa.headroom = 1024
session.suspend-timeout-seconds = 0
}
}
}
]

View File

@ -0,0 +1,36 @@
monitor.alsa.rules = [
{
matches = [
{
node.name = "~alsa_input.*"
alsa.card_name = "acp5x"
}
{
node.name = "~alsa_input.*"
alsa.card_name = "acp6x"
}
{
node.name = "~alsa_input.*"
alsa.card_name = "sof-nau8821-max"
}
{
node.name = "~alsa_output.*"
alsa.card_name = "acp5x"
}
{
node.name = "~alsa_output.*"
alsa.card_name = "acp6x"
}
{
node.name = "~alsa_output.*"
alsa.card_name = "sof-nau8821-max"
}
]
actions = {
update-props = {
session.suspend-timeout-seconds = 0
api.alsa.headroom = 1024
}
}
}
]

View File

@ -0,0 +1,20 @@
monitor.alsa.rules = [
{
matches = [
{
node.name = "~alsa_input.*"
alsa.card_name = "Wireless Controller"
}
{
node.name = "~alsa_output.*"
alsa.card_name = "Wireless Controller"
}
]
actions = {
update-props = {
priority.driver = 90
priority.session = 90
}
}
}
]

View File

@ -0,0 +1,25 @@
monitor.bluez.properties = {
## we only want these audio profiles:
## 0000110a-0000-1000-8000-00805f9b34fb Audio Source
## 0000110b-0000-1000-8000-00805f9b34fb Audio Sink
## 0000110d-0000-1000-8000-00805f9b34fb Advanced Audio Distribution
## And only this one headset related profile:
## disabled: 00001112-0000-1000-8000-00805f9b34fb hsp_ag
## disabled: 00001108-0000-1000-8000-00805f9b34fb hsp_hs
## disabled: 0000111e-0000-1000-8000-00805f9b34fb hfp_hf
## enabled : 0000111f-0000-1000-8000-00805f9b34fb hfp_ag
## >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
## NOTE: This used to be in .headset-roles, which was merged into .roles
## NOTE: check hfphsp-backend below as that also affects hs/hf profiles
## >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
bluez5.roles = "[ a2dp_sink a2dp_source hfp_ag ]"
## HFP/HSP backend (default: native).
## Available values: any, none, hsphfpd, ofono, native
## setting this to "none" disables all headset roles
bluez5.hfphsp-backend = "native"
## Disable dummy AVRCP player
bluez5.dummy-avrcp-player = false
}