[alsa-devel] UCM representation questions

Liam Girdwood lrg at ti.com
Thu May 26 13:02:11 CEST 2011


On 25/05/11 23:38, Stephen Warren wrote:
> 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?

Yes, although does it make more sense using "SupportedDevice" instead ? 

> 
> 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?
> 

Yeah, this sounds like it would be useful and let the apps know the correct device dependencies.

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

Ok, sounds good.

Liam


More information about the Alsa-devel mailing list