mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
alsa: strip and add the _alibpref from device names
Strip the _alibpref from the device name, it contains a local counter to identify the ucm card that should remain internal. We set a flag on the device to notify of this. Re-add the _alibpref of the local card to the device name if the device was flagged. See #1286
This commit is contained in:
parent
283e13629c
commit
1c513464c8
2 changed files with 8 additions and 3 deletions
|
|
@ -252,6 +252,9 @@ static void init_device(pa_card *impl, pa_alsa_device *dev, pa_alsa_direction_t
|
|||
char **d;
|
||||
for (d = m->device_strings; *d; d++) {
|
||||
if (pa_startswith(*d, alibpref)) {
|
||||
size_t plen = strlen(alibpref);
|
||||
size_t len = strlen(*d);
|
||||
memmove(*d, (*d) + plen, len - plen + 1);
|
||||
dev->device.flags |= ACP_DEVICE_UCM_DEVICE;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue