Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Multimedia package base on 6.6.52 #2055

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
From 2adc30e9838daf62312f32a0a93129d64b1668b3 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
Date: Fri, 6 Sep 2024 10:05:56 +0200
Subject: [PATCH] pcm: dmix: Fix resume with multiple instances

Upstream-Status: Pending

The fix for PCM dmix suspend/resume checks spcm->info bit of
SND_PCM_INFO_RESUME for applying a workaround for drivers with the
full resume support. This assumed that scpm->info is exposed from the
underlying slave PCM device.

The above is true for the first opened instance, but for the second
opened instance, it's a copy from the saved data in shmem. And, we
dropped SND_PCM_INFO_RESUME bit there to assure not to expose the full
resume capability to applications. This resulted in the
inconsistencies, and when the second instance is resumed at first, it
misses the snd_pcm_resume() call, hence the driver doesn't react
properly any longer.

For addressing it, we keep SND_PCM_INFO_RESUME bit in shmptr->s.info
bits as is, while dropping the bit exposed to apps in
snd_pcm_direct_hw_refine() and *_hw_params() callbacks.

Fixes: 6d1d620eadf3 ("pcm: dmix: resume workaround for buggy driver")
Reported-and-tested-by: Chancel Liu <[email protected]>
Closes: https://lore.kernel.org/DB9PR04MB94988752ED7C43B399E0BC00E3942@DB9PR04MB9498.eurprd04.prod.outlook.com
Signed-off-by: Takashi Iwai <[email protected]>
---
src/pcm/pcm_direct.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
index e53e5923..17e677f6 100644
--- a/src/pcm/pcm_direct.c
+++ b/src/pcm/pcm_direct.c
@@ -1018,6 +1018,7 @@ int snd_pcm_direct_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
}
dshare->timer_ticks = hw_param_interval(params, SND_PCM_HW_PARAM_PERIOD_SIZE)->max / dshare->slave_period_size;
params->info = dshare->shmptr->s.info;
+ params->info &= ~SND_PCM_INFO_RESUME;
#ifdef REFINE_DEBUG
snd_output_puts(log, "DMIX REFINE (end):\n");
snd_pcm_hw_params_dump(params, log);
@@ -1031,6 +1032,7 @@ int snd_pcm_direct_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
snd_pcm_direct_t *dmix = pcm->private_data;

params->info = dmix->shmptr->s.info;
+ params->info &= ~SND_PCM_INFO_RESUME;
params->rate_num = dmix->shmptr->s.rate;
params->rate_den = 1;
params->fifo_size = 0;
@@ -1183,8 +1185,6 @@ static void save_slave_setting(snd_pcm_direct_t *dmix, snd_pcm_t *spcm)
COPY_SLAVE(buffer_time);
COPY_SLAVE(sample_bits);
COPY_SLAVE(frame_bits);
-
- dmix->shmptr->s.info &= ~SND_PCM_INFO_RESUME;
}

#undef COPY_SLAVE
--
2.46.0

3 changes: 1 addition & 2 deletions recipes-multimedia/alsa/alsa-lib_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ IMX_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 \
file://0001-pcm-dmix-Fix-resume-with-multiple-instances.patch \
"
SRC_URI:append:imx-nxp-bsp = "${IMX_PATCH}"

PACKAGE_ARCH:imx-nxp-bsp = "${MACHINE_SOCARCH}"

GLIBC_64BIT_TIME_FLAGS = ""
INSANE_SKIP:append = " 32bit-time"
2 changes: 1 addition & 1 deletion recipes-multimedia/alsa/imx-alsa-plugins_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ inherit autotools pkgconfig use-imx-headers
PV = "1.0.26+${SRCPV}"

SRC_URI = "git://github.com/nxp-imx/imx-alsa-plugins.git;protocol=https;branch=${SRCBRANCH}"
SRCBRANCH = "MM_04.09.01_2408_L6.6.y"
SRCBRANCH = "MM_04.09.02_2410_L6.6.y"
SRCREV = "b2ba082e70333f187972ee4e85f63f9d2f608331"

S = "${WORKDIR}/git"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Copyright 2017-2023 NXP
# Copyright 2017-2022,2024 NXP

DESCRIPTION = "i.MX DSP Wrapper, Firmware Binary, Codec Libraries"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=10c0fda810c63b052409b15a5445671a"

LIC_FILES_CHKSUM = "file://COPYING;md5=ca53281cc0caa7e320d4945a896fb837"

inherit fsl-eula-unpack autotools pkgconfig

SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
IMX_SRCREV_ABBREV = "a3074e2"
SRC_URI = "${FSL_MIRROR}/${BP}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true"

S = "${WORKDIR}/${BP}-${IMX_SRCREV_ABBREV}"

SRC_URI[sha256sum] = "5d42c8f39fb36bcc48e9f0c4caffd125b89c257fa8eccb3b61608bc690a16462"
SRC_URI[sha256sum] = "1f763c21f20abfbb013a0d1acb5846fec55241e9fa8c8aae47fd95b007d800fe"

EXTRA_OECONF = " \
-datadir=${base_libdir}/firmware \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ca53281cc0caa7e320d4945a896fb837"
DEPENDS = "virtual/opencl-icd"

SRC_URI = "${FSL_MIRROR}/${BP}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true"
IMX_SRCREV_ABBREV = "f2c3930"
IMX_SRCREV_ABBREV = "605ef75"

SRC_URI[sha256sum] = "eb3df72a7e1d16ec1660978cf36b7818b8ac7c7defe3222ae4bb7dabd4a5f4cc"
SRC_URI[sha256sum] = "777f49805d5455ebc27e63d19552e2924174011d2ae7d9b392febfa8794d4dc6"

S = "${WORKDIR}/${BP}-${IMX_SRCREV_ABBREV}"
inherit fsl-eula-unpack autotools pkgconfig meson
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ RPROVIDES:${PN} = "libfslparser"
RCONFLICTS:${PN} = "libfslparser"

SRC_URI = "${FSL_MIRROR}/${BP}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true"
IMX_SRCREV_ABBREV = "5d91190"
IMX_SRCREV_ABBREV = "828fcb7"
S = "${WORKDIR}/${BP}-${IMX_SRCREV_ABBREV}"

SRC_URI[sha256sum] = "087badea414540d1b9403be1a0c7fc91ac42a61f0374857972cd06d8c392ddec"
SRC_URI[sha256sum] = "7414db9e2cce2cb2d6fe63ac7d193a0ea65ad8a184e6a2e2ce2785e43acbb339"

inherit fsl-eula-unpack autotools pkgconfig

Expand Down

This file was deleted.

This file was deleted.

6 changes: 2 additions & 4 deletions recipes-multimedia/imx-vpuwrap/imx-vpuwrap_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ DEPENDS:append:mx8mp-nxp-bsp = " imx-vpu-hantro-vc"

SRC_URI = " \
git://github.com/NXP/imx-vpuwrap.git;protocol=https;branch=${SRCBRANCH} \
file://0001-vpu_wrapper_hantro_encoder-add-sys-time.h-for-gettim.patch \
file://0001-vpu_wrapper_hantro_VCencoder-add-sys-time.h-for-gett.patch \
"
SRCBRANCH = "MM_04.09.01_2408_L6.6.y"
SRCREV = "c13069d239cae314adc3651df25b96afa46cb434"
SRCBRANCH = "MM_04.09.02_2410_L6.6.y"
SRCREV = "378e33989cf72d6c2eb57a585072ba9abe87c6ff"

S = "${WORKDIR}/git"

Expand Down