Takashi Iwai wrote:
Clemens Ladisch wrote:
The media controller API <linux/media.h> allows prividing routing information, but its implementation does not quite fit the sound drivers:
- it allows reconfiguration of links, but not in a way that would be useful for ALSA selector controls
I didn't mention why: it is not possible to enable two links to a sink pad, and neither can one change the state of two links atomically; therefore, an enum control with exactly one active input cannot be modelled. (It might be possible to change the media controller API to allow this.)
Mute controls _could_ be modelled by disabling links, but with all other mixer control types not represented in the media controller API, this doesn't appear to be very useful.
But what about multiple codecs on a single control device? Can they be represented well?
The driver has to choose the entity IDs so that they don't conflict; something like busnumber<<20 | codecaddress<<10 | nodeid. The USB audio driver will have this problem if there are multiple audio control interfaces, so I guess it will have to include the interface number.
Regards, Clemens