[MTL] Attempting to sniff custom verbs, QEMU HDA passthrough not working
Related: #5002, #5006
Hi, I'm currently trying to fix speakers for ALC298 used in Galaxy Book4 Pro.
The Linux kernel currently has a Samsung-specific ALC298 verbs ( https://lore.kernel.org/alsa-devel/[email protected]/ ) that fixes speakers for older models, but it is not compatible with the Galaxy Book4 Pro.
To get the appropriate verbs on this specific device, I'm following https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html 's "Reverse-engineer the Windows audio driver" section.
The ASUS Linux blog allowed me to dump the codec states, but not the appropriate verb commands to reach such states, so no luck there.
With QEMU, I believe I'm running into a Meteor-lake-specific issue where the Intel OED (1f.3) fails to initialize. I've tried multiple QEMU versions and Linux kernel host versions, but no luck.
I get Code 43 in Device Manager with “FW dump detected”. In the Event Viewer, I get "Set DSP state. Firmware crashed (noncontinuable exception) - resetting., STATUS = {exception}".
The guest disk image is a real NVMe device, and booting it natively of course have speakers working.
Passing through other devices alongside 1f.3 didn’t work. I've tried passing through devices in bold here: 00:00.0 Host bridge [0600]: Intel Corporation Device [8086:7d14] (rev 04) 00:02.0 VGA compatible controller [0300]: Intel Corporation Meteor Lake-P [Intel Arc Graphics] [8086:7d55] (rev 08) 00:04.0 Signal processing controller [1180]: Intel Corporation Device [8086:7d03] (rev 04) 00:05.0 Multimedia controller [0480]: Intel Corporation Device [8086:7d19] (rev 04) 00:06.0 PCI bridge [0604]: Intel Corporation Device [8086:7e4d] (rev 20) 00:07.0 PCI bridge [0604]: Intel Corporation Meteor Lake-P Thunderbolt 4 PCI Express Root Port #0 [8086:7ec4] (rev 02) 00:07.1 PCI bridge [0604]: Intel Corporation Meteor Lake-P Thunderbolt 4 PCI Express Root Port #1 [8086:7ec5] (rev 02) 00:08.0 System peripheral [0880]: Intel Corporation Device [8086:7e4c] (rev 20) 00:0a.0 Signal processing controller [1180]: Intel Corporation Device [8086:7d0d] (rev 01) 00:0b.0 Processing accelerators [1200]: Intel Corporation Meteor Lake NPU [8086:7d1d] (rev 04) 00:0d.0 USB controller [0c03]: Intel Corporation Meteor Lake-P Thunderbolt 4 USB Controller [8086:7ec0] (rev 02) 00:0d.2 USB controller [0c03]: Intel Corporation Meteor Lake-P Thunderbolt 4 NHI #0 [8086:7ec2] (rev 02) 00:12.0 Serial controller [0700]: Intel Corporation Device [8086:7e45] (rev 20) 00:14.0 USB controller [0c03]: Intel Corporation Meteor Lake-P USB 3.2 Gen 2x1 xHCI Host Controller [8086:7e7d] (rev 20) 00:14.2 RAM memory [0500]: Intel Corporation Device [8086:7e7f] (rev 20) 00:14.3 Network controller [0280]: Intel Corporation Meteor Lake PCH CNVi WiFi [8086:7e40] (rev 20) 00:15.0 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P Serial IO I2C Controller #0 [8086:7e78] (rev 20) 00:15.1 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P Serial IO I2C Controller #1 [8086:7e79] (rev 20) 00:15.2 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P Serial IO I2C Controller #2 [8086:7e7a] (rev 20) 00:15.3 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P Serial IO I2C Controller #3 [8086:7e7b] (rev 20) 00:16.0 Communication controller [0780]: Intel Corporation Device [8086:7e70] (rev 20) 00:1c.0 PCI bridge [0604]: Intel Corporation Device [8086:7e38] (rev 20) 00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:7e02] (rev 20) 00:1f.3 Multimedia audio controller [0401]: Intel Corporation Meteor Lake-P HD Audio Controller [8086:7e28] (rev 20) 00:1f.4 SMBus [0c05]: Intel Corporation Meteor Lake-P SMBus Controller [8086:7e22] (rev 20) 00:1f.5 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P SPI Controller [8086:7e23] (rev 20) 01:00.0 Non-Volatile memory controller [0108]: SK hynix Platinum P41/PC801 NVMe Solid State Drive [1c5c:1959] 56:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller PM9A1/PM9A3/980PRO [144d:a80a]
Booting a Linux guest seemed to indicate an issue with ACPI NHLT table, so I've even went ahead and modified QEMU to feed the host's NHLT table, but still no luck with Windows.
I understand that this is not a SOF issue and is rather the "infamous I2C amp over HDA needing custom vendor-specific verbs", but I'm stuck as QEMU guest is not initializing sound properly.
Can anyone give some additional pointers here?
I've attached alsa-info.txt as well: alsa-info.txt
Thanks.
I am not sure if the Intel OED driver is required in your case @arter97, what happens if you use the default Microsoft in-box driver to control the HDaudio controller and codec?
@plbossart Thanks, I've tried your approach but still no luck.
The result's a bit interesting though; If I boot with no Intel OED drivers present, the HD audio controller doesn't appear to the system at all. If I boot with Intel OED drivers present and enabled and then disable it, a different HD audio controller (HDAUDIO\FUNC_01&VEN_10EC&DEV_0298&SUBSYS_144DC890) appears with no drivers installed.
Now, if this is a native install, force-installing Samsung drivers (HDXSamsung.inf) on it (it warns me due to different PCI ID) makes the audio work.
From QEMU, I can see 1f.3 vfio traffic and Windows show a normally operating audio device but no actual sound is coming out. Consequently, using the verbs extracted from that still doesn't produce a working speaker in Linux.
So from what I can gather, a properly operating Intel OED device is required to setup the HD audio controller, and I'm back to square one :(
Any other tips that I can probably try? Thanks.
I am reasonably confident the OED driver is NOT needed, if you take a new Windows install without any audio drivers the Microsoft in-box driver should just work - albeit with the DSP disabled/not used.
I am reasonably confident the OED driver is NOT needed, if you take a new Windows install without any audio drivers the Microsoft in-box driver should just work - albeit with the DSP disabled/not used.
An audio controller (INTELAUDIO\FUNC_01&VEN_10EC&DEV_0298&SUBSYS_144DC890&REV_1001) is not present when I do not install any drivers at all. The device manager asks me to install a driver for 1f.3 (PCI\VEN_8086&DEV_7E28&SUBSYS_C890144D&REV_20), and when I force-install Microsoft's "High Definition Audio device", I get code 10 error saying "Unsupported operation".
When I force-install a Realtek driver (both Windows-integrated one or one provided by my OEM - Samsung), I get a BSOD with SYSTEM_THREAD_EXCEPTION_NOT_HANDLED from RTKVHD64.sys.
Is there any other way I can expose the audio device without relying on OED?
I am afraid I can't help on such Windows low-level details, sorry.
@arter97, sorry for the slightly out of topic question, but does your webcam work on Linux on your Galaxy Book4 Pro ?
@arter97, sorry for the slightly out of topic question, but does your webcam work on Linux on your Galaxy Book4 Pro ?
Yes, I fixed it: https://github.com/intel/ipu6-drivers/pull/230
Oh this is great news, thank for you work ! :heart: I assume, it should also work on the Galaxy Book 4 Ultra, right ? :crossed_fingers:
Are you still working on sniffing the verbs to fix the audio ? Do you think it could be solvable in the coming months ? I'm considering buying the Book 4 Ultra, and I can live with only headphone for a while, but would be nice if we can have sound at some point later...
Oh this is great news, thank for you work ! ❤️ I assume, it should also work on the Galaxy Book 4 Ultra, right ? 🤞
No clue, but the screen chassis looks identical, so most likely yes.
Are you still working on sniffing the verbs to fix the audio ? Do you think it could be solvable in the coming months ? I'm considering buying the Book 4 Ultra, and I can live with only headphone for a while, but would be nice if we can have sound at some point later...
Nope, I'm stuck at a dead end. I need a fix for this very issue until processing any further (which will still be a hassle, cleaning up the verbs, etc).
I still think this OED driver failure under VM is a Meteorlake-specific issue, not Samsung's, so as more Meteorlake devices (maybe Dell?) don't work under Linux and get more attention, this may progress further.
@arter97, I suppose you have tried to switch to legacy HDA stack and it did not changed the situation?
Without direct support from OEM (Samsung) or Realtek I don't know if we can help here much :(
It might be that a kernel update have fixed this as well...
For sure... without help from Samsung, it's impossible.
Okay so this is where I'm at. I'm running my Galaxy Book 4 Pro in ubuntu with a Windows QEMU and logged some verbs. Here is the thing. I do have the audio driver installed, and I do have sounds, BUT ONLY ON THE HEADPHONE JACK. When I remove it, I still have no sound on the speaker. I am not sure where it is going wrong. Also when I startup the qemu after a ubuntu restart, I will see this:
qemu-system-x86_64: vfio: Cannot reset device 0000:00:1f.5, no available reset mechanism.
qemu-system-x86_64: vfio: Cannot reset device 0000:00:1f.4, no available reset mechanism.
qemu-system-x86_64: vfio: Cannot reset device 0000:00:1f.3, no available reset mechanism.
qemu-system-x86_64: vfio: Cannot reset device 0000:00:1f.0, no available reset mechanism.
qemu-system-x86_64: vfio: Cannot reset device 0000:00:1f.5, no available reset mechanism.
qemu-system-x86_64: vfio: Cannot reset device 0000:00:1f.4, no available reset mechanism.
qemu-system-x86_64: vfio: Cannot reset device 0000:00:1f.3, no available reset mechanism.
qemu-system-x86_64: vfio: Cannot reset device 0000:00:1f.0, no available reset mechanism.
Which might something have to do with it? I'm not sure. I did add some modules to the modprobe blocklist:
blacklist snd_sof_pci_intel_mtl
blacklist snd_hda_intel
blacklist i801_smbus
blacklist spi_intel_pci
But that does not change. Maybe it is some kind of initialisation on startup? I'm a bit confused here. If you need the system. let me know! I want to fix this issue. My Discord is my username, BreadJS.
Edit:
I found that the Galaxy Book 4 Pro uses the MAX98390 which is being detected in windows as a ADI AMP Device. Without that driver working, it does not give any sound to the speakers. I tested this by disabling it in windows. I could not pass this through in the windows vm....
Hi
Maybe this can help to understand : https://kernel.googlesource.com/pub/scm/linux/kernel/git/geert/renesas-devel/+/refs/heads/renesas-dt-bindings-for-v5.20/sound/soc/codecs/max98390.h
Sound is just ScFi lol
Tbh, I'm not a wizzard in c/cpp. This looks like voodoo magic. So ehm. Maybe you could help to try something by remoting in my laptop?
Yes, i can try
Do you use discord? If so, please add me "BreadJS". If not, what would be better for you? :3 i would really appreciate this help ♥️
I don't use discord ;
Is there any other way possibly? @dginhoux
@dginhoux Do you know how to write a topology file for sof?
Hi,
Maybe we can stay in this issue, all our work can be usefull for everyone ; At this, time, i don't know and understand what i need to do.
Using ubuntu 25.10 and latest kernel from mainlines.
All righty, that is okay. So here is the thing, the max chips require a driver just as in windows (like i said before, that it said dmi amp), which is connected on the meteor lake serial controller. And there needs to be written a topology file for sof in order to communicate to the amp and such.