[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a1d81f71-e661-4deb-a20c-500eb114588e@sirena.org.uk>
Date: Fri, 14 Apr 2023 18:47:41 +0100
From: Mark Brown <broonie@...nel.org>
To: Paweł Anikiel <pan@...ihalf.com>
Cc: alsa-devel@...a-project.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, lgirdwood@...il.com, perex@...ex.cz,
tiwai@...e.com, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, dinguyen@...nel.org,
lars@...afoo.de, nuno.sa@...log.com, upstream@...ihalf.com
Subject: Re: [PATCH 7/9] ASoC: ssm2602: Add mute gpio
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists