diff --git a/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch b/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch new file mode 100755 index 000000000..87c0311ed --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0001-add-conf-for-multichannel-support-in-imx.patch @@ -0,0 +1,221 @@ +From cc06048dcd722049f92ab17958760bd798fb4781 Mon Sep 17 00:00:00 2001 +From: Shengjiu Wang +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 +--- + 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" ] ++ } ++ } ++} ++ ++ ++ ++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 ++} ++ ++ ++ ++ ++ ++ ++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 ++} ++ ++ ++ ++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" ] ++ } ++ } ++} ++ ++ ++ ++IMX-HDMI.pcm.surround40.0 { ++ @args [ CARD ] ++ @args.CARD { ++ type string ++ } ++ type hw ++ card $CARD ++ channels 4 ++} ++ ++ ++ ++ ++ ++ ++IMX-HDMI.pcm.surround51.0 { ++ @args [ CARD ] ++ @args.CARD { ++ type string ++ } ++ type hw ++ card $CARD ++ channels 6 ++} ++ ++ ++ ++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 00999f0..fbf0697 100644 +--- a/src/conf/cards/Makefile.am ++++ b/src/conf/cards/Makefile.am +@@ -58,7 +58,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 18a920f..2c422ee 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 ++imx-cs42888 cards.CS42888 ++imx-hdmi-soc cards.IMX-HDMI + + + +-- +2.7.4 + diff --git a/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0001-pcm-plugin-status-fix-the-return-value-regression.patch b/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0001-pcm-plugin-status-fix-the-return-value-regression.patch new file mode 100644 index 000000000..3a7aa772d --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0001-pcm-plugin-status-fix-the-return-value-regression.patch @@ -0,0 +1,46 @@ +From 67be50a9d95c8659d4821d0cd8c228e4f57b2c32 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Wed, 30 Dec 2020 09:31:10 +0100 +Subject: [PATCH 1/2] pcm: plugin status - fix the return value (regression) + +The snd_pcm_plugin_avail_update() error code in snd_pcm_plugin_status() +should not be reported to the caller. The state errors can be determined +using the state member in the status structure. + +Fixes: 4f90392f07e ("pcm: fix the snd_pcm_plugin_status() avail and delay fields") +BugLink: https://github.com/alsa-project/alsa-lib/issues/107 +Signed-off-by: Jaroslav Kysela +--- + src/pcm/pcm_plugin.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c +index 5739cfc2eb07..76a524fa801d 100644 +--- a/src/pcm/pcm_plugin.c ++++ b/src/pcm/pcm_plugin.c +@@ -541,19 +541,17 @@ static snd_pcm_sframes_t snd_pcm_plugin_avail_update(snd_pcm_t *pcm) + static int snd_pcm_plugin_status(snd_pcm_t *pcm, snd_pcm_status_t * status) + { + snd_pcm_plugin_t *plugin = pcm->private_data; +- snd_pcm_sframes_t err, avail; ++ snd_pcm_sframes_t err; + + /* sync with the latest hw and appl ptrs */ +- avail = snd_pcm_plugin_avail_update(pcm); +- if (avail < 0) +- return avail; ++ snd_pcm_plugin_avail_update(pcm); + + err = snd_pcm_status(plugin->gen.slave, status); + if (err < 0) + return err; + status->appl_ptr = *pcm->appl.ptr; + status->hw_ptr = *pcm->hw.ptr; +- status->avail = avail; ++ status->avail = snd_pcm_mmap_avail(pcm); + status->delay = snd_pcm_mmap_delay(pcm); + return 0; + } +-- +2.27.0 + diff --git a/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0002-pcm-plugin-status-revert-the-recent-changes.patch b/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0002-pcm-plugin-status-revert-the-recent-changes.patch new file mode 100644 index 000000000..4d91b20ec --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0002-pcm-plugin-status-revert-the-recent-changes.patch @@ -0,0 +1,34 @@ +From eeea1c8c352e54908f464e8dfd7a06b0f7ce0e6e Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Sun, 3 Jan 2021 16:16:10 +0100 +Subject: [PATCH 2/2] pcm: plugin status - revert the recent changes + +It's no reason to sync the avail/delay fields using the mirrored +buffer pointers. The slave information must be valid. + +The original report probably tries to fix something for +the specific plugin. Revert all changes. + +Fixes: afe6ff3b33e ("pcm: plugin status - fix the return value (regression)") +Fixes: 4f90392f07e ("pcm: fix the snd_pcm_plugin_status() avail and delay fields") +Signed-off-by: Jaroslav Kysela +--- + src/pcm/pcm_plugin.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c +index 76a524fa801d..ea60eb98986e 100644 +--- a/src/pcm/pcm_plugin.c ++++ b/src/pcm/pcm_plugin.c +@@ -551,8 +551,6 @@ static int snd_pcm_plugin_status(snd_pcm_t *pcm, snd_pcm_status_t * status) + return err; + status->appl_ptr = *pcm->appl.ptr; + status->hw_ptr = *pcm->hw.ptr; +- status->avail = snd_pcm_mmap_avail(pcm); +- status->delay = snd_pcm_mmap_delay(pcm); + return 0; + } + +-- +2.27.0 + diff --git a/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch b/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch new file mode 100644 index 000000000..98fca311d --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0005-add-ak4458-conf-for-multichannel-support.patch @@ -0,0 +1,123 @@ +From 1641ce8c724018365d7fa598f9a70c6492e7c271 Mon Sep 17 00:00:00 2001 +From: Shengjiu Wang +Date: Wed, 31 Jan 2018 15:06:53 +0800 +Subject: [PATCH] add ak4458 conf for multichannel support + +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 +--- + 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 +=================================================================== +--- /dev/null ++++ alsa-lib-1.1.6/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" ] ++ } ++ } ++} ++ ++ ++ ++AK4458.pcm.surround40.0 { ++ @args [ CARD ] ++ @args.CARD { ++ type string ++ } ++ type plug ++ slave.pcm { ++ type hw ++ card $CARD ++ } ++ slave.channels 4 ++} ++ ++ ++ ++ ++ ++ ++AK4458.pcm.surround51.0 { ++ @args [ CARD ] ++ @args.CARD { ++ type string ++ } ++ type plug ++ slave.pcm { ++ type hw ++ card $CARD ++ } ++ slave.channels 6 ++} ++ ++ ++ ++AK4458.pcm.surround71.0 { ++ @args [ CARD ] ++ @args.CARD { ++ type string ++ } ++ type plug ++ slave.pcm { ++ type hw ++ card $CARD ++ } ++ 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 +@@ -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 +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 +@@ -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 + + + diff --git a/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch b/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch new file mode 100755 index 000000000..a702f946c --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch @@ -0,0 +1,89 @@ +From d2be0f650f9fec265f0f0b4ba646a157f2a4cb7c Mon Sep 17 00:00:00 2001 +From: Viorel Suman +Date: Mon, 9 Mar 2020 14:25:46 +0200 +Subject: [PATCH] add conf for iMX XCVR sound card + +Upstream Status: Pending + +Signed-off-by: Viorel Suman +--- + src/conf/cards/IMX-XCVR.conf | 39 +++++++++++++++++++++++++++++++++++++++ + src/conf/cards/Makefile.am | 3 ++- + src/conf/cards/aliases.conf | 1 + + 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..009000c +--- /dev/null ++++ b/src/conf/cards/IMX-XCVR.conf +@@ -0,0 +1,39 @@ ++# ++# Configuration for the IMX-XCVR sound card using software IEC958 ++# subframe conversion ++# ++IMX-XCVR.pcm.default { ++ @args [ CARD ] ++ @args.CARD { type string } ++ type plug ++ slave.pcm { ++ @func concat ++ strings [ "iec958:" $CARD ] ++ } ++} ++ ++ ++ ++IMX-XCVR.pcm.iec958.0 { ++ @args [ CARD AES0 AES1 AES2 AES3 ] ++ @args.CARD { type string } ++ @args.AES0 { type integer } ++ @args.AES1 { type integer } ++ @args.AES2 { type integer } ++ @args.AES3 { type integer } ++ type iec958 ++ slave { ++ format IEC958_SUBFRAME_LE ++ pcm { ++ type plug ++ slave.pcm { ++ type hw ++ card $CARD ++ } ++ } ++ } ++ 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 +--- a/src/conf/cards/Makefile.am ++++ b/src/conf/cards/Makefile.am +@@ -61,7 +61,8 @@ cfg_files = aliases.conf \ + VXPocket440.conf \ + CS42888.conf \ + IMX-HDMI.conf \ +- AK4458.conf ++ AK4458.conf \ ++ IMX-XCVR.conf + + 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 +--- a/src/conf/cards/aliases.conf ++++ b/src/conf/cards/aliases.conf +@@ -60,6 +60,7 @@ VC4-HDMI cards.vc4-hdmi + imx-cs42888 cards.CS42888 + imx-hdmi-soc cards.IMX-HDMI + ak4458-audio cards.AK4458 ++imx-audio-xcvr cards.IMX-XCVR + + + +-- +2.7.4 + diff --git a/meta-digi-dey/recipes-multimedia/alsa/alsa-lib_%.bbappend b/meta-digi-dey/recipes-multimedia/alsa/alsa-lib_%.bbappend new file mode 100644 index 000000000..ee10914c9 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/alsa/alsa-lib_%.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +IMX_PATCH += " \ + file://0001-pcm-plugin-status-fix-the-return-value-regression.patch \ + file://0002-pcm-plugin-status-revert-the-recent-changes.patch \ +" + +PACKAGE_ARCH_imx = "${TUNE_PKGARCH}"