Skip to content

ASoC: rt722-sdca: Enable speaker playback on Acer Swift Pro SFP14-55 - #6052

Draft
shripad-jyothinath wants to merge 1 commit into
thesofproject:topic/sof-devfrom
shripad-jyothinath:rt722-acer-sfp14-55-speaker-fix
Draft

shripad-jyothinath wants to merge 1 commit into
thesofproject:topic/sof-devfrom
shripad-jyothinath:rt722-acer-sfp14-55-speaker-fix

Conversation

@shripad-jyothinath

Copy link
Copy Markdown

This patch enables the internal stereo speakers on the Acer Swift Pro SFP14-55 (Meteor Lake-P with Realtek RT722 SDCA SoundWire codec).

Problem

On the Acer Swift Pro SFP14-55, audio output through the internal speakers produces no sound at all under Linux, even though headphones and DMIC work fine.

Root Cause

While debugging on the actual laptop hardware and comparing ACPI SSDT tables against the SoundWire register dumps, I found a few key issues preventing the Class-D amplifier from producing sound:

  1. ACPI Entity mismatch: The ACPI SSDT tables declare the Class-D SmartAmp power domain under Entity 0x41 (Device (E041)), but RT722_SDCA_ENT_PDE23 in rt722-sdca.h was hardcoded to 0x23.
  2. PDE float control: Hardware register 0x61:0x29 (RT722_AMP_PDE_FLOAT_CTL) defaults to 0x2323, which leaves the amplifier power domain disconnected from Entity 0x41. Setting this to 0x4141 connects it to the power domain declared in ACPI.
  3. Bridge control bit: Register 0x20:0x07 (RT722_MISC_CTRL1) bit 15 (0x8000) was unasserted by default. Without setting bit 15, digital audio stream data from the SoundWire bus is gated and does not reach the Class-D stage.
  4. Class-D tuning: The ACPI table specifies tuning registers for the amp (0x20:0x38 = 0x890a, 0x20:0x37 = 0xfc15, 0x20:0x40 = 0x8800).
  5. Power sequencing and EAPD: The amplifier PLL and LDOs in 0x5F:0x0B need to be enabled (0x9800) along with raising EAPD (0x20:0x10 = 0x0360) during SND_SOC_DAPM_POST_PMU. An 80ms settling delay avoids DC pop. On stream stop (PRE_PMD), EAPD is lowered back to 0x0260 and the amp power is cut.

Changes

  • Added a DMI quirk match for Acer Swift Pro SFP14-55 (RT722_QUIRK_ACER_SFP14_55).
  • Configured PDE float control, bridge routing, and ACPI tuning in rt722_sdca_init().
  • Implemented amplifier power and EAPD sequence in DAPM widget event rt722_sdca_spk_event().
  • Corrected RT722_SDCA_ENT_PDE23 define to 0x41.

Verification

  • Verified on Acer Swift Pro SFP14-55 running 7.4.0-rc1-sof-test+.
  • Stream playback tested with ALSA and PipeWire/WirePlumber desktop audio (pw-play).
  • Both acoustic loopback recordings (via onboard DMIC) and listening tests confirm clean, pop-free stereo sound from the internal speakers.

The internal speakers on the Acer Swift Pro SFP14-55 (Meteor Lake-P
with Realtek RT722 SDCA SoundWire codec) produce no sound on Linux.
Investigation revealed several factors preventing audio output:

1. In the ACPI SSDT table, the Class-D SmartAmp power domain is
declared under Entity 0x41 (Device E041), but the upstream rt722
header hardcodes RT722_SDCA_ENT_PDE23 as 0x23. Update the definition
to 0x41.

2. Hardware register 0x61:0x29 (RT722_AMP_PDE_FLOAT_CTL) controls which
entity the Class-D power domain is mapped to. The default is 0x2323.
On Acer SFP14-55, set this to 0x4141 to map it to Entity 0x41.

3. Hardware register 0x20:0x07 (RT722_MISC_CTRL1) bit 15 (0x8000)
must be set to route digital stream audio to the Class-D stage. When
this bit is clear, audio from the bus is blocked at the bridge.

4. Apply the ACPI AF04 FIT Class-D tuning values (0x20:0x38 = 0x890a,
0x20:0x37 = 0xfc15, 0x20:0x40 = 0x8800).

5. On stream start (POST_PMU), power up the amplifier PLL and LDOs
(0x5F:0x0B = 0x9800) and raise EAPD (0x20:0x10 = 0x0360) with an 80ms
settling delay to avoid pops. On stream stop (PRE_PMD), lower EAPD to
0x0260 and cut amplifier power back to 0x0000.

Add a DMI quirk table matching the Acer Swift Pro SFP14-55 to apply
these settings cleanly without affecting other platforms.

Signed-off-by: Shripad J <shripad-jyothinath@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 22, 2026 07:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@sofci

sofci commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

reply test this please to run this test once

@shripad-jyothinath
shripad-jyothinath requested a balanced review from Copilot November 22, 2026 10:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@jack-cy-yu

Copy link
Copy Markdown

Hi Shripad,

Thanks for getting the speakers to play on the SFP14-55, it confirms the problem is in the amp setup on this board and not in the SoundWire transport or the CAE firmware, but we can't take the patch as it is, mainly for two reasons:

  1. Changing RT722_SDCA_ENT_PDE23 from 0x23 to 0x41 is global. It is not covered by the DMI quirk, so every other RT722 platform would send its PDE requests to entity 0x41 while its PDE is still mapped to 0x23 (AMP_PDE_FLOAT_CTL = 0x2323 from the generic preset). That would break the speaker on all of them.
  2. The patch combines several independent changes (PDE entity mapping, MISC_CTRL1 bit 15, amp power/EAPD sequence, Class-D values from the FIT). Upstream will ask which of them are actually required, and we also need to check the values against our internal settings for this board.

The goal is a minimal, DMI-scoped fix that only affects this machine. To get there, could you help with the following?

Step 1: register dump comparison
Please capture cache-bypassed register dumps in two configurations, with the same kernel and both from a cold boot:

  • A: your patch (speaker works)
  • B: generic amp preset, i.e. your patch disabled (speaker silent)

For each, take the dump at three points: after init, during speaker playback, and after playback stops. Please include NID 0x20 (incl. 0x07, 0x10, 0x37, 0x38, 0x40), NID 0x5d (0x10000-0x10004), NID 0x5f (incl. 0x00, 0x0b), NID 0x61 (up to 0x80), and the amp function SDCA controls (PDE 0x23/0x41 requested/actual power state, FU06, function status).

If you can, also capture the same dump after a warm restart from Windows (Windows -> restart -> Linux, before the driver writes anything). It tells us which values Windows actually uses.

The dump diff gives us a candidate list. Some differences will just be a consequence of the amp running (power and status bits), so the minimal set has to be confirmed by testing.

Step 2: reduction test
Group your changes by function:

  • A: PDE entity 0x41 + AMP_PDE_FLOAT_CTL = 0x4141
  • B: MISC_CTRL1 (0x20:0x07) bit 15
  • C: Codec_D0 / amp power (0x5f:0x00, LDO1/LDO2_3, 0x5f:0x0b)
  • D: amp EAPD (0x20:0x10)
  • E: Class-D values from the AF04 FIT (0x20:0x37/0x38/0x40, 0x5d block, 0x61 entries, 0x2f03)

Then:

  1. Starting from your working patch, disable one group at a time and check whether the speaker still plays. A group whose removal makes the speaker silent is required.
  2. Starting from the generic preset, enable only the required groups and confirm the speaker plays.
  3. Only then narrow down to individual registers inside the required groups.

Our guess for the order of likelihood: A is probably not needed (0x23 with 0x2323 and 0x41 with 0x4141 are both consistent mappings, and PDE23 already reached PS0 in your earlier tests). B is worth testing on its own first: the existing CAE download flow sets MISC_CTRL1 bit 15 during the download and clears it afterwards. After that, C+D (amp power and EAPD), then E.

Step 3: final fix
Once you know the minimal set, we then verify the values internally and send a DMI-scoped patch upstream that only affects the SFP14-55.

In the meantime, could you also send:

  • the output of: cat /sys/class/dmi/id/{sys_vendor,product_name,product_sku,board_name,bios_version}
  • the acpidump (sudo acpidump > acpi.dat), if not already shared

Would you mind converting this PR to a draft while we work through this, so it is not merged as is?

Thanks again for the effort on this!

@shripad-jyothinath
shripad-jyothinath marked this pull request as draft November 23, 2026 13:31
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.

4 participants