Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: vinod.koul@intel.com, alsa-devel@alsa-project.org,
	Lars-Peter Clausen <lars@metafoo.de>,
	lgirdwood@gmail.com
Subject: Re: [alsa-devel] [PATCH] ASoC: Intel: Add merrifield machine driver
Date: Tue, 12 Aug 2014 11:36:09 +0530	[thread overview]
Message-ID: <20140812060601.GA1115@vinod.koul@linux.intel.com> (raw)
In-Reply-To: <20140729195043.GM17528@sirena.org.uk>

On Tue, Jul 29, 2014 at 08:50:43PM +0100, Mark Brown wrote:
> On Thu, Jul 17, 2014 at 05:43:45PM +0530, Subhransu S. Prusty wrote:
> 
> > +	default n
> 
> This is the standard Kconfig behaviour - no need to specify it (other
> drivers don't...).
Removed.
> 
> > +static int mrfld_8958_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;
> > +
> > +	if (!strcmp(codec_dai->name, "wm8994-aif1"))
> > +		return mrfld_wm8958_set_clk(codec_dai);
> > +	return 0;
> > +}
> 
> It's much clearer to define separate operations for each DAI, there's no
> need for the string matching (especially given that there's nothing to
> do for other DAIs).
> 
Don't need the comparison. Removed
> > +	/*
> > +	 * Machine uses 2 DMICs, other configs may use more so change below
> > +	 * accordingly
> > +	 */
> > +	{ "DMIC1DAT", NULL, "DMIC" },
> > +	{ "DMIC2DAT", NULL, "DMIC" },
> > +	/*{ "DMIC3DAT", NULL, "DMIC" },*/
> > +	/*{ "DMIC4DAT", NULL, "DMIC" },*/
> 
> Remove commented out code.
> 
Done
> > +	/* Force enable VMID to avoid cold latency constraints */
> > +	snd_soc_dapm_force_enable_pin(&card->dapm, "VMID");
> > +	snd_soc_dapm_sync(&card->dapm);
> 
> This looks like you're open coding a version of wm8994_vmid_mode().
> Though that might need some tuning for systems that really have no
> single ended outputs.
> 
VMID has a larget settling time. Keep it ON here to avoid the delay. Any
better way of doing this?
> > +	/*
> > +	 * Micbias1 is always off, so for pm optimizations make sure the micbias1
> > +	 * discharge bit is set to floating to avoid discharge in disable state
> > +	 */
> > +	snd_soc_update_bits(codec, WM8958_MICBIAS1, WM8958_MICB1_DISCH, 0);
> 
> Don't write directly to CODEC registers, provide a way of configuring
> this in the CODEC either via platform data or some API.  That way
> nothing else is writing to the CODEC register map without the driver for
> the CODEC knowing about it.
> 
Yes it can be given through the pdata. Removed.
> > +static void snd_mrfld_8958_complete(struct device *dev)
> > +{
> > +	struct snd_soc_card *card = dev_get_drvdata(dev);
> > +	struct snd_soc_codec *codec = card->rtd[CODEC_BE].codec;
> > +	struct snd_soc_dapm_context *dapm;
> > +
> > +	pr_debug("In %s\n", __func__);
> > +
> > +	pr_debug("found codec %s\n", codec->component.name);
> > +	dapm = &codec->dapm;
> > +
> > +	snd_soc_dapm_force_enable_pin(dapm, "VMID");
> > +	snd_soc_dapm_sync(dapm);
> > +
> > +	snd_soc_resume(dev);
> > +}
> 
> Doing the manual fiddling before rather than after resuming the core
> seems...  concerning, I'd expect this to be done either in one of the
> ASoC suspend/resume callbacks or at least after calling snd_soc_resume()
> - doing it before seems likely to trigger or cause bugs.
Complete callback is called only after resume. 
> 
> > +static int snd_mrfld_8958_poweroff(struct device *dev)
> > +{
> > +	pr_debug("In %s\n", __func__);
> > +	snd_soc_poweroff(dev);
> > +	return 0;
> > +}
> 
> Remove this, just use the core function directly.
Removed.
> 
> > +	platform_set_drvdata(pdev, &snd_soc_card_mrfld);
> > +	pr_info("%s successful\n", __func__);
> 
> This print has no content, remove it or at the very least downgrade it
> to debug level.
Done



-- 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2014-08-12  6:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 12:13 [PATCH] ASoC: Intel: Add merrifield machine driver Subhransu S. Prusty
2014-07-29 19:50 ` Mark Brown
2014-08-12  6:06   ` Subhransu S. Prusty
2014-08-12  6:06   ` Subhransu S. Prusty [this message]
2014-08-12 21:48     ` Mark Brown
2014-08-17 14:20       ` Subhransu S. Prusty
2014-08-17 14:20       ` [alsa-devel] " Subhransu S. Prusty
2014-08-17 14:57         ` Mark Brown
2014-08-18  3:59           ` Subhransu S. Prusty
2014-08-18  3:59           ` [alsa-devel] " Subhransu S. Prusty

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=20140812060601.GA1115@vinod.koul@linux.intel.com \
    --to=subhransu.s.prusty@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=vinod.koul@intel.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