Re: [PATCH 7/9] ASoC: ssm2602: Add mute gpio

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

 



On Fri, Apr 14, 2023 at 04:02:01PM +0200, Paweł Anikiel wrote:

> @@ -352,6 +355,10 @@ static int ssm2602_mute(struct snd_soc_dai *dai, int mute, int direction)
>  	else
>  		regmap_update_bits(ssm2602->regmap, SSM2602_APDIGI,
>  				    APDIGI_ENABLE_DAC_MUTE, 0);
> +
> +	if (ssm2602->mute_gpiod)
> +		gpiod_set_value_cansleep(ssm2602->mute_gpiod, mute);
> +

It seems pointless to control both the mute register and the GPIO mute
here, we gain nothing but overhead from having the GPIO.  What I would
suggest is that if the GPIO is present then that is used in _mute() and
we add a control allowing the user to mute and unmute via the register.

Attachment: signature.asc
Description: PGP signature


[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