fresh snapshot
This commit is contained in:
parent
9c4013651f
commit
4ec22829b7
@ -1,111 +0,0 @@
|
||||
From c07cf2017076cf00fa344f6fc7d188bbba06dc28 Mon Sep 17 00:00:00 2001
|
||||
From: David Henningsson <david.henningsson@canonical.com>
|
||||
Date: Mon, 23 Sep 2013 14:00:57 +0200
|
||||
Subject: [PATCH] alsa-mixer: Drop all unused paths, not only unsupported paths
|
||||
|
||||
This is a cleaner solution, because it also removes paths that are
|
||||
being removed because they are subsets of other paths.
|
||||
|
||||
Otherwise, the lingering paths could cause jack detection related
|
||||
assertion failures.
|
||||
|
||||
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=69676
|
||||
Reported-and-tested-by: Kalev Lember <kalevlember@gmail.com>
|
||||
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
||||
---
|
||||
src/modules/alsa/alsa-mixer.c | 23 +++++++++++++++--------
|
||||
1 file changed, 15 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
|
||||
index 71dfa79..95c7628 100644
|
||||
--- a/src/modules/alsa/alsa-mixer.c
|
||||
+++ b/src/modules/alsa/alsa-mixer.c
|
||||
@@ -3748,7 +3748,7 @@ fail:
|
||||
}
|
||||
|
||||
static void mapping_paths_probe(pa_alsa_mapping *m, pa_alsa_profile *profile,
|
||||
- pa_alsa_direction_t direction) {
|
||||
+ pa_alsa_direction_t direction, pa_hashmap *used_paths) {
|
||||
|
||||
pa_alsa_path *p;
|
||||
void *state;
|
||||
@@ -3793,6 +3793,9 @@ static void mapping_paths_probe(pa_alsa_mapping *m, pa_alsa_profile *profile,
|
||||
if (mixer_handle)
|
||||
snd_mixer_close(mixer_handle);
|
||||
|
||||
+ PA_HASHMAP_FOREACH(p, ps->paths, state)
|
||||
+ pa_hashmap_put(used_paths, p, p);
|
||||
+
|
||||
pa_log_debug("Available mixer paths (after tidying):");
|
||||
pa_alsa_path_set_dump(ps);
|
||||
}
|
||||
@@ -4281,16 +4284,18 @@ static snd_pcm_t* mapping_open_pcm(pa_alsa_mapping *m,
|
||||
&try_buffer_size, 0, NULL, NULL, true);
|
||||
}
|
||||
|
||||
-static void paths_drop_unsupported(pa_hashmap* h) {
|
||||
+static void paths_drop_unused(pa_hashmap* h, pa_hashmap *keep) {
|
||||
|
||||
void* state = NULL;
|
||||
const void* key;
|
||||
pa_alsa_path* p;
|
||||
|
||||
pa_assert(h);
|
||||
+ pa_assert(keep);
|
||||
+
|
||||
p = pa_hashmap_iterate(h, &state, &key);
|
||||
while (p) {
|
||||
- if (p->supported <= 0) {
|
||||
+ if (pa_hashmap_get(keep, p) == NULL) {
|
||||
pa_hashmap_remove(h, key);
|
||||
pa_alsa_path_free(p);
|
||||
}
|
||||
@@ -4308,7 +4313,7 @@ void pa_alsa_profile_set_probe(
|
||||
void *state;
|
||||
pa_alsa_profile *p, *last = NULL;
|
||||
pa_alsa_mapping *m;
|
||||
- pa_hashmap *broken_inputs, *broken_outputs;
|
||||
+ pa_hashmap *broken_inputs, *broken_outputs, *used_paths;
|
||||
|
||||
pa_assert(ps);
|
||||
pa_assert(dev_id);
|
||||
@@ -4319,6 +4324,7 @@ void pa_alsa_profile_set_probe(
|
||||
|
||||
broken_inputs = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
|
||||
broken_outputs = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
|
||||
+ used_paths = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
|
||||
|
||||
PA_HASHMAP_FOREACH(p, ps->profiles, state) {
|
||||
uint32_t idx;
|
||||
@@ -4406,12 +4412,12 @@ void pa_alsa_profile_set_probe(
|
||||
if (p->output_mappings)
|
||||
PA_IDXSET_FOREACH(m, p->output_mappings, idx)
|
||||
if (m->output_pcm)
|
||||
- mapping_paths_probe(m, p, PA_ALSA_DIRECTION_OUTPUT);
|
||||
+ mapping_paths_probe(m, p, PA_ALSA_DIRECTION_OUTPUT, used_paths);
|
||||
|
||||
if (p->input_mappings)
|
||||
PA_IDXSET_FOREACH(m, p->input_mappings, idx)
|
||||
if (m->input_pcm)
|
||||
- mapping_paths_probe(m, p, PA_ALSA_DIRECTION_INPUT);
|
||||
+ mapping_paths_probe(m, p, PA_ALSA_DIRECTION_INPUT, used_paths);
|
||||
}
|
||||
|
||||
/* Clean up */
|
||||
@@ -4419,10 +4425,11 @@ void pa_alsa_profile_set_probe(
|
||||
|
||||
pa_alsa_profile_set_drop_unsupported(ps);
|
||||
|
||||
- paths_drop_unsupported(ps->input_paths);
|
||||
- paths_drop_unsupported(ps->output_paths);
|
||||
+ paths_drop_unused(ps->input_paths, used_paths);
|
||||
+ paths_drop_unused(ps->output_paths, used_paths);
|
||||
pa_hashmap_free(broken_inputs);
|
||||
pa_hashmap_free(broken_outputs);
|
||||
+ pa_hashmap_free(used_paths);
|
||||
|
||||
ps->probed = true;
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
%global pa_major 4.0
|
||||
#global pa_minor 0
|
||||
|
||||
%global gitrel 186
|
||||
%global gitcommit a89ca82e6823641231adb90ad6c1e48c870d2c2f
|
||||
%global gitrel 266
|
||||
%global gitcommit f81e3e1d7852c05b4b737ac7dac4db95798f0117
|
||||
%global shortcommit %(c=%{gitcommit}; echo ${c:0:5})
|
||||
|
||||
%ifarch %{ix86} x86_64 %{arm}
|
||||
@ -12,7 +12,7 @@
|
||||
Name: pulseaudio
|
||||
Summary: Improved Linux Sound Server
|
||||
Version: %{pa_major}%{?pa_minor:.%{pa_minor}}
|
||||
Release: 4%{?gitcommit:.git%{shortcommit}}%{?dist}
|
||||
Release: 5%{?gitcommit:.git%{shortcommit}}%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: http://www.freedesktop.org/wiki/Software/PulseAudio
|
||||
%if 0%{?gitrel}
|
||||
@ -480,6 +480,9 @@ exit 0
|
||||
%attr(0600, gdm, gdm) %{_localstatedir}/lib/gdm/.pulse/default.pa
|
||||
|
||||
%changelog
|
||||
* Fri Oct 11 2013 Rex Dieter <rdieter@fedoraproject.org> - 4.0-5.gitf81e3
|
||||
- fresh snapshot
|
||||
|
||||
* Mon Sep 23 2013 Kalev Lember <kalevlember@gmail.com> - 4.0-4.gita89ca
|
||||
- Update to today's git snapshot
|
||||
- Backport a patch for pulseaudio crash at startup (#1000966)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user