Skip to content

Merge integration/aurora into aurora-wip (11-07) - #1063

Merged
RyanTheTide merged 71 commits into
aurora-wipfrom
mtr/wip-sync-20261107
Nov 7, 2026
Merged

RyanTheTide merged 71 commits into
aurora-wipfrom
mtr/wip-sync-20261107

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Brings integration/aurora (at 68db611, including #922 and #1061) plus the sync branch of #1062 into aurora-wip, so aurora-wip again contains everything on the release branch.

One conflict, in sound/soc/apple/macaudio.c: aurora-wip added spk_dai_fmt and spk_secondary_only to struct macaudio_snd_data (J813/J873), and integration added tweeter_hpf_granted (speaker protection ownership) at the same place. The resolution keeps all three fields; nothing else differs from either side.

Gates (buildbox, on this exact tree 8e199297, built from the same merge):

  • fleet-config Image + modules + dtbs build
  • tools/asahi/run-host-tests.py
  • apple-dcp host selftests (rtkit is touched on the aurora-wip side)

Results are added below before merging.

🤖 Generated with Claude Code

RyanTheTide and others added 30 commits November 1, 2026 03:41
…ostics

Append requested_frequency_hz from the parsed legacy firmware OPP table,
using the same pstate printed by sysfs and preserving existing output.
Keep firmware table order and reject invalid indices.

Expose per-role/tag transport admission alongside complete statistics
records and decoded values, without changing admission or power policy.
Exercise production lookups, receiver/report storage and the C formatter,
and register the new lookup case in the host runner.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Remember each statistics producer cursor at a power boundary and reject
only the prefix already published there. Discarding the entire next drain
also loses fresh records queued after the observation, including when the
ring was empty. Keep late wake observations conservative, reject live
telemetry while powered off, and preserve suspend/restart/quarantine rules.

Stop firmware_reports reads from invalidating telemetry and arming discards.
Use an immutable firmware borrow, and append the observed power state and
per-role cutoff to the admission diagnostic.

Exercise complete histogram/transition payloads without treating their
unqualified words as pstate, both role cutoffs at wrap, late wake and bad
producers, and repeated production debugfs reads. Add controls for bypassed
cutoffs and the old whole-batch discard. The qualified logical pstate ABI
remains tag 0x10 word 6; no other tag or enable is established by the SPEC.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The V25G83 (G16S) and V26A428 (G17P) firmwares accept statistics tag 0x10
but never emit it, and no other record carries the current GPU pstate:
tag 0x1b is a boost-controller distribution, not a live pstate. Raw Neo
captures confirm it: no tag 0x10 in 120 report snapshots across idle,
wake and load, with nothing discarded or quarantined.

pstate_status therefore read "unavailable" forever on these machines,
which suggests a transient state. Report it as "unsupported" when no
pstate has ever been decoded. A firmware that does send tag 0x10 still
reports valid or stale, and the requested and achieved frequency keys
remain unsupported.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Replace the speaker volume lock with ownership by a protection engine
that runs in the speaker signal path, as macOS does: the amps sit at a
fixed, known gain while it owns them, and it does all attenuation
itself. The amps' volume is not changed during playback.

The owner is the control file that holds the element lock on the new
"Speaker Protection" control. Writing a lease length of 10 to 100 ms
grants protection for that long: every speaker volume goes to the
amp's 0 dB operating point (full scale on the J700's software gain) and
speaker playback may start. The owner renews it by writing again.
Writing 0, unlocking the control or closing the file withdraws it at
once. A lease that runs out withdraws it from a high-priority work, and
the owner's next write fails with -ETIMEDOUT and grants nothing, so an
owner that stalled learns of it before it plays again. Reads return 1
while protection is granted; every change is notified.

Without protection the speakers are at the hardware floor: the speaker
back-ends refuse to start, a running speaker stream is stopped, and
every amp is at its safe level (muted on the TAS5770 and SN012776, 20 dB
down on the J700's software gain). The floor is set before the card is
registered and again before a system sleep. A floor that cannot be set
on every amp refuses speaker playback until the driver is reloaded.

The speaker volume controls become the driver's: userspace can read
them but no longer write them. The "Speaker Volume Unlock" control,
its magic ping and 250 ms lease, the volume ceiling, the volumes kept
over a system sleep, the software-gain epoch, the "Speaker Sample Rate"
control and the please_blow_up_my_speakers parameter all go: nothing
uses them with the new ownership.

The KUnit cases go through the control callbacks and the PM notifier
on a card of fake controls: the floor from the binding on, a grant only
for the owner with a valid lease, release, owner loss, lease expiry and
its -ETIMEDOUT, renewal, a system sleep, failed floors and grants, and
the J700's levels.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The fault interrupt only logs what the amp latched. Give each amp a
read-only "Amp Fault Status" control, so that a speaker protection
engine learns of its faults without parsing the kernel log:

  [0] the INT_LTCH0 bits the interrupt reported since probe: over
      temperature, over current, bad TDM clock, limiter active, PVDD
      below the limiter inflection point, limiter at maximum
      attenuation, BOP infinite hold, BOP mute;
  [1] how many such interrupts there were, saturating;
  [2] 1 once the amp's SDZ group was forced off.

The interrupt notifies the control on every report. The expected clock
fault after a stream's end is not reported, as it is not logged.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The sense ring hands frames to the sense front-end once per ring
period, 480 frames (10 ms). A front-end period of 512 frames then
completes up to 10 ms after its last frame arrived. Use 120-frame
periods, 32 of them: the same 80 ms ring, delivered within 2.5 ms.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The capture buffers came from coherent DMA memory, which the CPU maps
uncached on these machines. Copying one 512-frame period of the J316's
speaker sense (12 channels, 12 KiB) out of it cost 22 us through read()
and 15 us through mmap.

Allocate them as SNDRV_DMA_TYPE_NONCOHERENT: cacheable, with ALSA's
explicit sync. The CPU's view of what the DMA wrote is invalidated in
the pointer callback, before the position that covers it is returned
and so before ALSA publishes it as hw_ptr: no reader can see a frame
before its cache lines were invalidated after the DMA wrote it. A line
still being written at the reported position is invalidated again with
the next range, which starts on it. A start hands the whole buffer back
to the device first. The CPU never writes a capture buffer, so no dirty
line can be written back over the DMA's data. The buffer is allocated
at hw_params to its own size: ALSA syncs the whole allocation on every
read, and a 3 MiB preallocation made that cost milliseconds. Playback
buffers are unchanged.

On a J316, with a zero-sample speaker stream, the copy now costs 4.5 us
per period through read() and 1.8 us through mmap. 20 s of capture
through each path holds no 64-byte line that repeats the previous lap
of the buffer.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Review of the "Speaker Protection" lease found that its end could be
starved by the stall it guards against, and that the control could be
owned by anyone with the seat's control device. Fix both, and the
smaller gaps the review found next to them.

The lease ran out from a delayed work on system_highpri_wq: a per-CPU
kworker at nice -20, not a real-time thread. A SCHED_FIFO thread spinning
on that CPU (a stuck audio thread, or the supervisor, which runs at RT
priority) held it off for up to about 950 ms of every second, and the
speaker stream played on at the operating gain all that time. The start
gate only looked at the grant, never at the lease's end.

- The lease's end is now an hrtimer in HRTIMER_MODE_REL_HARD. Its
  callback runs in hard IRQ context and closes the start gate itself; a
  renewal that raced it re-arms it from the new end.
- The stream stop and the safe level run on two kthread workers at
  SCHED_FIFO 90, above PipeWire's data threads (88) and the supervisor.
  They are not bound to a CPU, so a spinner on one CPU cannot keep them
  from waking on another. The stop worker never takes spk_mutex or the
  card's controls_rwsem; the floor worker does.
- Every start checks the lease's end as well as the grant
  (macaudio_spk_admitted()), so a start after the end is refused even
  before the timer has run. Reads report the same. A renewal that comes
  after the end is a stall: the speakers are floored and the write
  returns -ETIMEDOUT.
- A grant waits for the stop that a withdrawal queued
  (kthread_flush_work()) before the amps go back to the operating gain.
  Otherwise a quick release and regrant could raise them under a stream
  that the withdrawal was meant to stop, which then never stopped. The
  stop has a worker of its own, so the flush cannot wait behind a floor
  that needs the caller's mutex.
- Only a CAP_SYS_ADMIN process can take ELEM_LOCK on the control, and
  every write needs CAP_SYS_ADMIN too, so an owner's file handed to
  another process grants nothing. Before this, a seat user could take the
  lock before the supervisor started, or in its restart gap, and grant
  100 ms leases forever.
- DPCM triggers a back-end only for the first front-end that starts on
  it. A front-end trigger now applies the same gate, so a second
  front-end cannot join a speaker back-end that was left running across
  a withdrawal. It runs before the front-end's DMA, so a refused start
  starts nothing.
- After a system sleep, the owner's first write returns -ETIMEDOUT. The
  owner was frozen with the rest of userspace and must re-check its
  engine before it plays, as after any stall.
- "Amp Gain Volume" is held at the machine's configured gain and made
  read-only, like the speaker volumes. Before, it was capped there but
  still writable downwards, which moved the operating point the engine's
  tuning assumes.

KUnit apple-speaker-protection gains seven cases:
- the gate follows the lease's end without the timer;
- the timer closes the gate while the floor worker is held off;
- SCHED_FIFO 99 spinners on every CPU, with the gate still closing at
  the lease's end (0.35-0.66 ms late on 4-CPU qemu, 3.5 ms on 1 CPU);
- the workers are SCHED_FIFO 90;
- the CAP_SYS_ADMIN checks on lock and write;
- a regrant that waits for a held stop worker;
- the fixed amp gain.

The sleep case now expects the -ETIMEDOUT. 20 of 20 cases pass on arm64
qemu, with PROVE_LOCKING and DEBUG_ATOMIC_SLEEP and no lockdep report,
on 1 and 4 CPUs. The macaudio-fixed-controls selftest takes the shared
write-denial helper from the source, as it did the loop before.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
… lapped

mca_capture_sync() invalidated only the range between the last synced
position and the new one. When the DMA had gone exactly one buffer round
between two pointer calls, the positions matched and nothing was
invalidated. When it had gone further, only the remainder was. ALSA can
still publish the whole advance: on a late interrupt it adds whole buffers
from the jiffies, and a stop threshold at the boundary turns off the
XRUN. A reader would then get the previous lap's cache lines as new
speaker sense data.

The position cannot tell a lap from no advance, but time can. Keep when
each sync happened. If the time since the last one could hold a lap (a
buffer's time less a period, which covers the reported position's lag),
invalidate the whole buffer. Otherwise invalidate the range as before.

The capture stays without SNDRV_PCM_INFO_EXPLICIT_SYNC, and a comment
now says why. hw_ptr only ever moves through mca_pointer(), so with laps
handled, an mmap reader of the status page never sees a frame before it
was invalidated. Setting the flag was measured on a J316: 12-channel
sense, 512-frame periods, zero-sample playback, the audio server
stopped, 10 s of arecord per run. The CPU time per period, as the mean
of three runs:

  per period   no flag   flag
  read()       30.8 us   32.8 us
  mmap         34.8 us   40.5 us

The flag costs about 16% on mmap, with no gain in correctness. The lap
check itself is within noise of 79af0ba. Nothing in 480 000 frames
through either path repeats the previous lap.

KUnit apple-mca-capture-sync (3 cases) covers the lap test and the
ranges, including an exact lap and two and a bit laps.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The sense ring's callback took the new bytes as the advance modulo the
80 ms ring. A tasklet more than a lap late lost a whole lap without a
sign, and an exact lap looked like no advance. Either way the sense was
then shifted against the playback with no XRUN, and closed-loop V/I
alignment depends on it.

Keep the time of the last callback. When the time since then could hold
a lap (the ring's time less one 2.5 ms period), stop the attached sense
front-end with an XRUN instead of delivering what the position shows.
The reader re-prepares and starts again aligned.

KUnit apple_aop_sense_ring (3 cases) covers the lap test.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Under pm_test=freezer on a J616s, protection was withdrawn 5.1 s after
"PM: suspend entry". The PM_SUSPEND_PREPARE notifier took spk_mutex
before it touched anything. Meanwhile the supervisor's own release write
sat in the kernel and logged nothing, and systemd's watchdog killed it.
The floor came 1 ms after that kill. Only then was the withdrawal logged,
and its reason was "system sleep". If the lease timer closed the gate
during the wait, the log could not show it.

At PM_SUSPEND_PREPARE and PM_HIBERNATION_PREPARE:
- The notifier marks the card quiesced, closes the start gate and queues
  the stream stop before it waits for anything. It is the same lockless
  close that the lease timer uses. The safe level then follows under
  spk_mutex. A wait for the lock longer than 50 ms is logged, with its
  length.
- The notifier is registered at INT_MAX, so no other driver's sleep
  preparation runs before the floor.
- The notifier still runs before tasks freeze and not from a device
  suspend callback, so a sleep that stops short of the devices
  (pm_test=freezer) withdraws protection too.
- A grant that is raising the amps when the sleep begins floors them
  again and returns -EBUSY.
- The lease timer is only ever cancelled together with a floor, so a
  lease still ends at its deadline while the floor waits.

A card without speakers, the J616s jack card, now ignores sleep. Before,
its notifier "floored" no amps and latched spk_floor_failed, with a
dev_crit at every suspend.

A withdrawal whose gate was already closed now names what closed it and
how long before: the lease's end or system sleep. The timer's action is
visible in the log even when the floor that follows waits.

After a resume, an owner's first write is still -ETIMEDOUT, then the
next one grants.

KUnit apple-speaker-protection gains four cases:
- the gate closes while a writer holds spk_mutex across the sleep's
  start, then the floor, -EBUSY, -ETIMEDOUT after the resume, and a
  re-grant;
- the hibernation path;
- the notifier's priority;
- a card without speakers.

24 of 24 cases pass on arm64 qemu, on 1 and 4 CPUs, with PROVE_LOCKING
and no lockdep report.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
While protection is withdrawn, an audio server's speaker sink retries its
start from the data loop. Each refused start went through ASoC's DPCM
trigger, which logs every failure as an error:

  Secondary: ASoC error (-1): at soc_link_trigger() on Secondary
  Secondary: ASoC error (-1): trigger FE cmd: 1 failed

On an M1 Pro that came to about 41 refusals for a 400 ms stall of the
protection supervisor, about 190 for a 2 s stall, and dozens at every
cold start before the first grant. The J616s showed the same. A refused
start is the floor working, not a DAI failure.

The card's late probe now puts a gate in front of each front-end PCM's
own trigger (rtd->ops.trigger, which ALSA calls). Its PCMs exist by then
and are not yet registered. The gate refuses a speaker start with the
same -EPERM and the same admission check (macaudio_spk_admitted()), and
it does so before the DPCM trigger runs, so nothing is logged and nothing
has been touched. Stops, capture, and front-ends that do not drive the
speakers pass straight through. The link-trigger and back-end checks stay
behind the gate.

Each refusal is counted. debugfs asoc/<card>/speaker_starts_refused holds
the exact total, and the next grant logs the run in its one line:
"Speaker protection granted (N speaker starts refused before)". The
-EPERM that userspace sees is unchanged, and the supervisor and the
engine see no difference.

KUnit apple-speaker-protection gains a case on a front-end PCM wired to a
speaker back-end. It checks the gate install (idempotent), the refusals
and their count, the pass-through, the grant and its reset, a lease past
its end, and a front-end not connected to the speakers. 25 of 25 cases
pass on arm64 qemu on 1 and 4 CPUs, with PROVE_LOCKING, DEBUG_FS and no
lockdep report.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
A machine driver can admit a stream only while it is allowed to play.
The case here is speakers that may start only while a protection engine
holds them. Such a driver refuses the start from its link trigger with
-EPERM. That is the driver working as intended, but ASoC logs it as an
error at two levels:

  Secondary: ASoC error (-1): at soc_link_trigger() on Secondary
  Secondary: ASoC error (-1): trigger FE cmd: 1 failed

An audio server retries a refused start from its data loop, so the
error lines reach dozens to hundreds per refusal period.

Add a dai_link flag, quiet_trigger_eperm. On a link that sets it, -EPERM
from a trigger still fails the trigger exactly as before, but
soc_link_trigger(), dpcm_be_dai_trigger() and the DPCM front-end trigger
do not log it. Every other error, and every link without the flag, is
logged as before. snd_soc_link_trigger_refused() is the test, with a
KUnit case in soc-utils.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Drop the stand-in for the front-end PCM's trigger that 3d61274
added: it reached into rtd->ops from the machine driver. Use the
ASoC core's quiet_trigger_eperm instead: every link of a card with
speakers sets it. The gate's -EPERM from the front-end and back-end link
triggers then fails the start without a log line, and errors other than
-EPERM are logged as before.

Behaviour is otherwise unchanged:
- userspace sees the same -EPERM;
- each refusal is counted in debugfs asoc/<card>/speaker_starts_refused;
- the next grant logs the run in its one line ("Speaker protection
  granted (N speaker starts refused before)").

KUnit:
- the refusal case now drives macaudio_fe_trigger() and
  macaudio_be_trigger() directly, covering the counter, the pass-through,
  the reset at grant, a lease past its end and an unconnected front-end;
- a new case checks that every link of a speaker card is marked quiet;
- apple-* has 26 of 26 cases, and soc-utils 3 of 3, on arm64 qemu on 1
  and 4 CPUs, with PROVE_LOCKING and no lockdep report.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
macaudio fixes the playback high-pass filter of every SN012776 tweeter
amp at 800 Hz, a safety net from before any speaker protection ran in
userspace. On machines where the protection runs in the PipeWire graph
and measures each voice coil with a low-frequency pilot tone, that
filter sits after the protection stage and removes the pilot from the
tweeter outputs. The tweeters' V/I sense then never carries the pilot,
so their closed-loop temperature never leaves its calibration value
and only the open-loop model protects them. The woofers, filtered at
2 Hz, track as expected. The amp's sense-path DC blockers are separate
and unchanged.

On those machines the graph's crossover, which keeps program bass off
the tweeters, comes before the protection stage, so the amp filter adds
nothing to the tweeters' protection there but takes away their sense.

Add a tweeter_hpf field to the platform match data, "800 Hz" when
unset, and set it to the woofers' 2 Hz on the J413 and the J616s/J616c,
both of which run the in-graph protection with a tweeter pilot. Every
other machine keeps 800 Hz. The control stays fixed and read-only, and
the speaker gate is unchanged: no amp plays unless the protection owner
grants it.

KUnit apple-speaker-hpf: woofers stay at 2 Hz, the default tweeter
corner stays 800 Hz on every machine that does not set it, the two
pilot machines get the woofer corner below the pilot, and no machine
selects "Disabled".

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
…granted

The previous change fixed the tweeter playback high-pass at the woofers'
2 Hz on the J413 and J616 for good. That opens the tweeters even when no
protection engine owns the speakers, which is exactly when the 800 Hz
filter is the only thing keeping program bass off them.

Tie it to the grant instead. The tweeter corners become the driver's,
like the speaker volumes: read-only to userspace, 800 Hz from the card's
binding on, and set to the machine's granted corner
(tweeter_hpf_granted) in macaudio_spk_grant(), before the amps go up to
the operating gain. Every withdrawal (an explicit release, the owner's
file closing, a new owner, the lease running out, system sleep) goes
through macaudio_spk_floor(), which brings the amps to the safe level
first and then restores 800 Hz. A corner that cannot be restored is a
failed floor: speaker playback is refused until the driver reloads. A
corner that cannot be opened fails the grant and floors.

The machines that open the tweeters while granted are the J316, J413
and J616s/J616c, the boards whose protection engine runs the crossover
ahead of its protection stage and a low-frequency pilot on every voice
coil. Every other machine keeps 800 Hz throughout.

KUnit apple-speaker-hpf, now 7 cases: a grant opens the tweeters, an
explicit release, the owner going and a lease timeout restore 800 Hz,
a refused renewal opens nothing, a failed restore is a failed floor, a
failed open floors, other machines stay at 800 Hz, woofers stay at 2 Hz,
and no machine ever selects "Disabled".

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
ASoC: apple: macaudio: Open the tweeter HPF only while protection is granted
…nt snapshot

At the end of a period the controller runs the residue down to 0, posts
the period's report, and only then loads the next descriptor. A residue
read in between (report counted, residue still 0) put the position a whole
period ahead. The PCM core then saw the hardware pointer past the
application pointer and stopped the stream for an underrun.

On the J316s (M1 Pro) speakers this hit two to three times in each
five-minute full-volume run. PipeWire's timer wakes a few microseconds
before the period interrupt, and the protection supervisor reads the PCM
status every millisecond, so the reads land at period ends. ftrace showed
the playback position jump from 11242 to 11776 frames (a period end plus
512) in 0.36 ms, with the PCM stopped in XRUN by the same read. Both data
loop wakes and the DMA interrupt were on time, and no thread was
preempted.

The old check caught only a descriptor load between the two residue reads.
It also counted a report posted before the first ring read twice.

So read again until the snapshot is consistent: the report ring the same
on both reads, and the residue non-zero, not reloaded and within a period.
A controller that stays at a period's end (stalled, with no descriptor
to load) is reported at the periods done or the last position, whichever
is later. That position is never ahead of the transfer and never behind
an earlier report, since a pointer that goes back reads as a wrap of the
whole buffer. KUnit covers the cases from the trace.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
dmaengine: apple-admac: Read the cyclic position only from a consistent snapshot
Bring the speakerguardd v2 kernel interface up to the release branch
(b500668) so linux#922 merges as tested.

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
macaudio_set_speaker() now picks the SN012776 HPF corner through
macaudio_speaker_hpf() (the tweeter high-pass opens only while the
speaker protection lease is granted), so the no-device harness stopped
compiling: the helper, its corner names and the platform field it reads
were missing. Extract the helper and its HPF corner defines from the
source under test, accept const char * returns in the extractor, and add
tweeter_hpf_granted to the shimmed platform data. The expected items are
unchanged: woofers at 2 Hz, tweeters at their safe 800 Hz corner outside
a grant.

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
…rnel-interface

Resolves macaudio: each SN012776's Amp Gain Volume is fixed at its own
ADT level (macaudio_fix_sn012776_levels), tweeters keep
macaudio_speaker_hpf(), woofers keep the amp's ADT corner, the board
tables carry no SN012776 gain and keep tweeter_hpf_granted. The amp
gain test fixes an ADT-style level instead of the j316 table's.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Merge integration/aurora (#981 amp values from the ADT) into sgv2-kernel-interface
On J316, J413 and J616 a protection grant opens every tweeter amp's
playback high-pass from the 800 Hz safe corner to the amp's DT corner.
That is right only when the engine ahead of the amps already splits the
band the way the machine does: the tweeters then see no low-frequency
content but the engine's own thermal pilot. An engine without that
crossover would drive the full band into the tweeters with nothing in
the way.

Make the grant fail closed. Add "Speaker Protection Crossover", a
boolean card control on which the owner of "Speaker Protection"
declares that its engine passes every speaker channel through the
machine's own crossover and high-pass ahead of the amps. A grant opens
the tweeter high-pass only while that declaration is 1; otherwise the
tweeters stay at the safe corner for the whole grant and the woofers
are unchanged.

The control is the owner's alone. Locking it needs CAP_SYS_ADMIN and
ownership of "Speaker Protection"; a write needs CAP_SYS_ADMIN and that
lock held by the owning file (-EPERM otherwise). A grant latches the
declaration: a write while granted fails with -EBUSY. The declaration
goes back to 0 when the owner unlocks "Speaker Protection" or closes
its file, and when a new owner takes it. A lease that runs out keeps
it, as the owner is the same; the floor still restores the safe corner.

The control is appended after the existing card controls, so no
control is renumbered. Machines that never open the tweeter high-pass
ignore it.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
ASoC: restore DT tweeter HPF on grant and protect amp sense switches
RyanTheTide and others added 24 commits November 7, 2026 01:35
On resume the VL122 management interface needs about 7 ms after reset
is asserted before it answers, against under 2 ms at probe. Wait 20 ms
so neither path starts its poll with a NACK, which the I2C controller
logs as an error.

Tested on J700: probe plus three pm_test=devices resume cycles, tuning
list applied and verified each time, no I2C NACK in the log.

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
Neo: tune the eUSB2 repeater and the VL122 hub like macOS
…d-20261107

drm/asahi: agx_stats: G13/G14 requested frequency, firmware-unsupported pstate and delivery-aware utilisation age on G16S/G17P
media: apple: jpeg: enable the M4 Pro JPEG engines on the J616s
No acknowledge contract is established for the error-handler and
event-log status registers, so a source cannot be cleared from Linux.
Panicking on the first delivery would turn any benign or stuck line
into a dead machine.

Count each delivery as an uncorrectable error in the EDAC core, log it
rate-limited, and mask the line. Unmask it again after a backoff that
doubles from 1 s to 60 s; a line still asserted after eight backoffs
stays masked. A quiet minute restarts the backoff.

Move the T8140 nodes to the root: they have no reg, so they do not
belong on the simple bus. Build the driver as a module in defconfig
and enable it in asahi.config.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
A J616s trial boot showed all sixteen AMCC error-handler lines asserted
from boot: each re-asserts as soon as it is unmasked, under idle and
load alike, while no other source fired. Without an acknowledge
contract they cannot be told apart from real errors, so leave them
unclaimed like the DCS lines.

Name each EDAC control after its device: the event-log handler failed
to probe with -EEXIST because both handlers registered "apple_soc".

Measure a line as cleared from its last unmask rather than its last
delivery. With a 60 s backoff ceiling, the old rule reset the retry
count on every unmask and never left a stuck line masked.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
M1 Macs cold-boot the SEP, and creating Linux's identity keybag there
rewrites a session record that predates Linux (seen on J316s). With the
guard at the platform default of 1, Touch ID setup and matching on every
M1 Mac needed an explicit apple_sep xart_guard=0.

Default the T8103 and T6000/T6001 profiles to 0, as on the MacBook Neo.
M2 and M3 keep level 1, and xart_guard=1 still turns the guard on.

Signed-off-by: Diljit Singh <[email protected]>
An asserted error-handler line is not an error by itself. The J616s
hands Linux several lines that are asserted from boot, so log-only
reporting either counted them as errors or masked them with warnings.

Map the four AMCC and 25 NI status apertures. On delivery, read each
source status, acknowledge it by writing the observed bits back, and
count an uncorrectable error only when a bit in the platform error
policy is set. A delivery with no pending status goes through the
existing mask and backoff without being counted.

Reclaim the sixteen AMCC lines, now that they are acknowledged. Leave
the NSC and NSI lines unclaimed: no returning acknowledge path is
established for them.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
soc: apple: sep: turn the xART guard off by default on M1
On the J616s the first read of an AMCC status aperture from the AP
resets the machine, so the module could not be loaded with them
mapped. The 25 NI status windows read safely and are kept.

Leave the AMCC lines unclaimed again. A line still asserted with no
pending status is not an error: report that it is left masked at info
level.

Keep the T8140 handler nodes disabled until they are qualified on the
J700.

Tested on the J616s with a one-shot trial Stage 2 carrying only these
nodes: 38 error and 21 event-log sources monitored, no interrupt over
10 minutes idle and 3 minutes of stress-ng, 0 UE, 0 err-level kernel
lines, 0 AVC.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
EDAC: Add Apple SoC platform error reporting
Commit a03e01f ("Bluetooth: add J813 N1 native transport and
encrypted connection bring-up") rewrote drivers/bluetooth/Makefile from
an older copy of the file. Besides its own additions it dropped:

- the mt7932_bt_pcie rule added by 1d4782c ("Bluetooth: add opt-in
  J700 MT7932 PCIe transport experiment"), so CONFIG_BT_MTK7932_PCIE=m
  builds nothing and the J700 Bluetooth function has no driver;
- CONTEXT_ANALYSIS := y from e01e99a ("Bluetooth: enable context
  analysis").

Restore both. The PCMCIA rules it re-added (dtl1_cs, bt3c_cs,
bluecard_cs) have no Kconfig symbols since 794b5e7 and are inert;
they are left for a separate cleanup.

Tested on J700 (MacBook Neo) on 9127278, whose Makefile is the same:
mt7932_bt_pcie.ko is built and loads, and the controller registers as
hci0.

Signed-off-by: Bartosz Nitka <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bring linux#922 up to date with integration/aurora (33bec40) before the
speakerguardd v2 Plan B cutover merge. No conflicts.

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bluetooth: restore the MT7932 PCIe build rule and context analysis
Bring linux#922 up to date with integration/aurora (f9ce365, linux#1055
Bluetooth MT7932 build rule) before the speakerguardd v2 Plan B cutover
merge. No conflicts.

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A scratch-backed H16 program uses the 0x8c0 descriptor form. Besides
the prefetch relocation tuple that the linear 0x8a0 form also has, it
carries a second tuple for the intermediate-spill stream in the kind-3
payload at +0x890. ane_h16_custom_bars() returned no record for that
form, so an EXECUTE of such a program carried no custom BAR at all.

The first request of a program takes the queued EXELOOP path, which
sets up a fresh BAR context; later requests go direct and reuse it.
Without the BAR records, the direct second request of a scratch-backed
program reads through an unrelocated selector: on a T6041 (M4 Pro) the
engine raised DART read faults at 0x21_xxxx_xxxx and the firmware
quarantined the program.

Decode both tuples and send two records, both on BAR 4 with the
program's DSID. Their bit ranges overlap but they use different mcache
value types, so the request validator now treats two records as
conflicting only when they also share the value type.

Drop the info message on the first request of each program. Each load
already logs, and the line added nothing.

Tested on a T6041 (J616s) on a 7.3 kernel with this change: a two-task
scratch-backed program with one DRAM spill and a two-task L2-resident
program both run bit-exact on two executions each, the second one on
the direct path, with no DART faults. A MobileNet v2 program ran 16/16
correct in five runs with p50 latency at parity with the unpatched
driver, the suspend/resume gate passed, and there were no new SELinux
denials.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
…rora

Brings the two hardware-tested Aurora fixes that landed on aurora-wip:
- iio: aop_motion: own trigger per sensor + threaded poll half (J616s)
- rtc: macsmc: round the whole-second offset to the nearest second (Neo)

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
accel/ane: send both custom BARs of a scratch-backed H16 program
ASoC: apple: speaker protection ownership for in-graph protection
Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
Resolves sound/soc/apple/macaudio.c: aurora-wip added spk_dai_fmt and
spk_secondary_only (J813/J873) where integration added tweeter_hpf_granted
(speaker protection ownership); the struct keeps all three.

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
Sync aurora-wip's aop_motion trigger and macsmc RTC fixes into integration/aurora
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merge train (MTR 11-07) gates on tree 8e199297 (this head; buildbox merge db59c3b4 has the same tree):

  • fleet-config (fleet18 release.config) Image + modules + dtbs: rc=0, 5890 modules (same as fleet18); build warnings identical to fleet18 (5 modpost MODULE_DESCRIPTION lines, 0 new).
  • tools/asahi/run-host-tests.py: 193/193 (fleet18 base 193/193).
  • apple-dcp host selftests: 86/86 (base 86/86).
    The only conflict was the struct macaudio_snd_data field list, resolved by keeping both sides. Hardware is not a gate for aurora-wip; the integration side of this tree is fleet18, which is booted on the M2 and M1 Pro. Merging with a merge commit.

@RyanTheTide
RyanTheTide merged commit aedc62d into aurora-wip Nov 7, 2026
2 of 3 checks passed
@RyanTheTide
RyanTheTide deleted the mtr/wip-sync-20261107 branch November 7, 2026 02:52
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