From: "Omair M. Abdullah" <omair.m.abdullah@intel.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Ramesh Babu <ramesh.babu@linux.intel.com>,
alsa-devel@alsa-project.org, vinod.koul@linux.intel.com,
vaibhav.agarwal@intel.com, lgirdwood@gmail.com,
Omair Mohammed Abdullah <omair.m.abdullah@linux.intel.com>
Subject: Re: [PATCH] ASoC: Jack: add configurable option for irq_flag
Date: Sun, 17 Feb 2013 12:07:25 +0530 [thread overview]
Message-ID: <20130217063725.GB23031@oma-dev> (raw)
In-Reply-To: <20130215121727.GD22283@opensource.wolfsonmicro.com>
On Fri, Feb 15, 2013 at 12:17:27PM +0000, Mark Brown wrote:
> On Fri, Feb 15, 2013 at 12:40:00PM +0530, Omair M. Abdullah wrote:
>
> > This patch is mainly to handle GPIOs where there is some toggling of the GPIO
> > lines due to the switch bouncing, and the debounce time cannot be increased
> > further due to other constraints. In such cases, providing the specific
> > edge on which to trigger the interrupt helps increase the robustness.
>
> > ___ _ _ _________
> > e.g. |_| |______________| |_|
>
> > insert followed by removal, where we want to trigger on the falling edge in both
> > cases.
>
> This doesn't make much sense to me, it's a *very* non-obvious change and
> it doesn't reflect what's actually happening well. If you happen to be
> lucky and get no bounce it'll fail. If it's working on your system
> there is a fair element of luck in there.
>
> It sounds like all you're looking for here is a better debounce
> algorithm, for example one that delays for a bit then starts polling the
> GPIO state at a higher rate and declares a result when the GPIO state
> doesn't change for a few polls.
We are using a polling mechanism in our system to check the jack state a few
times. But what we observed is that we always get a bounce.
Also, we do have a system where we are using the snd_soc_jack_gpio code for a
codec interrupt through a GPIO line, like Ramesh mentioned - even if it is just
for re-using the software debounce mechanism. In such cases, the interrupt would
be triggered on one edge only. Maybe that is not the original intent the of that
code?
next prev parent reply other threads:[~2013-02-17 6:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-12 5:37 [PATCH] ASoC: Jack: add configurable option for irq_flag Omair Mohammed Abdullah
2013-02-12 11:47 ` Mark Brown
2013-02-13 5:39 ` Ramesh Babu
2013-02-13 13:19 ` Mark Brown
2013-02-15 7:10 ` Omair M. Abdullah
2013-02-15 12:17 ` Mark Brown
2013-02-17 6:37 ` Omair M. Abdullah [this message]
2013-02-17 18:11 ` Mark Brown
2013-02-18 12:55 ` Omair M. Abdullah
2013-02-18 13:29 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130217063725.GB23031@oma-dev \
--to=omair.m.abdullah@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lgirdwood@gmail.com \
--cc=omair.m.abdullah@linux.intel.com \
--cc=ramesh.babu@linux.intel.com \
--cc=vaibhav.agarwal@intel.com \
--cc=vinod.koul@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.