ALSA: hda: Add MAX98390 side codec support for Samsung Galaxy Book4 Pro 360
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | ASoC: max98390: Move register definitions to include/soundinclude/ sound/ | +657 | 1 reply | |
| 2/4 | ACPI/platform: Add MAX98390 to serial-multi-instantiatedrivers/ drivers/ | +15 | 0 replies | |
| 3/4 | ALSA: hda: Add MAX98390 side codec driverMAINTAINERS sound/ sound/ +3 more | +561 | 0 replies | |
| 4/4 | ALSA: hda/realtek: Add MAX98390 fixup for Samsung Galaxy Book4 Pro 360sound/ | +13 | 0 replies |
Reviews trailers per patch
1 of 4 patches has a Reviewed-by or Acked-by.
| Patch | Mark Brown |
|---|---|
| 1/4 | A-b |
| 2/4 | |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/4] ALSA: hda: Add MAX98390 side codec support for Samsung Galaxy Book4 Pro 360
Hi!
This is my first kernel contribution. It fixes the internal speakers on my laptop, a Samsung Galaxy Book4 Pro 360 (NP960QGK), which produce no sound on Linux. The laptop pairs a Realtek ALC298 HDA codec with four MAX98390 boosted class-D amplifiers on I2C, a woofer and a tweeter per channel, which the platform firmware leaves unconfigured.
This series adds an HDA side codec driver for the MAX98390, modeled on the existing CS35L41, TAS2781 and AW88399 side codec drivers, and enables it on the NP960QGK.
Patch 1 touches the ASoC max98390 driver, and patch 2 touches drivers/acpi and drivers/platform/x86. I would like the whole series to go through the sound tree, as the serial-multi-instantiate changes for the TAS2781 and AW88399 HDA drivers did, so acks from the ASoC, ACPI and platform/x86 maintainers would be appreciated.
Speaker tuning
--------------
Samsung's Windows tuning for the MAX98390's DSM block is not available under a license that would allow distributing it. The driver instead loads optional per-amplifier tuning files keyed by the codec subsystem ID, in the format the ASoC driver uses for dsm_param.bin.
No tuning files exist yet, so the driver always programs a conservative default that I wrote from scratch and writes a tuning file on top of
it: a high-pass filter on each speaker and a -7.5 dB volume cap, since speaker protection stays off without measured parameters. A measured tuning with protection for this model can follow as a firmware file.
Testing
-------
Tested on a Galaxy Book4 Pro 360 (NP960QGK, SSID 144d:c892, BIOS P14RHB.460.250425.04) on top of sound.git for-next. Checked:
- all four amplifiers bind and play
- stereo and woofer/tweeter split
- switching between speakers and headphones
- no pops or clicks when streams start and stop
- s2idle suspend/resume while idle and during playback
- loading tuning files, both full-range and partial-range, and reapplying them after resume
- reloading the module
Every patch builds cleanly with W=1 and sparse (C=1).
Tools
-----
I used an AI coding assistant, Claude Code (Anthropic), throughout this series, including for the commit messages and this cover letter. The default EQ coefficients come from a small Python script implementing the Audio EQ Cookbook formulas, which I can share on request. I reviewed every change and tested each version on the laptop.
Other models
------------
The Galaxy Book4 Pro (NP940XGK, 144d:ca07; NP960XGK, 144d:c890), Galaxy Book4 Ultra (NP960XGL, 144d:c1d8) and Galaxy Book5 Pro 360 (NP960QHA, 144d:c1da) are reported to use the same configuration. I left them out until owners of those models confirm this series works. I will send follow-up quirks once they have been tested.
History
-------
The driver is based on Kevin Cuperus' (BreadJS on GitHub) work in an SOF pull request [1], which got these speakers working for the first time. Kevin has agreed to my reworking and submitting it [2] (given to my previous address). The main changes are that the DSM register data, which was derived from other vendors' tuning, is replaced by firmware loading and the default above, and that the driver no longer depends on the ASoC driver or on I2C addresses.
Thanks also to slaschinski, Lyapsus and Emilian Miron for the testing and debugging that led to the original patch.
[1] https://github.com/thesofproject/linux/pull/5616
[2] https://github.com/thesofproject/linux/pull/5616#issuecomment-7329189152
(archived: https://web.archive.org/web/20261202024420/https://github.com/thesofproject/linux/pull/5616)
Kevin Cuperus (2):
ACPI/platform: Add MAX98390 to serial-multi-instantiate
ALSA: hda/realtek: Add MAX98390 fixup for Samsung Galaxy Book4 Pro 360
Stephan Lensky (2):
ASoC: max98390: Move register definitions to include/sound
ALSA: hda: Add MAX98390 side codec driver
MAINTAINERS | 6 + drivers/acpi/scan.c | 2 + .../platform/x86/serial-multi-instantiate.c | 13 + include/sound/max98390.h | 656 ++++++++++++++++++ sound/hda/codecs/realtek/alc269.c | 13 + sound/hda/codecs/side-codecs/Kconfig | 18 + sound/hda/codecs/side-codecs/Makefile | 4 + sound/hda/codecs/side-codecs/max98390_hda.c | 435 ++++++++++++ sound/hda/codecs/side-codecs/max98390_hda.h | 18 + .../hda/codecs/side-codecs/max98390_hda_i2c.c | 80 +++ sound/soc/codecs/max98390.h | 647 +---------------- 11 files changed, 1246 insertions(+), 646 deletions(-) create mode 100644 include/sound/max98390.h create mode 100644 sound/hda/codecs/side-codecs/max98390_hda.c create mode 100644 sound/hda/codecs/side-codecs/max98390_hda.h create mode 100644 sound/hda/codecs/side-codecs/max98390_hda_i2c.c
base-commit: 250eb16dcd515b1f03601828c316bda9e1dd5f8e
Signature · 1 line
2.55.0