alsa-ucm: Disable old modifiers when switching profiles of same verb
Looks like I forgot to disable modifiers when switching between profiles of the same verb, this is to fix that. I discovered the issue shortly after my code got merged, with a weird UCM config that caused a segfault when switching profiles.
For example, when we have a Speaker
-Mic
conflict and a PlayTone
modifier with a PlaybackPCM
value that has SupportedDevice
of just Speaker
. This gives us two profiles: Speaker
(with PlayTone
as another mapping), and Mic
(without). When switching from Speaker
to Mic
we get a segfault because we try to disable PlayTone
's map->ucm_context.ucm_device
which is null.