Accepting request 228908 from multimedia:libs
- Backport upstream fixes: 0037-route-Return-NULL-in-case-of-zero-found-channels-in-.patch 0038-route-Fix-invalid-pointer-access.patch 0039-pcm-ladspa-Delay-LADSPA-plugin-activate-call.patch - Remove the temporary fix that has been replaced by the fixes above: 0037-pcm-route-Don-t-handle-no-matching-chmap-as-a-seriou.patch (forwarded request 228907 from tiwai) OBS-URL: https://build.opensuse.org/request/show/228908 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/alsa?expand=0&rev=149
This commit is contained in:
commit
518285cd8f
@ -1,35 +0,0 @@
|
||||
From 5b72e3d5305930bffc300aa4f2545ba95992c144 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Tue, 18 Mar 2014 15:23:09 +0100
|
||||
Subject: [PATCH] pcm: route: Don't handle no matching chmap as a serious error
|
||||
|
||||
When find_matching_chmap() returns an error for the non-matching
|
||||
chmap, the caller, snd_pcm_route_open(), also returns an error
|
||||
although it shouldn't be handled as the fatal error. This results in
|
||||
the probe error with PulseAudio and it gives no real output in the
|
||||
end.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/pcm/pcm_route.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c
|
||||
index ab17fa78be2c..ac11bdc8adfd 100644
|
||||
--- a/src/pcm/pcm_route.c
|
||||
+++ b/src/pcm/pcm_route.c
|
||||
@@ -940,10 +940,8 @@ static int find_matching_chmap(snd_pcm_t *spcm, snd_pcm_chmap_t *tt_chmap,
|
||||
|
||||
snd_pcm_free_chmaps(chmaps);
|
||||
|
||||
- if (*found_chmap == NULL) {
|
||||
+ if (*found_chmap == NULL)
|
||||
SNDERR("Found no matching channel map");
|
||||
- return -EINVAL;
|
||||
- }
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
1.9.0
|
||||
|
@ -0,0 +1,34 @@
|
||||
From d794af65e97822a29945a21c1cd2a21ea3b8e6b8 Mon Sep 17 00:00:00 2001
|
||||
From: David Henningsson <david.henningsson@canonical.com>
|
||||
Date: Tue, 18 Mar 2014 23:07:19 +0100
|
||||
Subject: [PATCH] route: Return NULL in case of zero found channels in
|
||||
determine_chmap
|
||||
|
||||
This should fix the problem where the old route syntax can no longer
|
||||
be opened.
|
||||
|
||||
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/pcm/pcm_route.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c
|
||||
index ac11bdc8adfd..a9097caa7303 100644
|
||||
--- a/src/pcm/pcm_route.c
|
||||
+++ b/src/pcm/pcm_route.c
|
||||
@@ -883,7 +883,10 @@ static int determine_chmap(snd_config_t *tt, snd_pcm_chmap_t **tt_chmap)
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
+ if (chmap->channels == 0) {
|
||||
+ free(chmap);
|
||||
+ chmap = NULL;
|
||||
+ }
|
||||
*tt_chmap = chmap;
|
||||
return 0;
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
41
0038-route-Fix-invalid-pointer-access.patch
Normal file
41
0038-route-Fix-invalid-pointer-access.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From dbe6d7f86902dbbe2ff276b7a6524c084893772f Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Wed, 19 Mar 2014 10:52:24 +0100
|
||||
Subject: [PATCH] route: Fix invalid pointer access
|
||||
|
||||
An uninitialized chmap pointer value is assigned in
|
||||
_snd_pcm_route_open(). Add NULL initializations appropriately, and
|
||||
also avoid the possible invalid access of NULL pcmp pointer.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/pcm/pcm_route.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c
|
||||
index a9097caa7303..599fc3eb48e2 100644
|
||||
--- a/src/pcm/pcm_route.c
|
||||
+++ b/src/pcm/pcm_route.c
|
||||
@@ -1361,7 +1361,7 @@ int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
||||
int err;
|
||||
snd_pcm_t *spcm;
|
||||
snd_config_t *slave = NULL, *sconf;
|
||||
- snd_pcm_chmap_t *tt_chmap, *chmap;
|
||||
+ snd_pcm_chmap_t *tt_chmap = NULL, *chmap = NULL;
|
||||
snd_pcm_format_t sformat = SND_PCM_FORMAT_UNKNOWN;
|
||||
int schannels = -1;
|
||||
snd_config_t *tt = NULL;
|
||||
@@ -1460,8 +1460,9 @@ int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
||||
if (err < 0) {
|
||||
free(chmap);
|
||||
snd_pcm_close(spcm);
|
||||
+ } else {
|
||||
+ ((snd_pcm_route_t*) (*pcmp)->private_data)->chmap = chmap;
|
||||
}
|
||||
- ((snd_pcm_route_t*) (*pcmp)->private_data)->chmap = chmap;
|
||||
|
||||
return err;
|
||||
}
|
||||
--
|
||||
1.9.1
|
||||
|
40
0039-pcm-ladspa-Delay-LADSPA-plugin-activate-call.patch
Normal file
40
0039-pcm-ladspa-Delay-LADSPA-plugin-activate-call.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 8dcce52ee09b12d977ea23ccd281a17bdcc5414e Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Larisch <mail@matthias-larisch.de>
|
||||
Date: Thu, 27 Mar 2014 19:05:10 +0100
|
||||
Subject: [PATCH] pcm: ladspa: Delay LADSPA plugin activate call
|
||||
|
||||
Some LADSPA Plugins rely on connected control ports on activate call.
|
||||
While this is not okay by spec, the spec also encourages the activate
|
||||
call happening as late as possible.
|
||||
|
||||
Signed-off-by: Matthias Larisch <mail@matthias-larisch.de>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/pcm/pcm_ladspa.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_ladspa.c b/src/pcm/pcm_ladspa.c
|
||||
index 9ce5242e2359..7d1e3df878b0 100644
|
||||
--- a/src/pcm/pcm_ladspa.c
|
||||
+++ b/src/pcm/pcm_ladspa.c
|
||||
@@ -645,8 +645,6 @@ static int snd_pcm_ladspa_allocate_instances(snd_pcm_t *pcm, snd_pcm_ladspa_t *l
|
||||
return -EINVAL;
|
||||
}
|
||||
list_add_tail(&instance->list, &plugin->instances);
|
||||
- if (plugin->desc->activate)
|
||||
- plugin->desc->activate(instance->handle);
|
||||
if (plugin->policy == SND_PCM_LADSPA_POLICY_DUPLICATE) {
|
||||
err = snd_pcm_ladspa_connect_plugin_duplicate(plugin, &plugin->input, &plugin->output, instance, idx);
|
||||
if (err < 0) {
|
||||
@@ -664,6 +662,8 @@ static int snd_pcm_ladspa_allocate_instances(snd_pcm_t *pcm, snd_pcm_ladspa_t *l
|
||||
assert(err >= 0);
|
||||
err = snd_pcm_ladspa_connect_controls(plugin, &plugin->output, instance);
|
||||
assert(err >= 0);
|
||||
+ if (plugin->desc->activate)
|
||||
+ plugin->desc->activate(instance->handle);
|
||||
}
|
||||
err = snd_pcm_ladspa_check_connect(plugin, &plugin->input, &instance->input, depth);
|
||||
if (err < 0)
|
||||
--
|
||||
1.9.1
|
||||
|
11
alsa.changes
11
alsa.changes
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 3 17:10:46 CEST 2014 - tiwai@suse.de
|
||||
|
||||
- Backport upstream fixes:
|
||||
0037-route-Return-NULL-in-case-of-zero-found-channels-in-.patch
|
||||
0038-route-Fix-invalid-pointer-access.patch
|
||||
0039-pcm-ladspa-Delay-LADSPA-plugin-activate-call.patch
|
||||
- Remove the temporary fix that has been replaced by the fixes
|
||||
above:
|
||||
0037-pcm-route-Don-t-handle-no-matching-chmap-as-a-seriou.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 20 15:04:38 CET 2014 - tiwai@suse.de
|
||||
|
||||
|
@ -88,7 +88,9 @@ Patch33: 0033-pcm-route-Select-slave-chmap-based-on-ttable-informa.patch
|
||||
Patch34: 0034-conf-Allow-2.1-surround-to-use-different-number-of-c.patch
|
||||
Patch35: 0035-pcm-Wrap-hw_ptr-to-boundary-in-pcm_ioplug.patch
|
||||
Patch36: 0036-src-conf-cards-Add-missing-entry-for-Loopback.conf.patch
|
||||
Patch37: 0037-pcm-route-Don-t-handle-no-matching-chmap-as-a-seriou.patch
|
||||
Patch37: 0037-route-Return-NULL-in-case-of-zero-found-channels-in-.patch
|
||||
Patch38: 0038-route-Fix-invalid-pointer-access.patch
|
||||
Patch39: 0039-pcm-ladspa-Delay-LADSPA-plugin-activate-call.patch
|
||||
# rest suse patches
|
||||
Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff
|
||||
BuildRequires: doxygen
|
||||
@ -195,6 +197,8 @@ cp %{SOURCE50} src/conf/cards
|
||||
%patch35 -p1
|
||||
%patch36 -p1
|
||||
%patch37 -p1
|
||||
%patch38 -p1
|
||||
%patch39 -p1
|
||||
%if 0%{?suse_version} == 1130
|
||||
%patch99 -p1
|
||||
%endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user