summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch')
-rw-r--r--recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-the-crash-in-snd_pcm_rate_may_wait_for_.patch41
1 files changed, 41 insertions, 0 deletions
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 @@
1From aa4f56c3c952269c36464cc0da9db5a1381648fa Mon Sep 17 00:00:00 2001
2From: Jaroslav Kysela <perex@perex.cz>
3Date: Wed, 9 Nov 2022 08:11:42 +0100
4Subject: [PATCH] pcm: rate - fix the crash in
5
6Upstream-Status: Backport
7
8 snd_pcm_rate_may_wait_for_avail_min()
9
10The pcm argument passed to the conversion function in
11snd_pcm_plugin_may_wait_for_avail_min_conv() should be
12pcm->fast_op_arg.
13
14Test command: arecord -Dplughw:x -r12000 -c2 -fS16_LE -M temp.wav
15
16Fixes: d9dbb57b ("pcm: rate - rewrite the may_wait_for_avail_min callback for the rate plugin")
17
18BugLink: https://lore.kernel.org/alsa-devel/1667793912-18957-1-git-send-email-shengjiu.wang@nxp.com/
19Fixes: https://github.com/alsa-project/alsa-lib/issues/282
20Reported-by: Shengjiu Wang <shengjiu.wang@nxp.com>
21Signed-off-by: Jaroslav Kysela <perex@perex.cz>
22---
23 src/pcm/pcm_plugin.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
27index 6bb90b8b..ec64604c 100644
28--- a/src/pcm/pcm_plugin.c
29+++ b/src/pcm/pcm_plugin.c
30@@ -622,7 +622,7 @@ int snd_pcm_plugin_may_wait_for_avail_min_conv(
31 * This code is also used by extplug, but extplug does not allow to alter the sampling rate.
32 */
33 if (conv)
34- needed_slave_avail_min = conv(pcm, needed_slave_avail_min);
35+ needed_slave_avail_min = conv(pcm->fast_op_arg, needed_slave_avail_min);
36
37 if (slave->avail_min != needed_slave_avail_min) {
38 snd_pcm_sw_params_t *swparams;
39--
402.34.1
41