[alsa-devel] [PATCH] ASoC: ics43432: Add codec driver for InvenSense ICS-43432

Mark Brown broonie at kernel.org
Fri Aug 14 17:55:48 CEST 2015


On Thu, Aug 13, 2015 at 03:55:17PM +0200, Ricard Wanderlof wrote:

> +static int ics43432_hw_params(struct snd_pcm_substream *substream,
> +	struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
> +{
> +	unsigned int rate = params_rate(params);
> +
> +	if (rate < ICS43432_RATE_MIN || rate > ICS43432_RATE_MAX)
> +		return -EINVAL;
> +
> +	return 0;
> +}

This isn't adding much, just let the constraint code worry about it.

> +static int ics43432_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
> +{
> +	switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
> +	case SND_SOC_DAIFMT_NB_NF:

Similarly here, this isn't adding any discoverability of the
configuration so just omit it.

> +MODULE_DESCRIPTION("ASoC ICS43432 driver");
> +MODULE_AUTHOR("Ricard Wanderlof <ricardw at axis.com>");
> +MODULE_LICENSE("GPL2");

GPLv2.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150814/86ceff07/attachment.sig>


More information about the Alsa-devel mailing list