Skip to content

[FAILED - DO NOT MERGE] SP11 v6 qualification aggregate - #43

Closed
ooaklee wants to merge 55 commits into
sp11/ubuntu-qcom-x1e-7.2.y-betafrom
sp11/qualification-7.2.2-v6
Closed

[FAILED - DO NOT MERGE] SP11 v6 qualification aggregate#43
ooaklee wants to merge 55 commits into
sp11/ubuntu-qcom-x1e-7.2.y-betafrom
sp11/qualification-7.2.2-v6

Conversation

@ooaklee

@ooaklee ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Purpose

Assemble the already separated SP11 topic branches plus the focused hardware A/B repairs in one disposable qualification branch. This PR supersedes #41 for the next physical test pass; it is not an integration approval and must not merge before the gates below pass.

The beta target remains unchanged. Topic review and provenance remain in their respective PRs.

Qualification-only delta after #41

  • 59820d33d9db stops replaying live GENI/GSI state on Denali QSPI runtime resume, preserving the hardware-qualified v19 transport lifecycle while retaining the guarded 64-bit ring fixes.
  • 503abc993906 restores the v19 active Offset2 behavior only for Denali WSA feedback ports 10, 11, and 13. It intentionally exposes no legacy module parameter.
  • 873129140e5b restores the exact v19 WSA8845 cold/start/stop transactions behind Denali, protected-feedback, 4-ohm, and detected-2S guards, including bounded PA recovery.
  • 8acb616daac4 retains initialized WSA state only across the guarded simple clock-stop lifecycle.
  • 7978eadd8959 permits SoundWire teardown when readiness clears are deferred and clears both protected backends only after a confirmed final graph stop.
  • fbfbd8a6516e selects the established Debian version 7.2.2-jg-0sp11v6, deriving the isolated kernel ABI 7.2.2-jg-0sp11v6-qcom-x1e.

Evidence before packaging

  • strict checkpatch.pl across all six new commits: 0 errors, 0 warnings, 0 checks
  • git diff --check: pass
  • fresh ARM64 ubuntu_x1e_defconfig, W=1: Qualcomm GENI SPI, Qualcomm SoundWire, WSA884x, Q6APM, and X1E80100 linked module targets pass
  • fresh OLED Denali DTB build: pass
  • v6 does not collide with an existing origin branch, tag, or release
  • Debian tooling accepts 7.2.2-jg-0sp11v6 and orders it after 7.2.2-jg-0sp11v5

Required physical gates

  • preserve the known-good v19 fallback and its version-matched DTB
  • install the exact v6 image/modules/header bundle and stage the v6 DTB at its own /boot path
  • verify uname -r is exactly 7.2.2-jg-0sp11v6-qcom-x1e
  • exercise touchscreen and pen continuously, repeated idle/resume, and suspend/resume; no unowned GPI event, paired-RX residue, EIO, channel-stop timeout, or reset timeout
  • verify left and right speakers independently and together across repeated open/close and suspend/resume; no WSA PA status 0x6 failure
  • verify VI and CPS readiness, both WSA attachments, protection clocks, and no repeated backend-clear -EBUSY warning group
  • rerun camera, battery, platform-profile, USB4, and baseline boot checks so the repairs do not mask another aggregate regression

The full Lexr package build and artifact inspection are still qualification gates. Keep this PR draft and do not merge on compile evidence alone.

Physical qualification result: failed

The v6 aggregate must not merge. On the Surface Pro 11 OLED it produced intermittent touch/pen recovery followed by repeated QSPI TX timeout and loss of HIDRAW/IPTSD, plus loud speaker static after volume-key feedback and earlier left-only playback. The correct per-ABI OLED DTB was installed and the same userspace is stable on v19, excluding Lexr userspace and DTB selection as primary causes.

The live QSPI trace and v19 codec comparison produced follow-up repairs 1a207c4 and d9ce34f on PRs #42 and #39. A new ABI-distinct v7 qualification aggregate is required; do not reuse or amend the v6 packages.

@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

Lexr v6 build evidence (2026-09-03)

The full native Ubuntu X1E package build completed successfully from exact source revision fbfbd8a6516e04310e3710ef6def537367bd0b36 (tree 4b665438bcac81406b3f57b5e75a9d87b085b2c3) on sp11/qualification-7.2.2-v6.

  • Package version: 7.2.2-jg-0sp11v6
  • Runtime ABI: 7.2.2-jg-0sp11v6-qcom-x1e
  • Lexr recipe SHA-256: 9f9abb9eed28dfa334bfe029b016d8c99227999d84dab0a37adce43baa9dcf3a
  • lexr kernel inspect --json: passed; four-package ABI-bound bundle, all entries verified
  • SHA256SUMS: all four packages passed
  • Image SHA-256: 04405a36f79e84921c03652e8a200a6504f1c230d3b5cbbd679951646a2c95bc
  • Modules SHA-256: ce9398455679f49f7154deb4b68ab8e56b51434dc64fc02297a9dcec7b8b90ec
  • ABI headers SHA-256: 65c048ad99277fed2978710e58c5016da6130b5bd09e5a92752324630ccfbbaf
  • Common headers SHA-256: 4004f556b78a037a7a729017c5567db65c533f024f36c5a9679342655902b119

The modules package contains both version-scoped DTBs:

  • /usr/lib/firmware/7.2.2-jg-0sp11v6-qcom-x1e/device-tree/qcom/x1e80100-microsoft-denali-oled.dtb
  • /usr/lib/firmware/7.2.2-jg-0sp11v6-qcom-x1e/device-tree/qcom/x1p64100-microsoft-denali.dtb

This PR remains draft and must not be merged until physical qualification confirms persistent touch, pen input, stereo playback, suspend/resume, and repeated playback cycles.

@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

OpenCode-assisted semantic parity audit (2026-09-03)

Compared the known-good sp11/integration-7.2.x v19 implementation with this exact v6 candidate and checked the running v19 machine at 7.2.0-jg-0sp11v19-qcom-x1e.

Audio

  • PASS: Denali WSA SoundWire feedback Offset2 is now automatic and restricted to the Denali WSA controller ports 10, 11, and 13. This replaces the old global sp11_feedback_active_offset2_zero switch.
  • PASS: WSA8845 cold/start/stop sequencing, bounded PA recovery, 4-ohm 2S profile, gain range, left/right port maps, VI/CPS feedback DAIs, shared CPS port handling, clock-stop retention, protected AudioReach graph ordering/geometry, backend lifecycle, and TX/VA DMIC clock sharing are preserved.
  • PASS: candidate behavior is guarded by the Denali machine compatible and the relevant controller/profile/route properties rather than exposed as global module policy.
  • INTENTIONAL: the old default-off sp11_cps_pcm_route_105c diagnostic parameter is not carried. On the known-good v19 runtime, /sys/module/soundwire_qcom/parameters/sp11_cps_pcm_route_105c is N; it is not part of the working configuration.
  • INTENTIONAL: the deprecated Offset2 compatibility parameter is absent. The known-good v19 runtime has it Y through GRUB, whereas v6 implements that hardware policy automatically. A stale v19-oriented GRUB argument may warn under v6 but must not be used to justify reintroducing the parameter.

Camera

  • PASS: Denali C-PHY lane mapping, PHY reset sequence, receiver crop, CSID keep-all behavior, VFE MIPI RAW selection, partial-start unwind, stop diagnostics, link-frequency parsing, and OLED graph were all traced to guarded candidate equivalents.
  • INTENTIONAL: Denali now binds the standalone IMX681 driver rather than the old CCS path; the mode data is retained and the old path is no longer bound.

Remaining qualification gate

No static semantic gap was found. This remains a hardware qualification build. Before merging, test persistent touch and pen input, stereo left/right playback, repeated playback open/close cycles, suspend/resume followed by playback, TX DMIC capture, and live IMX681 capture/start-stop behavior. The beta base remains unchanged until those checks pass.

@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

SP11 v6 source-to-topic qualification matrix

Authoritative revisions used for this audit:

  • hardware-qualified source: sp11/integration-7.2.x at 2cbd1ec3e2da385e7bd91fd65c63ba5a8fb5b865
  • maintained upstream base: jglathe/jg/ubuntu-qcom-x1e-7.2.y at 87bcf07d1ed79960c0f2e769ada5b8b05fd35c48
  • beta base: sp11/ubuntu-qcom-x1e-7.2.y-beta at eca65c109843c3245bc844ec8bc2adb149415bb6
  • aggregate qualification candidate: sp11/qualification-7.2.2-v6 at fbfbd8a6516e04310e3710ef6def537367bd0b36
Integration behavior Guarded destination State in beta/v6 Qualification evidence still required
Denali volume keys/autorepeat, firmware names, WLAN rfkill policy, X1P PWM backlight, TPM/UFS reservations maintained 7.2.y board description inherited from the current upstream base; no duplicate SP11 patch smoke-test keys, WLAN/Bluetooth, backlight, storage and firmware loading
OLED display maximum-link-rate workaround #28 merged; property-controlled DP workaround internal OLED at expected mode, external display regression check
DWC3 PHY recovery after resume #31 merged; DT opt-in quirk repeated suspend/resume and USB reconnect
Denali PSCI idle containment #32 merged; Denali DTS disables the affected cluster states repeated s2idle/resume, idle stability
MSHW0485 QSPI/direct touch #33 plus repair #42 foundation merged; replay-on-runtime-resume removal included in v6, repair remains draft persistent touch after boot, idle and suspend/resume
Pen heat-frame/IPTSD ABI and HIDRAW #34 merged; Denali DT opt-in pen events, pressure/buttons, touch+pen coexistence
IMX681 C-PHY camera graph and CAMSS behavior #35 plus repair #40 foundation merged; seven guarded parity repairs included in v6, repair remains draft live 3840x2640 capture, layout/stride, repeated start/stop and failure unwind
TX/VA DMIC capture and shared clock ownership #36 draft and included in v6 two-channel recording, channel separation, suspend/resume capture
Golden v33 stereo/protected-speaker path #39 draft and included in v6 left/right stereo, repeated open/close, suspend/resume playback, PA fault/status checks
Native battery provider vs duplicate SAM battery/AC providers #37 draft and included in v6 one battery and one AC provider, charging/status/percentage updates
SP11 platform profile/fan nodes and low-power CPU cap #38 draft and included in v6 profile enumeration/switching, fan telemetry, low-power cap behavior
Integration guardrail/checkpatch policy #27, #29, #30 merged; every current topic and v6 check is green continue enforcing on each merge head

Assembly verification:

Merge gate and order:

  1. Do not merge [FAILED - DO NOT MERGE] SP11 v6 qualification aggregate #43; it is an aggregate qualification vehicle only.
  2. Physically qualify the complete v6 image against the matrix above.
  3. If v6 passes, merge the independent topic PRs individually: [FAILED - DO NOT MERGE] dmaengine: correlate Denali QSPI completion ordering #42, media: qcom: restore SP11 camera parity gaps #40, ASoC: re-lift guarded SP11 TX DMIC capture #36, [FAILED - DO NOT MERGE] ASoC: re-lift guarded SP11 Golden v33 playback #39, platform/surface: re-lift SP11 battery-provider containment #37, then platform/surface: re-lift contained SP11 platform profile #38. Re-run the integration check after each merge because platform/surface: re-lift SP11 battery-provider containment #37 and platform/surface: re-lift contained SP11 platform profile #38 share the SP11 registry file.
  4. Rebuild the final beta head and run a short regression pass before declaring parity restored.

ooaklee and others added 26 commits September 3, 2026 04:37
Denali uses a 4.8 MHz direct-DMIC rate with the VA path clocked at
19.2 MHz. Validate the sample rate against that clock so the driver
selects DIV4, matching the native Windows programming, instead of DIV2.

Keep the existing calculation on every other machine.

This is based on geoca's Windows-parity analysis in patch 0072.

Link: https://github.com/geocausa/SP11X1e-audio/blob/a1d51ecc7416a905acdad50d31600fff7f28ac1c/patches/0072-ASoC-lpass-va-macro-SP11-match-Windows-DMIC-divider.patch
Link: 58e36b1
Co-authored-by: geoca <272055834+geocausa@users.noreply.github.com>
Signed-off-by: Leon Silcott <leon@boasi.io>
The Surface Pro 11 microphone array feeds the TX macro while the VA
macro owns its direct-DMIC pad clocks. Without a cross-macro clock
request, the TX capture path cannot reproduce the working firmware
sequence.

Add an LPASS-internal DMIC clock broker, register the Denali VA macro as
its provider, and request DMIC1 then DMIC0 from the TX DEC event group.
Validate the exact two-channel Denali route before changing the clocks.

Both the provider and consumer paths are gated by the microsoft,denali
root compatible. Other machines retain the existing VA and TX behavior;
the common broker remains unused on those systems.

This implementation follows geoca's Windows-parity work in patch 0078.

Link: https://github.com/geocausa/SP11X1e-audio/blob/a1d51ecc7416a905acdad50d31600fff7f28ac1c/patches/0078-ASoC-lpass-SP11-share-VA-DMIC-clock-with-TX-capture.patch
Link: 58e36b1
Co-authored-by: geoca <272055834+geocausa@users.noreply.github.com>
Signed-off-by: Leon Silcott <leon@boasi.io>
The Surface Pro 11 exposes its microphone array as two 48 kHz PCM
channels. The existing VA backend covers the voice path but does not
provide the regular TX-macro host capture path.

Add a TX macro link through AudioReach TX_CODEC_DMA_TX_3 and route DMIC0
and DMIC1 through the microphone regulator. Keep the existing VA capture
link available for low-power use and hardware comparison.

Link: ab34e94
Link: 58e36b1
Signed-off-by: Leon Silcott <leon@boasi.io>
Describe the optional WSA8845 VISENSE and CPS feedback paths, including
their DAI selectors and slave-only SoundWire transport properties. Add a
board-specific Denali sound-card compatible with the generic X1E80100
fallback.

[Leon: Split the source binding changes into a reviewable commit, rebased
them onto the current schemas, added the Denali sound-card compatible with
its generic fallback, and kept the new properties optional.]

Link: geocausa/SP11X1e-audio@31466d6
Link: 4bcfa10
Signed-off-by: Leon Silcott <leon@boasi.io>
Let a slave describe optional banked registers implemented by a SIMPLE
data port, and let a stream provide slave-only transport overrides. The
new fields default to zero so existing SoundWire devices are unchanged.

[Leon: Split the zero-default slave transport metadata from the source
overlay and rebased it onto the current SoundWire types.]

Link: geocausa/SP11X1e-audio@31466d6
Link: 4bcfa10
Signed-off-by: Leon Silcott <leon@boasi.io>
Give the Denali sound-card compatible a private configuration and use it
to constrain the WSA VI and CPS rate, format, and channel-map setup. Other
X1E80100 sound cards keep their existing backend behavior and speaker
volume limits.

Do not carry the source branch's global AudioReach readiness variables.
Readiness must instead be represented by the relevant card and graph
instances in the runtime part of the series.

[Leon: Replaced the source global readiness and volume changes with a
Denali-private card configuration while retaining non-Denali behavior.]

Link: geocausa/SP11X1e-audio@31466d6
Link: 4f9ac01
Signed-off-by: Leon Silcott <leon@boasi.io>
Let a slave describe optional banked registers implemented by a SIMPLE
data port, and let a stream provide slave-only transport overrides. The
new fields default to zero, so existing SoundWire devices keep the current
programming path.

This is the generic core portion required by the Denali WSA8845 feedback
ports; controller and codec use is added separately.

[Leon: Split the generic SIMPLE transport/register override support from
its Qualcomm controller and codec consumers and retained the current stream
API.]

Link: geocausa/SP11X1e-audio@31466d6
Link: 5cf86f7
Signed-off-by: Leon Silcott <leon@boasi.io>
Expose companion playback streams for the two Denali WSA input DAIs so
DPCM can start VI and CPS with speaker render while SoundWire keeps their
physical direction toward the master. Merge the two amplifier channels
only for Denali's shared CPS master port.

Gate both changes on the Denali machine compatible, the WSA controller,
and DAI IDs 9 and 10. Other Qualcomm SoundWire controllers retain their
existing DAI capabilities, rates, formats, direction, and port allocation.

The source branch's global diagnostic module parameters are intentionally
not carried.

[Leon: Scoped the feedback direction, shared-port merge, and companion
DAIs to Denali WSA controller IDs 9 and 10. Omitted the source diagnostic
module parameters.]

Link: geocausa/SP11X1e-audio@31466d6
Link: 5cf86f7
Signed-off-by: Leon Silcott <leon@boasi.io>
Register separate VI and CPS feedback DAIs when a WSA884x instance has
the qcom,enable-cps property. Split its SoundWire sink and source ports,
apply the DT-selected VISENSE mask and CPS Offset1, and keep playback and
feedback stream state separate.

Devices without the property still register only the existing speaker DAI
and retain the existing port description and stream setup. This commit does
not include the Denali PA register profile or lifecycle changes.

[Leon: Split the WSA884x feedback DAI/port subset, made it an explicit
per-node opt-in with private stream state, and omitted the broad PA
lifecycle changes.]

Link: geocausa/SP11X1e-audio@31466d6
Link: e72bffc
Signed-off-by: Leon Silcott <leon@boasi.io>
On Denali, add playback-side VI and CPS endpoints so the protected render
graph can start both feedback paths atomically. Add the associated DAPM
widgets and keep the existing VI capture endpoint intact.

Build the extended DAI table from a private copy only on Denali. Other
machines continue to register the original DAI table and DAPM graph, so the
shared WSA macro driver does not redefine their TX interfaces.

[Leon: Split the WSA macro feedback endpoints, built them from a
Denali-private DAI/DAPM copy, and preserved the existing VI capture path.]

Link: geocausa/SP11X1e-audio@31466d6
Link: e72bffc
Signed-off-by: Leon Silcott <leon@boasi.io>
Add playback capabilities for the WSA TX0 and TX1 backend DAIs used by
Denali's VI and CPS protection links. Build the modified table as a
device-managed copy only for the Denali AudioReach backend provider.

Other machines and the legacy Q6AFE provider keep the existing capture-
only definitions. Propagate allocation failure from the AudioReach DAI
probe.

Link: geocausa/SP11X1e-audio@31466d6
Link: 22bdec2
Signed-off-by: Leon Silcott <leon@boasi.io>
APR receive processing can hold a service pointer after dropping
svcs_lock, while dynamic port removal used to remove and immediately
free that service. A concurrent callback could therefore use freed
memory.

Give every service a registrar reference and take callback references
while holding svcs_lock. Remove the service from the IDR first, then wait
for admitted callbacks to drain before freeing it. Apply the same unwind
discipline to static service registration failures.

gpr_free_port() may sleep and must run in process context outside the
port's own callback. This avoids self-deadlock while preserving a simple
removal contract.

Signed-off-by: Leon Silcott <leon@boasi.io>
Global AudioReach commands reused token zero and shared one result slot.
Late responses after a timeout could complete a later command or mutate
the wrong mapping handle. Dynamic graph clients could also disappear
while callbacks or command users still held them.

Assign unique tokens to synchronous global and per-client commands while
preserving the graph and position-buffer token fields. Claim replies only
when token and opcode match the active command, and update mapping handles
inside the same critical section.

Publish graph clients under a lifecycle lock, reject new users once
teardown begins, abort pending waits, and drain admitted users and
callbacks before releasing ports. This also corrects the position-buffer
unmap token.

Link: geocausa/SP11X1e-audio@33d5145
Link: geocausa/SP11X1e-audio@39499f0
Link: 22bdec2
Signed-off-by: Leon Silcott <leon@boasi.io>
FullIO v19c topologies add raw module stage classes and data, graph
control links, extended container placement, and integrated-backend
metadata. The 7.2 parser did not retain or emit those fields.

Parse the extended tokens and build matching graph-open payloads without
hard-coded diagnostic or volume instance IDs. Use one checked iterator
for vendor arrays and known raw records, reject truncated, reordered,
duplicate, oversized, or overflowing input before packet allocation, and
preserve the historical no-op for unsupported legacy module extensions.

[Leon: ported the format to 7.2, preserved legacy-topology no-op
behavior, and hardened raw-block bounds, ordering, duplicates, ownership,
and aggregate allocation arithmetic.]

Link: geocausa/SP11X1e-audio@31466d6
Link: geocausa/SP11X1e-audio@7af8f21
Link: 4bcfa10
Link: 22bdec2
Signed-off-by: Leon Silcott <leon@boasi.io>
FullIO protection calibration can exceed the in-band SET_CFG limit, and
its storage belongs to the DSP graph rather than global card state.

Size each graph payload from topology, allocate coherent memory through
the APM DMA device, translate the address for the DSP SID, and map it
with a graph-scoped token. Serialize buffer writes and correlate MAP,
SET_CFG, and UNMAP replies to the exact command before changing mapping
state.

Close the DSP graph before unmapping its OOB buffer. If a reply leaves
ownership ambiguous, retain the coherent memory and device reference
until reboot or a future proven reset hook rather than allowing the DMA
range to be reused.

[Leon: made OOB ownership graph-scoped, keyed reply mutation to the
current command, and retained ambiguous mappings instead of reusing DMA.]

Link: geocausa/SP11X1e-audio@9de3dc9
Link: geocausa/SP11X1e-audio@af28565
Link: geocausa/SP11X1e-audio@1ca3820
Link: geocausa/SP11X1e-audio@31466d6
Link: 22bdec2
Signed-off-by: Leon Silcott <leon@boasi.io>
FullIO v19c describes protected-speaker calibration and runtime stages
in topology. Execute graph calibration and ordered protection or bypass
SET_CFG payloads on the owning graph instead of using global card state
or hard-coded module instance IDs.

Keep configuration, bypass proof, backend readiness, start references,
and faults per graph. Enable this path only for Denali PCM clients and a
topology-declared protected graph; reject partial profiles and mixed
ordinary or protected clients. Start only after protected configuration
or both SP and SPVI bypass commands are confirmed.

Correlate every state transition and make final close consume-on-success.
If execution, close, OOB, or mapping ownership is unconfirmed, block
reuse and retain the complete client, callback context, and DMA ownership
until reboot or a future proven reset hook.

[Leon: limited the runtime to Denali plus a topology-declared protected
graph, made malformed or unconfirmed setup fail closed, serialized
backend/readiness and start references, enforced immutable shared runtime
modes, and quarantined callbacks, clients, and DMA after unconfirmed
teardown.]

Link: geocausa/SP11X1e-audio@db2af54
Link: geocausa/SP11X1e-audio@1ca3820
Link: geocausa/SP11X1e-audio@33d5145
Link: geocausa/SP11X1e-audio@31466d6
Link: geocausa/SP11X1e-audio@7af8f21
Link: 22bdec2
Signed-off-by: Leon Silcott <leon@boasi.io>
Denali speaker protection needs both VI feedback and CPS telemetry before
the protected path can be enabled. Map those backend DAIs to the graph
that owns their topology-declared integrated backend, and publish
readiness as the SoundWire links prepare or tear down.

Keep the mapping and lifecycle limited to microsoft,denali-sndcard.
Require a valid, prepared SoundWire runtime before publishing readiness,
reject readiness transitions while the graph is started, and drain the
matching FE and BE start references symmetrically. Refuse SoundWire
teardown until the graph is known stopped. Other machines and ordinary
graphs keep their existing DAI behavior.

Link: geocausa/SP11X1e-audio@31466d6
Link: geocausa/SP11X1e-audio@7af8f21
Link: 22bdec2
Link: 4f9ac01
Signed-off-by: Leon Silcott <leon@boasi.io>
Describe the optional nominal speaker load used to select board-specific
PA gain and PBR thresholds. An absent property retains the existing
8-ohm defaults.

Link: geocausa/SP11X1e-audio@967b539
Link: 40932bb
Signed-off-by: Leon Silcott <leon@boasi.io>
Read the nominal speaker load from firmware and apply the 2S 4-ohm PA
gain, PBR, class-H, VCM, and UVLO values only when the amplifier also
reports a 2S VPHX supply. Devices without the property retain the current
defaults.

[Leon: Re-lifted the profile onto the current driver, gated it by
qcom,speaker-load-ohms and a fresh hardware-confirmed 2S status, and added
explicit default restoration after failed re-attach reads.]

Link: geocausa/SP11X1e-audio@967b539
Link: 40932bb
Signed-off-by: Leon Silcott <leon@boasi.io>
Have each opted-in WSA884x report a successful, error-free PA
enable to the WSA macro. Enable both protection paths after the
second confirmed PA and disable them before the first PA teardown.

Require protected feedback DAIs to have a live 2S/4-ohm
classification so VI/CPS readiness cannot outrun the PA profile.
Roll back PA and DRE state when an enable write, PA status check,
or macro lookup fails. Keep the counters, lock, and enabled state
in each WSA macro instance so non-protected cards remain unchanged.

[Leon: Replaced the source globals with per-macro state, scoped
lookup to the source card, balanced duplicate/remove events per
amp, made the helper Kconfig-safe, required a confirmed 2S/4-ohm
feedback profile, and withheld the PA event after write or FSM
errors.]

Link: geocausa/SP11X1e-audio@31466d6
Link: e72bffc
Signed-off-by: Leon Silcott <leon@boasi.io>
Describe the WSA8845 VISENSE and CPS feedback links used by the protected
speaker graph. Select them only from the Denali sound card and give that
card a board-specific compatible ahead of the generic X1E80100 fallback.

[Leon: Re-lifted only the common Denali VI/CPS graph and transport data,
added the board-specific compatible, and omitted the experimental board
target.]

Link: geocausa/SP11X1e-audio@31466d6
Link: 6035b3e
Signed-off-by: Leon Silcott <leon@boasi.io>
Describe both integrated WSA8845 speaker loads as 4 ohms so the codec can
select the matching PA profile after confirming the hardware 2S supply.

Link: geocausa/SP11X1e-audio@967b539
Link: 6035b3e
Signed-off-by: Leon Silcott <leon@boasi.io>
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>
Qualcomm battmgr is the authoritative battery provider on the Surface
Pro 11. Do not instantiate the primary Surface Aggregator Module battery
device in the Denali-specific software-node group, avoiding a duplicate
battery provider without adding a machine quirk to the shared driver.

Keep the separate SAM AC-adapter node registered. This extracts and
narrows the Denali battery fix from the original combined touchscreen and
battery commit.

Link: 3fc7c52
Signed-off-by: Justin White <kyjus25@gmail.com>
Signed-off-by: Leon Silcott <leon@boasi.io>
The X1E Qualcomm battery manager registers qcom-battmgr-ac as the
authoritative mains supply. Retaining the Surface Aggregator ADP1 node
creates a second mains interface for the same Denali power source.

Follow the upstream Surface Laptop 7 precedent and omit the SAM AC node
from the Denali-only registry group. Keep this correction separate from
the Justin White battery-node extraction so its original authorship and
sign-off remain intact.

Link: torvalds@0488073
Signed-off-by: Leon Silcott <leon@boasi.io>
Device-tree systems can use platform-profile providers even when ACPI is
disabled, but the framework currently declines to register its class in
that case. Register the class unconditionally and create the legacy ACPI
attribute group only after ACPI has initialized successfully.

Record that group registration and use it to guard legacy notifications
and teardown. This keeps the class path independent of ACPI while also
avoiding a stale acpi_kobj after an ACPI initialization failure.

This exposes the native /sys/class/platform-profile/ interface without
creating a synthetic /sys/firmware/acpi hierarchy. Existing ACPI systems
retain the legacy aggregate attributes unchanged.

This is a contained rework of the original SP11 non-ACPI enablement.

Link: 106ad0d
Signed-off-by: Leon Silcott <leon@boasi.io>
Restore the CSID-specific part of the qualified camera path: detect the
one-trio C-PHY RAW10 3844x2640 sink format, decode it for the receiver
crop,
program a 3840-pixel horizontal crop, and expose 3840 pixels on the CSID
source pad.

Keep the final source branch's exact 3840-or-3844 IMX681 signature helper
so the standalone 3840x2640 driver can use the same guarded diagnostics.
C-PHY routing itself is already carried by the preceding beta camera
topic, so it is intentionally not duplicated here.

This extracts the remaining receiver-crop and standalone-signature
behavior from the two linked hardware-qualified source commits while
preserving their author.

Link: 73960c7
Link: 6621d73
Signed-off-by: Leon Silcott <leon@boasi.io>
Program period 1 and pattern 0 for the frame, pixel, and line drop
engines.
This preserves every RDI sample explicitly instead of relying on reset
values, while the independently configured IMX681 horizontal crop remains
enabled only for its exact C-PHY RAW10 geometry.

Extract the CSID portion of the hardware-qualified source commit and
preserve its author. Sensor, PHY, device-tree, and packaging changes from
that original multi-area commit are already represented by the preceding
beta camera topic.

Link: 1592ec3
Signed-off-by: Leon Silcott <leon@boasi.io>
Track the last subdevice that accepted stream start. If a later subdevice
fails, stop only the subdevices that were successfully started before
tearing down the media pipeline. Reuse the same helper for normal stream
stop and keep teardown going after nonfatal stop errors.

This preserves the CAMSS portion of the hardware-qualified source commit.
Its sensor, CCS, and packaging changes are not copied because the beta
already uses the validated standalone IMX681 driver and focused packaging.

Link: 0097c12
Signed-off-by: Leon Silcott <leon@boasi.io>
Sample read-only CSID680 receiver, packet, error, IRQ, crop, and linked-
RDI state while its clocks are still running. Sample matching VFE680
write-master and IRQ state before disabling the writer.

Keep the source branch's narrow activation signature: X1E80100,
one-trio C-PHY RAW10, 3840x2640 or its 3844-pixel pre-crop form, and the
exact packed VFE output geometry. Other SoCs, D-PHY routes, formats, and
VFE Lite remain unchanged.

This extracts the active CAMSS diagnostics from the hardware-qualified
source commit and preserves its author. The old CCS sensor diagnostics are
not copied: the qualified final tree replaced that unbound path with the
standalone IMX681 driver.

Link: 4d190bc
Signed-off-by: Leon Silcott <leon@boasi.io>
Supersede the withdrawn sp11beta1 qualification carrier after restoring
the active camera behavior identified by the final-tree parity audit.

Signed-off-by: Leon Silcott <leon@boasi.io>
The qualified integration source applied its CSID680 keep-all state and
VFE680 MIPI RAW write mode to every user of those shared blocks. Preserve
the observed behavior for the X1E80100 C-PHY RAW10 IMX681 route while
restoring the existing programming for all other formats and SoCs.

Use the already exact transport and geometry signature for containment.
For that route, keep crop/drop disabled unless the 3844-to-3840 horizontal
crop is selected, explicitly program all drop engines to keep every
sample, and select the MIPI RAW VFE write-client mode. Other routes retain
their prior RDI flags, reset-value drop state, and VFE mode.

This is an intentional guardrail relative to the qualified source, not a
claim of cross-device equivalence. The SP11 path and a non-SP11 VFE680 RDI
path both require hardware qualification before integration.

Signed-off-by: Leon Silcott <leon@boasi.io>
The hardware-qualified Denali graph uses a 48 kHz, 16-bit, stereo
pull ring with two 1920-byte periods. Restore those ALSA constraints
and map only the page which contains the 3840-byte ring.

Keep the existing generic push/pull allocation for every other card
and topology. Fail closed if the protected Denali runtime reaches
prepare with geometry other than the qualified values.

Signed-off-by: Leon Silcott <leon@boasi.io>
The qualified SP11 playback path keeps its integrated pull graph
running across ALSA STOP and reprepare, and uses the topology
soft-pause module for pause and resume. Restore the exact zero-length
parameters for instance 0x466b, register both completion events,
and retain the measured 20 ms ramp, 25 ms downstream delay, and 5 ms
completion margin.

Limit the persistent lifecycle to Denali playback with both a protected
profile and a pull endpoint. Keep the existing command correlation,
uncertain-state quarantine, and final close handling around it.

Signed-off-by: Leon Silcott <leon@boasi.io>
The hardware-qualified Denali protected profile uses the full WSA PA
gain range and selects its operating point through UCM. Do not apply
the provisional 0 dB PA cap to that profile.

Keep the -3 dB digital-volume limit everywhere, and retain the upstream
PA cap for every X1E80100 machine without the Denali speaker-feedback
guard.

Signed-off-by: Leon Silcott <leon@boasi.io>
The qualified integrated SP11 graph sends its pull-ring parameter
through the graph client port. Use that route when protection is
active so command correlation and ordering remain graph-scoped.

Preserve the existing APM service route for generic unprotected
push/pull users.

Signed-off-by: Leon Silcott <leon@boasi.io>
Restore the qualified protected graph's own uncached position page and
use its DSP address for the fixed pull ring. Read the live counter
with DMA barriers and reject zero, torn, and out-of-range indices
before updating the ALSA pointer.

Identify this lifecycle only when the protected topology contains pull
instance 0x4660 and soft-pause instance 0x466b. Preserve the generic
ALSA-owned position buffer for every other push/pull graph, and retain
uncertain mappings under the existing fail-closed teardown policy.

Use the captured SP11 subgraph order for graph-client run-state
commands. Treat a lost soft-pause completion as uncertain so the
next teardown or prepare performs a confirmed graph stop instead of
claiming that playback resumed.

Signed-off-by: Leon Silcott <leon@boasi.io>
The hardware-qualified FullIO pull transaction proceeds from its
protected configuration directly to the ordered graph-client START. Do
not insert the generic APM GRAPH_PREPARE command for the exact SP11
topology.

Advance the existing fail-closed prepared state locally so start still
requires successful protection configuration or confirmed bypass. All
other protected and generic graphs retain the existing PREPARE command.

Signed-off-by: Leon Silcott <leon@boasi.io>
The qualified integrated transaction configures the pull endpoint
media format before walking the protected PCM converter and MFC
chain. Restore that order for the exact SP11 topology.

Keep the existing PCM-then-shared-memory order for every ordinary
and non-SP11 graph.

Signed-off-by: Leon Silcott <leon@boasi.io>
Match the qualified position-map token and send the soft-pause
parameter over the APM service port used by the captured SP11
transaction. The exact protected-topology predicate still prevents
either path from serving another graph.

Keep pull-ring setup and event registration on the graph client,
matching their qualified routes and preserving graph-scoped command
correlation.

Signed-off-by: Leon Silcott <leon@boasi.io>
Clear the retained-map uncertainty only when the DSP definitively
rejects the matching graph-owned position mapping. This lets the
synchronous failure path release coherent DMA without treating a
confirmed NACK like an unknown DSP outcome.

Reject a second position allocation on the same graph as a defensive
backstop against overwriting retained mapping state.

Signed-off-by: Leon Silcott <leon@boasi.io>
A persistent Denali pull graph may reach prepare while it is still
DSP soft-paused. Resume it and require the matching completion before
reporting the reused graph as running.

Keep the stream uncertain on a missing completion so a later prepare
cannot silently reuse a potentially paused graph.

Signed-off-by: Leon Silcott <leon@boasi.io>
The graph-owned position mapping uses the qualified fixed BIT(30)
token. Reserve that sequence value from generated mapping tokens
and classify graph-position responses by the complete non-graph-id
token class.

This prevents a generic fixed-region mapping from becoming
indistinguishable after the sequence counter reaches the reserved
value while preserving the qualified DSP transaction.

Signed-off-by: Leon Silcott <leon@boasi.io>
Do not let a later STOP overwrite the fail-closed state left by
a missing soft-pause completion. Confirm a hard graph stop first,
then clear persistent pull state so the next prepare performs the
complete setup.

Also clear the soft-pause marker after hw_free confirms the same
recovery, preventing stale pause state from surviving into a rebuilt
graph.

Signed-off-by: Leon Silcott <leon@boasi.io>
Revert the QSPI-specific register replay added in b6781f8.
The hardware-qualified integration path resumes resources and restores
the serial clock rate without rewriting live GENI and GSI interrupt
state.

On Surface Pro 11, the replay is followed by an unowned GPI event, an
incomplete paired RX descriptor, channel-stop timeout, and loss of the
MSHW0485 HID transport. Keep the existing per-pair live-mask programming
and Denali-gated 64-bit event-ring handling unchanged.

Fixes: b6781f8 ("spi: geni-qcom: restore Denali state after runtime resume")

Signed-off-by: Leon Silcott <leon@boasi.io>
The hardware-qualified SP11 v19 image clears Offset2 while enabling
the WSA VI and CPS master ports. The guarded 7.2.2 relift dropped that
behavior.

Apply the active value automatically only to WSA controller ports 10,
11 and 13 on Microsoft Denali. Keep the inactive transport
configuration unchanged and leave generic controllers untouched.

This restores the qualified behavior without exposing SP11 policy
through a module parameter or making SP11 naming part of the public
userspace contract.

Link: 537d1ac

Signed-off-by: Leon Silcott <leon@boasi.io>
The guarded 7.2.2 port kept the 2S 4-ohm final values but dropped the
hardware-qualified Denali WSA8845 cold, start and stop transactions.
The right amplifier consequently reports PA status 0x6 and remains
disabled during playback.

Restore the v19 register sequences verbatim and select them only when
the machine is Microsoft Denali, protected feedback is described, the
speaker load is 4 ohms and the codec reports a 2S supply. Generic
WSA884x devices retain the upstream lifecycle.

Also restore the bounded PA FSM reset and retry path. Retain the
relifted protection-clock accounting and keep a failed recovery as a
hard playback error.

Link: e72bffc

Signed-off-by: Leon Silcott <leon@boasi.io>
The WSA8845 devices remain powered and advertise simple clock-stop
support on Microsoft Denali. Treating each transient SoundWire detach
as context loss dirties the full register cache and replays the cold
transaction on attachment, unlike the hardware-qualified v19
lifecycle.

Keep the initialized codec state across the Denali protected 2S 4-ohm
detach and sync only writes queued while cache-only. Preserve the
existing context-loss path, including full dirty-cache restore, for
every other device and profile.

Link: e72bffc

Signed-off-by: Leon Silcott <leon@boasi.io>
DPCM releases the Denali VI and CPS backends before the front end
performs its final protected graph stop. The graph correctly rejects
those ready-to-not-ready transitions while start_count is nonzero, but
the machine driver then aborts SoundWire hw_free and shutdown. This
produces four -EBUSY warnings and can retain the stream runtime on every
close.

Treat only a busy readiness clear as deferred so SoundWire teardown
continues. Complete both deferred clears after a confirmed final
protected graph stop, under the existing protection lock. Keep ready
transitions into a running graph rejected, and do not clear state after
an uncertain or failed stop.

Signed-off-by: Leon Silcott <leon@boasi.io>
Use the established sp11vN Debian revision form for this qualification
build. This produces a distinct v6 kernel release while remaining
compatible with the current Lexr parser and installer.

Keep this aggregate branch unmerged until touch, pen and stereo
playback pass hardware qualification on Surface Pro 11.

Signed-off-by: Leon Silcott <leon@boasi.io>
@ooaklee
ooaklee force-pushed the sp11/qualification-7.2.2-v6 branch from fbfbd8a to 25b65b5 Compare September 3, 2026 03:37
@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

Superseding v6 build evidence after provenance rewrite

This supersedes the earlier artifact evidence built from fbfbd8a6516e04310e3710ef6def537367bd0b36.

The qualification branch was rewritten only to improve camera-source attribution and DCO hygiene. The old and new aggregate heads have the same Git tree (4b665438bcac81406b3f57b5e75a9d87b085b2c3), and git diff --exit-code reports no content change.

Reproducible source

  • Head: 25b65b5ece94ab051e537bd85884a3bb1efcea31
  • Tree: 4b665438bcac81406b3f57b5e75a9d87b085b2c3
  • Branch: sp11/qualification-7.2.2-v6
  • Debian version: 7.2.2-jg-0sp11v6
  • Runtime ABI: 7.2.2-jg-0sp11v6-qcom-x1e
  • Lexr: v0.2.0-rc.3
  • Recipe SHA-256: 9f9abb9eed28dfa334bfe029b016d8c99227999d84dab0a37adce43baa9dcf3a
  • Toolchain SHA-256: 46457e13a132ee3e064cfbaf488f76862b0e0b5266bcabcaab8c7904332f251d
  • Container: docker.io/library/ubuntu@sha256:61b65dc6bddff5e68c552f22126fe77496395f956ff2e983e05d8a52efd63e55

Lexr's clean kernel build --reset-source completed with exit status 0 and produced exactly four installable packages. lexr kernel inspect --json accepted the bundle as arm64, version 7.2.2-jg-0sp11v6, ABI 7.2.2-jg-0sp11v6-qcom-x1e; all package entries were verified. shasum -a 256 -c SHA256SUMS also passed for all four files.

Package SHA-256

  • bfda74f1f4db1240427ac2b80e8b9cf6fb4df42a1a0df953aaeb9143756fa29d — flavour headers
  • 601074c4a712003e45a854c66e4ac771169f2a41fc00c4020d73bfecd2b121fb — kernel image
  • f37d9c71bdbcb914cfd1aac9992eb56a4c00c7a9d01b2d8c4eae0934c2eaf69c — kernel modules
  • 9f30d5a40a9332616d865e61a79c5d207e7c8930245151996ccee80f3b5a5dae — common headers

Package inspection additionally confirms:

  • both Denali DTBs are present in /usr/lib/firmware/7.2.2-jg-0sp11v6-qcom-x1e/device-tree/qcom/;
  • mshw0485_touch.ko.zst, imx681.ko.zst, qcom-camss.ko.zst, soundwire-qcom.ko.zst, and snd-soc-x1e80100.ko.zst are present;
  • CONFIG_TOUCHSCREEN_MSHW0485=m, CONFIG_VIDEO_IMX681=m, CONFIG_VIDEO_QCOM_CAMSS=m, CONFIG_SOUNDWIRE_QCOM=m, and CONFIG_SND_SOC_X1E80100=m are enabled.

The aggregate validation check is green. This remains DO NOT MERGE until physical SP11 qualification confirms boot, DTB selection, touchscreen/pen persistence, stereo playback, microphones, battery/profile behaviour, USB-C/DP/USB4, and camera containment/capture behaviour, with v19 retained as fallback.

@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

v6 installed; pre-boot gate passed after ABI-specific DTB correction

Lexr v0.2.0-rc.3 installed all four packages for 7.2.2-jg-0sp11v6-qcom-x1e, generated the exact-ABI initramfs, verified both packaged device trees and both header trees, and retained running fallback 7.2.0-jg-0sp11v19-qcom-x1e. dpkg --audit is empty.

The installation exposed the known legacy DTB-selector issue: the host postinst hook selected the v20 DTB for a shared /boot/sp11-denali.dtb, while Lexr's current post-install verification still passed because it verifies the ABI-scoped firmware copies rather than the GRUB-referenced /boot payload. This is now documented with live evidence in Lexr issues #22 and #23.

Before reboot, both target and fallback were corrected to immutable ABI-specific paths and GRUB was regenerated:

  • /boot/dtb-7.2.2-jg-0sp11v6-qcom-x1e matches the packaged v6 DTB: 953867f134356825b6e25fdfeb20fe5b6a1524921c8a7aac09495e82b44d10e6
  • /boot/dtb-7.2.0-jg-0sp11v19-qcom-x1e matches the packaged v19 DTB: 325cc2476a82c91e0c1011afac7639ffe2bdad7568ef92d316a0dbaaac2e3bd2
  • both normal and recovery entries for each ABI reference their matching /dtb-<full-ABI> path;
  • no devicetree /sp11-denali.dtb reference remains;
  • grub-script-check passes;
  • v19 remains the persistent default.

Known-good v19 baseline immediately before the one-time v6 boot:

  • soundwire_qcom: sp11_feedback_active_offset2_zero=Y, sp11_cps_pcm_route_105c=N
  • loaded: snd_soc_x1e80100, soundwire_qcom, qcom_camss, imx681, mshw0485_touch
  • input nodes: Microsoft Surface G6 Touch, Microsoft Surface G6 Pen, IPTSD Virtual Stylus
  • sp11-iptsd@dev-hidraw4.service: active/running
  • ALSA card: X1E80100-Microsoft-Surface-Pro-
  • PipeWire sink: Built-in Audio Speaker playback

Physical v6 qualification is next. This PR remains DO NOT MERGE.

@ooaklee ooaklee changed the title [DO NOT MERGE] qualify SP11 v6 touch and stereo parity repairs [FAILED - DO NOT MERGE] SP11 v6 qualification aggregate Sep 3, 2026
@ooaklee

ooaklee commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

Closing this failed qualification aggregate to prevent accidental integration. The branch, build evidence, failure symptoms, and follow-up references remain preserved in this PR for diagnosis and provenance. No commits from this aggregate are approved for beta by this closure.

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

3 participants