alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Liam Girdwood <lrg@slimlogic.co.uk>
To: "Olaya, Margarita" <magi.olaya@ti.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"broonie@opensource.wolfsonmicro.com"
	<broonie@opensource.wolfsonmicro.com>
Subject: Re: [alsa-devel] [PATCHv4 2/7] ASoC: TWL6030: Add twl6030 codec driver
Date: Thu, 25 Feb 2010 09:06:58 +0000	[thread overview]
Message-ID: <1267088818.3255.42.camel@odin> (raw)
In-Reply-To: <1889FA7136B567478A67D4B0F85B0CCE65DD22C9@dlee06.ent.ti.com>

On Wed, 2010-02-24 at 17:37 -0600, Olaya, Margarita wrote:
> 
> > -----Original Message-----
> > From: Liam Girdwood [mailto:lrg@slimlogic.co.uk]
> > Sent: Wednesday, February 24, 2010 4:38 AM
> > To: Olaya, Margarita
> > Cc: alsa-devel@alsa-project.org; linux-omap@vger.kernel.org; broonie@opensource.wolfsonmicro.com
> > Subject: Re: [PATCHv4 2/7] ASoC: TWL6030: Add twl6030 codec driver
> >
> > On Tue, 2010-02-23 at 18:10 -0600, Olaya, Margarita wrote:
> > > From: Misael Lopez Cruz <x0052729@ti.com>
> > >
> > > Initial version of TWL6030 codec driver.
> > >
> > > The TWL6030 codec uses a propietary PDM-based digital audio interface.
> > > Audio paths supported are:
> > >
> > > - Input: Main Mic, Sub Mic, Headset Mic, Auxiliary-FM Left/Right
> > > - Output: Headset Left/Right, Handsfree Left/Right

> > > +
> > > +/*
> > > + * read from twl6030 hardware register
> > > + */
> > > +static int twl6030_read(struct snd_soc_codec *codec,
> > > +                       unsigned int reg)
> > > +{
> > > +       u8 value;
> > > +
> > > +       if (reg >= TWL6030_CACHEREGNUM)
> > > +               return -EIO;
> > > +
> > > +       twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &value, reg);
> > > +       twl6030_write_reg_cache(codec, reg, value);
> >
> >
> > You probably want to read from the cache if the register is not
> > volatile. This saves a slow I2C read.
> >
> 
> This function is called for volatile registers; if the register is not volatile we call twl6030_read_reg_cache. I could merge those two functions with a case for those.
> 

Ok, could amend the name or comment so it's obvious this is for
volatiles.

Thanks

Liam

-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk


  reply	other threads:[~2010-02-25  9:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24  0:10 [PATCHv4 2/7] ASoC: TWL6030: Add twl6030 codec driver Olaya, Margarita
2010-02-24 10:38 ` Liam Girdwood
2010-02-24 10:42   ` [alsa-devel] " Mark Brown
2010-02-24 23:57     ` Olaya, Margarita
2010-02-25 10:17       ` Mark Brown
2010-02-24 23:37   ` Olaya, Margarita
2010-02-25  9:06     ` Liam Girdwood [this message]
2010-02-25 10:17     ` Mark Brown
2010-02-26 19:42       ` Olaya, Margarita
2010-02-26 21:21         ` Mark Brown
2010-02-24 13:38 ` 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=1267088818.3255.42.camel@odin \
    --to=lrg@slimlogic.co.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=magi.olaya@ti.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).