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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 02 Nov 2021 09:19:25 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     Jonathan Clarke <jonathan.a.clarke@...il.com>
Cc:     linux-kernel@...r.kernel.org, Takashi Iwai <tiwai@...e.com>,
        alsa-devel@...a-project.org
Subject: Re: [PATCH] Make top/rear speaker, mute and micmute leds work on HP x360 14-ea000 laptops that use Realtek 245 codec

On Mon, 01 Nov 2021 11:34:45 +0100,
Jonathan Clarke wrote:
> 
> Thanks for taking a look at this patch so quickly, Takashi.
> 
> On Sat, Oct 30, 2021 at 12:01:03PM +0200, Takashi Iwai wrote:
> > Could you give more descriptions?  The patch isn't trivial at all, and
> > it needs more explanations.
> 
> Yes, will do.
> 
> > > +           /* output mute is set via SET_COEF_INDEX,SET_PROC_COEF */
> > > +           spec->mute_led_polarity = 0;
> > > +           spec->mute_led_coef.idx = 0x0b;
> > > +           spec->mute_led_coef.mask = 0xffff;
> > > +           spec->mute_led_coef.on = 0xa02f;
> > > +           spec->mute_led_coef.off = 0x7774;
> > > +           snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
> >
> > I guess this COEF isn't only about mute-LED but actually does mute the
> > output?  IIRC, the bit 0x08 corresponds to the LED.  If so, it's
> > better to split.  Basically this snd_hda_gen_add_mute_led_cdev() and
> > mute_led_coef stuff are only for the mute LED control.  e.g. you can
> > change the mute LED independently via sysfs.
> 
> Thanks for suggesting this.
> 
> Having tested, I can confirm that setting this coef only affects
> the output mute LED, and does not affect output.
> 
> I will therefore assume that current implementation in my patch is OK,
> but let me know if it still needs changing (maybe I've misunderstood).
> 
> For reference to other users, the commands to test are:
> # output LED on
> hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x0b
> hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0xa02f
> 
> # output LED off
> hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x0b
> hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x7774

Could you try just to flip the bit 0x08?  At LED off state?

% hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x0b
% hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x77f4

That is, the implementation in alc286_fixup_hp_mute_led_coefbit(),
which is used by many other HP laptops.


Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ