meta-st-stm32mp/recipes-bsp/alsa/alsa-lib/0001-conf-add-card-configs-...

173 lines
4.5 KiB
Diff

From a15f711c4726232c73990404ac8279d79f185b06 Mon Sep 17 00:00:00 2001
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Date: Thu, 9 Sep 2021 15:52:25 +0200
Subject: [PATCH 1/2] conf: add card configs for stm32mp15x boards
Add card configuration files for STM32MP15x-EV
and STM32MP15x-DK boards.
Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
---
src/conf/cards/Makefile.am | 4 ++-
src/conf/cards/STM32MP15DK.conf | 47 ++++++++++++++++++++++++
src/conf/cards/STM32MP15EV.conf | 64 +++++++++++++++++++++++++++++++++
src/conf/cards/aliases.conf | 2 ++
4 files changed, 116 insertions(+), 1 deletion(-)
create mode 100644 src/conf/cards/STM32MP15DK.conf
create mode 100644 src/conf/cards/STM32MP15EV.conf
diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
index 00999f0..c29d831 100644
--- a/src/conf/cards/Makefile.am
+++ b/src/conf/cards/Makefile.am
@@ -58,7 +58,9 @@ cfg_files = aliases.conf \
VIA8237.conf \
VX222.conf \
VXPocket.conf \
- VXPocket440.conf
+ VXPocket440.conf \
+ STM32MP15EV.conf \
+ STM32MP15DK.conf
if BUILD_ALISP
cfg_files += aliases.alisp
diff --git a/src/conf/cards/STM32MP15DK.conf b/src/conf/cards/STM32MP15DK.conf
new file mode 100644
index 0000000..b57cc69
--- /dev/null
+++ b/src/conf/cards/STM32MP15DK.conf
@@ -0,0 +1,47 @@
+<confdir:pcm/front.conf>
+
+STM32MP15DK.pcm.front.0 {
+ @args [ CARD ]
+ @args.CARD { type string }
+ type asym
+ playback.pcm {
+ type hw
+ card $CARD
+ device 0
+ }
+}
+
+<confdir:pcm/default.conf>
+
+STM32MP15DK.pcm.default {
+ @args [ CARD ]
+ @args.CARD { type string }
+ type asym
+ playback.pcm {
+ type hw
+ card $CARD
+ device 0
+ }
+ capture.pcm {
+ type hw
+ card $CARD
+ device 1
+ }
+}
+
+<confdir:pcm/hdmi.conf>
+
+STM32MP15DK.pcm.hdmi.0 {
+ @args [ CARD AES0 AES1 AES2 AES3 ]
+ @args.CARD { type string }
+ @args.AES0 { type integer }
+ @args.AES1 { type integer }
+ @args.AES2 { type integer }
+ @args.AES3 { type integer }
+ type asym
+ playback.pcm {
+ type hw
+ card $CARD
+ device 2
+ }
+}
diff --git a/src/conf/cards/STM32MP15EV.conf b/src/conf/cards/STM32MP15EV.conf
new file mode 100644
index 0000000..fc2e57e
--- /dev/null
+++ b/src/conf/cards/STM32MP15EV.conf
@@ -0,0 +1,64 @@
+<confdir:pcm/front.conf>
+
+STM32MP15EV.pcm.front.0 {
+ @args [ CARD ]
+ @args.CARD { type string }
+ type asym
+ playback.pcm {
+ type hw
+ card $CARD
+ device 0
+ }
+}
+
+<confdir:pcm/default.conf>
+
+STM32MP15EV.pcm.default {
+ @args [ CARD ]
+ @args.CARD { type string }
+ type asym
+ playback.pcm {
+ type hw
+ card $CARD
+ device 0
+ }
+ capture.pcm {
+ type hw
+ card $CARD
+ device 1
+ }
+}
+
+<confdir:pcm/iec958.conf>
+
+STM32MP15EV.pcm.iec958.0 {
+ @args [ CARD AES0 AES1 AES2 AES3 ]
+ @args.CARD { type string }
+ @args.AES0 { type integer }
+ @args.AES1 { type integer }
+ @args.AES2 { type integer }
+ @args.AES3 { type integer }
+ type asym
+ playback.pcm {
+ type iec958
+ slave.pcm {
+ type hw
+ card $CARD
+ device 2
+ }
+ type hooks
+ hooks.0 {
+ type ctl_elems
+ hook_args [
+ {
+ interface PCM
+ name "IEC958 Playback Default"
+ device 2
+ lock true
+ preserve true
+ value [ $AES0 $AES1 $AES2 $AES3 ]
+ }
+ ]
+ }
+ }
+}
diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
index 7e352f7..b282549 100644
--- a/src/conf/cards/aliases.conf
+++ b/src/conf/cards/aliases.conf
@@ -57,6 +57,8 @@ CMI8786 cards.CMI8788
CMI8787 cards.CMI8788
pistachio cards.pistachio-card
VC4-HDMI cards.vc4-hdmi
+STM32MP15-EV cards.STM32MP15EV
+STM32MP15-DK cards.STM32MP15DK
<confdir:ctl/default.conf>
<confdir:pcm/default.conf>
--
2.25.1