acp: Probe and set up HW volume for cards detected through UCM

The codepath `pa_alsa_ucm_add_ports` -> `probe_volumes` ->
`pa_alsa_path_probe` was never called leading to no HW volume being set
up when loading a card through UCM. PulseAudio calls this from
`card_set_profile` -> `pa_alsa_{sink,source}_new`.
This commit is contained in:
Marijn Suijten 2020-12-09 00:25:09 +01:00 committed by Wim Taymans
parent d636cadbb8
commit 44882f5ab3

View file

@ -249,9 +249,12 @@ static void add_profiles(pa_card *impl)
init_device(impl, dev, PA_ALSA_DIRECTION_OUTPUT, m, n_devices++);
pa_dynarray_append(&impl->out.devices, dev);
}
if (impl->use_ucm)
pa_alsa_ucm_add_ports_combination(dev->ports, &m->ucm_context,
if (impl->use_ucm) {
pa_alsa_ucm_add_ports_combination(NULL, &m->ucm_context,
true, impl->ports, ap, NULL);
pa_alsa_ucm_add_ports(&dev->ports, m->proplist, &m->ucm_context,
true, impl, dev->pcm_handle, impl->profile_set->ignore_dB);
}
else
pa_alsa_path_set_add_ports(m->output_path_set, ap, impl->ports,
dev->ports, NULL);
@ -268,10 +271,12 @@ static void add_profiles(pa_card *impl)
pa_dynarray_append(&impl->out.devices, dev);
}
if (impl->use_ucm)
pa_alsa_ucm_add_ports_combination(dev->ports, &m->ucm_context,
false, impl->ports, ap, NULL);
else
if (impl->use_ucm) {
pa_alsa_ucm_add_ports_combination(NULL, &m->ucm_context,
false, impl->ports, ap, NULL);
pa_alsa_ucm_add_ports(&dev->ports, m->proplist, &m->ucm_context,
false, impl, dev->pcm_handle, impl->profile_set->ignore_dB);
} else
pa_alsa_path_set_add_ports(m->input_path_set, ap, impl->ports,
dev->ports, NULL);