summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/alsa
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2015-07-15 17:14:27 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2015-07-16 15:01:29 -0300
commitf8517afc7a5ada4538b3b7d397fa32586d57ffe5 (patch)
tree79349f091306d1760fd4687e62336ffa8fb8c721 /recipes-multimedia/alsa
parentc92b415d653afc55f33b6b93fb9248193bfd4fa0 (diff)
downloadmeta-freescale-f8517afc7a5ada4538b3b7d397fa32586d57ffe5.tar.gz
Move meta-fsl-arm content to layer root
The meta-fsl-arm is going to be used as the base for this layer. It contains a clean history and allowing a more granullar set of changes. This commit is just a rename of all contents of meta-fsl-arm subdirectory to this layer's root, subsequent changes are based on top of that. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-multimedia/alsa')
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch221
-rw-r--r--recipes-multimedia/alsa/alsa-lib_%.bbappend7
-rw-r--r--recipes-multimedia/alsa/fsl-alsa-plugins/0001-asrc_pair-update-output-buffer-size.patch47
-rw-r--r--recipes-multimedia/alsa/fsl-alsa-plugins_1.0.25.bb33
4 files changed, 308 insertions, 0 deletions
diff --git a/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch b/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch
new file mode 100644
index 00000000..32b31953
--- /dev/null
+++ b/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch
@@ -0,0 +1,221 @@
1From e99c36dfdce3e0f393eeaca6c2790b566f72d6a8 Mon Sep 17 00:00:00 2001
2From: Shengjiu Wang <b02247@freescale.com>
3Date: Thu, 5 Jun 2014 17:37:47 +0800
4Subject: [PATCH] add conf for multichannel support in imx
5
6Upstream Status: Inappropriate [platform specific]
7
8Signed-off-by: Shengjiu Wang <b02247@freescale.com>
9---
10 src/conf/cards/CS42888.conf | 94 ++++++++++++++++++++++++++++++++++++++++++++
11 src/conf/cards/IMX-HDMI.conf | 67 +++++++++++++++++++++++++++++++
12 src/conf/cards/Makefile.am | 4 +-
13 src/conf/cards/aliases.conf | 2 +
14 4 files changed, 166 insertions(+), 1 deletion(-)
15 create mode 100644 src/conf/cards/CS42888.conf
16 create mode 100644 src/conf/cards/IMX-HDMI.conf
17
18diff --git a/src/conf/cards/CS42888.conf b/src/conf/cards/CS42888.conf
19new file mode 100644
20index 0000000..671a284
21--- /dev/null
22+++ b/src/conf/cards/CS42888.conf
23@@ -0,0 +1,94 @@
24+#
25+# Configuration for the CS42888 chip
26+#
27+
28+# default with dmix & dsnoop
29+CS42888.pcm.default {
30+ @args [ CARD ]
31+ @args.CARD {
32+ type string
33+ }
34+ type asym
35+ playback.pcm {
36+ type plug
37+ slave.pcm {
38+ @func concat
39+ strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]
40+ }
41+ }
42+ capture.pcm {
43+ type plug
44+ slave.pcm {
45+ @func concat
46+ strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ]
47+ }
48+ }
49+}
50+
51+<confdir:pcm/surround40.conf>
52+
53+CS42888.pcm.surround40.0 {
54+ @args [ CARD ]
55+ @args.CARD {
56+ type string
57+ }
58+ type plug
59+ slave.pcm {
60+ type hw
61+ card $CARD
62+ }
63+ slave.channels 4
64+ ttable.0.0 1
65+ ttable.1.2 1
66+ ttable.2.1 1
67+ ttable.3.3 1
68+}
69+
70+
71+<confdir:pcm/surround41.conf>
72+<confdir:pcm/surround50.conf>
73+<confdir:pcm/surround51.conf>
74+
75+CS42888.pcm.surround51.0 {
76+ @args [ CARD ]
77+ @args.CARD {
78+ type string
79+ }
80+ type plug
81+ slave.pcm {
82+ type hw
83+ card $CARD
84+ }
85+ slave.channels 6
86+ ttable.0.0 1
87+ ttable.1.3 1
88+ ttable.2.1 1
89+ ttable.3.4 1
90+ ttable.4.2 1
91+ ttable.5.5 1
92+}
93+
94+<confdir:pcm/surround71.conf>
95+
96+CS42888.pcm.surround71.0 {
97+ @args [ CARD ]
98+ @args.CARD {
99+ type string
100+ }
101+ type plug
102+ slave.pcm {
103+ type hw
104+ card $CARD
105+ }
106+ slave.channels 8
107+ ttable.0.0 1
108+ ttable.1.4 1
109+ ttable.2.1 1
110+ ttable.3.5 1
111+ ttable.4.2 1
112+ ttable.5.6 1
113+ ttable.6.3 1
114+ ttable.7.7 1
115+}
116+
117+# vim: ft=alsaconf
118diff --git a/src/conf/cards/IMX-HDMI.conf b/src/conf/cards/IMX-HDMI.conf
119new file mode 100644
120index 0000000..a51509e
121--- /dev/null
122+++ b/src/conf/cards/IMX-HDMI.conf
123@@ -0,0 +1,67 @@
124+#
125+# Configuration for the CS42888 chip
126+#
127+
128+# default with dmix & dsnoop
129+IMX-HDMI.pcm.default {
130+ @args [ CARD ]
131+ @args.CARD {
132+ type string
133+ }
134+ type asym
135+ playback.pcm {
136+ type plug
137+ slave.pcm {
138+ @func concat
139+ strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]
140+ }
141+ }
142+ capture.pcm {
143+ type plug
144+ slave.pcm {
145+ @func concat
146+ strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ]
147+ }
148+ }
149+}
150+
151+<confdir:pcm/surround40.conf>
152+
153+IMX-HDMI.pcm.surround40.0 {
154+ @args [ CARD ]
155+ @args.CARD {
156+ type string
157+ }
158+ type hw
159+ card $CARD
160+ channels 4
161+}
162+
163+
164+<confdir:pcm/surround41.conf>
165+<confdir:pcm/surround50.conf>
166+<confdir:pcm/surround51.conf>
167+
168+IMX-HDMI.pcm.surround51.0 {
169+ @args [ CARD ]
170+ @args.CARD {
171+ type string
172+ }
173+ type hw
174+ card $CARD
175+ channels 6
176+}
177+
178+<confdir:pcm/surround71.conf>
179+
180+IMX-HDMI.pcm.surround71.0 {
181+ @args [ CARD ]
182+ @args.CARD {
183+ type string
184+ }
185+ type hw
186+ card $CARD
187+ channels 8
188+}
189+
190+# vim: ft=alsaconf
191diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
192index ee7991b..b08acae 100644
193--- a/src/conf/cards/Makefile.am
194+++ b/src/conf/cards/Makefile.am
195@@ -54,7 +54,9 @@ cfg_files = aliases.conf \
196 VIA8237.conf \
197 VX222.conf \
198 VXPocket.conf \
199- VXPocket440.conf
200+ VXPocket440.conf \
201+ CS42888.conf \
202+ IMX-HDMI.conf
203
204 if BUILD_ALISP
205 cfg_files += aliases.alisp
206diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
207index 4a92fb2..46430c2 100644
208--- a/src/conf/cards/aliases.conf
209+++ b/src/conf/cards/aliases.conf
210@@ -55,6 +55,8 @@ AV100 cards.CMI8788
211 AV200 cards.CMI8788
212 CMI8786 cards.CMI8788
213 CMI8787 cards.CMI8788
214+cs42888-audio cards.CS42888
215+imx-hdmi-soc cards.IMX-HDMI
216
217 <confdir:pcm/default.conf>
218 <confdir:pcm/dmix.conf>
219--
2201.8.0
221
diff --git a/recipes-multimedia/alsa/alsa-lib_%.bbappend b/recipes-multimedia/alsa/alsa-lib_%.bbappend
new file mode 100644
index 00000000..9d95e680
--- /dev/null
+++ b/recipes-multimedia/alsa/alsa-lib_%.bbappend
@@ -0,0 +1,7 @@
1
2FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
3
4SRC_URI_append_mx6 = " file://0001-add-conf-for-multichannel-support-in-imx.patch \
5"
6PACKAGE_ARCH_mx6 = "${MACHINE_SOCARCH}"
7
diff --git a/recipes-multimedia/alsa/fsl-alsa-plugins/0001-asrc_pair-update-output-buffer-size.patch b/recipes-multimedia/alsa/fsl-alsa-plugins/0001-asrc_pair-update-output-buffer-size.patch
new file mode 100644
index 00000000..d76c74d4
--- /dev/null
+++ b/recipes-multimedia/alsa/fsl-alsa-plugins/0001-asrc_pair-update-output-buffer-size.patch
@@ -0,0 +1,47 @@
1From 9acab46fe307ec71d4a4dbe447e356f90b6a4a09 Mon Sep 17 00:00:00 2001
2From: Shengjiu Wang <shengjiu.wang@freescale.com>
3Date: Fri, 12 Dec 2014 14:58:06 +0800
4Subject: [PATCH] [asrc_pair] update output buffer size
5
6When input size larger than DMA_MAX_BYTES the output size should be updated.
7Otherwise the asrc have will not have enough data, then it will be timeout.
8
9Upstream Status: Inappropriate [platform specific]
10
11Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
12---
13 asrc/asrc_pair.c | 11 ++++++++---
14 1 file changed, 8 insertions(+), 3 deletions(-)
15
16diff --git a/asrc/asrc_pair.c b/asrc/asrc_pair.c
17index e3df027..e74e8b1 100644
18--- a/asrc/asrc_pair.c
19+++ b/asrc/asrc_pair.c
20@@ -139,7 +139,7 @@ asrc_pair *asrc_pair_create(unsigned int channels, ssize_t in_period_frames,
21 config.dma_buffer_size = dma_buffer_size;
22 config.input_sample_rate = in_rate;
23 config.output_sample_rate = out_rate;
24- config.buffer_num = 1;
25+ config.buffer_num = buf_num;
26 config.input_word_width = ASRC_WIDTH_16_BIT;
27 config.output_word_width = ASRC_WIDTH_16_BIT;
28 config.inclk = INCLK_NONE;
29@@ -303,8 +303,13 @@ void asrc_pair_convert_s16(asrc_pair *pair, const int16_t *src, unsigned int src
30
31 while (src_left > 0)
32 {
33- in_len = src_left > pair->buf_size ? pair->buf_size : src_left;
34- out_len = dst_left;
35+ if (src_left > pair->buf_size) {
36+ in_len = pair->buf_size;
37+ out_len = dst_left * in_len/src_left;
38+ } else {
39+ in_len = src_left;
40+ out_len = dst_left;
41+ }
42
43 buf_info.input_buffer_vaddr = s;
44 buf_info.input_buffer_length = in_len;
45--
461.9.1
47
diff --git a/recipes-multimedia/alsa/fsl-alsa-plugins_1.0.25.bb b/recipes-multimedia/alsa/fsl-alsa-plugins_1.0.25.bb
new file mode 100644
index 00000000..af552701
--- /dev/null
+++ b/recipes-multimedia/alsa/fsl-alsa-plugins_1.0.25.bb
@@ -0,0 +1,33 @@
1# Copyright (C) 2013 Freescale Semiconductor
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4DESCRIPTION = "Freescale alsa-lib plugins"
5LICENSE = "GPLv2"
6SECTION = "multimedia"
7DEPENDS = "alsa-lib virtual/kernel"
8
9# Make sure kernel sources are available
10do_configure[depends] += "virtual/kernel:do_shared_workdir"
11
12LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
13
14inherit autotools pkgconfig
15
16SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.tar.gz"
17SRC_URI[md5sum] = "b1ca7a250a8cd5da07062081b30b4118"
18SRC_URI[sha256sum] = "902df92255d755e8eb08b3c3db0c7b9d70d26d9659b219373bee425ffdc34245"
19
20SRC_URI_append_mx6 = " file://0001-asrc_pair-update-output-buffer-size.patch"
21
22INCLUDE_DIR = "-I${STAGING_KERNEL_DIR}/include/uapi -I${STAGING_KERNEL_DIR}/include"
23
24EXTRA_OECONF = "CFLAGS="${INCLUDE_DIR}""
25
26INSANE_SKIP_${PN} = "dev-so"
27
28FILES_${PN} += "${libdir}/alsa-lib/libasound_*.so"
29FILES_${PN}-dbg += "${libdir}/alsa-lib/.debug"
30FILES_${PN}-dev += "${libdir}/alsa-lib/*.la"
31
32COMPATIBLE_MACHINE = "(mx6)"
33PACKAGE_ARCH_mx6 = "${MACHINE_SOCARCH}"