mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-20 06:50:06 +01:00
Merge branch 'alsa-ucm-multi-verb-hw-volumes' into 'master'
alsa-ucm: Set up hardware volumes again on duplicate port additions See merge request pulseaudio/pulseaudio!840
This commit is contained in:
commit
1ce1b261cf
1 changed files with 22 additions and 20 deletions
|
|
@ -1261,11 +1261,14 @@ void pa_alsa_ucm_add_port(
|
|||
|
||||
pa_hashmap_put(ports, port->name, port);
|
||||
pa_log_debug("Add port %s: %s", port->name, port->description);
|
||||
}
|
||||
|
||||
data = PA_DEVICE_PORT_DATA(port);
|
||||
PA_HASHMAP_FOREACH_KV(verb_name, vol, is_sink ? dev->playback_volumes : dev->capture_volumes, state) {
|
||||
if (pa_hashmap_get(data->paths, verb_name))
|
||||
continue;
|
||||
pa_alsa_path *path = pa_alsa_path_synthesize(vol->mixer_elem,
|
||||
is_sink ? PA_ALSA_DIRECTION_OUTPUT : PA_ALSA_DIRECTION_INPUT);
|
||||
|
||||
if (!path)
|
||||
pa_log_warn("Failed to set up volume control: %s", vol->mixer_elem);
|
||||
else {
|
||||
|
|
@ -1284,7 +1287,6 @@ void pa_alsa_ucm_add_port(
|
|||
pa_hashmap_put(dev->capture_mapping->input_path_set->paths, pa_xstrdup(vol->mixer_elem), path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
port->priority = priority;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue