Skip to content

alsa-ucm: Replace port device UCM context assertion with an error

The pa_alsa_ucm_set_port() function is passed both a mapping context and a device port, and both of these refer to their respective UCM device. While switching over to having one port per mapping per UCM device, I expected both of these to be the same device struct, so added an assert checking so.

This assertion gets triggered when we have multiple UCM verbs declaring the same UCM device name. The root cause here is that the ports' UCM device references are set once while creating the ports for the card, so they happen to be those of a specific verb and may not match those from a different UCM verb's profiles' mappings.

Solving the root cause necessitates a larger refactor. What we actually assume here is that name of the UCM device is same for both the port and the UCM context, which ends up always true in practice. For now, replace the assert with a check and error.

Merge request reports