Repository navigation
ASoC: rt722-sdca: add speaker quirk for Acer Swift Pro SFP14-55 - #6052
shripad-jyothinath wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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.
|
Can one of the admins verify this patch?
|
There was a problem hiding this comment.
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.
|
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:
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
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
Then:
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 In the meantime, could you also send:
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! |
|
Hi Jack, Thanks for the detailed review and guidance! Here are the requested DMI strings, ACPI dump, cache-bypassed register dumps across both configurations, and the reduction test results from live hardware testing on the Acer Swift Pro SFP14-55. 1. DMI Information & ACPI DumpDMI Strings (
ACPI Table Dump: (Note regarding Windows warm-restart: This laptop runs pure Linux without a dual-boot Windows partition, so I was unable to capture a warm reboot directly from Windows. However, the runtime reduction testing on the live codec gave us very clear answers.) 2. Step 1: Cache-Bypassed Register DumpsDumps were captured directly from the SoundWire slave hardware registers via debugfs ( Configuration A: Working Quirk (Sound audible, Delta SNR > +55 dB)
Configuration B: Generic Upstream Driver (Speaker silent)
3. Step 2: Reduction Test MatrixWe tested the functional groups toggled via dynamic module parameters on live playback using a 1000 Hz reference tone and measured acoustic loopback via the onboard SoundWire DMIC (hw:0,4) using FFT SNR analysis. The groups tested:
Test 1: Disabling One Group at a Time from Baseline (Working)
Test 2: Enabling from Generic Preset (Clean Startup)Starting from all groups disabled (pure silence, Delta SNR -0.4 dB):
Test 3: Finding the Minimal Working SubsetWe tested combinations to find the exact minimal necessary set:
4. Key Takeaways & Proposed Final Fix
I can clean up the patch into a minimal, DMI-scoped quirk that only implements the C + D (+ E tuning) power sequence and leaves the upstream SDCA entity definitions completely untouched. Let me know if you would like me to push the simplified patch for review! |
|
Thanks a lot for the DMI strings, the ACPI dump and the very thorough reduction test. This is really helpful. Some good news first: we checked internally, and the EAPD sequence in group D (0x20:0x10 bits [9:8] = 0x3 on stream start with an 80 ms delay, 0x2 on stream stop) matches what this platform is supposed to use. Group D is confirmed. Group C (the manual amp PLL/LDO power on 0x5f:0x0b and friends) is different. It is not in the AF04 initialization table and not part of the platform sequence we have, so before turning it into an upstream patch we'd like to check whether it is really needed, or whether it is only compensating for something else. Looking at the AF04 table in your ACPI dump, the amp power domain is entity 0x41 (AMP_PDE_FLOAT_CTL = 0x4141), and the Line3 power and mute are also floated to the amp function (0x61:0x01/0x1b/0x20/0x39/0x3d, e.g. 0x61:0x20 = 0x413e). With the upstream driver, PDE requests go to entity 0x23 with 0x2323, so nothing ever brings entity 0x41 to PS0. That could explain why the amp power had to be turned on by hand. Your earlier result that A is not needed was measured with C enabled, so it doesn't cover this case yet. Could you run two more combinations? Please do a cold boot for each (shut down, unplug AC, wait ~10 s), and set the groups on the kernel command line or before the module loads, not by toggling them at runtime, so no state carries over from a previous configuration:
For each, please report whether the speaker plays, and attach:
If combination 1 plays, the final fix can follow the platform description directly (AF04 table + EAPD sequence, no manual analog power), which will be much easier to justify upstream. Thanks again for all the testing! |
|
Hi Jack, Here are the results from testing the two combinations requested, including the silicon version register (0x20:0x00) and register dumps taken during playback and >5 seconds after playback stops. (Note on the cold boot: The battery on this unit is currently depleted, so the reboot was performed with the AC adapter connected. However, the module parameters were passed at module load time via /etc/modprobe.d/ so that the codec driver initialized directly in each target state.) Silicon Version
Summary of Results
Key Takeaways
Register ComparisonCombination 1: A + E + D (B=0, C=0) - Speaker Plays
Combination 2: E + D (A=0, B=0, C=0) - Speaker Silent
Full Register Dump (Combination 1)Click to expand Combination 1 Full DumpsState 2: During PlaybackState 3: Stopped (>5s after stop)I am ready to prepare and push the cleaned-up patch implementing this streamlined architecture (AF04 table + Entity 0x41 power sequencing + EAPD sequence) whenever you'd like! |
|
@shripad-jyothinath |
|
Hi Jack, I verified the v2 patch ( 1. Quirk DetectionThe DMI quirk matched automatically on probe without needing any module parameters: 2. Audio Playback & Verification
3. SummaryThe v2 patch completely resolves the silent speaker issue on this machine. Please let me know if you would like me to update this PR branch with your commit, or if you prefer to merge/apply your patch directly to Thanks again for the help and quick fix! |
|
Hi Shripad, Great news, thank you for testing v2 so quickly and thoroughly! Before the PR goes for review, could you check a few more cases with the same patch?
For each case, "sound / no sound" plus sudo dmesg | grep -iE "rt722|sdw" is enough. As for the PR: yes, please update PR #6052 with my patch, so it can go through SOF CI and review and be merged into topic/sof-dev. Please replace your current commit with my patch as is (keeping the author and my Signed-off-by), add your Tested-by tag with your real name and email, and update the PR title and description to match the commit. If the reviewers ask for changes, just let me know and I'll send you an updated patch to apply the same way, so the code always comes from my side and we keep a single version. Thanks again for all the testing and the detailed reports! |
The internal speakers of the Acer Swift Pro SFP14-55 stay silent because the BIOS (DisCo AF04) puts the amp power domain at entity 0x41, while the generic preset maps it to 0x23, so the amp is never powered; EAPD is also register controlled on this machine. Add a DMI quirk that sends the amp PDE requests to entity 0x41, applies the AF04 settings, and raises EAPD with an 80 ms settling time after PS0 (lowering it before PS3). Other platforms are unchanged. Link: thesofproject#6040 Link: thesofproject#6052 Signed-off-by: Jack Yu <jack.yu@realtek.com> Tested-by: Shripad J <shripad-jyothinath@users.noreply.github.com>
befa038 to
bbd360c
Compare
There was a problem hiding this comment.
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.
|
Hi Jack, Done on the PR side:
Additional testing with the same patch on the Acer SFP14-55 (kernel
Also, no SOF CI checks have been triggered on the new head yet. |
The internal speakers of the Acer Swift Pro SFP14-55 stay silent because
the BIOS (DisCo AF04) puts the amp power domain at entity 0x41, while the
generic preset maps it to 0x23, so the amp is never powered; EAPD is also
register controlled on this machine. Add a DMI quirk that sends the amp
PDE requests to entity 0x41, applies the AF04 settings, and raises EAPD
with an 80 ms settling time after PS0 (lowering it before PS3). Other
platforms are unchanged.
Link: #6040
Link: #6052
Signed-off-by: Jack Yu jack.yu@realtek.com
Tested-by: Shripad J shripad-jyothinath@users.noreply.github.com