All of lore.kernel.org
 help / color / mirror / Atom feed
From: javier Martin <javier.martin@vista-silicon.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, s.hauer@pengutronix.de,
	linux-arm-kernel@lists.infradead.org, b32542@freescale.com
Subject: Re: [PATCH v2 1/4] ASoC: Add TI tlv320aic32x4 codec support.
Date: Tue, 1 Mar 2011 15:36:13 +0100	[thread overview]
Message-ID: <AANLkTinSqVuuiif33yd1zZBTzeb4mvvLpDd4+=RPiHHM@mail.gmail.com> (raw)
In-Reply-To: <20110301142231.GH9662@opensource.wolfsonmicro.com>

Thank you for your fast response.

On 1 March 2011 15:22, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> On Tue, Mar 01, 2011 at 03:02:05PM +0100, Javier Martin wrote:
>
>> +     SOC_DOUBLE_R_TLV("ADC Level Volume", AIC32X4_LADCVOL,
>> +                     AIC32X4_RADCVOL, 0, 0x28, 0, tlv_step_0_5),
>> +     SOC_DOUBLE_R_TLV("PGA Gain Level Volume", AIC32X4_LMICPGAVOL,
>> +                     AIC32X4_RMICPGAVOL, 0, 0x5f, 0, tlv_step_0_5),
>
> I suspect you don't want to have Gain and Level in there.
>
>> +     SOC_SINGLE("AGC Left Enable Switch", AIC32X4_LAGC1, 7, 1, 0),
>> +     SOC_SINGLE("AGC Right Enable Switch", AIC32X4_RAGC1, 7, 1, 0),
>
> A switch is obviously an enable.
>

Yes, let me fix that in a following version.

>> +static const struct aic32x4_configs aic32x4_reg_init[] = {
>
> As I said in reply to your previous posting this looks like it shouldn't
> be here.  A few things jump out as suspicious but not everything you're
> doing is clear:
>
>> +     {AIC32X4_LDOCTL, AIC32X4_LDOCTLEN},
>
> This looks like it should be dynamically managed at runtime, either via
> DAPM or in the bias level functions.
>
>> +     {AIC32X4_CMMODE, AIC32X4_LDOIN_18_36 | AIC32X4_LDOIN2HP},
>> +     {AIC32X4_CLKMUX, AIC32X4_PLLCLKIN},
>> +     {AIC32X4_IFACE3, AIC32X4_DACMOD2BCLK},
>> +     {AIC32X4_DACSETUP,
>> +      AIC32X4_LDAC2LCHN | AIC32X4_RDAC2RCHN | AIC32X4_SSTEP2WCLK},
>> +     {AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_IN2R_10K},
>> +     {AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_IN1L_10K},
>
> These look like platform configuration.
>
>> +     {AIC32X4_LMICPGAVOL, 0x00},
>> +     {AIC32X4_RMICPGAVOL, 0x00},
>
> These look like volume controls which should be exposed to users.
>
>> +     /* Unmute ADC left and right channels */
>> +     {AIC32X4_ADCFGA, 0x00},
>
> This looks like it should be user visible.
>
>> +     /* MICBIAS = 2.075V(CM=0.75V) generated from LDOIN */
>> +     {AIC32X4_MICBIAS, 0x68},
>
> This should be configured by the platform.
>

Ok, let me organize all this stuff for better understanding. By the
way, when you said it should be configured by platform are you
referring to machine driver or to board specific code? Can you please
point me to a codec driver which uses a similar approach?

Thank you.

-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com

WARNING: multiple messages have this Message-ID (diff)
From: javier.martin@vista-silicon.com (javier Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/4] ASoC: Add TI tlv320aic32x4 codec support.
Date: Tue, 1 Mar 2011 15:36:13 +0100	[thread overview]
Message-ID: <AANLkTinSqVuuiif33yd1zZBTzeb4mvvLpDd4+=RPiHHM@mail.gmail.com> (raw)
In-Reply-To: <20110301142231.GH9662@opensource.wolfsonmicro.com>

Thank you for your fast response.

On 1 March 2011 15:22, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> On Tue, Mar 01, 2011 at 03:02:05PM +0100, Javier Martin wrote:
>
>> + ? ? SOC_DOUBLE_R_TLV("ADC Level Volume", AIC32X4_LADCVOL,
>> + ? ? ? ? ? ? ? ? ? ? AIC32X4_RADCVOL, 0, 0x28, 0, tlv_step_0_5),
>> + ? ? SOC_DOUBLE_R_TLV("PGA Gain Level Volume", AIC32X4_LMICPGAVOL,
>> + ? ? ? ? ? ? ? ? ? ? AIC32X4_RMICPGAVOL, 0, 0x5f, 0, tlv_step_0_5),
>
> I suspect you don't want to have Gain and Level in there.
>
>> + ? ? SOC_SINGLE("AGC Left Enable Switch", AIC32X4_LAGC1, 7, 1, 0),
>> + ? ? SOC_SINGLE("AGC Right Enable Switch", AIC32X4_RAGC1, 7, 1, 0),
>
> A switch is obviously an enable.
>

Yes, let me fix that in a following version.

>> +static const struct aic32x4_configs aic32x4_reg_init[] = {
>
> As I said in reply to your previous posting this looks like it shouldn't
> be here. ?A few things jump out as suspicious but not everything you're
> doing is clear:
>
>> + ? ? {AIC32X4_LDOCTL, AIC32X4_LDOCTLEN},
>
> This looks like it should be dynamically managed at runtime, either via
> DAPM or in the bias level functions.
>
>> + ? ? {AIC32X4_CMMODE, AIC32X4_LDOIN_18_36 | AIC32X4_LDOIN2HP},
>> + ? ? {AIC32X4_CLKMUX, AIC32X4_PLLCLKIN},
>> + ? ? {AIC32X4_IFACE3, AIC32X4_DACMOD2BCLK},
>> + ? ? {AIC32X4_DACSETUP,
>> + ? ? ?AIC32X4_LDAC2LCHN | AIC32X4_RDAC2RCHN | AIC32X4_SSTEP2WCLK},
>> + ? ? {AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_IN2R_10K},
>> + ? ? {AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_IN1L_10K},
>
> These look like platform configuration.
>
>> + ? ? {AIC32X4_LMICPGAVOL, 0x00},
>> + ? ? {AIC32X4_RMICPGAVOL, 0x00},
>
> These look like volume controls which should be exposed to users.
>
>> + ? ? /* Unmute ADC left and right channels */
>> + ? ? {AIC32X4_ADCFGA, 0x00},
>
> This looks like it should be user visible.
>
>> + ? ? /* MICBIAS = 2.075V(CM=0.75V) generated from LDOIN */
>> + ? ? {AIC32X4_MICBIAS, 0x68},
>
> This should be configured by the platform.
>

Ok, let me organize all this stuff for better understanding. By the
way, when you said it should be configured by platform are you
referring to machine driver or to board specific code? Can you please
point me to a codec driver which uses a similar approach?

Thank you.

-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com

  reply	other threads:[~2011-03-01 14:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01 14:02 (no subject) Javier Martin
2011-03-01 14:02 ` No subject Javier Martin
2011-03-01 14:02 ` [PATCH v2 1/4] ASoC: Add TI tlv320aic32x4 codec support Javier Martin
2011-03-01 14:02   ` Javier Martin
2011-03-01 14:22   ` Mark Brown
2011-03-01 14:22     ` Mark Brown
2011-03-01 14:36     ` javier Martin [this message]
2011-03-01 14:36       ` javier Martin
2011-03-01 14:43       ` Mark Brown
2011-03-01 14:43         ` Mark Brown
2011-03-01 14:02 ` [PATCH v2 2/4] ASoC: Fix burstsize and DSP_B format problems in imx-ssi Javier Martin
2011-03-01 14:02   ` Javier Martin
2011-03-01 20:59   ` Liam Girdwood
2011-03-01 20:59     ` Liam Girdwood
2011-03-01 23:31   ` Mark Brown
2011-03-01 23:31     ` Mark Brown
2011-03-01 14:02 ` [PATCH v2 3/4] ASoC: Add machine driver for Visstrim_M10 board Javier Martin
2011-03-01 14:02   ` Javier Martin
2011-03-01 14:02 ` [PATCH v2 4/4] ARM: Add SSI and aic3204 code to Visstrim_M10 boards Javier Martin
2011-03-01 14:02   ` Javier Martin

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='AANLkTinSqVuuiif33yd1zZBTzeb4mvvLpDd4+=RPiHHM@mail.gmail.com' \
    --to=javier.martin@vista-silicon.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=b32542@freescale.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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.