> there are now at most 2 choices.  analog or digital.  and yes, there
> are some codecs that only do analog and some that only to digital.

Yeah, that makes it more complicated. 

Is the following if-construction too vague?

if (dacs.ngroups = 1) {
        -- create the normal inputs.usingdac as it's done now
        -- we don't care if it's analog or digital
elsif (dacs.ngroups = 2) {
        -- create a knob outputs.spdif (or something similar)
        -- problem is how to wire it:
        -- clean choice would of course to check the i/o pins
        -- maybe some other rules would apply?

        -- like first dac is always analog and second one digital?
        -- or maybe the longer dac group is analog and the shorter digital?
        -- I doubt there are azalia devices with more digital sections
        -- than analog sections
}
        

Personally I think reading the i/o pins would be much safer,
but if it's really the case that those upper assumptions are 
always right, perhaps that would be another solution.

(Otherwise this could bring big problems if there would be a
non-"standard" azalia device sometimes...)


Note: I can't code C this is why I try to describe my thoughts..

>> I think another way would be if azalia could sense a plugged cable,
>> like it can do with headphones, that signal could then be used to
>> toggle on/off.
> 
> jack sense capability isn't a mandatory feature, so it's not a
> reliable method.
> 

Ok.

Reply via email to