mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH V2 2/2] ASoC: img: Add driver for Pistachio internal DAC
       [not found] ` <1449594324-2597-3-git-send-email-Damien.Horsley@imgtec.com>
@ 2015-12-08 19:00   ` Mark Brown
  0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2015-12-08 19:00 UTC (permalink / raw)
  To: Damien Horsley
  Cc: alsa-devel, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
	Kumar Gala, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	devicetree, linux-kernel, James Hartley

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

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.

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-08 19:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1449594324-2597-1-git-send-email-Damien.Horsley@imgtec.com>
     [not found] ` <1449594324-2597-3-git-send-email-Damien.Horsley@imgtec.com>
2015-12-08 19:00   ` [PATCH V2 2/2] ASoC: img: Add driver for Pistachio internal DAC Mark Brown

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®