aboutsummaryrefslogtreecommitdiffstats
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
meta-freescale-f8517afc7a5ada4538b3b7d397fa32586d57ffe5.tar.bz2
meta-freescale-f8517afc7a5ada4538b3b7d397fa32586d57ffe5.zip
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 @@
+From e99c36dfdce3e0f393eeaca6c2790b566f72d6a8 Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <b02247@freescale.com>
+Date: Thu, 5 Jun 2014 17:37:47 +0800
+Subject: [PATCH] add conf for multichannel support in imx
+
+Upstream Status: Inappropriate [platform specific]
+
+Signed-off-by: Shengjiu Wang <b02247@freescale.com>
+---
+ src/conf/cards/CS42888.conf | 94 ++++++++++++++++++++++++++++++++++++++++++++
+ src/conf/cards/IMX-HDMI.conf | 67 +++++++++++++++++++++++++++++++
+ src/conf/cards/Makefile.am | 4 +-
+ src/conf/cards/aliases.conf | 2 +
+ 4 files changed, 166 insertions(+), 1 deletion(-)
+ create mode 100644 src/conf/cards/CS42888.conf
+ create mode 100644 src/conf/cards/IMX-HDMI.conf
+
+diff --git a/src/conf/cards/CS42888.conf b/src/conf/cards/CS42888.conf
+new file mode 100644
+index 0000000..671a284
+--- /dev/null
++++ b/src/conf/cards/CS42888.conf
+@@ -0,0 +1,94 @@
++#
++# Configuration for the CS42888 chip
++#
++
++# default with dmix & dsnoop
++CS42888.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>
++
++CS42888.pcm.surround40.0 {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ slave.channels 4
++ ttable.0.0 1
++ ttable.1.2 1
++ ttable.2.1 1
++ ttable.3.3 1
++}
++
++
++<confdir:pcm/surround41.conf>
++<confdir:pcm/surround50.conf>
++<confdir:pcm/surround51.conf>
++
++CS42888.pcm.surround51.0 {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ slave.channels 6
++ ttable.0.0 1
++ ttable.1.3 1
++ ttable.2.1 1
++ ttable.3.4 1
++ ttable.4.2 1
++ ttable.5.5 1
++}
++
++<confdir:pcm/surround71.conf>
++
++CS42888.pcm.surround71.0 {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ slave.channels 8
++ ttable.0.0 1
++ ttable.1.4 1
++ ttable.2.1 1
++ ttable.3.5 1
++ ttable.4.2 1
++ ttable.5.6 1
++ ttable.6.3 1
++ ttable.7.7 1
++}
++
++# vim: ft=alsaconf
+diff --git a/src/conf/cards/IMX-HDMI.conf b/src/conf/cards/IMX-HDMI.conf
+new file mode 100644
+index 0000000..a51509e
+--- /dev/null
++++ b/src/conf/cards/IMX-HDMI.conf
+@@ -0,0 +1,67 @@
++#
++# Configuration for the CS42888 chip
++#
++
++# default with dmix & dsnoop
++IMX-HDMI.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>
++
++IMX-HDMI.pcm.surround40.0 {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type hw
++ card $CARD
++ channels 4
++}
++
++
++<confdir:pcm/surround41.conf>
++<confdir:pcm/surround50.conf>
++<confdir:pcm/surround51.conf>
++
++IMX-HDMI.pcm.surround51.0 {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type hw
++ card $CARD
++ channels 6
++}
++
++<confdir:pcm/surround71.conf>
++
++IMX-HDMI.pcm.surround71.0 {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type hw
++ card $CARD
++ channels 8
++}
++
++# vim: ft=alsaconf
+diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
+index ee7991b..b08acae 100644
+--- a/src/conf/cards/Makefile.am
++++ b/src/conf/cards/Makefile.am
+@@ -54,7 +54,9 @@ cfg_files = aliases.conf \
+ VIA8237.conf \
+ VX222.conf \
+ VXPocket.conf \
+- VXPocket440.conf
++ VXPocket440.conf \
++ CS42888.conf \
++ IMX-HDMI.conf
+
+ if BUILD_ALISP
+ cfg_files += aliases.alisp
+diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
+index 4a92fb2..46430c2 100644
+--- a/src/conf/cards/aliases.conf
++++ b/src/conf/cards/aliases.conf
+@@ -55,6 +55,8 @@ AV100 cards.CMI8788
+ AV200 cards.CMI8788
+ CMI8786 cards.CMI8788
+ CMI8787 cards.CMI8788
++cs42888-audio cards.CS42888
++imx-hdmi-soc cards.IMX-HDMI
+
+ <confdir:pcm/default.conf>
+ <confdir:pcm/dmix.conf>
+--
+1.8.0
+
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 @@
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append_mx6 = " file://0001-add-conf-for-multichannel-support-in-imx.patch \
+"
+PACKAGE_ARCH_mx6 = "${MACHINE_SOCARCH}"
+
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 @@
+From 9acab46fe307ec71d4a4dbe447e356f90b6a4a09 Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <shengjiu.wang@freescale.com>
+Date: Fri, 12 Dec 2014 14:58:06 +0800
+Subject: [PATCH] [asrc_pair] update output buffer size
+
+When input size larger than DMA_MAX_BYTES the output size should be updated.
+Otherwise the asrc have will not have enough data, then it will be timeout.
+
+Upstream Status: Inappropriate [platform specific]
+
+Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
+---
+ asrc/asrc_pair.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/asrc/asrc_pair.c b/asrc/asrc_pair.c
+index e3df027..e74e8b1 100644
+--- a/asrc/asrc_pair.c
++++ b/asrc/asrc_pair.c
+@@ -139,7 +139,7 @@ asrc_pair *asrc_pair_create(unsigned int channels, ssize_t in_period_frames,
+ config.dma_buffer_size = dma_buffer_size;
+ config.input_sample_rate = in_rate;
+ config.output_sample_rate = out_rate;
+- config.buffer_num = 1;
++ config.buffer_num = buf_num;
+ config.input_word_width = ASRC_WIDTH_16_BIT;
+ config.output_word_width = ASRC_WIDTH_16_BIT;
+ config.inclk = INCLK_NONE;
+@@ -303,8 +303,13 @@ void asrc_pair_convert_s16(asrc_pair *pair, const int16_t *src, unsigned int src
+
+ while (src_left > 0)
+ {
+- in_len = src_left > pair->buf_size ? pair->buf_size : src_left;
+- out_len = dst_left;
++ if (src_left > pair->buf_size) {
++ in_len = pair->buf_size;
++ out_len = dst_left * in_len/src_left;
++ } else {
++ in_len = src_left;
++ out_len = dst_left;
++ }
+
+ buf_info.input_buffer_vaddr = s;
+ buf_info.input_buffer_length = in_len;
+--
+1.9.1
+
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 @@
+# Copyright (C) 2013 Freescale Semiconductor
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Freescale alsa-lib plugins"
+LICENSE = "GPLv2"
+SECTION = "multimedia"
+DEPENDS = "alsa-lib virtual/kernel"
+
+# Make sure kernel sources are available
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
+
+LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+inherit autotools pkgconfig
+
+SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "b1ca7a250a8cd5da07062081b30b4118"
+SRC_URI[sha256sum] = "902df92255d755e8eb08b3c3db0c7b9d70d26d9659b219373bee425ffdc34245"
+
+SRC_URI_append_mx6 = " file://0001-asrc_pair-update-output-buffer-size.patch"
+
+INCLUDE_DIR = "-I${STAGING_KERNEL_DIR}/include/uapi -I${STAGING_KERNEL_DIR}/include"
+
+EXTRA_OECONF = "CFLAGS="${INCLUDE_DIR}""
+
+INSANE_SKIP_${PN} = "dev-so"
+
+FILES_${PN} += "${libdir}/alsa-lib/libasound_*.so"
+FILES_${PN}-dbg += "${libdir}/alsa-lib/.debug"
+FILES_${PN}-dev += "${libdir}/alsa-lib/*.la"
+
+COMPATIBLE_MACHINE = "(mx6)"
+PACKAGE_ARCH_mx6 = "${MACHINE_SOCARCH}"