public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: tony@atomide.com, alsa-devel@alsa-project.org,
	linux-omap@vger.kernel.org, sameo@linux.intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] ASoC: TWL4030: Do not modify the APLL_CTL register
Date: Mon, 2 Nov 2009 17:27:20 +0000	[thread overview]
Message-ID: <20091102172720.GA8546@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <1257165295-9352-6-git-send-email-peter.ujfalusi@nokia.com>

On Mon, Nov 02, 2009 at 02:34:55PM +0200, Peter Ujfalusi wrote:
> APLL_CTL register is configured by the twl4030-codec MFD
> driver.
> Remove code, which makes changes in the APLL_CTL register,
> and replace those with checks against the configured
> audio_mclk configuration done in the MFD driver.

This all looks mostly OK.  It might be nice to combine this patch with
the change to the MFD driver, simply because when the previous patch
said "move" but didn't remove anything from the CODEC driver it seemed a
bit surprising.  The MFD part of this is queued in ASoC ATM so it
shouldn't cause cross tree issues.

> -	twl4030_write(codec, TWL4030_REG_APLL_CTL, apll_ctrl);
> +	if ((freq / 1000) != twl4030->sysclk) {
> +		dev_err(codec->dev,
> +			"Mismatch in APLL infrequency %u (configred: %u)\n",
> +			freq, twl4030->sysclk * 1000);

Typos in the log message here (and similarly for the other DAI).

> -	if (infreq != TWL4030_APLL_INFREQ_26000KHZ) {
> +	if (twl4030->sysclk != 26000) {
>  		printk(KERN_ERR "TWL4030 voice startup: "
>  			"MCLK is not 26MHz, call set_sysclk() on init\n");
>  		return -EINVAL;

Is that advice still appropriate if things are specified via the
codec device now?

> @@ -2233,6 +2215,7 @@ static int __devinit twl4030_codec_probe(struct platform_device *pdev)
>  	twl4030_codec = codec;
>  
>  	/* Set the defaults, and power up the codec */
> +	twl4030->sysclk = twl4030_codec_get_mclk() / 1000;
>  	twl4030_init_chip(codec);
>  	codec->bias_level = SND_SOC_BIAS_OFF;
>  	twl4030_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

twl4030_codec_get_mclk() feels like it ought to take a parameter saying
which twl4030, though the chances of having multiple twl4030s in one
system are remote so it's not a real issue.

  reply	other threads:[~2009-11-02 17:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02 12:34 [PATCH 0/5] ASoC/MFD/OMAP: TWL4030: APLL_CTL handling change Peter Ujfalusi
2009-11-02 12:34 ` [PATCH 1/5] MFD: TWL4030: Add audio_mclk to the codec platform data Peter Ujfalusi
2009-11-02 12:34   ` [PATCH 2/5] OMAP: Configure audio_mclk for twl4030-codec MFD Peter Ujfalusi
2009-11-02 12:34     ` [PATCH 3/5] MFD: twl4030-codec: APLL_INFREQ handling in the MFD driver Peter Ujfalusi
2009-11-02 12:34       ` [PATCH 4/5] ASoC: TWL4030: Make sure, that the codec is powered on startup Peter Ujfalusi
2009-11-02 12:34         ` [PATCH 5/5] ASoC: TWL4030: Do not modify the APLL_CTL register Peter Ujfalusi
2009-11-02 17:27           ` Mark Brown [this message]
2009-11-03 14:05             ` Peter Ujfalusi
2009-11-02 17:28         ` [PATCH 4/5] ASoC: TWL4030: Make sure, that the codec is powered on startup Mark Brown
2009-11-02 17:30       ` [PATCH 3/5] MFD: twl4030-codec: APLL_INFREQ handling in the MFD driver Mark Brown
2009-11-03 13:37         ` Peter Ujfalusi
2009-11-03 13:44           ` Mark Brown
2009-11-03 14:02             ` Peter Ujfalusi

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=20091102172720.GA8546@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=peter.ujfalusi@nokia.com \
    --cc=sameo@linux.intel.com \
    --cc=tony@atomide.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