lkml.org 
[lkml]   [2023]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-04-14 19:48    [W:0.226 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site