thesofproject / linux

Linux kernel source tree
Other
88 stars 128 forks source link

[BUG] Huawei MateBook E DRR-W76 - the speakers are not working #5051

Open rautyrauty opened 3 weeks ago

rautyrauty commented 3 weeks ago

alsa-info: http://alsa-project.org/db/?f=4c40d6b4f04981eab230e4425cef7aabfeffac44

After applying patch from https://github.com/thesofproject/linux/issues/5038, the speakers really started working, but only on the right side. Moreover, the left and right sounds worked separately, but the left one sounded noticeably quieter, so I decided to test it on Windows. In Windows, the left sound is on the left of the MateBook, and the right one is on the right.

After reinstalling Linux, the speakers stopped working even with the patch, but the microphone remained working. Legacy mode (options snd-intel-dspcfg dsp_driver=1) does not help at all, the speakers and the microphone do not work. Apparently, the firmware has been updated ;(

rautyrauty commented 3 weeks ago

The headphones and headset microphone are working.

rautyrauty commented 1 week ago

What can I do to solve this problem? I have already written to HUAWEI tech support about the problem with a link to this issue.

plbossart commented 1 week ago

I am afraid there's no simple answer: https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html#reverse-engineer-the-windows-audio-driver

rautyrauty commented 1 week ago

I played around a bit with the PIN config of 0x1d via hdajackretask, but nothing worked. There is also a problem that the drivers for HUAWEI are downloaded through the application, and not through the website.

For history:

rautyrauty commented 4 days ago

I'm stuck.

I try to follow the instructions from https://github.com/ryanprescott/realtek-verb-tools/wiki/How-to-sniff-verbs-from-a-Windows-sound-driver, but here was a problem from here:https://github.com/ryanprescott/realtek-verb-tools/issues/2 https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Gotchas_3:

IOMMU groups
IOMMU group 7
        00:0d.0 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller [8086:461e] (rev 06)
        00:0d.2 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0 [8086:463e] (rev 06)
IOMMU group 15
        00:1f.0 ISA bridge [0601]: Intel Corporation Alder Lake LPC Controller [8086:5187] (rev 01)
        00:1f.3 Multimedia audio controller [0401]: Intel Corporation Alder Lake Smart Sound Technology Audio Controller [8086:51cc] (rev 01)
        00:1f.4 SMBus [0c05]: Intel Corporation Alder Lake PCH-P SMBus Host Controller [8086:51a3] (rev 01)
        00:1f.5 Serial bus controller [0c80]: Intel Corporation Alder Lake-P PCH SPI Controller [8086:51a4] (rev 01)
IOMMU group 5
[RESET] 00:07.0 PCI bridge [0604]: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #0 [8086:466e] (rev 06)
IOMMU group 13
        00:16.0 Communication controller [0780]: Intel Corporation Alder Lake PCH HECI Controller [8086:51e0] (rev 01)
IOMMU group 3
        00:04.0 Signal processing controller [1180]: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant [8086:461d] (rev 06)
IOMMU group 11
[RESET] 00:14.3 Network controller [0280]: Intel Corporation Alder Lake-P PCH CNVi WiFi [8086:51f0] (rev 01)
IOMMU group 1
[RESET] 00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-UP4 GT2 [Iris Xe Graphics] [8086:46aa] (rev 0c)
IOMMU group 8
        00:10.0 Serial bus controller [0c80]: Intel Corporation Alder Lake-P Serial IO I2C Controller #2 [8086:51d8] (rev 01)
        00:10.1 Serial bus controller [0c80]: Intel Corporation Alder Lake-P Serial IO I2C Controller #3 [8086:51d9] (rev 01)
IOMMU group 16
[RESET] 01:00.0 Non-Volatile memory controller [0108]: Phison Electronics Corporation PS5021-E21 PCIe4 NVMe Controller (DRAM-less) [1987:5021]
IOMMU group 6
[RESET] 00:08.0 System peripheral [0880]: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator [8086:464f] (rev 06)
IOMMU group 14
        00:19.0 Serial bus controller [0c80]: Intel Corporation Alder Lake-P Serial IO I2C Controller #0 [8086:51c5] (rev 01)
        00:19.1 Serial bus controller [0c80]: Intel Corporation Alder Lake-P Serial IO I2C Controller #1 [8086:51c6] (rev 01)
IOMMU group 4
[RESET] 00:06.0 PCI bridge [0604]: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 [8086:464d] (rev 06)
IOMMU group 12
        00:15.0 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 [8086:51e8] (rev 01)
        00:15.1 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #1 [8086:51e9] (rev 01)
IOMMU group 2
        00:00.0 Host bridge [0600]: Intel Corporation Alder Lake Host and DRAM Controller [8086:4602] (rev 06)
IOMMU group 10
        00:14.0 USB controller [0c03]: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller [8086:51ed] (rev 01)
        00:14.2 RAM memory [0500]: Intel Corporation Alder Lake PCH Shared SRAM [8086:51ef] (rev 01)
IOMMU group 0
[RESET] 00:05.0 Multimedia controller [0480]: Intel Corporation Alder Lake Imaging Signal Processor [8086:465d] (rev 06)
IOMMU group 9
        00:12.0 Serial controller [0700]: Intel Corporation Alder Lake-P Integrated Sensor Hub [8086:51fc] (rev 01)
        00:12.6 Serial bus controller [0c80]: Intel Corporation Device [8086:51fb] (rev 01)

According to https://bugzilla.kernel.org/show_bug.cgi?id=207423#c19, Windows drivers should solve it. But Windows does not want to install drivers for 8086:51сс in any way. It turned out that Huawei has drivers for sound on the site, but after installing the miracle did not happen - Windows does not see the speakers. Even considering that everything is OK in the Device Manager.

I have one last idea: install both Windows and Linux on the system, download all the drivers on Windows (https://www.tenforums.com/backup-restore/141466-how-backup-import-device-drivers-windows-10-using-powershell.html) and transfer them to the Linux virtual machine.

And while I was following the instructions, the sound card stopped displaying again: http://alsa-project.org/db/?f=d7437f5d8e5fda1a2ef00d2713f0598d0dc5ffda I am sure that the problem will be fixed by the usual reinstallation of Linux, but please tell me how to solve it in a less radical way.

rautyrauty commented 4 days ago

well, maybe not all ok... 1 2

rautyrauty commented 1 day ago

I succeeded in install the drivers from the real system to the virtual machine and finally the verbs appeared. Windows sees the speakers, shows that there is sound, but in fact there is not. I mean, I can't hear him. Just like on Linux. Unlike a real system, there is no Intel Smart Sound Technology MIPI soundwire controller in the virtual machine. I do not know how to pass it to a virtual machine, since the hardware ID show INTELAUDIO\SDW_ROOT. sniff-verbs-huawei-drr-w76.txt

It may be enough to turn on additional power via GPIO to make the speakers work. But I do not know how: gpioinfo0.txt gpioset0-23-1.txt

plbossart commented 1 day ago

if you have an HDaudio codec, there is no relationship or dependency on SoundWire. Different bus/interface/pins.

rautyrauty commented 1 day ago
$ cat /sys/kernel/debug/gpio 
gpiochip0: GPIOs 512-871, parent: platform/INTC1055:00, INTC1055:00:
 gpio-535 (                    |power-enable        ) out lo 
 gpio-583 (                    |privacy-led         ) out lo 
 gpio-655 (                    |power-enable        ) out lo 
 gpio-869 (                    |privacy-led         ) out lo