From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Reddy, MR Swami" <MR.Swami.Reddy@ti.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"Girdwood, Liam" <lrg@ti.com>
Subject: Re: [PATCH ] ASoC: Add support for TI LM49453 Audio codec
Date: Fri, 3 Feb 2012 13:25:04 +0000 [thread overview]
Message-ID: <20120203132504.GK3151@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <290463D19D2E064191F1F96ECA480A89434ABCAEDD@EXMAIL02.scwf.nsc.com>
[-- Attachment #1.1: Type: text/plain, Size: 3289 bytes --]
On Fri, Feb 03, 2012 at 04:19:00AM -0800, Reddy, MR Swami wrote:
Fix your mailer to word wrap within paragraphs. I'm sure I've mentioned
this before...
> >> + snd_soc_write(codec, LM49453_P0_FLL_REF_FREQL_REG, (state->in & 0xff));
> >> + snd_soc_write(codec, LM49453_P0_FLL_REF_FREQH_REG,
> >> + ((state->in >> 8) & 0xff));
> >> +
> >> + snd_soc_write(codec, LM49453_P0_VCO_TARGETLL_REG,
> >> + state->out & 0xff);
> >> + snd_soc_write(codec, LM49453_P0_VCO_TARGETLH_REG,
> >> + (state->out >> 8) & 0xff);
> >> + snd_soc_write(codec, LM49453_P0_VCO_TARGETHL_REG,
> >> + (state->out >> 16) & 0xff);
> >> + snd_soc_write(codec, LM49453_P0_VCO_TARGETHH_REG,
> >> + (state->out >> 24) & 0xff);
> The above code used to set the reference frequencies for FLL and VCO.
> Ideally, this code can be removed, because these registers are used
> for reference only.
You're saying that the PLL is actually not user configurable at all and
the above register writes have no effect?
> >> + switch (lm49453->sysclk) {
> >> + case 12288000:
> >> + case 26000000:
> >> + case 19000000:
> >> + /* PLL CLK slection */
> >> + pll_clk = ~BIT(4);
> >> + break;
> >> + case 48000:
> >> + case 32576:
> >> + /* FLL CLK slection */
> >> + pll_clk = BIT(4);
> >> + break;
> >> + default:
> >> + return -EINVAL;
> >> + }
> The above code used to set for CLOCK type (ie either PLL or FLL). The
> sysclk is PLL (HIGH FREQ mode) or FLL (LOW FREQ mode). So based on the
> sysclk, the BIT(4) will be set.
This doesn't address my comment (which you've deleted from my reply)
at all. Why is this being done in hw_params()? It appears to be
totally unrelated to hw_params().
The clocking configuration in this driver seems very confused, the
system clock for the device should be being configured by some
combinantion of set_sysclk() and set_pll() and hw_params() should do any
adjustment of the clock dividers and so on to configure the rest of the
chip for the sample rate based on the current clocking configuration.
> >> + case SND_SOC_BIAS_STANDBY:
> >> + if (codec->dapm.bias_level == SND_SOC_BIAS_OFF)
> >> + regcache_sync(lm49453->regmap);
> >> +
> >> + snd_soc_update_bits(codec, LM49453_P0_PMC_SETUP_REG,
> >> + LM49453_PMC_SETUP_CHIP_EN, 0);
> >> + break;
> >> +
> >> + case SND_SOC_BIAS_OFF:
> >> + snd_soc_update_bits(codec, LM49453_P0_PMC_SETUP_REG,
> >> + LM49453_PMC_SETUP_CHIP_EN, 0);
> >> + break;
> >> + }
> Setting CHIP_EN bit as '0'. In the _STANDBY mode, CHIP_EN bit setting
> not needed and will remove in the next patch.
This also sounds broken, as I repeatedly said when reviewing previous
versions of the driver if disabling the chip does anything at all then
why don't you need to reenable the chip later?
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2012-02-03 13:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 14:30 [PATCH ] ASoC: Add support for TI LM49453 Audio codec Reddy, MR Swami
2012-02-02 23:14 ` Mark Brown
2012-02-03 12:19 ` Reddy, MR Swami
2012-02-03 13:25 ` Mark Brown [this message]
2012-02-03 13:33 ` M R Swami Reddy
2012-02-03 13:55 ` Mark Brown
2012-02-03 14:44 ` M R Swami Reddy
2012-02-03 14:54 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2012-01-31 11:59 [PATCH] " Reddy, MR Swami
2012-01-31 20:12 ` Mark Brown
[not found] <290463D19D2E064191F1F96ECA480A89434AAB3793@EXMAIL02.scwf.nsc.com>
2012-01-27 14:35 ` Mark Brown
[not found] <290463D19D2E064191F1F96ECA480A89434A67486B@EXMAIL02.scwf.nsc.com>
2012-01-03 21:17 ` Mark Brown
[not found] ` <290463D19D2E064191F1F96ECA480A89434A7595BC@EXMAIL02.scwf.nsc.com>
2012-01-05 6:17 ` 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=20120203132504.GK3151@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=MR.Swami.Reddy@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@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 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.