From 0c54a55958a029e877f52148a138132d4bb664ef Mon Sep 17 00:00:00 2001
From: Olivier Moysan <olivier.moysan@st.com>
Date: Thu, 25 Apr 2019 11:47:16 +0200
Subject: [PATCH 1/1] 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 00999f0186d6..c29d83144b31 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 000000000000..b57cc69084ff
--- /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 000000000000..fc2e57e48746
--- /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 18a920f41e46..30ce4d86a8e1 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:pcm/default.conf>
 <confdir:pcm/dmix.conf>
-- 
2.17.1

