summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/30-alsa-monitor.lua
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2021-02-11 14:13:55 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-04-26 14:21:03 +0000
commit761e6467d12e2935785774383adca9ddbd3e1c26 (patch)
tree24c48f24a83004afcbee78ff33e73aaa4e3f2683 /meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/30-alsa-monitor.lua
parent69dbc40c36265760a27094b960ef9faebda3a08d (diff)
meta-pipewire: update to pipewire 0.3.25 and wireplumber master
Bug-AGL: SPEC-3844 Change-Id: Ie32bfa43bf078c7d218d3150dc616501b8848bd0 Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/26094 Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/30-alsa-monitor.lua')
-rw-r--r--meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/30-alsa-monitor.lua161
1 files changed, 161 insertions, 0 deletions
diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/30-alsa-monitor.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/30-alsa-monitor.lua
new file mode 100644
index 000000000..fd6b7ecb5
--- /dev/null
+++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/30-alsa-monitor.lua
@@ -0,0 +1,161 @@
+-- ALSA monitor config file --
+
+alsa_monitor = {}
+
+alsa_monitor.properties = {
+ ["alsa.jack-device"] = false,
+ ["alsa.reserve"] = false,
+}
+
+alsa_monitor.rules = {
+ -- disable ACP (PulseAudio-like profiles)
+ {
+ matches = {
+ {
+ { "device.name", "matches", "alsa_card.*" },
+ },
+ },
+ apply_properties = {
+ ["api.alsa.use-acp"] = false,
+ },
+ },
+
+ --
+ -- Bump priority of well-known output devices
+ -- Higher priority means it gets selected as the default if it's present
+ --
+
+ -- USB card
+ {
+ matches = {
+ {
+ { "node.name", "matches", "alsa_output.*" },
+ { "api.alsa.card.driver", "=", "USB-Audio" },
+ },
+ },
+ apply_properties = {
+ ["priority.driver"] = 1300,
+ ["priority.session"] = 1300,
+ }
+ },
+
+ -- fiberdyne amp
+ {
+ matches = {
+ {
+ { "node.name", "matches", "alsa_output.*" },
+ { "api.alsa.card.id", "=", "ep016ch" },
+ },
+ },
+ apply_properties = {
+ ["priority.driver"] = 1200,
+ ["priority.session"] = 1200,
+ }
+ },
+
+ -- well-known internal devices
+ {
+ matches = {
+ {
+ -- ak4613
+ { "node.name", "matches", "alsa_output.*" },
+ { "api.alsa.card.id", "=", "ak4613" },
+ { "api.alsa.pcm.device", "=", "0" },
+ },
+ {
+ -- dra7xx
+ { "node.name", "matches", "alsa_output.*" },
+ { "api.alsa.card.id", "=", "DRA7xx-EVM" },
+ },
+ {
+ -- imx8mq
+ { "node.name", "matches", "alsa_output.*" },
+ { "api.alsa.card.id", "=", "wm8524audio" },
+ },
+ {
+ -- rcarsound
+ { "node.name", "matches", "alsa_output.*" },
+ { "api.alsa.card.id", "=", "rcarsound" },
+ { "api.alsa.pcm.device", "=", "0" },
+ },
+ {
+ -- rpi3
+ { "node.name", "matches", "alsa_output.*" },
+ { "api.alsa.pcm.name", "=", "bcm2835 ALSA" },
+ },
+ },
+ apply_properties = {
+ ["priority.driver"] = 1100,
+ ["priority.session"] = 1100,
+ }
+ },
+
+ --
+ -- Same for input devices
+ --
+
+ -- USB card
+ {
+ matches = {
+ {
+ { "node.name", "matches", "alsa_input.*" },
+ { "api.alsa.card.driver", "=", "USB-Audio" },
+ },
+ },
+ apply_properties = {
+ ["priority.driver"] = 2300,
+ ["priority.session"] = 2300,
+ }
+ },
+
+ -- microchip mic
+ {
+ matches = {
+ {
+ { "node.name", "matches", "alsa_input.*" },
+ { "api.alsa.card.id", "=", "ep811ch" },
+ },
+ },
+ apply_properties = {
+ ["priority.driver"] = 2200,
+ ["priority.session"] = 2200,
+ }
+ },
+
+ -- well-known internal devices
+ {
+ matches = {
+ {
+ -- ak4613
+ { "node.name", "matches", "alsa_input.*" },
+ { "api.alsa.card.id", "=", "ak4613" },
+ },
+ {
+ -- dra7xx
+ { "node.name", "matches", "alsa_input.*" },
+ { "api.alsa.card.id", "=", "DRA7xx-EVM" },
+ },
+ {
+ -- imx8mq
+ { "node.name", "matches", "alsa_input.*" },
+ { "api.alsa.card.id", "=", "wm8524audio" },
+ },
+ {
+ -- rcarsound
+ { "node.name", "matches", "alsa_input.*" },
+ { "api.alsa.card.id", "=", "rcarsound" },
+ },
+ },
+ apply_properties = {
+ ["priority.driver"] = 2100,
+ ["priority.session"] = 2100,
+ }
+ },
+}
+
+function alsa_monitor.enable()
+ load_monitor("alsa", {
+ properties = alsa_monitor.properties,
+ rules = alsa_monitor.rules,
+ })
+end