Sound support for the Samsung Galaxy Book 4
Why this PR?
I bought my Samsung Galaxy Book 4 Pro almost a year ago and wanted to run Linux. But was unsatisfied with the fact that there were no sound drivers available. After opening up the laptop I discovered there was a MAX98390 chip in the system connected through the ACPI. But after a long time there was no success on getting this working, until now!
What does this PR do?
The file sound/soc/codecs/max98390.c was missing a match for the MAX98390. It only was saying MX98390 and not MAX98390. Not only that, but lots of registers were initialized and also includes the DSM coefficients for basic but good enough sound.
More information
Sorry if this is not the right way to include this in the linux kernel. This is my first time making a PR to such big repo. Let me know if I need to change things and will try my best. Others are able to do this for me too if really needed. I will most likely add a second PR later, to add DSM coefficients from windows. This is being extracted by someone I'm working with.
Can one of the admins verify this patch?
reply test this please to run this test once
This fixes https://github.com/thesofproject/linux/issues/5002, https://github.com/thesofproject/linux/issues/5568, and https://github.com/thesofproject/linux/issues/5606.
I've tested this on my own machine (Galaxy Book4 Pro 360 NP960QGK) under Arch Linux and can confirm sound works as expected. The quality is not exactly the same but pretty comparable to Windows.
Nice work @BreadJS!
This also fixes the following kernel bugzillas:
- https://bugzilla.kernel.org/show_bug.cgi?id=220808
- https://bugzilla.kernel.org/show_bug.cgi?id=218862
Thank you @stephanlensky
This also fixes issue #5483 and #5026
Should an entry also be added to alc269_fixup_models?
@melvyn2 Good call. I added it. (alc298-samsung-max98390-4-amps) I hope we get the PCI Device ID for the following models for auto detection:
- [x] Samsung Galaxy Book 4 Pro (14-inch)
- [x] Samsung Galaxy Book 4 Pro (16-inch)
- [x] Samsung Galaxy Book 4 Pro 360
- [x] Samsung Galaxy Book 4 Ultra
- [ ] Samsung Galaxy Book 4 360
- [ ] Samsung Galaxy Book 4 (base model)
- [ ] Samsung Galaxy Book 4 Edge
- [x] Samsung Galaxy Book 5 Pro 360
- [ ] Samsung Galaxy Book 5 Pro (16-inch)
- [ ] Samsung Galaxy Book 5 Pro (15.6-inch)
- [ ] Samsung Galaxy Book 5 360
- [ ] Samsung Galaxy Book 5 (base model)
- [ ] Samsung Galaxy Book 5 (ARC GPU)
I have no idea if there is a difference between the 14 and 16 inch variants and such. If you have one of these models, please give me the PCI Device ID by doing the following:
$ lspci -vvv | grep "Multimedia audio"
00:1f.3 Multimedia audio controller: Intel Corporation Meteor Lake-P HD Audio Controller (rev 20)
$ cat /sys/bus/pci/devices/0000:00:1f.3/subsystem_device
0xc892 <- this is what we need
0xc1da for the Galaxy Book5 Pro 360, which this also works for.
0xc1dafor the Galaxy Book5 Pro 360, which this also works for.
Wait really? This worked on the Samsung Galaxy Book 5 Pro 360? I thought they used different amp chips. Oh well, good to know it works for the Book 5 😄
I hope we get the PCI Device ID for the following models for auto detection:
- [ ] Samsung Galaxy Book4 Ultra
Here's my dev info for Book4 Ultra:
$ lspci -vvv | grep "Multimedia audio"
00:1f.3 Multimedia audio controller: Intel Corporation Meteor Lake-P HD Audio Controller (rev 20)
$ cat /sys/bus/pci/devices/0000:00:1f.3/subsystem_device
0xc1d8
$
The current patch does not work on this model. (Maybe it wasn't even supposed to?) I can help testing patches on this model if needed.
I hope we get the PCI Device ID for the following models for auto detection:
- [ ] Samsung Galaxy Book4 Pro (16-inch) - [ ] Samsung Galaxy Book4 (base model) - [ ] Samsung Galaxy Book4 EdgeI have no idea if there is a difference between the 14 and 16 inch variants and such.
Here's my dev info for Galaxy Book4 Pro (16-inch) NP960XGK:
$ lspci -vvv | grep "Multimedia audio"
00:1f.3 Multimedia audio controller: Intel Corporation Meteor Lake-P HD Audio Controller (rev 20)
$ cat /sys/bus/pci/devices/0000:00:1f.3/subsystem_device
0xc890
I hope we get the PCI Device ID for the following models for auto detection:
- [ ] Samsung Galaxy Book4 Ultra
Here's my dev info for Book4 Ultra:
$ lspci -vvv | grep "Multimedia audio" 00:1f.3 Multimedia audio controller: Intel Corporation Meteor Lake-P HD Audio Controller (rev 20) $ cat /sys/bus/pci/devices/0000:00:1f.3/subsystem_device 0xc1d8 $The current patch does not work on this model. (Maybe it wasn't even supposed to?) I can help testing patches on this model if needed.
It most likely did not work because the PCI Quirk was not added. It is now, Please try again and see if it works now. If it still does not work, please connect me at the official discord server: https://discord.gg/pXZzXyE6Ub
@BreadJS Excellent news that this was solved! As none of the changes fall under SOF (linux/sound/soc/sof/), patches submitted here cannot me merged here. Can you submit this series to Linux upstream ? [email protected] and see https://kernel.org/doc/html/latest/process/submitting-patches.html Please do refer to existing bugs like https://bugzilla.kernel.org/show_bug.cgi?id=220808 , this will likely help a lot of affected users.
@kv2019i Aah okay! I thought that this patch was for SOF. Thank you for letting me know! I will be trying to do that! Thank you very much!
Hi, I can confirm that this patch is also relevant for the Samsung Galaxy Book5 Pro 360 (Lunar Lake). My subsystem device ID is 0xc1da.
I’m currently running Linux Mint (Ubuntu-based) and would be very happy to test this once a patched kernel is available for Ubuntu/Mint users.
Thanks a lot for the amazing work on this!
@BreadJS can you update your Stripe account in bountyhub for the bounty reward? I tried to reach you through email, and I'm not sure if you got my email.
@BreadJS can you update your Stripe account in bountyhub for the bounty reward? I tried to reach you through email, and I'm not sure if you got my email.
I do not have a stripe account, is this required? Can I not use paypal?
@BreadJS can you update your Stripe account in bountyhub for the bounty reward? I tried to reach you through email, and I'm not sure if you got my email.
I do not have a stripe account, is this required? Can I not use paypal?
it's an Express connected account that can be created from bountyhub's dashboard, not a Stripe account for businesses. Fees are lower than PayPal.
@BreadJS can you update your Stripe account in bountyhub for the bounty reward? I tried to reach you through email, and I'm not sure if you got my email.
I do not have a stripe account, is this required? Can I not use paypal?
it's an Express connected account that can be created from bountyhub's dashboard, not a Stripe account for businesses. Fees are lower than PayPal.
It should be resolved now###
Confirmed working after https://github.com/thesofproject/linux/pull/5616/commits/c4a897b0609bf70506523a6992ce28fbce2fd191 on Book4 Ultra 0xc1d8
Dope, thanks a lot for this!
The dev info for my Galaxy Book4 360 (SAMSUNG model: NP750QGK-KS1FR) : $ cat /sys/bus/pci/devices/0000:00:1f.3/subsystem_device 0xc894
how do i run or get all of this? i'm sorry i'm new to all of this and been listening to chatgpt and clearly it did not steer me in the right direction... because i still have no sound on my galaxy book 4 ultra... which it is the i9 one with the 32GB of ram but when i looked it up it said same hardware as regular galaxy book 4 ultra which u have fixed apparently? i'm also on fedora 43 because that was what i was told would run best on this laptop, do i need to switch? or idk where exactly i went wrong...
@Donovan887 You can add me on Discord and I will try to help you when I have the time. BreadJS is my username
@BreadJS yea i just added you my discord is starts with unparagoned just so you know its not the same as on here lol only made it way back for my xbox stuff, but kept it for friends and such as an adult even tho i dont get much time to play anymore haha but yea dude thanks a bunch either way! you are probably the first person to actually reach out and help! so very much appreciated I sent u the request, and even tho I'm not very active on there I'll try to keep a look out for your add so i can start a message or see if you have so then i can turn on notifications for you.
Hardware I2C dump while windows11 was running.
Could you please elaborate on when this started to log? Is this done with software inside windows? Or with some kind of custom driver that logged from bootup?
i2c_dump.txt Hardware I2C dump while windows11 was running.
Could you please elaborate on when this started to log? Is this done with software inside windows? Or with some kind of custom driver that logged from bootup?
It's a hardware i2c snoop from boot time until some sound is playing on speakers then headphones and then sound again and then speakers again and in the end i believe it ends with headphones.
All the while Windows11 has the Samsung default drivers running. btw. this is Emilian from Discord .. it's the same file provided there.
Confirmed working on Galaxy Book5 Pro 360
@melvyn2 Good call. I added it. (
alc298-samsung-max98390-4-amps) I hope we get the PCI Device ID for the following models for auto detection:- [x] Samsung Galaxy Book 4 Pro (14-inch) - [x] Samsung Galaxy Book 4 Pro (16-inch) - [x] Samsung Galaxy Book 4 Pro 360 - [x] Samsung Galaxy Book 4 Ultra - [ ] Samsung Galaxy Book 4 360 - [ ] Samsung Galaxy Book 4 (base model) - [ ] Samsung Galaxy Book 4 Edge - [x] Samsung Galaxy Book 5 Pro 360 - [ ] Samsung Galaxy Book 5 Pro (16-inch) - [ ] Samsung Galaxy Book 5 Pro (15.6-inch) - [ ] Samsung Galaxy Book 5 360 - [ ] Samsung Galaxy Book 5 (base model) - [ ] Samsung Galaxy Book 5 (ARC GPU)I have no idea if there is a difference between the 14 and 16 inch variants and such. If you have one of these models, please give me the PCI Device ID by doing the following:
$ lspci -vvv | grep "Multimedia audio" 00:1f.3 Multimedia audio controller: Intel Corporation Meteor Lake-P HD Audio Controller (rev 20) $ cat /sys/bus/pci/devices/0000:00:1f.3/subsystem_device 0xc892 <- this is what we need
0xca07 for the Samsung Galaxy Book 4 Pro (14-inch, NP940XGK)