[alsa-devel] UCM representation questions

Stephen Warren swarren at nvidia.com
Thu May 26 00:38:31 CEST 2011


Liam Girdwood wrote at Saturday, May 21, 2011 10:20 AM:
> On 20/05/11 22:48, Stephen Warren wrote:
> > I have a few more questions how to represent things in UCM.
> > ...
> > The WM8903 can capture from one or the other or AMIC/DMIC, but not both.
> > ...
> > How to indicate when certain devices can be used together, or are
> > mutually exclusive?
> 
> Atm, I don't think we can do this with devices. We can do it with
> modifiers though (i.e. a modifier can list it's supported devices). It
> does sound like a useful feature and probably could be based on the
> modifier supported device code.

OK, it looks pretty easy to modify the code to parse and implement
something like:

SectionDevice."AMIC".0 {
    Comment "Analog Microphone Jack"

    ConflictingDevice [
        "DMIC",
        "foo"
    ]
...
}

SectionDevice."DMIC".0 {
    Comment "Internal Digital Microphone"

    ConflictingDevice [
        "AMIC"
    ]
...
}

Does that look reasonable?

However, the application is going to want to query these conflict lists,
and probably a modifier's SupportedDevice list too.

Should snd_use_case_get be modified to accept a query on e.g.:

_SupportedDevice/${modifier}
_ConflictingDevice/${device}

Both returning say a comma separate list of strings i.e. "DMIC,foo". I
guess the "get" code could reserve any string starting with "_" for this
kind of "system" value looking instead of user-defined Value[] lookup.

How does that sound?

If that's good, I'll try to make time to implement this.

-- 
nvpublic



More information about the Alsa-devel mailing list