Add alsa card configuration for stm32mp machine

Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com>
This commit is contained in:
Christophe Priouzeau 2019-02-04 15:37:34 +01:00
parent 5d3e67e0c1
commit acdb06a727
2 changed files with 168 additions and 0 deletions

View File

@ -0,0 +1,164 @@
From aedc2bda681ddc3ba59682bf3dd24e6588a93670 Mon Sep 17 00:00:00 2001
From: Olivier Moysan <olivier.moysan@st.com>
Date: Wed, 12 Dec 2018 16:00:08 +0100
Subject: [PATCH 1/1] conf: add card configs for stm32mp1 boards
Add card configuration files for STM32MP1x-EV
and STM32MP1x-DK boards.
Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
---
src/conf/cards/Makefile.am | 4 ++-
src/conf/cards/STM32MP1DK.conf | 34 +++++++++++++++++++++
src/conf/cards/STM32MP1EV.conf | 69 ++++++++++++++++++++++++++++++++++++++++++
src/conf/cards/aliases.conf | 2 ++
4 files changed, 108 insertions(+), 1 deletion(-)
create mode 100644 src/conf/cards/STM32MP1DK.conf
create mode 100644 src/conf/cards/STM32MP1EV.conf
diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
index 00999f0186d6..e565357df72c 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 \
+ STM32MP1EV.conf \
+ STM32MP1DK.conf
if BUILD_ALISP
cfg_files += aliases.alisp
diff --git a/src/conf/cards/STM32MP1DK.conf b/src/conf/cards/STM32MP1DK.conf
new file mode 100644
index 000000000000..7c7d9216e5bd
--- /dev/null
+++ b/src/conf/cards/STM32MP1DK.conf
@@ -0,0 +1,34 @@
+<confdir:pcm/front.conf>
+
+STM32MP1DK.pcm.front.0 {
+ @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>
+
+STM32MP1DK.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/STM32MP1EV.conf b/src/conf/cards/STM32MP1EV.conf
new file mode 100644
index 000000000000..56b4bf419c8b
--- /dev/null
+++ b/src/conf/cards/STM32MP1EV.conf
@@ -0,0 +1,69 @@
+<confdir:pcm/front.conf>
+
+STM32MP1EV.pcm.front.0 {
+ @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/default.conf>
+
+STM32MP1EV.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>
+
+STM32MP1EV.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..e6e1e5201cdf 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
+STM32MP1-EV cards.STM32MP1EV
+STM32MP1-DK cards.STM32MP1DK
<confdir:pcm/default.conf>
<confdir:pcm/dmix.conf>
--
2.7.4

View File

@ -0,0 +1,4 @@
FILESEXTRAPATHS_prepend_stm32mpcommon := "${THISDIR}/${PN}:"
SRC_URI_append_stm32mpcommon = " \
file://0001-conf-add-card-configs-for-stm32mp1-boards.patch \
"