Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Ideas about an analog-to-digital converter API



On Thu, Jan 1, 2009 at 9:07 AM, Jared D. McNeill 
<jmcneill%invisible.ca@localhost> wrote:
> Ken Hornstein wrote:
>>>
>>> Actually, audio has a way to set the analog input range: it has input
>>> gain control (multichannel, yet) as part of the mixer interface.
>>
>> Hm, I looked at that, but I don't quite see how it's flexible enough.  For
>> example, the MAX197 (the A/D chip that is of interest to me) can be set
>> to go from 0 to 5V, 0 to 10V, -5 to 5V, or -10 to 10V.  The "gain" knob on
>> the mixer is an unsigned char.  I could set some "magic" gain values to
>> make that work, but it just feels ... wrong.  And there's not a good way
>> to query capabilies using that interface, from what I can see.
>
> A hardware driver using MI audio can provide its own ioctls, you could use
> that for your driver (or layer another API between MI audio and your driver
> using custom ioctls).
>
Could we avoid please avoid hijacking a framework for something else
than its original purpose. This is a wrong way of designing things. An
ADC/DAC framework should not use audio(4) stuff, but the inverse, ie.
audio(4) should be adapted to use a general ADC/DAC framework.
audio(4) is only a subset of ADC/DAC use-case.

Thanks,

 - Arnaud


Home | Main Index | Thread Index | Old Index