mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Inha Song <ideal.song@samsung.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	linux-kernel@vger.kernel.org,
	ckeepax@opensource.wolfsonmicro.com,
	nikesh@opensource.wolfsonmicro.com, lars@metafoo.de,
	lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.de,
	Li.Xiubo@freescale.com, sachin.kamat@samsung.com,
	cw00.choi@samsung.com
Subject: Re: [alsa-devel] [PATCH] ASoC: wm8994: Manage wm8994's MCLK in codec driver
Date: Thu, 12 Mar 2015 11:39:45 +0000	[thread overview]
Message-ID: <20150312113945.GO28806@sirena.org.uk> (raw)
In-Reply-To: <1426128580-18320-1-git-send-email-ideal.song@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

On Thu, Mar 12, 2015 at 11:49:39AM +0900, Inha Song wrote:

> -		if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY)
> +		if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) {
> +			for (i = 0; i < ARRAY_SIZE(wm8994->clk_mclk); i++) {
> +				if (!IS_ERR(wm8994->clk_mclk[i]))
> +					clk_prepare_enable(wm8994->clk_mclk[i]);
> +			}

This isn't checking return values.  It's also enabling both clocks all
the time which isn't always going to be what's desired - it may result
in an expensive high frequency reference clock being enabled when only
a 32kHz clock is needed for example.  That doesn't seem desirable.

>  			active_reference(codec);

Should this perhaps be being done in active_reference instead?

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      parent reply	other threads:[~2015-03-12 11:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12  2:49 Inha Song
2015-03-12  2:49 ` Inha Song
2015-03-12  4:33 ` [alsa-devel] " Chanwoo Choi
2015-03-12  5:02   ` Inha Song
2015-03-12 11:39 ` Mark Brown [this message]

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=20150312113945.GO28806@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Li.Xiubo@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=cw00.choi@samsung.com \
    --cc=ideal.song@samsung.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikesh@opensource.wolfsonmicro.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=perex@perex.cz \
    --cc=sachin.kamat@samsung.com \
    --cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®