Bug 195827 - Mute key LED does not work on HP notebooks
Summary: Mute key LED does not work on HP notebooks
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
Depends on:
Reported: 2017-05-19 17:17 UTC by kernel
Modified: 2021-05-23 13:22 UTC (History)
7 users (show)

See Also:
Kernel Version: 4.10
Regression: No
Bisected commit-id:

Alsa-info output (33.94 KB, text/plain)
2017-05-19 20:12 UTC, kernel
Alsa-info output after modprobe change (33.98 KB, text/plain)
2017-05-19 20:55 UTC, kernel
Alsa-info output kernel 4.12-rc1 (38.73 KB, text/plain)
2017-05-19 21:11 UTC, kernel
alsa-info from HP Envy x360 15-cp0xxx Ryzen 2500u (33.24 KB, text/plain)
2019-07-28 17:55 UTC, Luya Tshimbalanga
Alsa-info output for HP G7 255 Ryzen 3500U (33.70 KB, text/plain)
2021-03-12 21:20 UTC, Yus
alsa-info.txt HP ProBook 455 G7 (40.30 KB, text/plain)
2021-05-11 10:54 UTC, C Heimanns

Description kernel 2017-05-19 17:17:32 UTC
Originally reported here:

Description of problem:
The F6/mute key on the keyboard of HP notebooks often has a built in LED indicator to show if the sound is muted. The LED state is never toggled. It will just retain its state, even though the audio is succesfully muted/unmuted.

Tested with HP Envy 15 from 2015. HP Stream 11 from 2015 and HP Stream 11 from 2016.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Press mute key on HP laptop

Actual results:
Mute state in software toggles, LED in mute key does not.

Expected results:
Mute state in software and LED in mute key toggle.

Additional info:
This happens on kernel 4.8, 4.9 and 4.10. I have not tested any other versions.

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: linux-image-4.10.0-19-generic 4.10.0-19.21
ProcVersionSignature: Ubuntu 4.10.0-19.21-generic 4.10.8
Uname: Linux 4.10.0-19-generic x86_64
ApportVersion: 2.20.4-0ubuntu4
Architecture: amd64
 /dev/snd/controlC0: stevenh 1659 F.... pulseaudio
CurrentDesktop: GNOME
Date: Mon Apr 17 11:02:20 2017
HibernationDevice: RESUME=UUID=2d246125-abf7-4945-9542-45b25fb8fcb2
InstallationDate: Installed on 2016-09-13 (215 days ago)
InstallationMedia: Ubuntu-GNOME 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160720)
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 005: ID 8087:0a2a Intel Corp.
 Bus 001 Device 003: ID 05c8:038e Cheng Uei Precision Industry Co., Ltd (Foxlink)
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: HP HP ENVY Notebook
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.10.0-19-generic.efi.signed root=UUID=fa0986da-ae48-47e2-9e62-a8ef25ce5b73 ro quiet splash vt.handoff=7
 linux-restricted-modules-4.10.0-19-generic N/A
 linux-backports-modules-4.10.0-19-generic N/A
 linux-firmware 1.164
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/13/2016
dmi.bios.vendor: Insyde
dmi.bios.version: F.23
dmi.board.asset.tag: Type2 - Board Asset Tag
dmi.board.name: 81CC
dmi.board.vendor: HP
dmi.board.version: KBC Version 60.26
dmi.chassis.asset.tag: Chassis Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: HP
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnInsyde:bvrF.23:bd09/13/2016:svnHP:pnHPENVYNotebook:pvrType1ProductConfigId:rvnHP:rn81CC:rvrKBCVersion60.26:cvnHP:ct10:cvrChassisVersion:
dmi.product.name: HP ENVY Notebook
dmi.product.version: Type1ProductConfigId
dmi.sys.vendor: HP
Comment 1 Bjorn Helgaas 2017-05-19 17:20:39 UTC
Reassigning to sound component.
Comment 2 Takashi Iwai 2017-05-19 20:01:55 UTC
Please give alsa-info.sh output for further investigation.
Run the script with --no-upload option, and attach to Bugzilla (don't paste to the form).
Comment 3 kernel 2017-05-19 20:12:40 UTC
Created attachment 256631 [details]
Alsa-info output

Attached alsa-info output
Comment 4 Takashi Iwai 2017-05-19 20:29:27 UTC
Try to pass model=mute-led-gpio option to snd-hda-intel module.  For example, pass the following line to /etc/modprobe.d/90-hda.conf:

options snd-hda-intel model=mute-led-gpio
Comment 5 kernel 2017-05-19 20:38:13 UTC
Hi Takashi,

Unfortunately creating the file mentioned with that line does not change the behaviour.
Comment 6 Takashi Iwai 2017-05-19 20:47:29 UTC
Did you reboot after the change, right?  Then attach alsa-info.sh output again after the change.

If it really doesn't help, try to check whether any GPIO pin corresponds to the mute LED.  Install hda-verb program (included in alsa-tools package), and run like:
   hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x01
   hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x01
   hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x01

This will turn on GPIO#1, the first bit.  For GPIO#2, pass 0x02 to each, and for GPIO#3, pass 0x04, GPIO#4, pass 0x08....  See whether the LED turns on by that.
The codec has 7 GPIO pins, so try up to 0x40.
Comment 7 kernel 2017-05-19 20:55:37 UTC
Created attachment 256633 [details]
Alsa-info output after modprobe change

Yes, I did indeed reboot. Attached is the new alsa-info. I'll go through the GPIO pins and report.
Comment 8 Takashi Iwai 2017-05-19 21:01:13 UTC
Ah, you're using a too old kernel.  The GPIO mute LED on Conexant code was added since 4.12-rc1.  Try 4.12-rc1 with that model option.
Comment 9 kernel 2017-05-19 21:02:24 UTC
Just to be clear, should I change only the first or also the second register in the command?

e.g. hda-verb /dev/snd/hwC0D0 0x02 SET_GPIO_MASK 0x02 ?

And I need to check 0x01, 0x02, 0x04, 0x08, 0x10, 0x20 and 0x40 correct?
Comment 10 kernel 2017-05-19 21:11:28 UTC
Created attachment 256635 [details]
Alsa-info output kernel 4.12-rc1

Tried again. This time with the following kernel: 4.12.0-041200rc1-generic downloaded from ubuntu kernel ppa.

The mute key LED does still not work, also running the hda-verb commands does not work (please check my comment at 21:02 UTC if I ran it correctly)
Comment 11 Takashi Iwai 2017-05-19 21:15:33 UTC
Sorry to be unclear, the first 0x01 is the widget NID, and it's always 0x01 for GPIO.  Only change the latter 0x01.  e.g.
   hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x02
   hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x02
   hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x02
Comment 12 kernel 2017-05-19 21:21:58 UTC
I redid it with the proper commands, but still no orange light :(
Comment 13 Luya Tshimbalanga 2019-07-28 17:55:11 UTC
Created attachment 284007 [details]
alsa-info from HP Envy x360 15-cp0xxx Ryzen 2500u

I just find this report related to HP laptop. I confirm the issue is also affecting newer model as well. 
It will be nice to customize this patch (https://bugzilla.kernel.org/attachment.cgi?id=255529&action=diff) applicable to all HP model as possible.
Comment 14 Luya Tshimbalanga 2019-07-28 19:16:27 UTC
It turned out the laptop detected two soundcards according to grep "Codec:" /proc/asound/card*/codec* command:

/proc/asound/card0/codec#0:Codec: ATI R6xx HDMI
/proc/asound/card1/codec#0:Codec: Realtek ALC295

The GPIO output for each:

Codec: ATI R6xx HDMI
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x1002aa01
Subsystem Id: 0x00aa0100
Revision Id: 0x100700
No Modem Function Group found
Default PCM:
    rates [0x70]: 32000 44100 48000
    bits [0x2]: 16
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D3 CLKSTOP EPSS
  Power: setting=D0, actual=D0, Clock-stop-OK
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0

Codec: Realtek ALC295
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0295
Subsystem Id: 0x103c8497
Revision Id: 0x100002
No Modem Function Group found
Default PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
  Power: setting=D0, actual=D0
GPIO: io=3, o=0, i=0, unsolicited=1, wake=0
Comment 15 glise 2020-09-19 13:02:57 UTC
Hello everyone,
i'm also having issues with microphone.
here is my alsa report


i've used this command
sudo arecord -Dhw:0,7 -c2 -r48000 -fS32_LE -d 10 mytest.wav
and i'm able to record and hear my voice, but if i use skype the mic seem not working.

any suggestion please?

Comment 16 Yus 2021-03-12 21:19:21 UTC
I'm also affected by this bug. I have an HP G7 255 laptop with a Ryzen 3500U CPU. This is the output of "cat /proc/asound/card*/codec* | grep Codec":

Codec: ATI R6xx HDMI
Codec: Realtek ALC236
Comment 17 Yus 2021-03-12 21:20:42 UTC
Created attachment 295823 [details]
Alsa-info output for HP G7 255 Ryzen 3500U

I have attached the output of alsa-info.sh.
Comment 18 C Heimanns 2021-05-11 10:54:53 UTC
Created attachment 296719 [details]
alsa-info.txt HP ProBook 455 G7

Output of "cat /proc/asound/card*/codec* | grep Codec":

Codec: ATI R6xx HDMI
Codec: Realtek ALC236
Comment 19 C Heimanns 2021-05-23 11:14:46 UTC
(In reply to C Heimanns from comment #18)
> Created attachment 296719 [details]
> alsa-info.txt HP ProBook 455 G7
> Output of "cat /proc/asound/card*/codec* | grep Codec":
> Codec: ATI R6xx HDMI
> Codec: Realtek ALC236

It's working for me now with kernel:
Linux mx 5.10.0-7mx-amd64 #1 SMP Debian 5.10.38-1~mx19+1 (2021-05-20) x86_64 GNU/Linux

Who ever was working on it or made it working: Thank you very much!
Comment 20 Peter Schmidt 2021-05-23 13:22:01 UTC
I actually have the same Realtek chip, also on a HP laptop, but mine isn't working (with the 5.12 kernel).

Note You need to log in before you can comment on or make changes to this bug.