Skip to content

ASoC: apple: bring speaker protection admission to integration/aurora - #551

Merged
RyanTheTide merged 2 commits into
integration/aurorafrom
fix/promote-macaudio-speaker-protection
Oct 28, 2026
Merged

RyanTheTide merged 2 commits into
integration/aurorafrom
fix/promote-macaudio-speaker-protection

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

This brings the speaker protection admission change into integration/aurora. It went into aurora-wip as #510 but never reached the tested head, so a machine built from integration/aurora alone would lose it.

The two commits are cherry-picks of f0f840c and 0f830f8 with no changes.

What they do

  • macaudio refuses to add a Speaker link unless the backend has a supported amplifier, a known speaker layout and a negative safe volume. The legacy unsafe parameter no longer overrides that.
  • The fixed speaker controls (ASI1 selection, HPF corner, OCE handling, DAC gain) are set during fixup and made read-only, so a direct ALSA element write gets EPERM.

Testing

🤖 Generated with Claude Code

Do not let the legacy unsafe parameter admit an unsupported backend, skip
safe-volume setup failures or expose fixed protection controls. Generic
apple,macaudio and SSM3515 backends remain disabled. Require a supported
amplifier, speaker layout and negative safe volume before adding a Speaker
link. Keep the parameter accepted for compatibility, without unsafe overrides.

Add a hardware-free KUnit regression covering generic fallback, unsupported
and missing-protection configurations with parameter 2 and other values,
plus the supported TAS and software-gain paths.

Signed-off-by: Ryan Murray <[email protected]>
INACTIVE hides a control but does not reject direct ALSA element writes.
Set each fixed speaker enum during control fixup, deactivate it, and
remove WRITE access from every element before publishing the card.
Cover ASI1 selection, HPF corner, OCE handling and the dormant DAC gain
setup independently of the deprecated unsafe parameter.

Add a no-device host regression composing the actual speaker setup and
ALSA matcher, enum setter, activation and element-write functions with
in-memory registers. Require EPERM for direct writes to fixed controls,
while unrelated jack controls remain writable. Cover both input-validation
settings, mono and stereo prefixes, all elements and parameter values.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide merged commit 23e5443 into integration/aurora Oct 28, 2026
@RyanTheTide
RyanTheTide deleted the fix/promote-macaudio-speaker-protection branch November 16, 2026 05:07
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