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>] [day] [month] [year] [list]
Message-ID: <20151208190005.GY5727@sirena.org.uk>
Date:	Tue, 8 Dec 2015 19:00:05 +0000
From:	Mark Brown <broonie@...nel.org>
To:	Damien Horsley <Damien.Horsley@...tec.com>
Cc:	alsa-devel@...a-project.org, Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Jaroslav Kysela <perex@...ex.cz>,
	Takashi Iwai <tiwai@...e.com>, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	James Hartley <james.hartley@...tec.com>
Subject: Re: [PATCH V2 2/2] ASoC: img: Add driver for Pistachio internal DAC

On Tue, Dec 08, 2015 at 05:05:24PM +0000, Damien Horsley wrote:

> +static int pistachio_internal_dac_set_mute(struct snd_kcontrol *kcontrol,
> +				  struct snd_ctl_elem_value *ucontrol)
> +{
> +	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
> +	struct pistachio_internal_dac *dac = snd_soc_codec_get_drvdata(codec);
> +	u32 reg;
> +
> +	dac->mute = ucontrol->value.integer.value[0];
> +
> +	if (dac->mute)
> +		reg = PISTACHIO_INTERNAL_DAC_CTRL_MUTE_MASK;
> +	else
> +		reg = 0;
> +
> +	regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_CTRL,
> +			PISTACHIO_INTERNAL_DAC_CTRL_MUTE_MASK, reg);
> +
> +	return 0;
> +}

Shouldn't this just be a standard SOC_SINGLE() now?  We've got a regmap.
Otherwise this looks good.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ