mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Ryan Lee <ryans.lee@maximintegrated.com>
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	arnd@arndb.de, afd@ti.com, robert.jarzmik@free.fr,
	supercraig0719@gmail.com, jbrunet@baylibre.com,
	dannenberg@ti.com, romain.perier@collabora.com,
	bryce.ferguson@rockwellcollins.com,
	kuninori.morimoto.gx@renesas.com, m-stecklein@ti.com,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	ryan.lee.maxim@gmail.com
Subject: Re: [V3 2/2] ASoC: max98373: Added Amplifier Driver
Date: Thu, 4 Jan 2018 17:13:45 +0000	[thread overview]
Message-ID: <20180104171345.GI10774@sirena.org.uk> (raw)
In-Reply-To: <1515004757-22267-1-git-send-email-ryans.lee@maximintegrated.com>

[-- Attachment #1: Type: text/plain, Size: 2257 bytes --]

On Wed, Jan 03, 2018 at 10:39:17AM -0800, Ryan Lee wrote:

This looks mostly good.  There are a few smaller issues but I think at
this point it's most sensible to apply and fix those incrementally so
I'll do that, please follow up with patches fixing the remaining issues.

> --- /dev/null
> +++ b/sound/soc/codecs/max98373.c
> @@ -0,0 +1,971 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/* Copyright (c) 2017, Maxim Integrated */

SPDX headers are supposed to be C++ comments, please send a followup
patch fixing this.

> +static int max98373_get_bclk_sel(int bclk)
> +{
> +	int i;
> +	/* match BCLKs per LRCLK */
> +	for (i = 0; i < ARRAY_SIZE(bclk_sel_table); i++) {
> +		if (bclk_sel_table[i] == bclk)
> +			return i + 2;
> +	}
> +	return 0;
> +}
> +static int max98373_set_clock(struct snd_soc_codec *codec,

Missing blank line between the functions.

> +	}
> +	/* set DAI_SR to correct LRCLK frequency */

Another missing blank line.

> +static int max98373_dai_tdm_slot(struct snd_soc_dai *dai,
> +	unsigned int tx_mask, unsigned int rx_mask,
> +	int slots, int slot_width)
> +{
> +	struct snd_soc_codec *codec = dai->codec;
> +	struct max98373_priv *max98373 = snd_soc_codec_get_drvdata(codec);
> +	int bsel = 0;
> +	unsigned int chan_sz = 0;
> +	unsigned int mask;
> +	int x, slot_found;
> +
> +	max98373->tdm_mode = true;

This should really also support disabling TDM mode - if the parameters
are all 0 just turn TDM off.  Again can be fixed in a followup.

> +SOC_SINGLE_TLV("DHT Gain Min", MAX98373_R20D1_DHT_CFG,
> +	MAX98373_DHT_SPK_GAIN_MIN_SHIFT, 9, 0, max98373_dht_spkgain_min_tlv),
> +SOC_SINGLE_TLV("DHT Rot Pnt", MAX98373_R20D1_DHT_CFG,
> +	MAX98373_DHT_ROT_PNT_SHIFT, 15, 0, max98373_dht_rotation_point_tlv),
> +SOC_SINGLE_TLV("DHT Attack Step", MAX98373_R20D2_DHT_ATTACK_CFG,
> +	MAX98373_DHT_ATTACK_STEP_SHIFT, 4, 0, max98373_dht_step_size_tlv),
> +SOC_SINGLE_TLV("DHT Release Step", MAX98373_R20D3_DHT_RELEASE_CFG,
> +	MAX98373_DHT_RELEASE_STEP_SHIFT, 4, 0, max98373_dht_step_size_tlv),

You should add a Volume on the end of these control names so that
userspace knows how to display them properly; it's a little confusing as
they're not actually gains but it tends to work out better.  Same for
most of the other TLV controls.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-01-04 17:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-03 18:39 Ryan Lee
2018-01-04 17:13 ` Mark Brown [this message]
2018-01-05 17:10   ` Ryan Lee
2018-01-04 17:42 ` Applied "ASoC: max98373: Added Amplifier Driver" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180104171345.GI10774@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=afd@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=bryce.ferguson@rockwellcollins.com \
    --cc=dannenberg@ti.com \
    --cc=jbrunet@baylibre.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-stecklein@ti.com \
    --cc=perex@perex.cz \
    --cc=robert.jarzmik@free.fr \
    --cc=romain.perier@collabora.com \
    --cc=ryan.lee.maxim@gmail.com \
    --cc=ryans.lee@maximintegrated.com \
    --cc=supercraig0719@gmail.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®