devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Rongjun Ying <rongjun.ying@csr.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	Barry Song <baohua@kernel.org>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Workgroup.linux@csr.com
Subject: Re: [PATCH 1/2] ASoC: sirf: Add audio usp interface driver
Date: Tue, 1 Jul 2014 18:48:44 +0100	[thread overview]
Message-ID: <20140701174844.GA410@sirena.org.uk> (raw)
In-Reply-To: <1404181134-21663-2-git-send-email-rongjun.ying@csr.com>

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

On Tue, Jul 01, 2014 at 10:18:53AM +0800, Rongjun Ying wrote:

A few *really* trivial things below, otherwise this looks good:

> +	if (usp->daifmt_format == SND_SOC_DAIFMT_I2S)
> +		regmap_update_bits(usp->regmap, USP_RX_FRAME_CTRL,
> +			USP_I2S_SYNC_CHG, USP_I2S_SYNC_CHG);
> +	else if (usp->daifmt_format == SND_SOC_DAIFMT_DSP_A) {
> +		regmap_update_bits(usp->regmap, USP_RX_FRAME_CTRL,
> +			USP_I2S_SYNC_CHG, 0);
> +		frame_len = data_len * params_channels(params);
> +		data_len = frame_len;
> +	}

Make this a switch statement for legibility, and if you do need to use {
} make sure they're used consistently for all branches of an if ().

> +	int playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;

I'm not sure the extra variable adds much here.

> +static struct snd_soc_dai_driver sirf_usp_pcm_dai = {
> +	.probe = sirf_usp_pcm_dai_probe,
> +	.name		= "sirf-usp-pcm",
> +	.id			= 0,

Weird indentation here.

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

  reply	other threads:[~2014-07-01 17:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01  2:18 [PATCH 0/2] ASoC: add CSR SiRFSoC audio USP interface driver Rongjun Ying
2014-07-01  2:18 ` [PATCH 1/2] ASoC: sirf: Add audio usp " Rongjun Ying
2014-07-01 17:48   ` Mark Brown [this message]
2014-07-01  2:18 ` [PATCH 2/2] ASoC: sirf: Add device tree binding for the USP audio device Rongjun Ying

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=20140701174844.GA410@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Workgroup.linux@csr.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=baohua@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=rongjun.ying@csr.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).