public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Ashish Chavan <ashish.chavan@kpitcummins.com>
Cc: lrg@ti.com, alsa-devel <alsa-devel@alsa-project.org>,
	David Dajun Chen <david.chen@diasemi.com>,
	kuninori.morimoto.gx@renesas.com,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [alsa-devel] [PATCH 7/9] ASoC: da7210: Add support for ALC and Noise suppression
Date: Wed, 12 Oct 2011 16:04:04 +0100	[thread overview]
Message-ID: <20111012150404.GT3647@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1318432070.12107.426.camel@matrix>

On Wed, Oct 12, 2011 at 08:37:50PM +0530, Ashish Chavan wrote:

> +	if (ucontrol->value.integer.value[0]) {
> +		/* Check if noise suppression is enabled */
> +		if (reg_cache[DA7210_CONTROL] & DA7210_NOISE_SUP_EN) {

No, don't go peering directly into the register cache.  This is going to
explode if the board configures a different cache style and means you
can't change the cache type later.  Just read the register and trust
that the cache will do something sane.

> +			dev_dbg(codec->dev, "Failed to enable ALC\n");
> +			return -EPERM;
> +		}

Either drop the debug print or make it say what the problem is.

similar problems in the rest of the patch.

> +	SOC_SINGLE("ALC Capture Max Gain", DA7210_ALC_MAX, 0, 0x3F, 0),
> +	SOC_SINGLE("ALC Capture Min Gain", DA7210_ALC_MIN, 0, 0x3F, 0),
> +	SOC_SINGLE("ALC Capture Noise Gain", DA7210_ALC_NOIS, 0, 0x3F, 0),

Volume.

  reply	other threads:[~2011-10-12 15:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-12 15:07 [alsa-devel] [PATCH 7/9] ASoC: da7210: Add support for ALC and Noise suppression Ashish Chavan
2011-10-12 15:04 ` Mark Brown [this message]
2011-10-13  9:15   ` Ashish Chavan
2011-10-13 10:26     ` 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=20111012150404.GT3647@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ashish.chavan@kpitcummins.com \
    --cc=david.chen@diasemi.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.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