[Trac #1476] microphone circuits never powered down
Zarro Boogs per Child
bugtracker at laptop.org
Mon May 14 15:51:25 EDT 2007
#1476: microphone circuits never powered down
---------------------+------------------------------------------------------
Reporter: dwmw2 | Owner: dilinger
Type: defect | Status: new
Priority: normal | Milestone: BTest-4
Component: kernel | Version: Build 406
Resolution: | Keywords:
---------------------+------------------------------------------------------
Comment (by wmb at firmworks.com):
From OFW, you can turn off the microphone bias with:
select /audio vbias-off unselect
I need to make this automatic on power-up.
Unfortunately, there are some wrinkles:
a) This one is minor: If you do not have an internal microphone attached,
the LED will stay on for several minutes instead of going out immediately.
The VREFOUT signal goes to hi-Z state when turned off, and with no
microphone to discharge the node, the voltage stays high for a long time
(the LED is isolated from the node via a FET). This could be fixed, if
indeed it is a problem, by adding a 100K resistor to discharge the node.
b) This is a bad one: Since the CODEC powers up in bias-voltage-on state,
the light will come on automatically upon a resume from S3, and explicit
action must be taken to turn it off. That turn-off action is not trivial,
because the only way to communicate with the CODEC is via the audio sample
stream. It is not as simple at hitting a GPIO register and being done
with it. You have to tell the AC97 engine to insert a control frame in
the sample stream, which involves some amount of setup (I haven't yet
worked out the mininum sequence).
Worse yet, the LED is going to flash when this happens - it will come up
in the on state and stay that way for several milliseconds at the very
least, until the software can get to the point where it can tell the CODEC
to turn it off.
Not only that, but the LED flashes on briefly when the system is going
down into suspend state. I'm not sure why, but it is easy to observe with
the following OFW commands:
ok select /camera
ok s vbias-off many
Every time you press the power button, the system will wake up, turn the
LED off as soon as possible, and go back to sleep; you can observe the
flicker on the the LED for every wakeup. Well, actually, not quite as
soon as possible - it first waits for the display to sync up, so the
flicker could be be shortened by doing the codec thing before the display
re-synce. But that won't solve the problem, because the human eye is very
good at detecting brief flashes, so making the flash a little shorter
won't eliminate the visual artifact.
--
Ticket URL: <http://dev.laptop.org/ticket/1476#comment:3>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list