Skip to content

Sound support for the Samsung Galaxy Book 4 - #5616

Open
BreadJS wants to merge 7 commits into
thesofproject:topic/sof-devfrom
BreadJS:topic/sof-dev
Open

BreadJS wants to merge 7 commits into
thesofproject:topic/sof-devfrom
BreadJS:topic/sof-dev

Conversation

@BreadJS

@BreadJS BreadJS commented Dec 6, 2025

Copy link
Copy Markdown

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.

@sofci

sofci commented Dec 6, 2025

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

reply test this please to run this test once

@stephanlensky

Copy link
Copy Markdown

This fixes #5002, #5568, and #5606.

@stephanlensky

Copy link
Copy Markdown

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!

@BreadJS

BreadJS commented Dec 7, 2025

Copy link
Copy Markdown
Author

Thank you @stephanlensky

This also fixes issue #5483 and #5026

@melvyn2

melvyn2 commented Dec 7, 2025

Copy link
Copy Markdown

Should an entry also be added to alc269_fixup_models?

@BreadJS

BreadJS commented Dec 7, 2025 •

Copy link
Copy Markdown
Author

@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

@melvyn2

melvyn2 commented Dec 7, 2025

Copy link
Copy Markdown

0xc1da for the Galaxy Book5 Pro 360, which this also works for.

Comment thread sound/hda/codecs/realtek/alc269.c Outdated
{.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
{.id = ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS, .name = "alc298-samsung-amp-v2-2-amps"},
{.id = ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS, .name = "alc298-samsung-amp-v2-4-amps"},
{.id = ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS, .name = "alc298-samsung-amp-v2-4-amps"},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this line was accidentally duplicated.

@BreadJS BreadJS Dec 7, 2025 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! Thank you for noticing!

@BreadJS

BreadJS commented Dec 7, 2025

Copy link
Copy Markdown
Author

0xc1da for 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 😄

@hopugop

hopugop commented Dec 8, 2025

Copy link
Copy Markdown

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.

@Gaspardctrl

Copy link
Copy Markdown

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 Edge

I 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

@BreadJS

BreadJS commented Dec 8, 2025 •

Copy link
Copy Markdown
Author

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

@kv2019i

kv2019i commented Dec 8, 2025

Copy link
Copy Markdown
Collaborator

@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.

@BreadJS

BreadJS commented Dec 8, 2025

Copy link
Copy Markdown
Author

@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!

@chriswa81

Copy link
Copy Markdown

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!

@Andycodeman

Copy link
Copy Markdown

@Andycodeman : I followed your advice on EsayEffects. It iproves sound quality.

Quick news: I got my camera to work on my Samsung Galaxy Book5 : with qcam, I can now see the camera image, though it is vertically flipped. There is also an issue : when opening the camera in firefox, no image can be seen, and the camera stops working in qcam afterwards. Will work on instructions to get this to work once I have solve the remaining issues. At least, this is a big step forward, as I got things right with the drivers.

Glad it helped your sound.

As for the webcam, Book5 uses IPU7 and my install for the webcam is only for IPU6 (Book4). It shouldn't even let you run it as it would detect you're on Lunar Lake and prevent it. So you're on your own for the webcam unfortunately as I don't have the hardware to test it for Book5. Sounds like you're making progress though so keep it up! :)

@antpln

antpln commented Mar 11, 2026

Copy link
Copy Markdown

Hi, for those using Arch Linux I have made an automatically built patched kernel. Here it is https://github.com/antpln/linux-galaxyaudio. You can install it pre-compiled with

yay -S linux-galaxyaudio-bin

Feedback would be appreciated, it is my first time doing this

@1Naim

1Naim commented Mar 29, 2026

Copy link
Copy Markdown

Hey, FYI:

sound/hda/codecs/side-codecs/max98390_hda.c:90:20: warning: unused variable 'global_en' [-Wunused-variable]
   90 |         unsigned int reg, global_en, amp_en, pcm_rx;
      |                           ^~~~~~~~~
sound/hda/codecs/side-codecs/max98390_hda.c:90:31: warning: unused variable 'amp_en' [-Wunused-variable]
   90 |         unsigned int reg, global_en, amp_en, pcm_rx;
      |                                      ^~~~~~
sound/hda/codecs/side-codecs/max98390_hda.c:90:39: warning: unused variable 'pcm_rx' [-Wunused-variable]
   90 |         unsigned int reg, global_en, amp_en, pcm_rx;
      | 

@muk8700-dotcom

Copy link
Copy Markdown

Hi, I have a Samsung Galaxy Book5 Pro 14 (940XHA) with Intel Lunar Lake and I'm experiencing the same issue — internal speakers completely silent, headphones work fine.
My details:

Model: Samsung 940XHA (Galaxy Book5 Pro 14)
Codec: Realtek ALC298
Subsystem ID: 0x144dca08
Audio chip: Intel Lunar Lake (sof-audio-pci-intel-lnl)
Amplifiers: 4x MAX98390 on i2c-2 (addresses 0x38, 0x39, 0x3c, 0x3d)
Kernel: 6.17.0-19-generic
Distro: Zorin OS 18 (Ubuntu-based)

ACPI only binds the amp at 0x38. Manually binding 0x39, 0x3c, and 0x3d via /sys/bus/i2c/devices/i2c-2/new_device shows all four amps responding with revisionID: 0x42, but still no speaker output.
Would love to see this model added to the supported list. Happy to test any patches

@Andycodeman

Copy link
Copy Markdown

Hi, I have a Samsung Galaxy Book5 Pro 14 (940XHA) with Intel Lunar Lake and I'm experiencing the same issue — internal speakers completely silent, headphones work fine. My details:

Model: Samsung 940XHA (Galaxy Book5 Pro 14) Codec: Realtek ALC298 Subsystem ID: 0x144dca08 Audio chip: Intel Lunar Lake (sof-audio-pci-intel-lnl) Amplifiers: 4x MAX98390 on i2c-2 (addresses 0x38, 0x39, 0x3c, 0x3d) Kernel: 6.17.0-19-generic Distro: Zorin OS 18 (Ubuntu-based)

ACPI only binds the amp at 0x38. Manually binding 0x39, 0x3c, and 0x3d via /sys/bus/i2c/devices/i2c-2/new_device shows all four amps responding with revisionID: 0x42, but still no speaker output. Would love to see this model added to the supported list. Happy to test any patches

Did you try the following...

Your 940XHA should already be fully supported as it's one of our primary test devices. The manual I2C binding alone won't get you sound because you also need the MAX98390 HDA side-codec driver module, which isn't in the kernel yet.

This fix bundles the driver (via DKMS) along with the I2C device setup as a systemd service so it all happens automatically on boot. Zorin OS works fine since it's Ubuntu-based.

Single command to install:

curl -sL https://github.com/Andycodeman/samsung-galaxy-book-linux-fixes/archive/refs/heads/main.tar.gz | tar xz && cd samsung-galaxy-book-linux-fixes-main/speaker-fix && sudo ./install.sh && sudo reboot

After reboot your speakers should be working. If you also need the webcam fix, there's an installer for that too — see the repo: https://github.com/Andycodeman/samsung-galaxy-book-linux-fixes

@muk8700-dotcom

Copy link
Copy Markdown

It worked perfectly, thank you so much! Speakers are working after reboot. The previous command I tried was from a slightly different repo URL which is why it failed. Really appreciate the quick response!

@Andycodeman

Copy link
Copy Markdown

It worked perfectly, thank you so much! Speakers are working after reboot. The previous command I tried was from a slightly different repo URL which is why it failed. Really appreciate the quick response!

Great! Glad to hear it worked and thanks for the update!

@cabaseira

Copy link
Copy Markdown

Tested on Samsung Galaxy Book 960XGL (NP960XGL-XG2ES) running Zorin OS 18 Pro (Ubuntu 24.04), kernel 6.17.0-20-generic.

Hardware:

  • CPU: Intel Core Ultra 9 185H (Meteor Lake-P)
  • Audio chip: Realtek ALC298
  • Subsystem ID: 0x144dc1d8
  • GPU: Intel Arc Graphics (MTL) + NVIDIA GeForce RTX 4070 Max-Q

Used the DKMS installer from @Andycodeman:
https://github.com/Andycodeman/samsung-galaxy-book-linux-fixes

The installer found 3 MAX98390 amplifiers and sound works correctly on internal speakers after running the install script and starting the service.

Thank you for the great work!

@BreadJS

BreadJS commented Apr 18, 2026 •

Copy link
Copy Markdown
Author

Thank you very much @cabaseira I've worked very hard on a solution! As we speak I'm working on getting this fix deployed in the linux kernel as soon as possible

@JoseFMP

JoseFMP commented May 20, 2026

Copy link
Copy Markdown

Tested on NT960XGL-XC72G, it works like a charm

@gnireorb

Copy link
Copy Markdown

Tested on NP940GK-KG2BR, works fine.

Used the DKMS installer from @Andycodeman:
https://github.com/Andycodeman/samsung-galaxy-book-linux-fixes

@jwsung91

jwsung91 commented Oct 10, 2026 •

Copy link
Copy Markdown

Hello, I've tested by my Galaxy Book4 Pro 14" (NP940XGK) on kernel 7.0.
Please checkout my report

Report: Galaxy Book4 Pro 14" (NP940XGK) on kernel 7.0

Confirming this driver works on a newer kernel and distro than the ones listed
so far. The main new data point is kernel 7.0 — the code builds cleanly
against 7.0 headers with no changes, so no rebase appears to be needed on that
front.

System

Model Samsung Galaxy Book4 Pro 14"
DMI product_name=940XGK, board_name=NT940XGK-KD72G
SoC Intel Core Ultra 7 155H (Meteor Lake)
HDA codec Realtek ALC298, subsystem ID 0x144dca07
Amps 4x MAX98390, I2C bus 2, addresses 0x38 / 0x39 / 0x3c / 0x3d
Distro Ubuntu 26.04.1 LTS (resolute)
Kernel 7.0.0-38-generic
SOF firmware 2.14.1.1, topology sof-hda-generic-2ch.tplg, machine driver skl_hda_dsp_generic
SOF firmware pkg firmware-sof-signed 2025.12.2-1
Secure Boot disabled

Before

Internal speakers completely silent; headphones worked normally. ALSA mixer was
not the cause — Master 100% [on], Speaker 98% [on], Auto-Mute Mode
Disabled — and PipeWire was correctly routing an active stream to the Speaker
sink. The gap was purely driver-side:

  • Only one amp enumerated (/sys/bus/i2c/devices/i2c-MAX98390:00); serial-multi-instantiate was not loaded
  • modinfo snd-hda-scodec-max98390 → not found (not in tree)
  • No alc269 quirk applied for 0x144dca07 (nothing in dmesg)

Codec node enumeration was 0x02–0x25 (36 nodes) with no 0x38/0x39/0x3c/0x3d,
confirming this board has no codec-internal class-D amps and depends entirely on
the external MAX98390 chips.

Result

All four amps probe and bind, and the internal speakers produce audio
(verified with a 440 Hz speaker-test tone, both channels):

max98390-hda i2c-MAX98390:00: MAX98390 HDA I2C probe: addr=0x38 index=0 name=i2c-MAX98390:00
max98390-hda 2-0039: MAX98390 HDA I2C probe: addr=0x39 index=1 name=2-0039
max98390-hda 2-003c: MAX98390 HDA I2C probe: addr=0x3c index=2 name=2-003c
max98390-hda 2-003d: MAX98390 HDA I2C probe: addr=0x3d index=3 name=2-003d

No probe errors, no I2C timeouts, no regmap failures. dkms status →
max98390-hda/1.0, 7.0.0-38-generic, x86_64: installed.

Caveat on methodology

I tested this via the out-of-tree DKMS packaging of this PR
(Andycodeman/samsung-galaxy-book-linux-fixes,
speaker-fix at 62ca87508e51), not by applying the patch series to a
kernel tree directly. That packaging carries its own build shims (local headers,
regmap shim) and supplies the I2C instantiation from userspace via a systemd
unit instead of through serial-multi-instantiate, so it does not exercise the
serial-multi-instantiate or alc269 quirk parts of this PR. Treat this as
evidence that the MAX98390 side-codec driver and DSM configuration work on this
hardware and build on 7.0 — not as a full validation of the series as submitted.

Happy to retest with the patches applied directly to a tree if that would be
more useful.

@bardliao

Copy link
Copy Markdown
Collaborator

This code is not related to SOF. You may want to send the patches to [email protected] and [email protected] to get some review?

@hogar1977

Copy link
Copy Markdown

Book5 Pro 360 (NP960QHA, 144d:c1da) on 7.3.5, Arch config with only this series on top — about a year after the series' base, all four amps still come up and the speakers work:

MAX98390:00: Instantiated 4 I2C devices.
snd_hda_codec_alc269 ehdaudio0D0: ALC298: picked fixup  for PCI SSID 144d:c1da
max98390-hda ...-max98390-hda.{0..3}: MAX98390 HDA component bound (index N)
snd_hda_codec_alc269 ehdaudio0D0: bound i2c-MAX98390:00-max98390-hda.N (ops max98390_hda_comp_ops)

No model= parameter needed, the quirk picks it up from the PCI SSID.

On the last comment — sending the series to [email protected] / [email protected]: if test reports from several models would help a submission, I'm glad to be one of them. I have the machine, it's my daily driver, and I'll test revisions and send back logs. Is there anything a tester can take off your plate to get this posted?

@stephanlensky

stephanlensky commented Nov 23, 2026 •

Copy link
Copy Markdown

👋 Hey @hogar1977, good timing, a couple of days ago I prepared an updated version of this series with a bunch of fixes/improvements that I plan to submit to [email protected] very shortly.

I will actually need new testers for the updated version, as with some substantial changes since this PR I did not feel comfortable assuming that all of the previously tested models still worked. If you're interested in helping, please send me an email which I can use to CC you on the submission when its ready. Feel free to send to [email protected] if you'd prefer not to post on GitHub. edit: please also include the laptop model you have in the email!

Same goes for all other testers who have posted results in this thread. Thanks!

@melvyn2

melvyn2 commented Nov 23, 2026

Copy link
Copy Markdown

If you send the lore link here once you submit the patches, I'll try them when I have the time.

@hogar1977

Copy link
Copy Markdown

Hi, for those using Arch Linux I have made an automatically built patched kernel. Here it is https://github.com/antpln/linux-galaxyaudio. You can install it pre-compiled with

yay -S linux-galaxyaudio-bin

Feedback would be appreciated, it is my first time doing this

I am using this at the moment and would very much appreciate if the fixes ended up in the main kernel instead of using the AUR package.
Dunno if this is the right place to mention this, but I have also managed to extract the binary blob from the windows installation for the sensors that deal with autorotation for my Galaxybook 5 Pro 360, so with a small script and service this now works fine for me.
Having the webcam fixed will be great as well.

@BreadJS

BreadJS commented Dec 1, 2026

Copy link
Copy Markdown
Author

I agree to Stephan Lensky [email protected] reworking the code from this pull request and submitting it to the upstream Linux kernel, with me credited as an author.

For the code I wrote, I certify the Developer Certificate of Origin 1.1 (https://developercertificate.org/), and the following tag may be added to the patches that contain it:

Signed-off-by: Kevin Cuperus [email protected]

Andycodeman added a commit to Andycodeman/samsung-galaxy-book-linux-fixes that referenced this pull request Dec 2, 2026
thesofproject/linux#5616 has had no code change since bfa17b7, which
speaker-fix already matches. What's new is in the thread:

- Stephan Lensky is reworking the series for linux-sound, and the
  original author signed off on that on 2026-12-01. Updated the
  "when will this be automatic" text in both READMEs.
- The rework may rename the strings max98390-hda-check-upstream.sh
  looks for, so the README now says to uninstall by hand if
  auto-removal doesn't fire once native support ships.
- Book4 Pro 14" (NP940XGK) on Ubuntu 26.04.1 / kernel 7.0 with
  speaker-fix, and Book5 Pro 360 (144d:c1da) with the upstream series
  on 7.3.5, added to the tested lists.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@stephanlensky

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.