lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1318497345.12107.443.camel@matrix>
Date:	Thu, 13 Oct 2011 14:45:45 +0530
From:	Ashish Chavan <ashish.chavan@...tcummins.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	<lrg@...com>, alsa-devel <alsa-devel@...a-project.org>,
	David Dajun Chen <david.chen@...semi.com>,
	<kuninori.morimoto.gx@...esas.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [alsa-devel] [PATCH 7/9] ASoC: da7210: Add support for ALC and
 Noise suppression

On Wed, 2011-10-12 at 16:04 +0100, Mark Brown wrote:
> 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.

Will update the code to directly read the register. I thought of saving
some io bandwidth and if I remember correctly, I saw few exiting drivers
doing this.

> 
> > +			dev_dbg(codec->dev, "Failed to enable ALC\n");
> > +			return -EPERM;
> > +		}
> 
> Either drop the debug print or make it say what the problem is.

Will add more specific info about error.

> 
> 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.
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ