Re: [alsa-devel] [PATCHv4 2/7] ASoC: TWL6030: Add twl6030 codec driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2010-02-24 at 17:37 -0600, Olaya, Margarita wrote:
> 
> > -----Original Message-----
> > From: Liam Girdwood [mailto:lrg@xxxxxxxxxxxxxxx]
> > Sent: Wednesday, February 24, 2010 4:38 AM
> > To: Olaya, Margarita
> > Cc: alsa-devel@xxxxxxxxxxxxxxxx; linux-omap@xxxxxxxxxxxxxxx; broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx
> > 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@xxxxxx>
> > >
> > > 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

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux