On Fri, 07 Aug 2020 15:05:12 +0200, Alexander Giese wrote:
Hello alsa-devel-team,
I have a problem with the built-in speakers on the 2020 model of the hp-spectre. From my unexperienced point of view, the audio sinks are correctly identified and therefore I tried tweaking the GPIO pins with success.
Information from alsa-info is here: http://alsa-project.org/db/?f=c8ee13e52fd6b2377573a7123c2887fe4d59c917
When I use hda-verb with the following parameters 2 of 4 of my built-in speakers start working:
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x02 (or 0x04) hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x01 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x01
So this means that GPIO pin#0 (0x01) is the amp, and it needs to be cleared.
In addition, my mute-mic-led on the keyboard glows when:
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x01 (or 0x02) hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x04 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x04
And this means GPIO pin#2 being the mic-mute LED, inverted (0=on, 1=off).
To check the behavior, try the following:
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x01 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x01 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x00
this should enable the speaker, and the succeeding call
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x01
turns off the speaker.
Also,
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x04 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x04 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x00
turns on the mic-mute LED, and the succeeding call
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x04
turns off the LED.
If above is the confirmed, you can manage both in a shot by
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x05 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x05 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x04
will turn on the speaker but off the LED, and
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x05
will turn on both speaker and LED.
And, doesn't the machine have the playback mute LED? Usually it's controlled with the GPIO, too, but this case
Since I do not understand how the GPIO-settings are integrated and applied in the upstream software for corresponding models, I would very much appreciate any help to get this to work out of the box in future releases so I do not have tweak my system all the time and others can benefit as well.
Any suggestions on getting all 4 speakers to work or the mute-volume-led to glow are very much welcome alike!
The surround/bass speaker is often more difficult. We need either the contact to the vendor or the reverse engineering.
Takashi