alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, alan@linux.intel.com,
	Harsha Priya <priya.harsha@intel.com>,
	lrg@slimlogic.co.uk
Subject: Re: [PATCH 1/4] ASoC sst: Add msic codec driver
Date: Sun, 2 Jan 2011 13:33:23 +0000	[thread overview]
Message-ID: <20110102133322.GC4935@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1293707551-8308-1-git-send-email-vinod.koul@intel.com>

On Thu, Dec 30, 2010 at 04:42:31PM +0530, Vinod Koul wrote:

> This patch adds the msic asoc codec driver. This driver currently supports only playback.
> Capture and jack detection to be added later

This looks mostly OK, but you probably want to run it through
checkpatch.pl.  For quite a few of the debug prints you've got here
you're replicating stuff that's in the core as standard - if you turn on
debug logs from the core you should get equivalent logging.

Some more specific issues below:

> +	switch (params_format(params)) {
> +	case SNDRV_PCM_FORMAT_S16_LE:
> +		format = 3;
> +		break;
> +
> +	case SNDRV_PCM_FORMAT_S24_LE:
> +		format = 0;
> +		break;
> +	default:
> +		return -EINVAL;
> +	}
> +	snd_soc_update_bits(dai->codec, MSIC_PCM2C2, BIT(4)|BIT(5), format);

This won't work - both the mask and value for snd_soc_update_bits() are
bitmasks so I'd expect the format for S16 to be 0x18 with that bitmask.

> +	snd_soc_update_bits(dai->codec, MSIC_PCM1C1, BIT(7), rate);

Similarly here.

> +	/*PCM interface */
> +	msic_write(codec, MSIC_PCM2RXSLOT01, 0x10);
> +	msic_write(codec, MSIC_PCM2RXSLOT23, 0x32);
> +	msic_write(codec, MSIC_PCM2RXSLOT45, 0x54);

For these it'd be better if you could provide some comments explaining
what the configuration that's being set is.  It's hard to tell if this
is stuff that should be managed by the driver or not.

> +static struct platform_driver intelmid_codec_driver = {
> +	.driver		= {
> +		.name		= "mid-msic-codec",

> +MODULE_ALIAS("msic-codec");

This should be platform:mid-msic-codec.

  reply	other threads:[~2011-01-02 13:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-30 11:12 [PATCH 1/4] ASoC sst: Add msic codec driver Vinod Koul
2011-01-02 13:33 ` Mark Brown [this message]
2011-01-03  5:30   ` Koul, Vinod
2011-01-03 15:25     ` Mark Brown
2011-01-03 15:36       ` Koul, Vinod
2011-01-03 15:44         ` Mark Brown

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=20110102133322.GC4935@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alan@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=priya.harsha@intel.com \
    --cc=tiwai@suse.de \
    --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;
as well as URLs for NNTP newsgroup(s).