[HDAudio][ALC285] Native speaker support for HP Spectre x360 15-eb0xxx
Alexander Giese
alex at alarmhandy.de
Fri Aug 7 19:27:05 CEST 2020
Hello again,
thank you for your fast reply!
I tried your solution and can confirm this:
> 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.
Yes, that's exactly what happens.
> 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.
This is right too. :)
> 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
This is right as well. But the succeeding call
>
> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x05
>
turns off mic-mute LED and speakers. However
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x01
turns off speakers and turns mic-mute LED on. Following
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x02
turns on both, speakers and mic-mute LED.
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x04
turns off mic-mute LED and turns on speakers.
> And, doesn't the machine have the playback mute LED? Usually it's
> controlled with the GPIO, too, but this case
Actually it has a playback-mute LED, but unfortunately I have not found
the GPIO pin to activate it.
I tried by first doing SET_GPIO_DIR (with values 0x01, 0x02, 0x04).
Foreach SET_GPIO_DIR I did SET_GPIO_MASK (with values 0x01, 0x02, 0x04)
and foreach SET_GPIO_MASK I did SET_GPIO_DATA (with values 0x00, 0x01,
0x02, 0x04).
I hope this test results help further understanding the pin layout.
Maybe you have some advice to find the playback-mute led?
Best regards
Alexander
Am 07.08.20 um 18:04 schrieb Takashi Iwai:
> 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
>
More information about the Alsa-devel
mailing list