[alsa-devel] [PATCH 14/31] HDA patch_via.c: Add Jack detect feature for VT1708.
Harald Welte
laforge at gnumonks.org
Tue Oct 6 14:17:40 CEST 2009
Hi all,
On Tue, Oct 06, 2009 at 08:01:40AM +0200, Takashi Iwai wrote:
> > As you describe, we implement it with self-reschedule workqueue, acting
> > like a timer.
> > Is there some advice to implement timer-like task, I tested with timer and
> > it will crash the driver.
>
> Right, you can't call it in a softirq.
>
> A few problems, however:
> - present variable should be in struct via_spec, instead of a static
> variable in update_hp_jack_state().
I agree
> - This mechanism is unconditionally invoked on VT1708 although, in
> theory, you can have a hardware that doesn't need HP jack detection
Yes, Logan/Li/Lydia: If we generate this kind of workaround with a timer,
it should only be used on those particular chips that absolutely need it.
> - Waking up each 100ms for the *whole* time is really bad regarding
> the power-saving; can't it be optimized?
I would personally actually suggest to simply not support headphone plug events
in case you are using such a [buggy?] chipset that does not support them.
I mean, what do you gain from that event? It's not something super-important.
waking up unconditionally every 100ms is really a too high burden on the
battery life.
Another option might be to make it a module load time parameter, so people
can choose if they actually want to pay the high power/batyery price for this
small feature.
--
- Harald Welte <laforge at gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
More information about the Alsa-devel
mailing list