aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/alsa/alsa-lib
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/alsa/alsa-lib')
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch18
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch41
-rwxr-xr-xrecipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch69
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch35
-rw-r--r--[-rwxr-xr-x]recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch86
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0007-add-conf-for-imx-cs42448-sound-card.patch107
6 files changed, 203 insertions, 153 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 747b62c5..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
@@ -1,14 +1,15 @@
-From cc06048dcd722049f92ab17958760bd798fb4781 Mon Sep 17 00:00:00 2001
+From 49a7eac8e02c33cae8a168e6d22d9ff8aaf86d44 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]
+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/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(-)
@@ -204,18 +205,15 @@ index 00999f0..fbf0697 100644
if BUILD_ALISP
cfg_files += aliases.alisp
diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
-index 18a920f..2c422ee 100644
+index 7e352f7..a9e6d76 100644
--- a/src/conf/cards/aliases.conf
+++ b/src/conf/cards/aliases.conf
@@ -57,6 +57,8 @@ CMI8786 cards.CMI8788
CMI8787 cards.CMI8788
pistachio cards.pistachio-card
VC4-HDMI cards.vc4-hdmi
-+cs42888-audio cards.CS42888
++imx-cs42888 cards.CS42888
+imx-hdmi-soc cards.IMX-HDMI
+ <confdir:ctl/default.conf>
<confdir:pcm/default.conf>
- <confdir:pcm/dmix.conf>
---
-2.7.4
-
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 100755
index 4d28a77f..00000000
--- a/recipes-multimedia/alsa/alsa-lib/0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 93607819d90ddf9bbdad8bbbe4af5d917ca572dc 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 2/2] 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 a6a8f3a..89c07d1 100644
---- a/src/pcm/pcm_dmix.c
-+++ b/src/pcm/pcm_dmix.c
-@@ -466,9 +466,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 7cdfea2..e0b4ea7 100644
---- a/src/pcm/pcm_dshare.c
-+++ b/src/pcm/pcm_dshare.c
-@@ -261,9 +261,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 539b671..03df6ff 100644
---- a/src/pcm/pcm_dsnoop.c
-+++ b/src/pcm/pcm_dsnoop.c
-@@ -212,9 +212,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)
---
-2.7.4
-
diff --git a/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch b/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch
index a07f60d6..b25aa910 100644
--- a/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch
+++ b/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch
@@ -1,7 +1,10 @@
-From 1641ce8c724018365d7fa598f9a70c6492e7c271 Mon Sep 17 00:00:00 2001
+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
@@ -9,17 +12,19 @@ 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/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
-Index: alsa-lib-1.1.6/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
-+++ alsa-lib-1.1.6/src/conf/cards/AK4458.conf
++++ b/src/conf/cards/AK4458.conf
@@ -0,0 +1,74 @@
+#
+# Configuration for the AK4458 chip
@@ -95,10 +100,10 @@ Index: alsa-lib-1.1.6/src/conf/cards/AK4458.conf
+ }
+ slave.channels 8
+}
-Index: alsa-lib-1.1.6/src/conf/cards/Makefile.am
-===================================================================
---- alsa-lib-1.1.6.orig/src/conf/cards/Makefile.am
-+++ alsa-lib-1.1.6/src/conf/cards/Makefile.am
+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 \
@@ -109,15 +114,15 @@ Index: alsa-lib-1.1.6/src/conf/cards/Makefile.am
if BUILD_ALISP
cfg_files += aliases.alisp
-Index: alsa-lib-1.1.6/src/conf/cards/aliases.conf
-===================================================================
---- alsa-lib-1.1.6.orig/src/conf/cards/aliases.conf
-+++ alsa-lib-1.1.6/src/conf/cards/aliases.conf
+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
- cs42888-audio cards.CS42888
+ imx-cs42888 cards.CS42888
imx-hdmi-soc cards.IMX-HDMI
+ak4458-audio cards.AK4458
+ <confdir:ctl/default.conf>
<confdir:pcm/default.conf>
- <confdir:pcm/dmix.conf>
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 d72fb02c..1f558185 100755..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,24 +1,25 @@
-From 2fd2737a1a0553e164d1b4f78687edf573f8e621 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
@@ -26,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 ]
+ }
+}
+
@@ -53,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 ]
++ type iec958
++ slave {
++ format IEC958_SUBFRAME_LE
++ pcm {
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
+ }
-+ ]
+ }
+ }
-+ capture.pcm {
-+ 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
@@ -103,17 +74,14 @@ index 34fa5a3..70b9bab 100644
if BUILD_ALISP
cfg_files += aliases.alisp
diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
-index 5d92ac7..c195848 100644
+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
- cs42888-audio cards.CS42888
+ 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>
- <confdir:pcm/dmix.conf>
---
-2.7.4
-
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