aboutsummaryrefslogtreecommitdiffstats
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-05-26 19:50:23 +0000
commitfc722f8aea13246ce7779acbb3a59681b64131a6 (patch)
treef0ca74bffa3ed887affd3731bf1e57f6ceca614e /meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/30-alsa-monitor.lua
parentb81c6beb388cafa6de9ca1baa13c3d529ca2f2d8 (diff)
meta-pipewire: backport pipewire updates from master
Bug-AGL: SPEC-3844 Bug-AGL: SPEC-3900 Bug-AGL: SPEC-3909 Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com> Change-Id: I3c32d0083f31f94b49e33c3dd546515d39df7867 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/26360 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