[PATCH v4 2/2] ASoC: rt715:add micmute led state control supports
Yuan, Perry
Perry.Yuan at dell.com
Mon Mar 22 10:25:25 CET 2021
Hi Mark:
> -----Original Message-----
> From: Mark Brown <broonie at kernel.org>
> Sent: Tuesday, March 9, 2021 1:24 AM
> To: Yuan, Perry
> Cc: pobrn at protonmail.com; pierre-louis.bossart at linux.intel.com;
> oder_chiou at realtek.com; perex at perex.cz; tiwai at suse.com;
> hdegoede at redhat.com; mgross at linux.intel.com; Limonciello, Mario;
> lgirdwood at gmail.com; alsa-devel at alsa-project.org; linux-
> kernel at vger.kernel.org; platform-driver-x86 at vger.kernel.org
> Subject: Re: [PATCH v4 2/2] ASoC: rt715:add micmute led state control
> supports
>
> On Mon, Mar 01, 2021 at 05:38:34PM +0800, Perry Yuan wrote:
>
> > + /* Micmute LED state changed by muted/unmute switch */
> > + if (mc->invert) {
> > + if (ucontrol->value.integer.value[0] || ucontrol-
> >value.integer.value[1]) {
> > + micmute_led = LED_OFF;
> > + } else {
> > + micmute_led = LED_ON;
> > + }
> > + ledtrig_audio_set(LED_AUDIO_MICMUTE, micmute_led);
> > + }
>
> These conditionals on inversion seem weird and counterintuitive. If we're
> going with this approach it would probably be clearer to define a custom
> operation for the affected controls that wraps the standard one and adds the
> LED setting rather than keying off invert like this.
Currently the sof soundwire driver has no generic led control yet.
This patch can handle the led control needs for MIC mute LED, definitely the patch is a short term solution.
There is a feature request discussion when we started to implement this solution.
https://github.com/thesofproject/linux/issues/2496#issuecomment-713892620
The workable way for now is that we put the LED mute control to the codec driver.
When there is new and full sound LED solution implemented, this part will be also optimized.
The Hardware privacy feature needs this patch to handle the Mic mute led state change.
Before that full solution ready in kernel, could we take this as short term solution?
Perry
More information about the Alsa-devel
mailing list