aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/alsa
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/alsa')
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch2
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch41
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch67
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch76
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch107
-rw-r--r--recipes-multimedia/alsa/alsa-lib_%.bbappend10
-rw-r--r--recipes-multimedia/alsa/imx-alsa-plugins_git.bb (renamed from recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb)24
7 files changed, 195 insertions, 132 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
index 07f6e098..7d20c678 100644
--- 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
@@ -3,7 +3,7 @@ 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]
+Upstream-Status: Inappropriate [platform specific]
Signed-off-by: Shengjiu Wang <b02247@freescale.com>
diff --git a/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch b/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch
new file mode 100644
index 00000000..5ec0d2e9
--- /dev/null
+++ b/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch
@@ -0,0 +1,41 @@
+From aa4f56c3c952269c36464cc0da9db5a1381648fa Mon Sep 17 00:00:00 2001
+From: Jaroslav Kysela <perex@perex.cz>
+Date: Wed, 9 Nov 2022 08:11:42 +0100
+Subject: [PATCH] pcm: rate - fix the crash in
+
+Upstream-Status: Backport
+
+ snd_pcm_rate_may_wait_for_avail_min()
+
+The pcm argument passed to the conversion function in
+snd_pcm_plugin_may_wait_for_avail_min_conv() should be
+pcm->fast_op_arg.
+
+Test command: arecord -Dplughw:x -r12000 -c2 -fS16_LE -M temp.wav
+
+Fixes: d9dbb57b ("pcm: rate - rewrite the may_wait_for_avail_min callback for the rate plugin")
+
+BugLink: https://lore.kernel.org/alsa-devel/1667793912-18957-1-git-send-email-shengjiu.wang@nxp.com/
+Fixes: https://github.com/alsa-project/alsa-lib/issues/282
+Reported-by: Shengjiu Wang <shengjiu.wang@nxp.com>
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+---
+ src/pcm/pcm_plugin.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
+index 6bb90b8b..ec64604c 100644
+--- a/src/pcm/pcm_plugin.c
++++ b/src/pcm/pcm_plugin.c
+@@ -622,7 +622,7 @@ int snd_pcm_plugin_may_wait_for_avail_min_conv(
+ * This code is also used by extplug, but extplug does not allow to alter the sampling rate.
+ */
+ if (conv)
+- needed_slave_avail_min = conv(pcm, needed_slave_avail_min);
++ needed_slave_avail_min = conv(pcm->fast_op_arg, needed_slave_avail_min);
+
+ if (slave->avail_min != needed_slave_avail_min) {
+ snd_pcm_sw_params_t *swparams;
+--
+2.34.1
+
diff --git a/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch b/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch
deleted file mode 100644
index 896d9426..00000000
--- a/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 09c1a959e7d007e00741606f69444c1f865a4beb Mon Sep 17 00:00:00 2001
-From: Shengjiu Wang <shengjiu.wang@freescale.com>
-Date: Tue, 10 May 2016 15:09:26 +0800
-Subject: [PATCH] pcm: Don't store the state for SND_PCM_STATE_SUSPENDED
-
-The resume function don't update the dmix->state, if store SUSPENDED
-state in snd_pcm_dmix_state, the write function after resume will
-return error -ESTRPIPE, because the snd_pcm_write_areas() will check
-the state of the pcm device.
-This patch remove the store SND_PCM_STATE_SUSPENDED state operation
-for dmix,dshare,dsnoop.
-
-Upstream-Status: Pending
-
-Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
-
----
- src/pcm/pcm_dmix.c | 2 +-
- src/pcm/pcm_dshare.c | 2 +-
- src/pcm/pcm_dsnoop.c | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c
-index 608593f..3d068c7 100644
---- a/src/pcm/pcm_dmix.c
-+++ b/src/pcm/pcm_dmix.c
-@@ -460,9 +460,9 @@ static snd_pcm_state_t snd_pcm_dmix_state(snd_pcm_t *pcm)
- snd_pcm_state_t state;
- state = snd_pcm_state(dmix->spcm);
- switch (state) {
-- case SND_PCM_STATE_SUSPENDED:
- case SND_PCM_STATE_DISCONNECTED:
- dmix->state = state;
-+ case SND_PCM_STATE_SUSPENDED:
- return state;
- case SND_PCM_STATE_XRUN:
- if ((err = snd_pcm_direct_slave_recover(dmix)) < 0)
-diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c
-index a918512..18071fb 100644
---- a/src/pcm/pcm_dshare.c
-+++ b/src/pcm/pcm_dshare.c
-@@ -258,9 +258,9 @@ static snd_pcm_state_t snd_pcm_dshare_state(snd_pcm_t *pcm)
- snd_pcm_state_t state;
- state = snd_pcm_state(dshare->spcm);
- switch (state) {
-- case SND_PCM_STATE_SUSPENDED:
- case SND_PCM_STATE_DISCONNECTED:
- dshare->state = state;
-+ case SND_PCM_STATE_SUSPENDED:
- return state;
- case SND_PCM_STATE_XRUN:
- if ((err = snd_pcm_direct_slave_recover(dshare)) < 0)
-diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c
-index 2c3b9f4..3b711ab 100644
---- a/src/pcm/pcm_dsnoop.c
-+++ b/src/pcm/pcm_dsnoop.c
-@@ -209,9 +209,9 @@ static snd_pcm_state_t snd_pcm_dsnoop_state(snd_pcm_t *pcm)
- snd_pcm_state_t state;
- state = snd_pcm_state(dsnoop->spcm);
- switch (state) {
-- case SND_PCM_STATE_SUSPENDED:
- case SND_PCM_STATE_DISCONNECTED:
- dsnoop->state = state;
-+ case SND_PCM_STATE_SUSPENDED:
- return state;
- case SND_PCM_STATE_XRUN:
- if ((err = snd_pcm_direct_slave_recover(dsnoop)) < 0)
diff --git a/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch b/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch
index bd1512e9..1f558185 100644
--- a/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch
+++ b/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch
@@ -1,25 +1,25 @@
-From cfbe756d55a303803805d3e8e3d3cf3b97866964 Mon Sep 17 00:00:00 2001
+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
+Upstream-Status: Pending
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
---
- src/conf/cards/IMX-XCVR.conf | 69 ++++++++++++++++++++++++++++++++++++
- src/conf/cards/Makefile.am | 3 +-
+ src/conf/cards/IMX-XCVR.conf | 39 ++++++++++++++++++++++++++++++++++++
+ src/conf/cards/Makefile.am | 3 ++-
src/conf/cards/aliases.conf | 1 +
- 3 files changed, 72 insertions(+), 1 deletion(-)
+ 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..ee323c7
+index 0000000..009000c
--- /dev/null
+++ b/src/conf/cards/IMX-XCVR.conf
-@@ -0,0 +1,69 @@
+@@ -0,0 +1,39 @@
+#
+# Configuration for the IMX-XCVR sound card using software IEC958
+# subframe conversion
@@ -27,21 +27,10 @@ index 0000000..ee323c7
+IMX-XCVR.pcm.default {
+ @args [ CARD ]
+ @args.CARD { type string }
-+ type asym
-+ playback.pcm {
-+ type linear
-+ slave.pcm {
-+ @func concat
-+ strings [ "iec958:" $CARD ]
-+ }
-+ slave.format S24_LE
-+ }
-+ capture.pcm {
-+ type plug
-+ slave.pcm {
-+ @func concat
-+ strings [ "iec958:" $CARD ]
-+ }
++ type plug
++ slave.pcm {
++ @func concat
++ strings [ "iec958:" $CARD ]
+ }
+}
+
@@ -54,40 +43,21 @@ index 0000000..ee323c7
+ @args.AES1 { type integer }
+ @args.AES2 { type integer }
+ @args.AES3 { type integer }
-+ type asym
-+ playback.pcm {
-+ type hooks
-+ slave.pcm {
-+ type hw
-+ card $CARD
-+ }
-+ hooks.0 {
-+ type ctl_elems
-+ hook_args [
-+ {
-+ interface PCM
-+ name "IEC958 Playback Default"
-+ preserve true
-+ optional true
-+ value [ $AES0 $AES1 $AES2 $AES3 ]
-+ }
-+ ]
-+ }
-+ }
-+ capture.pcm {
-+ type iec958
-+ slave {
-+ format IEC958_SUBFRAME_LE
-+ pcm {
-+ type plug
-+ slave.pcm {
-+ type hw
-+ card $CARD
-+ }
++ type iec958
++ slave {
++ format IEC958_SUBFRAME_LE
++ pcm {
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
+ }
+ }
-+ status [ $AES0 $AES1 $AES2 $AES3 ]
+ }
++ 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
diff --git a/recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch b/recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch
new file mode 100644
index 00000000..64e15be4
--- /dev/null
+++ b/recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch
@@ -0,0 +1,107 @@
+From 97d5e09a4166b45c567026e51b8a25ef5d7d587d Mon Sep 17 00:00:00 2001
+From: Chancel Liu <chancel.liu@nxp.com>
+Date: Fri, 29 Jul 2022 16:12:37 +0800
+Subject: [PATCH] add conf for imx-cs42448 sound card
+
+Upstream-Status: Inappropriate [i.MX specific]
+
+Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
+---
+ src/conf/cards/CS42448.conf | 58 +++++++++++++++++++++++++++++++++++++
+ src/conf/cards/Makefile.am | 3 +-
+ src/conf/cards/aliases.conf | 1 +
+ 3 files changed, 61 insertions(+), 1 deletion(-)
+ create mode 100644 src/conf/cards/CS42448.conf
+
+diff --git a/src/conf/cards/CS42448.conf b/src/conf/cards/CS42448.conf
+new file mode 100644
+index 00000000..28ba5c48
+--- /dev/null
++++ b/src/conf/cards/CS42448.conf
+@@ -0,0 +1,58 @@
++#
++# Configuration for the CS42448 chip
++#
++
++# default with dmix & dsnoop
++CS42448.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/surround51.conf>
++
++CS42448.pcm.surround51.0 {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ slave.channels 6
++}
++
++<confdir:pcm/surround71.conf>
++
++CS42448.pcm.surround71.0 {
++ @args [ CARD ]
++ @args.CARD {
++ type string
++ }
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ slave.channels 8
++}
++
++# vim: ft=alsaconf
+diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
+index 70b9bab3..6aba20b4 100644
+--- a/src/conf/cards/Makefile.am
++++ b/src/conf/cards/Makefile.am
+@@ -62,7 +62,8 @@ cfg_files = aliases.conf \
+ CS42888.conf \
+ IMX-HDMI.conf \
+ AK4458.conf \
+- IMX-XCVR.conf
++ IMX-XCVR.conf \
++ CS42448.conf
+
+ if BUILD_ALISP
+ cfg_files += aliases.alisp
+diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
+index e824145d..a40d3731 100644
+--- a/src/conf/cards/aliases.conf
++++ b/src/conf/cards/aliases.conf
+@@ -61,6 +61,7 @@ imx-cs42888 cards.CS42888
+ imx-hdmi-soc cards.IMX-HDMI
+ ak4458-audio cards.AK4458
+ imx-audio-xcvr cards.IMX-XCVR
++imx-cs42448 cards.CS42448
+
+ <confdir:ctl/default.conf>
+ <confdir:pcm/default.conf>
+--
+2.17.1
diff --git a/recipes-multimedia/alsa/alsa-lib_%.bbappend b/recipes-multimedia/alsa/alsa-lib_%.bbappend
index d76c45d1..65498aed 100644
--- a/recipes-multimedia/alsa/alsa-lib_%.bbappend
+++ b/recipes-multimedia/alsa/alsa-lib_%.bbappend
@@ -2,10 +2,14 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
IMX_PATCH = " \
file://0001-add-conf-for-multichannel-support-in-imx.patch \
- file://0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch \
file://0005-add-ak4458-conf-for-multichannel-support.patch \
file://0006-add-conf-for-iMX-XCVR-sound-card.patch \
+ file://0007-add-conf-for-imx-cs42448-sound-card.patch \
+ file://0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch \
"
-SRC_URI:append:imx = "${IMX_PATCH}"
+SRC_URI:append:imx-nxp-bsp = "${IMX_PATCH}"
-PACKAGE_ARCH:imx = "${MACHINE_SOCARCH}"
+PACKAGE_ARCH:imx-nxp-bsp = "${MACHINE_SOCARCH}"
+
+GLIBC_64BIT_TIME_FLAGS = ""
+INSANE_SKIP:append = " 32bit-time"
diff --git a/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb b/recipes-multimedia/alsa/imx-alsa-plugins_git.bb
index 96b6392d..e2acf767 100644
--- a/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb
+++ b/recipes-multimedia/alsa/imx-alsa-plugins_git.bb
@@ -1,9 +1,9 @@
-# Copyright (C) 2013-2016 Freescale Semiconductor
-# Copyright (C) 2017-2019 NXP
+# Copyright 2013-2016 Freescale Semiconductor
+# Copyright 2017-2023 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Freescale alsa-lib plugins"
-LICENSE = "GPLv2"
+LICENSE = "GPL-2.0-only"
SECTION = "multimedia"
DEPENDS = "alsa-lib"
@@ -13,13 +13,15 @@ RREPLACES:${PN} = "fsl-alsa-plugins"
RPROVIDES:${PN} = "fsl-alsa-plugins"
RCONFLICTS:${PN} = "fsl-alsa-plugins"
-LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
inherit autotools pkgconfig use-imx-headers
-SRCBRANCH = "MM_04.05.01_1909_L4.19.35"
-SRC_URI = "git://source.codeaurora.org/external/imx/imx-alsa-plugins.git;protocol=https;branch=${SRCBRANCH}"
-SRCREV = "cde60d68ab2acee913dbfacb8aabb53d87dd3e38"
+PV = "1.0.26+${SRCPV}"
+
+SRC_URI = "git://github.com/nxp-imx/imx-alsa-plugins.git;protocol=https;branch=${SRCBRANCH}"
+SRCBRANCH = "MM_04.08.03_2312_L6.6.y"
+SRCREV = "b2ba082e70333f187972ee4e85f63f9d2f608331"
S = "${WORKDIR}/git"
@@ -27,10 +29,16 @@ INCLUDE_DIR = "-I${STAGING_INCDIR_IMX}"
EXTRA_OECONF = "CFLAGS="${INCLUDE_DIR}""
+PACKAGECONFIG ??= "${PACKAGECONFIG_SWPDM}"
+PACKAGECONFIG_SWPDM = ""
+PACKAGECONFIG_SWPDM:mx8-nxp-bsp = "swpdm"
+
+PACKAGECONFIG[swpdm] = "--enable-swpdm,--disable-swpdm,imx-sw-pdm"
+
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|mx7|mx8)"
+COMPATIBLE_MACHINE = "(imx-nxp-bsp)"