mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-16 08:56:40 -05:00
alsa-mixer: Fix path set building when using the element-output or element-input mapping options in profile set configuration.
When creating synthesized paths, pa_alsa_path_set_new() created duplicate elements for each path, and one of the duplicate elements would be marked as required absent. That made path probing fail. While debugging this, I noticed also that pa_alsa_path_synthesize() didn't initialize p->last_element properly.
This commit is contained in:
parent
3153b60a62
commit
46359043c4
1 changed files with 5 additions and 0 deletions
|
|
@ -1992,6 +1992,7 @@ pa_alsa_path* pa_alsa_path_synthesize(const char*element, pa_alsa_direction_t di
|
||||||
e->volume_use = PA_ALSA_VOLUME_MERGE;
|
e->volume_use = PA_ALSA_VOLUME_MERGE;
|
||||||
|
|
||||||
PA_LLIST_PREPEND(pa_alsa_element, p->elements, e);
|
PA_LLIST_PREPEND(pa_alsa_element, p->elements, e);
|
||||||
|
p->last_element = e;
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2390,6 +2391,10 @@ pa_alsa_path_set *pa_alsa_path_set_new(pa_alsa_mapping *m, pa_alsa_direction_t d
|
||||||
/* Mark all other passed elements for require-absent */
|
/* Mark all other passed elements for require-absent */
|
||||||
for (je = en; *je; je++) {
|
for (je = en; *je; je++) {
|
||||||
pa_alsa_element *e;
|
pa_alsa_element *e;
|
||||||
|
|
||||||
|
if (je == ie)
|
||||||
|
continue;
|
||||||
|
|
||||||
e = pa_xnew0(pa_alsa_element, 1);
|
e = pa_xnew0(pa_alsa_element, 1);
|
||||||
e->path = p;
|
e->path = p;
|
||||||
e->alsa_name = pa_xstrdup(*je);
|
e->alsa_name = pa_xstrdup(*je);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue