On Thu, 2010-10-07 at 08:54 +0300, Jarkko Nikula wrote: > 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> Acked-by: Liam Girdwood <lrg@xxxxxxxxxxxxxxx> -- Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel