aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch
blob: 1f558185dfba4743736ecd92d4b92bd02943509c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
From 36aae65dc913e1ebe72366d7ae361897d465e88d Mon Sep 17 00:00:00 2001
From: Viorel Suman <viorel.suman@nxp.com>
Date: Mon, 9 Mar 2020 14:25:46 +0200
Subject: [PATCH] add conf for iMX XCVR sound card

Upstream-Status: Pending

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>

---
 src/conf/cards/IMX-XCVR.conf | 39 ++++++++++++++++++++++++++++++++++++
 src/conf/cards/Makefile.am   |  3 ++-
 src/conf/cards/aliases.conf  |  1 +
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100755 src/conf/cards/IMX-XCVR.conf

diff --git a/src/conf/cards/IMX-XCVR.conf b/src/conf/cards/IMX-XCVR.conf
new file mode 100755
index 0000000..009000c
--- /dev/null
+++ b/src/conf/cards/IMX-XCVR.conf
@@ -0,0 +1,39 @@
+#
+# Configuration for the IMX-XCVR sound card using software IEC958
+# subframe conversion
+#
+IMX-XCVR.pcm.default {
+	@args [ CARD ]
+	@args.CARD { type string }
+	type plug
+	slave.pcm {
+		@func concat
+		strings [ "iec958:" $CARD ]
+	}
+}
+
+<confdir:pcm/iec958.conf>
+
+IMX-XCVR.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 iec958
+	slave {
+		format IEC958_SUBFRAME_LE
+		pcm {
+			type plug
+			slave.pcm {
+				type hw
+				card $CARD
+			}
+		}
+	}
+	status [ $AES0 $AES1 $AES2 $AES3 ]
+	preamble.z 0x0
+	preamble.x 0x1
+	preamble.y 0x3
+}
diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
index 34fa5a3..70b9bab 100644
--- a/src/conf/cards/Makefile.am
+++ b/src/conf/cards/Makefile.am
@@ -61,7 +61,8 @@ cfg_files = aliases.conf \
 	VXPocket440.conf \
 	CS42888.conf \
 	IMX-HDMI.conf \
-	AK4458.conf
+	AK4458.conf \
+	IMX-XCVR.conf
 
 if BUILD_ALISP
 cfg_files += aliases.alisp
diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
index 2f0a22a..e824145 100644
--- a/src/conf/cards/aliases.conf
+++ b/src/conf/cards/aliases.conf
@@ -60,6 +60,7 @@ VC4-HDMI cards.vc4-hdmi
 imx-cs42888 cards.CS42888
 imx-hdmi-soc cards.IMX-HDMI
 ak4458-audio cards.AK4458
+imx-audio-xcvr cards.IMX-XCVR
 
 <confdir:ctl/default.conf>
 <confdir:pcm/default.conf>