Repository navigation
ASoC/arm64: M5 Mac Studio speaker behind the protection lease (stacked on #2535) - #2536
Draft
RyanTheTide wants to merge 4 commits into
Draft
RyanTheTide wants to merge 4 commits into
RyanTheTide wants to merge 4 commits into
Conversation
…ense On the M5 Mac Studio (J775c, J775d) the AOP's speaker stream carries one amplifier's playback and no voltage/current sense: the ADT's audio-speaker stream lists one TX slot and no RX slot. Allow the audio node to name only the jack and speaker channels, and allow apple,speaker-amps = <1> for such a stream. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The T6050 default speaker stream is the J714s's: six amplifiers in 32-bit slots and twelve 16-bit sense words back. The M5 Mac Studio's stream is the J873's instead: one amplifier in one 32-bit slot and nothing sent back (the same ADT audio-speaker description as the J873, J873s and J773g). Accept apple,speaker-amps = <1> on T6050 for that shape (and <6>, the default), keeping the J873's sense DAI description. The audio node of such a machine names no "sense" channel, so the sense capture cannot be opened. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Describe the M5 Mac Studio's AOP speaker stream as it is: one amplifier (apple,speaker-amps = <1>) and no "sense" channel, since the ADT's audio-speaker stream lists one TX slot and no RX slot. A protection daemon reads the missing "sense" channel as a speaker without V/I sense. The J775c and J775d DTBs change only on the AOP audio node: the apple,speaker-amps property and the sense DMA channel dropped. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The M5 Mac Studio's (J775c, J775d) speaker has no V/I sense: its AOP speaker stream carries one TX slot and no RX slot, and the amp's speaker-protection is 0. As on the J773g, run it behind the protection lease: give the entry the -20 dB safe level, so macaudio admits the speaker, and playback waits for a lease (macaudio_spk_admitted()), which only speakerguardd takes, with a model for a speaker without sense. With no lease the speaker stays silent. There is no fixed ceiling. KUnit: the J775 configuration is admitted, has no fixed ceiling and still carries no gain table. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Contributor
Author
|
Early note on this draft (no full review yet):
Assisted-by: LLM (Claude:Opus 5.5) |
Contributor
Author
|
Closing: this admits the Studio speaker with a fixed level we chose; a replacement should take the limit from the Mac's own speaker tuning. |
Contributor
Author
|
Reopened and kept as a draft; the comment above lists what it still needs before review. |
4 of 17 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #2535 (Mac Studio audio, speaker off). Review the last four commits. Draft until a J775 row and a speakerguardd model for this Mac exist.
Problem
With the base PR the M5 Mac Studio's speaker stays off. Its AOP speaker stream has one TX slot and no RX slot, so V/I sense can't protect it. The only safe way to run it is the J773g path: playback waits for a protection lease that speakerguardd takes with a model for a speaker without sense.
Change
cout,cin,spkr(nosense), andapple,speaker-ampsmay be 1.apple,speaker-amps = <1>on T6050 selects the J873 stream shape: one amp in one 32-bit slot, nothing sent back. The sense DAI keeps its description, and with nosensechannel it cannot be opened.apple,speaker-amps = <1>and drops thesensechannel. Nothing else changes in the J775c/J775d DTBs.macaudio_spk_admitted()). With no lease it stays silent.The DT commit comes before the macaudio one, so no commit admits the speaker while its stream still claims sense.
The speakerguardd side is aurora-silicon/speakerguardd#220: the T8142/T6050 transport reads the missing
sensechannel as "no sense", and the Mac is wiredderived-nosensefor one amp. It still needs a J775 (AID 47) tuning bundle before speakerguardd will take a lease.Testing (buildbox, no hardware, nothing played)
apple-speaker-*, built with CONFIG_RUST and the T8152 AOP audio driver): 60/60 pass. The J775 entry is admitted, has no fixed ceiling and no gain table.apple,speaker-amps, sense channel dropped), J714s identical. dt-validate against a schema built from this tree: 0 new messages on J775c, J775d, J714s, K114c, K116s, J813, J815.dt-doc-validateclean on both bindings. rustfmt: no new diffs in the changed lines.Still to run
dmesg;Speaker Senseopen fails with -ENODEV; speaker playback is refused with no lease.Assisted-by: LLM (Claude:Opus 5.5)