aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch
blob: b25aa910e0c8c3f3a1cde7c854d8aef7c648f73f (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
From d78b7e2b964c9713c2e9889f4ec85922528ba971 Mon Sep 17 00:00:00 2001
From: Shengjiu Wang <shengjiu.wang@nxp.com>
Date: Wed, 31 Jan 2018 15:06:53 +0800
Subject: [PATCH] add ak4458 conf for multichannel support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

one limitation is that ALSA and pulseaudio only support
maximum 8 channels, but ak4458 may support 16 channels

Upstream-Status: Inappropriate [i.MX specific]

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>

---
 src/conf/cards/AK4458.conf  | 74 +++++++++++++++++++++++++++++++++++++
 src/conf/cards/Makefile.am  |  3 +-
 src/conf/cards/aliases.conf |  1 +
 3 files changed, 77 insertions(+), 1 deletion(-)
 create mode 100644 src/conf/cards/AK4458.conf

diff --git a/src/conf/cards/AK4458.conf b/src/conf/cards/AK4458.conf
new file mode 100644
index 0000000..3b5b195
--- /dev/null
+++ b/src/conf/cards/AK4458.conf
@@ -0,0 +1,74 @@
+#
+# Configuration for the AK4458 chip
+#
+
+# default with dmix & dsnoop
+AK4458.pcm.default {
+	@args [ CARD ]
+	@args.CARD {
+		type string
+	}
+	type asym
+	playback.pcm {
+		type plug
+		slave.pcm {
+			@func concat
+			strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]
+		}
+	}
+	capture.pcm {
+		type plug
+		slave.pcm {
+			@func concat
+			strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ]
+		}
+	}
+}
+
+<confdir:pcm/surround40.conf>
+
+AK4458.pcm.surround40.0 {
+	@args [ CARD ]
+	@args.CARD {
+		type string
+	}
+	type plug
+	slave.pcm {
+		type hw
+		card $CARD
+	}
+	slave.channels 4
+}
+
+
+<confdir:pcm/surround41.conf>
+<confdir:pcm/surround50.conf>
+<confdir:pcm/surround51.conf>
+
+AK4458.pcm.surround51.0 {
+	@args [ CARD ]
+	@args.CARD {
+		type string
+	}
+	type plug
+	slave.pcm {
+		type hw
+		card $CARD
+	}
+	slave.channels 6
+}
+
+<confdir:pcm/surround71.conf>
+
+AK4458.pcm.surround71.0 {
+	@args [ CARD ]
+	@args.CARD {
+		type string
+	}
+	type plug
+	slave.pcm {
+		type hw
+		card $CARD
+	}
+	slave.channels 8
+}
diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
index fbf0697..34fa5a3 100644
--- a/src/conf/cards/Makefile.am
+++ b/src/conf/cards/Makefile.am
@@ -60,7 +60,8 @@ cfg_files = aliases.conf \
 	VXPocket.conf \
 	VXPocket440.conf \
 	CS42888.conf \
-	IMX-HDMI.conf
+	IMX-HDMI.conf \
+	AK4458.conf
 
 if BUILD_ALISP
 cfg_files += aliases.alisp
diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
index a9e6d76..2f0a22a 100644
--- a/src/conf/cards/aliases.conf
+++ b/src/conf/cards/aliases.conf
@@ -59,6 +59,7 @@ pistachio cards.pistachio-card
 VC4-HDMI cards.vc4-hdmi
 imx-cs42888 cards.CS42888
 imx-hdmi-soc cards.IMX-HDMI
+ak4458-audio cards.AK4458
 
 <confdir:ctl/default.conf>
 <confdir:pcm/default.conf>