From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Koul, Vinod" <vinod.koul@intel.com>
Cc: "tiwai@suse.de" <tiwai@suse.de>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"Harsha, Priya" <priya.harsha@intel.com>,
"lrg@slimlogic.co.uk" <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 4/4] ASoC: mid-x86 add jack detect support
Date: Wed, 19 Jan 2011 18:54:03 +0000 [thread overview]
Message-ID: <20110119185403.GF17150@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <438BB0150E931F4B9CE701519A446301084470BBE1@bgsmsx502.gar.corp.intel.com>
On Wed, Jan 19, 2011 at 10:18:04PM +0530, Koul, Vinod wrote:
> > Since this is a common pattern we should ideally have some utility code
> > which can take any table of ADC values in conjunction with any ADC and
> > use those to do detection.
> Yes the codec reads into the ADC to measure the micbias voltage.
> It has map where we know based on micbais present what kind of accessory maybe
> connected. Since this is entirely codec domain it should be in codec.
> Let me know if you disagree.
Well, the ADC is clearly part of the CODEC but the logic surrounding
walking through the table and coming up with jack statuses to report
based off it isn't, that's a generic thing which should probably be
sitting along with soc-jack.c (possibly in there, possibly as a separate
file).
> > > +static int sn95031_initialize_adc(struct snd_soc_codec *sn95031_codec)
> > > +{
> > > + int base_addr, chnl_addr;
> > > + int value;
> > > + static int channel_index;
> > The functions added in this header look like they'd be better placed in
> > the source file?
> Typically ADC should be a separate driver but we don't have that yet so
> though of adding these as helpers.
> When we get a proper adc driver we can replace this with code calling adc.
I'd suggest putting the bodies of the function into the main CODEC
driver for now.
prev parent reply other threads:[~2011-01-19 18:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 12:48 [PATCH 4/4] ASoC: mid-x86 add jack detect support Harsha Priya
2011-01-19 14:41 ` Mark Brown
2011-01-19 16:48 ` Koul, Vinod
2011-01-19 18:54 ` Mark Brown [this message]
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=20110119185403.GF17150@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=tiwai@suse.de \
--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).