Skip to content

SP11 7.2.2: record AudioReach, Denali QSPI and userspace fixes - #26

Closed
ooaklee wants to merge 3 commits into
sp11/ubuntu-qcom-x1e-7.2.y-targetfrom
sp11/ubuntu-qcom-x1e-7.2.y-target-fix-pt-2
Closed

SP11 7.2.2: record AudioReach, Denali QSPI and userspace fixes#26
ooaklee wants to merge 3 commits into
sp11/ubuntu-qcom-x1e-7.2.y-targetfrom
sp11/ubuntu-qcom-x1e-7.2.y-target-fix-pt-2

Conversation

@ooaklee

@ooaklee ooaklee commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

This retrospective records why 7.2.2-jg-0sp11v1-qcom-x1e lost sound,
microphone capture, touchscreen/pen reliability, and visible power-profile
control compared with sp11/integration-7.2.x, and records the bounded fixes
used for 7.2.2-jg-0sp11v2-qcom-x1e.

The branch contains three commits:

  • accept valid AudioReach modules with more than eight input ports while
    retaining the fixed output-link bound;
  • publish the complete Denali QSPI event-ring doorbell before channel
    activation and keep the completion workarounds scoped to
    microsoft,denali; and
  • advance the Ubuntu package identity to 7.2.2-jg-0sp11v2.

This PR is a historical record, not a request to merge these commits again.
The target branch already contains equivalent focused merges and has the same
resulting source tree. A final evidence comment will be added before this PR is
closed unmerged, following the record-keeping pattern used by #25.

Root causes

Playback and microphone

The affected system had no ALSA card. The kernel log showed an AudioReach
command timeout followed by failure to load topology widget sp11.sal.4001
with -EINVAL. FullIO v19c declares ten input ports for that SAL module, but
the parser incorrectly applied the eight-entry output-link limit to the input
metadata as well. The fixed arrays store output links, not input ports, so the
input rejection is removed and the output bound remains.

Microphone capture does not require a separate route patch here. The complete
card was aborting before playback or capture could register, while the target
already retains the VA/TX capture routes, TX_CODEC_DMA_TX_3, and two-channel
capture configuration.

Touchscreen and pen

Touch initially enumerated and exposed HIDRAW, then the QSPI/GPI path reported
events without pending descriptors, RX residue, channel-stop timeouts, and
eventual initialization failure. The event ring was made active after only the
low half of its 64-bit doorbell address had been published. The correction
publishes both halves before activation. The related completion behavior is
enabled only for devices selected through microsoft,denali.

The pen uses the same QSPI/HIDRAW transport, so a separate userspace or pen
protocol change is not introduced.

Power profiles

The v1 kernel already exposes one native
/sys/class/platform-profile/platform-profile-0 handler with low-power,
balanced, balanced-performance, and performance. The missing desktop
control was a userspace compatibility gap: power-profiles-daemon 0.30 only
looked for the legacy ACPI path. No synthetic legacy kernel interface is added.
The companion OE PR teaches userspace to consume the native class, and the
Lexr PR gates readiness on that exact kernel/userspace contract.

Historical equivalence

PR #25 was closed unmerged. It is therefore not correct to describe this line
as having merged that PR by ancestry. Its relevant changes were rebased or
propagated through focused branches and are present by semantic/resulting-tree
equivalence.

The relevant parts of PR #18 are also already represented: X1E product
0x0c83, X1P product 0x0c80, descriptor support, and registry-level omission
of duplicate SAM battery/AC providers. Replaying its older probe-time battery
workaround would weaken the current registry-level solution.

Guardrails and exclusions

  • Shared-driver behavior is either generic correctness or explicitly selected
    by microsoft,denali.
  • The generic AudioReach change removes an invalid input metadata restriction;
    it does not weaken the output-array safety bound.
  • The Denali completion behavior is not enabled for unrelated GPI clients.
  • Integration-only CL4 disablement, SAM D3 experiments, and USB resume changes
    are intentionally excluded.
  • Audio topology/UCM, IPTSD configuration, camera assets, firmware, battery
    userspace, Wi-Fi, Bluetooth, and GPU userspace remain unchanged and require
    requalification rather than speculative source changes.

These boundaries follow the guardrail conclusion recorded in
jglathe#79 (comment).

Propagation

The demonstration target and retrospective branch resolve to identical tree
b2be92faf2801084e23ae42d0568fc9fc844f33d.

Validation

  • Ubuntu annotations: check-config: all good.
  • Clean Lexr container build from the pushed retrospective branch: PASS.
  • ABI: 7.2.2-jg-0sp11v2-qcom-x1e; boot image mode: Stubble.
  • Exact source revision: dd928de48c037ca93bc9ade7ee5a5728543f251f.
  • Four-package ARM64 image/modules/ABI-header/common-header bundle emitted.
  • All package SHA256SUMS entries passed and lexr kernel inspect accepted the
    complete ABI-bound bundle.
  • X1E OLED and X1P LCD Denali device trees are present.
  • gpi.ko.zst, snd-q6apm.ko.zst, and snd-soc-x1e80100.ko.zst are present.

This is source, build, and package validation. It does not claim a physical
boot test or qualification of playback, capture, touch, pen, suspend/resume,
power-profile transitions, or battery-provider count.

The SP11 FullIO topology SAL module declares ten input ports.
AR_MAX_MOD_LINKS bounds the stored output connection arrays, but it
does not bound this module metadata. Rejecting the input count prevents
the sound card from probing with -EINVAL. Keep the output-port array
bound while accepting the valid SAL declaration.

Signed-off-by: Leon Silcott <leon@boasi.io>
The event ring is allocated and published before either QSPI channel
reaches ACTIVE_STATE. Using the active-channel predicate for the upper
doorbell write therefore publishes only the low half of a 64-bit DMA
address and can corrupt the completion stream.

Detect a configured Denali QSPI channel for event-ring publication, and
cache the root compatible so the SP11 completion workarounds remain
gated away from common GPI users.

Signed-off-by: Leon Silcott <leon@boasi.io>
Bump the downstream ABI for the AudioReach topology and Denali QSPI
event-ring fixes.

Signed-off-by: Leon Silcott <leon@boasi.io>
@ooaklee

ooaklee commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

Resolved conclusion

This retrospective is complete and is intentionally being closed unmerged.

  • The original v1 regressions were traced to two bounded kernel defects: the AudioReach parser rejected the valid ten-input FullIO v19c SAL module, aborting the whole playback/capture card; and the Denali QSPI path activated its event ring before publishing the complete 64-bit doorbell address, destabilising the shared touch/pen transport.
  • The audio correction is generic metadata correctness and retains the fixed output-array bound. The GPI correction and completion behavior remain selected through microsoft,denali, honoring the PR SP11: integrate 7.2.x platform, IPTS pen, audio, camera, and power support jglathe/linux_ms_dev_kit#79 guardrail.
  • No separate microphone route or pen userspace patch was required. Existing VA/TX capture routes and the IPTSD/HIDRAW integration remain the intended interfaces.
  • The missing desktop power-profile control was a userspace gap. The kernel's native class remains authoritative; no legacy ACPI-style kernel shim was retained.
  • PR Surface Pro 11: support X1P touchscreen and Denali battery #18's relevant X1E/X1P IDs, descriptor support, and duplicate battery/AC-provider behavior are already represented by equivalent or stronger target changes.
  • PR Ubuntu: enable MSHW0485 pen userspace interfaces #25 remains closed/unmerged historical ancestry. Its relevant result is represented semantically through the propagated target work; it should not be described as a literal merge.
  • Integration-only CL4, SAM D3, and USB-resume experiments remain excluded.

Propagation and records:

The clean Stubble build emitted ABI 7.2.2-jg-0sp11v2-qcom-x1e, four coherent packages, both Denali DTBs, and the expected GPI/AudioReach/X1E sound modules. Local and freshly downloaded release assets matched exactly and passed the closed Lexr release validator.

This resolves source, propagation, build, package, and publication work. It does not claim physical qualification; playback, microphone capture, touch, pen, suspend/resume, profile transitions, and battery-provider count still require a boot test on the Surface Pro 11.

@ooaklee

ooaklee commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

Closing unmerged as the requested retrospective record: the equivalent focused fixes are already propagated, the target and retrospective heads have identical trees, and the final resolution and validated release are recorded above.

@ooaklee ooaklee closed this Sep 2, 2026
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.

1 participant