]> git.alsa-project.org Git - alsa-lib.git/commit
ucm: do not register hw: aliases for non-hw control devices
authorJaroslav Kysela <perex@perex.cz>
Tue, 24 Nov 2026 15:35:12 +0000 (16:35 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 24 Nov 2026 15:39:13 +0000 (16:39 +0100)
commit91a0e4d05565fd51b22e1fbb0d5042b9e5f433ca
tree5632e24569491f6bde535fbd26fcd9b43318b64e
parent3a0a1b535c5a609dc20eb054db4ff7f0e35cd3f9
ucm: do not register hw: aliases for non-hw control devices

uc_mgr_ctl_add() unconditionally registered the synthetic hw:<card> and
hw:<id> aliases into the dev_list of every opened control device. These
aliases identify the hw control interface of a card, so adding them to a
different interface (e.g. default:X) makes that handle wrongly claim the
hw name. Two cached entries then reference the same hw:<id> string and a
later hw:X request may be served by (or merged into) the default handle.

Register the hw:<card> / hw:<id> aliases only when the opened device is
actually a hw device, keeping each cache entry tied to a single control
interface.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/utils.c