alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: ALSA ML <alsa-devel@alsa-project.org>,
	Harsha Priya <harshapriya.n@intel.com>,
	Takashi Iwai <tiwai@suse.de>,
	Sriram Periyasamy <sriramx.periyasamy@intel.com>,
	mturquette@baylibre.com,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Patches Audio <patches.audio@intel.com>,
	Mark Brown <broonie@kernel.org>,
	linux-clk@vger.kernel.org
Subject: Re: [PATCH v4 4/7] ASoC: Intel: kbl: Enable mclk and ssp sclk early
Date: Wed, 6 Dec 2017 17:25:07 +0530	[thread overview]
Message-ID: <20171206115506.GR32417@localhost> (raw)
In-Reply-To: <20171205233326.GD4283@codeaurora.org>

On Tue, Dec 05, 2017 at 03:33:26PM -0800, Stephen Boyd wrote:
> On 11/22, Sriram Periyasamy wrote:

> > +static int platform_clock_control(struct snd_soc_dapm_widget *w,
> > +			struct snd_kcontrol *k, int  event)
> > +{
> > +	struct snd_soc_dapm_context *dapm = w->dapm;
> > +	struct snd_soc_card *card = dapm->card;
> > +	struct kbl_rt5663_private *priv = snd_soc_card_get_drvdata(card);
> > +	int ret = 0;
> > +
> > +	/*
> > +	 * MCLK/SCLK need to be ON early for a successful synchronization of
> > +	 * codec internal clock. And the clocks are turned off during
> > +	 * POST_PMD after the stream is stopped.
> > +	 */
> > +	switch (event) {
> > +	case SND_SOC_DAPM_PRE_PMU:
> > +		if (__clk_is_enabled(priv->mclk))
> 
> Why do you need to use this in your consumer driver? Do you not
> know if the clk is on at boot time and then you need to make sure
> you don't call clk_set_rate() on an already enabled clk? If so,
> why can't the provider driver for mclk take care of that and do
> nothing if the clk is enabled already and clk_set_rate() is
> called with the same rate as what's in the hardware?

yes makes sense, we will move the check of __clk_is_enabled() in the
provider driver and let that return success if it is already at same rate
etc and is enabled.

-- 
~Vinod

  reply	other threads:[~2017-12-06 11:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22 12:09 [alsa-devel] [PATCH v4 0/7] ASoC: Intel: Skylake: Add a clk driver to enable ssp clks early Sriram Periyasamy
2017-11-22 12:09 ` [alsa-devel] [PATCH v4 1/7] ASoC: Intel: Skylake: Parse nhlt and register clock device Sriram Periyasamy
2017-11-22 12:09 ` [alsa-devel] [PATCH v4 2/7] ASoC: Intel: Skylake: Add ssp clock driver Sriram Periyasamy
2017-11-22 12:09 ` [alsa-devel] [PATCH v4 3/7] ASoC: Intel: Skylake: Add extended I2S config blob support in Clock driver Sriram Periyasamy
2017-11-22 12:09 ` [alsa-devel] [PATCH v4 4/7] ASoC: Intel: kbl: Enable mclk and ssp sclk early Sriram Periyasamy
2017-12-05 23:33   ` Stephen Boyd
2017-12-06 11:55     ` Vinod Koul [this message]
2017-11-22 12:09 ` [alsa-devel] [PATCH v4 5/7] ASoC: Intel: eve: " Sriram Periyasamy
2017-11-22 12:09 ` [alsa-devel] [PATCH v4 6/7] ASoC: Intel: Skylake: Make DSP replies more human readable Sriram Periyasamy
2017-11-22 12:09 ` [alsa-devel] [PATCH v4 7/7] ASoC: Intel: Skylake: Add FW reply for MCLK/SCLK IPC Sriram Periyasamy
2017-11-28 16:25 ` [alsa-devel] [PATCH v4 0/7] ASoC: Intel: Skylake: Add a clk driver to enable ssp clks early Vinod Koul

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=20171206115506.GR32417@localhost \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=harshapriya.n@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=patches.audio@intel.com \
    --cc=sboyd@codeaurora.org \
    --cc=sriramx.periyasamy@intel.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;
as well as URLs for NNTP newsgroup(s).