All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org,
	subhransu.s.prusty@intel.com, lgirdwood@gmail.com
Subject: Re: [PATCH v3 5/6] ASoC: Intel: add BYTCR machine driver with RT5640
Date: Thu, 6 Nov 2014 18:41:42 +0530	[thread overview]
Message-ID: <20141106131141.GD1870@intel.com> (raw)
In-Reply-To: <20141106124854.GC8509@sirena.org.uk>


[-- Attachment #1.1: Type: text/plain, Size: 2113 bytes --]

On Thu, Nov 06, 2014 at 12:48:54PM +0000, Mark Brown wrote:
> On Tue, Nov 04, 2014 at 04:25:19PM +0530, Vinod Koul wrote:
> 
> > +static int byt_aif1_hw_params(struct snd_pcm_substream *substream,
> > +					struct snd_pcm_hw_params *params)
> > +{
> > +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> > +	struct snd_soc_dai *codec_dai = rtd->codec_dai;
> > +	int ret;
> > +
> > +	if (strncmp(codec_dai->name, "rt5640-aif1", 11))
> > +		return 0;
> 
> This looks wrong...  fairly sure I queried this on an earlier version of
> the patch and was told it wasn't required.
This was supposed to be removed, not sure why it creeped back in, will fix
now

> 
> > +	ret = snd_soc_dai_set_sysclk(codec_dai, RT5640_SCLK_S_PLL1,
> > +				     params_rate(params) * 512,
> > +				     SND_SOC_CLOCK_IN);
> > +	if (ret < 0) {
> > +		dev_err(rtd->dev, "can't set codec clock %d\n", ret);
> > +		return ret;
> > +	}
> > +	ret = snd_soc_dai_set_pll(codec_dai, 0, RT5640_PLL1_S_BCLK1,
> 
> Missing blank line here and in several places throughout the file.  I'd
> expect the PLL to be enabled before the sysclk is told to use it, error
> checking might kick in otherwise.
ok

> 
> > +#ifdef CONFIG_PM_SLEEP
> > +static int snd_byt_prepare(struct device *dev)
> > +{
> > +	return snd_soc_suspend(dev);
> > +}
> > +
> > +static void snd_byt_complete(struct device *dev)
> > +{
> > +	snd_soc_resume(dev);
> > +}
> > +
> > +static int snd_byt_poweroff(struct device *dev)
> > +{
> > +	return snd_soc_poweroff(dev);
> > +}
> > +#else
> > +#define snd_byt_prepare NULL
> > +#define snd_byt_complete NULL
> > +#define snd_byt_poweroff NULL
> > +#endif
> 
> Don't bother with the wrapper functions, they're not adding anything.
> Why are we using prepare() and complete() here - other machine drivers
> don't need to do that?  Comments might be helpful...
due to I2C. We have seen that codec is resumed but I2C is still
not ready causing i2c failures, so moving to complete and prepare helps. I
will add this comment. Will remove wrappers.

Thanks
-- 
~Vinod

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2014-11-06 13:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 10:55 [PATCH v3 0/6] ASoC: Intel: ACPI support and machines Vinod Koul
2014-11-04 10:55 ` [PATCH v3 1/6] ASoC: Intel: mrfld - remove unnecessary check for pointer Vinod Koul
2014-11-06 12:36   ` Mark Brown
2014-11-04 10:55 ` [PATCH v3 2/6] ASoC: Intel: mrfld - create separate module for pci part Vinod Koul
2014-11-06 12:36   ` Mark Brown
2014-11-04 10:55 ` [PATCH v3 3/6] ASoC: Intel: mrfld - add shim save restore Vinod Koul
2014-11-06 12:36   ` Mark Brown
2014-11-04 10:55 ` [PATCH v3 4/6] ASoC: Intel: mrfld- add ACPI module Vinod Koul
2014-11-06 12:43   ` Mark Brown
2014-11-06 13:09     ` Vinod Koul
2014-11-06 13:44       ` Mark Brown
2014-11-10  6:18         ` Vinod Koul
2014-11-04 10:55 ` [PATCH v3 5/6] ASoC: Intel: add BYTCR machine driver with RT5640 Vinod Koul
2014-11-06 12:48   ` Mark Brown
2014-11-06 13:11     ` Vinod Koul [this message]
2014-11-06 13:46       ` Mark Brown
2014-11-10  6:20         ` Vinod Koul
2014-11-10 10:03           ` Mark Brown
2014-11-04 10:55 ` [PATCH v3 6/6] ASoC: Intel: Add Merrifield machine driver Vinod Koul
2014-11-06 12:51   ` Mark Brown
2014-11-06 13:18     ` 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=20141106131141.GD1870@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=subhransu.s.prusty@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 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.