From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Harsha Priya <priya.harsha@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>,
alsa-devel@alsa-project.org, lrg@slimlogic.co.uk
Subject: Re: [PATCH 1/3] ASoC: soc_jack - add function to determine jack type
Date: Mon, 31 Jan 2011 12:08:26 +0000 [thread overview]
Message-ID: <20110131120826.GD5123@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1296234579-6622-1-git-send-email-priya.harsha@intel.com>
On Fri, Jan 28, 2011 at 10:39:39PM +0530, Harsha Priya wrote:
> given the mic bias value. For any codec that would give
> the mic bias value on a jack insertion, this function would
> return the type of jack based on mic bias range
I think this is too minimal as an API for this. There's two things I'm
missing here. The major one is that there's no handling of debounce -
jack insertion is a very slow and very analogue process relative to CPUs
so taking a single reading is likely to give false measurements.
The other is that there's no facility for either scaling the voltages
with micbias (obviously the specific voltages read are going to vary
depending on what the micbias voltage on a given system is) or for
adding other things that can be detected. For example, some systems
have buttons on their headset which pull micbias to ground via varying
resistances with individual buttons being detected by measuring the
different voltages resulting from the different resistances.
It'd be worth taking a look at the sec_jack stuff that Samsung have used
in at least some of their Android devices:
http://android.git.kernel.org/?p=kernel/samsung.git;a=blob;f=include/linux/sec_jack.h
It's quite hard coded in code terms but it covers things like the
debounce.
next prev parent reply other threads:[~2011-01-31 12:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-28 17:09 [PATCH 1/3] ASoC: soc_jack - add function to determine jack type Harsha Priya
2011-01-31 12:06 ` Liam Girdwood
2011-01-31 12:08 ` Mark Brown [this message]
2011-02-01 13:19 ` Harsha, Priya
2011-02-01 13:22 ` Mark Brown
2011-02-01 13:35 ` Harsha, Priya
2011-02-01 13:43 ` 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=20110131120826.GD5123@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@slimlogic.co.uk \
--cc=priya.harsha@intel.com \
--cc=vinod.koul@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).