update to alsa-lib 1.2.6.1 and alsa-ucm-conf 1.2.6.3
Resolves: rhbz#2019740
This commit is contained in:
parent
9f7f49d4b3
commit
c0e77db165
219
alsa-git.patch
219
alsa-git.patch
@ -1,219 +0,0 @@
|
||||
From e47c11822d6b459a9b3704b3ee6a4a5c9a1b85be Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Tue, 29 Jun 2021 18:02:27 +0200
|
||||
Subject: [PATCH 1/2] control: remap - assign right name to the child handle
|
||||
for no-op
|
||||
|
||||
Fixes: https://github.com/alsa-project/alsa-utils/issues/100
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/control/control_remap.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/control/control_remap.c b/src/control/control_remap.c
|
||||
index a85c1725..81524014 100644
|
||||
--- a/src/control/control_remap.c
|
||||
+++ b/src/control/control_remap.c
|
||||
@@ -1173,6 +1173,10 @@ int snd_ctl_remap_open(snd_ctl_t **handlep, const char *name, snd_config_t *rema
|
||||
/* no-op check, remove the plugin */
|
||||
if (priv->map_items == 0 && priv->remap_items == 0) {
|
||||
remap_free(priv);
|
||||
+ free(child->name);
|
||||
+ child->name = name ? strdup(name) : NULL;
|
||||
+ if (name && !child->name)
|
||||
+ return -ENOMEM;
|
||||
*handlep = child;
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 23a191a82c693456e61431ab699cddc1e5782a26 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Tue, 29 Jun 2021 19:31:28 +0200
|
||||
Subject: [PATCH 2/2] control: remap - assign right name to the child handle
|
||||
for no-op (2nd case)
|
||||
|
||||
Fixes: https://github.com/alsa-project/alsa-utils/issues/100
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/control/control_remap.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/control/control_remap.c b/src/control/control_remap.c
|
||||
index 81524014..4914f960 100644
|
||||
--- a/src/control/control_remap.c
|
||||
+++ b/src/control/control_remap.c
|
||||
@@ -1154,6 +1154,10 @@ int snd_ctl_remap_open(snd_ctl_t **handlep, const char *name, snd_config_t *rema
|
||||
snd_ctl_t *ctl;
|
||||
int result, err;
|
||||
|
||||
+ /* no-op, remove the plugin */
|
||||
+ if (!remap && !map)
|
||||
+ goto _noop;
|
||||
+
|
||||
priv = calloc(1, sizeof(*priv));
|
||||
if (priv == NULL)
|
||||
return -ENOMEM;
|
||||
@@ -1173,6 +1177,7 @@ int snd_ctl_remap_open(snd_ctl_t **handlep, const char *name, snd_config_t *rema
|
||||
/* no-op check, remove the plugin */
|
||||
if (priv->map_items == 0 && priv->remap_items == 0) {
|
||||
remap_free(priv);
|
||||
+ _noop:
|
||||
free(child->name);
|
||||
child->name = name ? strdup(name) : NULL;
|
||||
if (name && !child->name)
|
||||
@@ -1316,11 +1321,6 @@ int _snd_ctl_remap_open(snd_ctl_t **handlep, char *name, snd_config_t *root, snd
|
||||
err = _snd_ctl_open_child(&cctl, root, child, mode, conf);
|
||||
if (err < 0)
|
||||
return err;
|
||||
- /* no-op, remove the plugin */
|
||||
- if (!remap && !map) {
|
||||
- *handlep = cctl;
|
||||
- return 0;
|
||||
- }
|
||||
err = snd_ctl_remap_open(handlep, name, remap, map, cctl, mode);
|
||||
if (err < 0)
|
||||
snd_ctl_close(cctl);
|
||||
--
|
||||
2.31.1
|
||||
|
||||
From dd609ef9684987d3ca61d5c5cc3c77589ff9c29f Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 21 Jun 2021 09:28:41 +0200
|
||||
Subject: [PATCH] pcm: direct plugins - fix hw_ptr in the status callback
|
||||
|
||||
The parent hw_ptr may be in another range (boundary limit).
|
||||
Set the correct value for the caller.
|
||||
|
||||
BugLink: https://github.com/alsa-project/alsa-lib/issues/155
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/pcm/pcm_dmix.c | 1 +
|
||||
src/pcm/pcm_dshare.c | 1 +
|
||||
src/pcm/pcm_dsnoop.c | 1 +
|
||||
3 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c
|
||||
index 0d0d0bff..94dbb1e0 100644
|
||||
--- a/src/pcm/pcm_dmix.c
|
||||
+++ b/src/pcm/pcm_dmix.c
|
||||
@@ -491,6 +491,7 @@ static int snd_pcm_dmix_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
|
||||
}
|
||||
|
||||
status->state = snd_pcm_dmix_state(pcm);
|
||||
+ status->hw_ptr = *pcm->hw.ptr; /* boundary may be different */
|
||||
status->appl_ptr = *pcm->appl.ptr; /* slave PCM doesn't set appl_ptr */
|
||||
status->trigger_tstamp = dmix->trigger_tstamp;
|
||||
status->avail = snd_pcm_mmap_playback_avail(pcm);
|
||||
diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c
|
||||
index a918512b..01814dc8 100644
|
||||
--- a/src/pcm/pcm_dshare.c
|
||||
+++ b/src/pcm/pcm_dshare.c
|
||||
@@ -243,6 +243,7 @@ static int snd_pcm_dshare_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
|
||||
break;
|
||||
}
|
||||
status->state = snd_pcm_dshare_state(pcm);
|
||||
+ status->hw_ptr = *pcm->hw.ptr; /* boundary may be different */
|
||||
status->appl_ptr = *pcm->appl.ptr; /* slave PCM doesn't set appl_ptr */
|
||||
status->trigger_tstamp = dshare->trigger_tstamp;
|
||||
status->avail = snd_pcm_mmap_playback_avail(pcm);
|
||||
diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c
|
||||
index 2c3b9f43..3f28df99 100644
|
||||
--- a/src/pcm/pcm_dsnoop.c
|
||||
+++ b/src/pcm/pcm_dsnoop.c
|
||||
@@ -193,6 +193,7 @@ static int snd_pcm_dsnoop_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
|
||||
snd_pcm_status(dsnoop->spcm, status);
|
||||
state = snd_pcm_state(dsnoop->spcm);
|
||||
status->state = state == SND_PCM_STATE_RUNNING ? dsnoop->state : state;
|
||||
+ status->hw_ptr = *pcm->hw.ptr; /* boundary may be different */
|
||||
status->appl_ptr = *pcm->appl.ptr; /* slave PCM doesn't set appl_ptr */
|
||||
status->trigger_tstamp = dsnoop->trigger_tstamp;
|
||||
status->avail = snd_pcm_mmap_capture_avail(pcm);
|
||||
--
|
||||
2.31.1
|
||||
|
||||
From e0e084659083c2ab75d5c894f24227ea2f67010f Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 21 Jun 2021 15:14:18 +0200
|
||||
Subject: [PATCH] pcm: direct plugins - fix bad memory access when channel
|
||||
bindings do not match hw
|
||||
|
||||
Fix and cleanup snd_pcm_direct_check_interleave() function.
|
||||
Add requested / hardware channel check and use goto when the interleaved
|
||||
|
||||
Fixes: https://github.com/alsa-project/alsa-lib/issues/117
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/pcm/pcm_direct.c | 40 +++++++++++++++++-----------------------
|
||||
1 file changed, 17 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
|
||||
index d50503e3..90417b2f 100644
|
||||
--- a/src/pcm/pcm_direct.c
|
||||
+++ b/src/pcm/pcm_direct.c
|
||||
@@ -1627,43 +1627,37 @@ int snd_pcm_direct_set_timer_params(snd_pcm_direct_t *dmix)
|
||||
int snd_pcm_direct_check_interleave(snd_pcm_direct_t *dmix, snd_pcm_t *pcm)
|
||||
{
|
||||
unsigned int chn, channels;
|
||||
- int bits, interleaved = 1;
|
||||
+ int bits;
|
||||
const snd_pcm_channel_area_t *dst_areas;
|
||||
const snd_pcm_channel_area_t *src_areas;
|
||||
|
||||
bits = snd_pcm_format_physical_width(pcm->format);
|
||||
if ((bits % 8) != 0)
|
||||
- interleaved = 0;
|
||||
+ goto __nointerleaved;
|
||||
channels = dmix->channels;
|
||||
+ if (channels != dmix->spcm->channels)
|
||||
+ goto __nointerleaved;
|
||||
dst_areas = snd_pcm_mmap_areas(dmix->spcm);
|
||||
src_areas = snd_pcm_mmap_areas(pcm);
|
||||
for (chn = 1; chn < channels; chn++) {
|
||||
- if (dst_areas[chn-1].addr != dst_areas[chn].addr) {
|
||||
- interleaved = 0;
|
||||
- break;
|
||||
- }
|
||||
- if (src_areas[chn-1].addr != src_areas[chn].addr) {
|
||||
- interleaved = 0;
|
||||
- break;
|
||||
- }
|
||||
+ if (dst_areas[chn-1].addr != dst_areas[chn].addr)
|
||||
+ goto __nointerleaved;
|
||||
+ if (src_areas[chn-1].addr != src_areas[chn].addr)
|
||||
+ goto __nointerleaved;
|
||||
}
|
||||
for (chn = 0; chn < channels; chn++) {
|
||||
- if (dmix->bindings && dmix->bindings[chn] != chn) {
|
||||
- interleaved = 0;
|
||||
- break;
|
||||
- }
|
||||
+ if (dmix->bindings && dmix->bindings[chn] != chn)
|
||||
+ goto __nointerleaved;
|
||||
if (dst_areas[chn].first != chn * bits ||
|
||||
- dst_areas[chn].step != channels * bits) {
|
||||
- interleaved = 0;
|
||||
- break;
|
||||
- }
|
||||
+ dst_areas[chn].step != channels * bits)
|
||||
+ goto __nointerleaved;
|
||||
if (src_areas[chn].first != chn * bits ||
|
||||
- src_areas[chn].step != channels * bits) {
|
||||
- interleaved = 0;
|
||||
- break;
|
||||
- }
|
||||
+ src_areas[chn].step != channels * bits)
|
||||
+ goto __nointerleaved;
|
||||
}
|
||||
- return dmix->interleaved = interleaved;
|
||||
+ return dmix->interleaved = 1;
|
||||
+__nointerleaved:
|
||||
+ return dmix->interleaved = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
2.31.1
|
||||
|
@ -2,14 +2,14 @@
|
||||
#define prever_dot .rc3
|
||||
#define postver a
|
||||
|
||||
%define version_alsa_lib 1.2.5.1
|
||||
%define version_alsa_ucm 1.2.5.1
|
||||
%define version_alsa_lib 1.2.6.1
|
||||
%define version_alsa_ucm 1.2.6.3
|
||||
%define version_alsa_tplg 1.2.5
|
||||
|
||||
Summary: The Advanced Linux Sound Architecture (ALSA) library
|
||||
Name: alsa-lib
|
||||
Version: %{version_alsa_lib}
|
||||
Release: 2%{?prever_dot}%{?dist}
|
||||
Release: 1%{?prever_dot}%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: http://www.alsa-project.org/
|
||||
|
||||
@ -52,7 +52,7 @@ against the ALSA libraries and interfaces.
|
||||
Summary: ALSA Use Case Manager configuration
|
||||
BuildArch: noarch
|
||||
License: BSD
|
||||
Requires: %{name} >= %{version_alsa_ucm}
|
||||
Requires: %{name} >= %{version_alsa_lib}
|
||||
|
||||
%description -n alsa-ucm
|
||||
The Advanced Linux Sound Architecture (ALSA) Use Case Manager configuration
|
||||
@ -62,7 +62,7 @@ contains alsa-lib configuration of Audio input/output names and routing
|
||||
Summary: ALSA Topology configuration
|
||||
BuildArch: noarch
|
||||
License: BSD
|
||||
Requires: %{name} >= %{version_alsa_tplg}
|
||||
Requires: %{name} >= %{version_alsa_lib}
|
||||
|
||||
%description -n alsa-topology
|
||||
The Advanced Linux Sound Architecture (ALSA) topology configuration
|
||||
@ -167,6 +167,9 @@ rm %{buildroot}/%{_includedir}/asoundlib.h
|
||||
%{_datadir}/alsa/topology
|
||||
|
||||
%changelog
|
||||
* Mon Dec 20 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.6.1-1
|
||||
- update to alsa-lib 1.2.6.1 and alsa-ucm-conf 1.2.6.3
|
||||
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.5.1-2
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
4
sources
4
sources
@ -1,3 +1,3 @@
|
||||
SHA512 (alsa-lib-1.2.5.1.tar.bz2) = 01998ffa449e925ff552c13aea47f9540903afdc533086067c78dcaba4d239c347180d3d28bb0000e6d19b7779c7249fcc77a30057930ca22d18ba55e163fa1c
|
||||
SHA512 (alsa-ucm-conf-1.2.5.1.tar.bz2) = 774d6da1a0ee6fb1fcd764c1d4b3eb5812a35508cf27db71f6c82784f125eca207992da9081d25783fecb31e548d8b34124d4b3b3d506e33215b76ea48f71012
|
||||
SHA512 (alsa-lib-1.2.6.1.tar.bz2) = 70e539cf092b5d43e00e4134d8a3e184f0dc34312823e4b58a574320cbf06cb7369bc3251ecb1858033756a7a8c35d36faa8da48d49f6efe0cec905784adbd45
|
||||
SHA512 (alsa-ucm-conf-1.2.6.3.tar.bz2) = 14031173dd9b44c506f13172fcf89d1119e4b2d409a749ec8ef4948e75231a5e5091206e826dff9e70f1f803de8cfb9fd94886ef70764c705f65c1c7ebdf649f
|
||||
SHA512 (alsa-topology-conf-1.2.5.tar.bz2) = 2eb4d8baf2dcbf0b631dd11dbf15bffc51694d9cc6931619e51787f3ba58d1a091d266e6721a3b737c040ec74a28270b93f39fb97f30a3227cf340dd646e5d51
|
||||
|
Loading…
Reference in New Issue
Block a user