acp: sync with pulseaudio

This commit is contained in:
Wim Taymans 2022-01-03 17:21:28 +01:00
parent 2f4c589d5b
commit b63a6a1b66
5 changed files with 93 additions and 60 deletions

View file

@ -255,10 +255,10 @@ static void init_device(pa_card *impl, pa_alsa_device *dev, pa_alsa_direction_t
pa_idxset_string_compare_func);
if (m->ucm_context.ucm) {
dev->ucm_context = &m->ucm_context;
if (impl->ucm.alibpref != NULL) {
if (impl->ucm.alib_prefix != NULL) {
for (d = m->device_strings; *d; d++) {
if (pa_startswith(*d, impl->ucm.alibpref)) {
size_t plen = strlen(impl->ucm.alibpref);
if (pa_startswith(*d, impl->ucm.alib_prefix)) {
size_t plen = strlen(impl->ucm.alib_prefix);
size_t len = strlen(*d);
memmove(*d, (*d) + plen, len - plen + 1);
dev->device.flags |= ACP_DEVICE_UCM_DEVICE;