[OLPC-devel] Re: ALSA interface for the analog input
Jaya Kumar
jayakumar.lkml at gmail.com
Tue Jul 11 03:49:50 EDT 2006
On 7/7/06, Jim Gettys <jg at laptop.org> wrote:
> That begs an interesting question: we have to poke a register on the ADI
> 1888, and also tell the embedded controller to do something, to enable
> the analog input.
>
> Is this going to pose any difficulties? One piece of it is potentially
> generic, and the other is clearly very OLPC hardware specific....
No problems on the ALSA side. Here's my understanding:
. User decides to use sensor mode and clicks on something in the UI
. That UI app then has to do two things:
*a- tell the EC to turn on MIC_AC (ie: bypass C35 and R25) [ OLPC specific ]
*b- tell ALSA to disable VREFOUT and the high pass filter [ AD1888 specific ]
. User connects the sensor device to the mic input jack
. Done!
. User clicks on UI to switch back into mic mode
. UI does the opposite in *a and *b
. Can connect to and use the standard mic again
Details on *a:
Based on the port IO sequence that Ray sent, I guess talking to the EC
will be through cs5536 GPIO (LPC). There's a cs5536 gpio driver that
shows up as a character device. The userspace app could use that
interface to talk to the EC.
Details on *b:
Both the AD1888 specific VREFOUT and high pass filter bits are exposed
via mixer controls that are set from user space. The UI app can either
shell out amixer commands or use the snd_mixer_* API to unset the two
controls which are surfaced as:
"V_REFOUT Enable"
"High Pass Filter Enable"
I hope this helps clarify things.
btw, the patches for this and the AD1888 suspend/resume fix have been
merged into Linus's 2.6.18-rc1 tree. Aggressive suspend/resume is in
the alsa tree and also akpm's -mm tree.
Thanks,
jaya
More information about the Devel
mailing list