[alsa-devel] [PATCH] ASoC: Add max98371 codec driver

Mark Brown broonie at kernel.org
Mon Mar 21 15:56:42 CET 2016


On Sun, Mar 20, 2016 at 06:59:02PM -0700, anish kumar wrote:

This looks mostly good, a few small things:

> +static const char *const voltage_level_text[] = {
> +	"9.5dB", "10.5dB", "11.5dB", "11.5dB", "12.5dB",
> +	"13.5dB", "14.5dB", "15.5dB", "16.5dB", "17.5dB",
> +	"18.5dB", "19.5dB", "20.5dB"
> +};

Volume controls should be done with TLV data not enums.

> +static const struct snd_kcontrol_new max98371_snd_controls[] = {
> +	SOC_SINGLE_TLV("Speaker Gain", MAX98371_GAIN,
> +			MAX98371_GAIN_SHIFT, (1<<MAX98371_GAIN_WIDTH)-1, 0,
> +			max98371_gain_tlv),

Volume controls should end with Volume.

> +static int max98371_probe(struct snd_soc_codec *codec)
> +{
> +	struct max98371_priv *max98371 = snd_soc_codec_get_drvdata(codec);
> +
> +	max98371->codec = codec;
> +	return 0;
> +}

Do we ever actually use this?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20160321/5b9dbba8/attachment.sig>


More information about the Alsa-devel mailing list