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