Skip to content

ASoC: Intel: soc-acpi-intel-ptl-match: Remove unnecessary cs42l43 match#5773

Open
charleskeepax wants to merge 3 commits into
thesofproject:topic/sof-devfrom
charleskeepax:sof-dev
Open

ASoC: Intel: soc-acpi-intel-ptl-match: Remove unnecessary cs42l43 match#5773
charleskeepax wants to merge 3 commits into
thesofproject:topic/sof-devfrom
charleskeepax:sof-dev

Conversation

@charleskeepax
Copy link
Copy Markdown

For PTL onwards we are intending to rely on function topologies, rather than using a match table for each system type. Remove this unnecessary match table entry. Having the match entries can mean that systems match when they should use function topologies instead, resulting in incorrect audio configurations. Although, admittedly this is not too likely with this 6x amp configuration as those are quite rare, but best to follow best practice.

Note there is a single remaining match which does currently need a match as it contains custom magic in the topology. More work will be required to figure out how we guard off situations like that from interfering with more generic systems.

bardliao
bardliao previously approved these changes May 13, 2026
bardliao
bardliao previously approved these changes May 13, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Intel PTL SoundWire machine matching to prefer function topology selection over a per-platform match entry, and adds a SoundWire DMI quirk to ignore a ghost RT722 ACPI device on specific PTL systems to avoid incorrect enumeration.

Changes:

  • Remove the PTL SoundWire machine match entry for the cs42l43 + 6x cs35l56 configuration to avoid preempting function-topology based selection.
  • Add a new DMI-based _ADR remap quirk to drop a ghost RT722 device (by remapping its _ADR to 0) on select ASUS/Lenovo PTL platforms.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
sound/soc/intel/common/soc-acpi-intel-ptl-match.c Removes an explicit cs42l43+cs35l56x6 match entry so PTL systems rely on function topologies instead.
drivers/soundwire/dmi-quirks.c Adds a DMI quirk table entry to ignore a ghost Realtek RT722 ACPI device on specific PTL systems.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread drivers/soundwire/dmi-quirks.c
Comment thread sound/soc/intel/common/soc-acpi-intel-ptl-match.c
shumingfan
shumingfan previously approved these changes May 14, 2026
Copy link
Copy Markdown
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

LGTM, but needs @bardliao

bardliao
bardliao previously approved these changes May 14, 2026
For PTL onwards Cirrus are intending to rely on function topologies,
rather than using a match table for each system type. Remove this
unnecessary match table entry. Having the match entries can
mean that systems match when they should use function topologies
instead, resulting in incorrect audio configurations. Although,
admittedly this is not too likely with this 6x amp configuration
as those are quite rare, but best to follow best practice.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
For PTL onwards Cirrus are intending to rely on function
topologies, rather than using a match table for each system
type. Chrome systems tend to have custom magic in the topology
and thus need to load a specific file. This causes problems as
these system can have the same layout as generic laptops causing
the match to apply to other laptops. Add a DMI quirk that forces
these matches to only apply to specific devices.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Many systems ship with a Realtek audio codec in the ACPI that doesn't
physically exist in the system. This confuses the newer function
topology system that creates the soundcard, as it builds the card based
on the ACPI information.

Whilst we are working with the laptop vendors to try and stop this
happening there are quite a few systems where this has shipped. Add a
quirk to disable this "ghost" device.

Currently this patch should cover:
 - Asus UX5406AA
 - Lenovo Yoga Pro 9i (83SF)
 - Lenovo Yoga Slim 7 Ultra (83QK)

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
@Pegorim
Copy link
Copy Markdown

Pegorim commented May 14, 2026

Tested on ASUS Zenbook S14 UX5406AA (Panther Lake, Core Ultra 9 386H), BIOS v303, against torvalds linux v7.1-rc2 with this PR's current HEAD (a5bec626, the 3-commit version with the shared ghost_realtek quirk table and the Chrome-only machine_check) plus PR #5728. Audio works end-to-end — confirming the DMI-quirk approach as a clean replacement for PR #5754.

Boot evidence (journalctl -k -b 0 | grep -iE "sof|sdw|cs35l56|cs42l43|rt722"):

sof-audio-pci-intel-ptl 0000:00:1f.3: No SoundWire machine driver found for the ACPI-reported configuration:
sof-audio-pci-intel-ptl 0000:00:1f.3:   link 1 mfg_id 0x01fa part_id 0x3556 version 0x3
sof-audio-pci-intel-ptl 0000:00:1f.3:   link 1 mfg_id 0x01fa part_id 0x3556 version 0x3
sof-audio-pci-intel-ptl 0000:00:1f.3:   link 2 mfg_id 0x01fa part_id 0x3556 version 0x3
sof-audio-pci-intel-ptl 0000:00:1f.3:   link 2 mfg_id 0x01fa part_id 0x3556 version 0x3
sof-audio-pci-intel-ptl 0000:00:1f.3:   link 3 mfg_id 0x01fa part_id 0x4243 version 0x3
sof-audio-pci-intel-ptl 0000:00:1f.3: Use SoundWire default machine driver with function topologies
...
sof-audio-pci-intel-ptl 0000:00:1f.3: Using function topologies instead intel/sof-ipc4-tplg/sof-ptl-dummy.tplg
sof-audio-pci-intel-ptl 0000:00:1f.3: loading topology 0: intel/sof-ipc4-tplg/sof-sdca-2amp-id2.tplg
sof-audio-pci-intel-ptl 0000:00:1f.3: loading topology 1: intel/sof-ipc4-tplg/sof-sdca-jack-id0.tplg
sof-audio-pci-intel-ptl 0000:00:1f.3: loading topology 2: intel/sof-ipc4-tplg/sof-sdca-mic-id4.tplg
sof-audio-pci-intel-ptl 0000:00:1f.3: loading topology 3: intel/sof-ipc4-tplg/sof-hdmi-pcm5-id5.tplg
cs35l56 sdw:0:1:01fa:3556:01:2: DSP1: cirrus/cs35l56-b0-dsp1-misc-10431464-l1u2.bin (v1): v3.11.28
cs35l56 sdw:0:2:01fa:3556:01:0: DSP1: cirrus/cs35l56-b0-dsp1-misc-10431464-l2u0.bin (v1): v3.11.28
cs35l56 sdw:0:1:01fa:3556:01:3: DSP1: cirrus/cs35l56-b0-dsp1-misc-10431464-l1u3.bin (v1): v3.11.28
cs35l56 sdw:0:2:01fa:3556:01:1: DSP1: cirrus/cs35l56-b0-dsp1-misc-10431464-l2u1.bin (v1): v3.11.28

What's confirmed:

  • DMI match fires: the new ghost_realtek remap entry for ASUS / UX5406AA zeroes the phantom 0x000330025d072201 _ADR. No rt722 traces in dmesg, and the enumerated devices are just the four cs35l56 on links 1/2 plus the cs42l43 on link 3 (i.e. real hardware only).
  • All 4 amps load tuning blobs (l1u2, l1u3, l2u0, l2u1) — same coverage as under ASoC: soc-acpi-intel-ptl-match: add ptl_cs42l43_agg_l3_cs35l56_l12_ghost_rt722 #5754, no regression.
  • Userspace sees the expected device set: Jack Out/In, Speaker, Microphone, HDMI 1/2/3 — both via aplay -l and Pipewire sinks (HiFi__Headphones__sink, HiFi__Speaker__sink, three HDMI*__sinks).

One observation worth flagging on the path the kernel takes: after the rt722 is removed, the ptl_cs42l43_agg_l3_cs35l56_l2 entry is now skipped on non-Google DMI thanks to the new .machine_check = snd_soc_acpi_intel_no_function_topology, so the kernel falls all the way through to the SoundWire default machine driver with function topologies path. That default path then enumerates everything via function topologies — and that's what makes the four-amp setup work without a per-platform machine entry. So the elegance of this version of #5773 vs. #5754 is that the same DMI quirk, combined with the Chrome-only fence around the static-tplg entry, lets that default path do the heavy lifting on any board sharing the ghost-rt722 pattern.

For my @Pegorim/omarchy-pkgs#90, I'm dropping the prior backport of #5754 and shipping just #5728 + this PR as the linux-ptl audio set, since the result on hardware is identical and the patch surface is much smaller.

cc @itisyb for the Lenovo 83QK/83SF coverage now in the same shared ghost_realtek table.

@charleskeepax
Copy link
Copy Markdown
Author

@Pegorim Thanks very much for the testing there is one slight oddity reported on the Yoga Pro 9 that I want to attempt to track down, then I shall get the series upstreamed.

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.

6 participants