Re: [PATCH] ASoC: Use delayed work for debounce of GPIO based jacks

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

 



On Wed,  6 Oct 2010 16:05:01 -0700
Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Rather than block the workqueue by sleeping to do the debounce use delayed
> work to implement the debounce time. This should also mean that we extend
> the debounce time on each new bounce, potentially allowing shorter debounce
> times for clean insertions.
> 
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
> ---
> 
> This is completely untested as I do not have any systems to hand which
> can make use of this functionality but I believe it should work - I've
> CCed a couple of the OMAP people since they seem to be the main users.
> 
>  include/sound/soc.h  |    2 +-
>  sound/soc/soc-jack.c |   11 +++++------
>  2 files changed, 6 insertions(+), 7 deletions(-)
> 
Works fine on N900 when testing with
hexdump /dev/input/by-path/platform-soc-audio-event

I have a vague memory that user space and actual state can get soon out
of sync if using delay based debouncing only and doing some insane plug
in/out cycle. So this is a step to right direction for implementing
more advanced debouncing.

Acked-by: Jarkko Nikula <jhnikula@xxxxxxxxx>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux