Re: [PATCH V2 2/2] ASoC: img: Add driver for Pistachio internal DAC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux