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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux