lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAd53p6ru7CJ=pJ2knCL5pgU_Y+nA=yTPscKk225zTD-fv4qQg@mail.gmail.com>
Date:   Wed, 20 Jul 2022 09:45:37 +0800
From:   Kai-Heng Feng <kai.heng.feng@...onical.com>
To:     Jaroslav Kysela <perex@...ex.cz>
Cc:     tiwai@...e.com, Bard Liao <yung-chuan.liao@...ux.intel.com>,
        Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ALSA: hda: Skip creating captures in SOF context

On Tue, Jul 19, 2022 at 11:41 PM Jaroslav Kysela <perex@...ex.cz> wrote:
>
> Dne 19. 07. 22 v 16:47 Kai-Heng Feng napsal(a):
> > On HP laptops that use SOF driver for DMIC, the micmute LED doesn't
> > light up when mic is muted after commit 9b014266ef8a ("ASoC: SOF:
> > topology: use new sound control LED layer").
> >
> > The micmute LED itself is still working via sysfs, but it doesn't follow
> > mute anymore. That's because unlike vendors like Dell and Lenovo, HP
> > laptops use HDA codec to control mute LEDs instead of ACPI. So on HP
> > laptops, both SOF and HDA create captures with
> > SNDRV_CTL_ELEM_ACCESS_MIC_LED access, snd_ctl_led_set_state() considers
> > there are two different kcontrols and one of them is not muted.
>
> It does not mean that it's a wrong behavior. When both controls are muted, the
> LED should be turned on. It just requires that all inputs are off (and it may
> be the default - probably we can set in UCM or so). If you turn the "Capture
> Switch" off in amixer / alsamixer, do things work as expected ?

Yes. When all captures are muted the micmute LED is on.

>
> > So skip creating captures for HDA when it's called from SOF, the
> > captures are already handled by SOF.
>
> The capture controls are for other inputs like external analog microphone. If
> it is required to suppress the MIC LED for some hardware, just skip the
> "spec->mic_mute_led = 1" assignment in hda_generic.c . Also, the check
> "codec->core.type != HDA_DEV_ASOC" is not sufficient, because you don't know,
> if the topology really sets the MIC LED flag.

AFAIK the external analog microphone on DMIC laptop is driven by SOF driver too.
If those capture controls are indeed needed for external analog mics,
use UCM to mute them by default won't work either.

Skip "mic_mute_led = 1" can be hard because it's still needed for legacy HDA.
If checking "HDA_DEV_ASOC" isn't sufficient, is it possible to just
check "card" in snd_ctl_led_set_state(), instead of kcontrols?
I think it's reasonable to assume a card has just one speaker LED and
one microphone LED.

Kai-Heng

>
>                                         Jaroslav
>
> --
> Jaroslav Kysela <perex@...ex.cz>
> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ