Re: [PATCH] ASoC: pcm512x: Implement the digital_mute interface

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

 



On Sat, Nov 24, 2018 at 10:05:42PM +0200, Dimitris Papavasiliou wrote:

> +static int pcm512x_digital_playback_switch_get(struct snd_kcontrol *kcontrol,
> +					       struct snd_ctl_elem_value *ucontrol)
> +{
> +	struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
> +	struct pcm512x_priv *pcm512x = snd_soc_component_get_drvdata(component);
> +
> +	mutex_lock(&pcm512x->mutex);
> +	ucontrol->value.integer.value[0] = !(pcm512x->mute & 0x4);
> +	ucontrol->value.integer.value[1] = !(pcm512x->mute & 0x2);
> +	mutex_unlock(&pcm512x->mutex);
> +
> +	return 0;
> +}

Just remove the control, no need to jump through these hoops.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux