Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1400698

Re: [PATCH v3] ASoC: MAX9860: new driver

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3] ASoC: MAX9860: new driver
Date 2016-05-13 13:00 +0200
Message-ID <ryiZ4-1D7-7@gated-at.bofh.it> (permalink)
References <rygaS-7tc-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Fri, May 13, 2016 at 09:25:33AM +0200, Peter Rosin wrote:

> +static int max9860_dai_startup(struct snd_pcm_substream *substream,
> +			       struct snd_soc_dai *dai)
> +{
> +	struct snd_soc_codec *codec = dai->codec;
> +	struct max9860_priv *max9860 = snd_soc_codec_get_drvdata(codec);
> +
> +	switch (max9860->fmt & SND_SOC_DAIFMT_MASTER_MASK) {
> +	case SND_SOC_DAIFMT_CBM_CFM:
> +	case SND_SOC_DAIFMT_CBS_CFS:
> +		return 0;
> +
> +	default:
> +		return -EINVAL;
> +	}
> +}

This isn't the place to enforce restrictions on DAI format, do it in
set_dai_fmt().

Otherwise this looks good.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3] ASoC: MAX9860: new driver Peter Rosin <peda@axentia.se> - 2016-05-13 10:00 +0200
  Re: [PATCH v3] ASoC: MAX9860: new driver Mark Brown <broonie@kernel.org> - 2016-05-13 13:00 +0200
  Re: [PATCH v3] ASoC: MAX9860: new driver Rob Herring <robh@kernel.org> - 2016-05-16 18:30 +0200

csiph-web