Repository navigation
arm64: dts: apple: t6050: share the six-amp speaker block, give the K114s its speakers - #3451
Conversation
…114s its speakers The J714s, K114s, K114c, K116s and K116c ADTs describe the same six SN012776 speaker amps (i2c1 0x38-0x3a, i2c3 0x3b-0x3d), the same speaker-config slots (playback N, voltage sense 4N, current sense 4N+2), shutdown pin 107, fault interrupt 106, speaker-ID pins 136/137 and the same amp-tx-zd-config rows (live K114s and K116s ADTs, 26B8125 K114c and K116c device trees; phandles aside). The J714s and the K114c each carried their own copy of the amps, and the K114c a copy of the J714s's "Speaker" link under the J714 compatible. The K114s, which includes the same chassis file as the K114c, had neither: its card was the jack only. Move the amps and the "Speaker" link into t6050-sn012776-speakers.dtsi, included after the card by the J714s and by the 14-inch chassis file, and give the K114 compatible the J714 config (as the K116 already has). The K114c override goes. The speakers stay at the kernel's floor until a "Speaker Protection" owner grants them (speakerguardd v2), as on every v2 machine. DTBs (dtc -s, phandle values aside): J714s unchanged; K114c only its card compatible (apple,j714-macaudio -> apple,k114-macaudio, the same config); K114s gains exactly the K114c's amps, regulator and link; K116s, K116c and J714c byte-identical. macaudio KUnit 75/75 (arm64 qemu). Revert: git revert this commit (the K114s returns to a jack-only card). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
@aurora-silicon/core @aurora-silicon/omarchy-mac @aurora-silicon/aurora-maintainers review request (code owners). This is half of the K114 speaker work: #3451 (kernel: K114s speaker link) + aurora-silicon/speakerguardd#292 (v2: six-lane LSID static release). Both stay drafts until the K114s silent row is posted. The speakers stay muted until v2 grants them and each speaker has playback rows. An adversarial review from a different lane is requested separately. |
There was a problem hiding this comment.
Verdict: FINISH, then merge, at 20e759f912. The DT and kernel change are right; the K114s silent row is what's left.
Blockers: none in the code. Before merge: the K114s silent row at this head (card up, six amps bound, sense PCM present, ungranted speaker start refused, volumes at the floor, v2 self-check), then out of draft.
Checked:
- DTBs: built all 11 T6050 DTBs at main and at this head and compared them as sorted DTS. J714c, J714s, J716c, J716s, J775c, J775d, J873s, K116s and K116c are unchanged. K114c changes only its card compatible (
apple,j714-macaudio->apple,k114-macaudio, both the J714 config). K114s gains the six SN012776, the SDZ regulator and the Speaker link, and its amp nodes and regulator are identical to the K114c's. - ADT (live K114s): SDZ/reset
function-resetGPIO 0x6b (107), amps at I2C 0x38-0x3a / 0x3b-0x3d, matching the DT (fault interrupt pin 106). - Kernel safety: without a "Speaker Protection" lease from a CAP_SYS_ADMIN owner, SN012776 gain is 0 and no speaker start is admitted; a lapsed lease closes the gate from a hard hrtimer; the tweeters keep the 800 Hz safe corner unless the owner declares its crossover. So this PR alone can't make the K114s speakers play: that takes speakerguardd v2 granting the K114 (speakerguardd#292, reviewed separately), plus per-speaker playback rows.
- Dropping
macaudio_k114_cfgand its KUnit expectations is consistent with K114 now taking the J714 config, as the K116 already does.
No attribution.
satchlj
left a comment
There was a problem hiding this comment.
Reviewed 20e759f912ac and verified on Apple M5 Max (J775c, G17C B1):
- Extracted
t6050-sn012776-speakers.dtsicleanly eliminates the duplicated six-amp speaker blocks acrosst6050-j714s,t6050-j775c, andt6050-j716c, and wirest6050-k114s(apple,k114-macaudio->macaudio_j714_cfg). scripts/checkpatch.pl --strict: 0 errors (only the expected new-file MAINTAINERS notice and 126-col table comment matching surrounding lines inmacaudio.c).- Built
t6050-j714s.dtb,t6050-j775c.dtb,t6050-j716c.dtb, andt6050-k114s.dtbwithW=1: zero new warnings. dtc -I dtb -O dts -scomparison against20e759f912ac~1ont6050-j714s.dtb,t6050-j775c.dtb, andt6050-j716c.dtb: zero diff (identical compiled device trees).- Compiled
sound/soc/apple/macaudio.ocleanly (ARCH=arm64).
|
Out of draft: speaker audio is allowed again on the lab Macs, and the K114s silent row plus the protected speaker ramp run on the next combined K114s boot (the DTB carries these nodes). Hold the merge until that row is posted here. Offline proof is unchanged: J714s DTB byte-identical, K116s/K116c/J714c unchanged, macaudio KUnit 75/75. |
|
K114s silent row (no playback), 11-28 14:35 one-shot, now also Ryan's default (
|
There was a problem hiding this comment.
Verdict: MERGE at 20e759f912ac.
Blockers: none. The K114s silent row I asked for is in.
Checked (the K114s silent row, 14:35 one-shot, now the default):
- The DTB is the bridge DTB + #3368/#3456 + only this commit. All six SN012776 amps bind to
tas2764(0-0038/39/3a,2-003b/3c/3d). - Card
MacBook Pro K114with Primary, Secondary and Speaker Sense PCMs. The per-amp controls are present for all six amps, plus the Speaker Protection Interface. - Kernel floor: the speaker front ends have no back end until v2 routes them ("no backend DAIs" at open), so no speaker stream can start at all, which is stronger than a refused start.
speaker_starts_refusedis 0 because nothing tried. - speakerguardd v2 on that boot: identity (k114s, AID49), IPSW acquire, compile, the hardware silent-switch test (the kernel interlock) and selfcheck all pass. v2 then refuses the K114s at the voicing-parity stage (speakerguardd#292's parity block: AID49 is louder than macOS on the woofer lanes), so the speakers stay at the floor.
- Offline: J714s DTB byte-identical; K116s/K116c/J714c unchanged; macaudio KUnit 75/75. My earlier DT/ADT checks stand (the amp nodes equal the K114c's; SDZ 107, IRQ 106, I2C 0x38-0x3d).
No attribution.
|
Merged as 55184f0 (normal merge: required checks green, human + KREVIEW approval, K114s row above). Revert: |
What: The K114s (14-inch M5 Pro OLED MacBook Pro) gets its six speaker amps and the card's "Speaker" link, from the same description the J714s and K114c already use. The amp block moves into one shared
t6050-sn012776-speakers.dtsi(it existed twice, in the J714s and K114c files), andapple,k114-macaudiotakes the J714 config, asapple,k116-macaudioalready does.Tested: offline at
20e759f9. DTBs compared withdtc -s, phandle values aside: J714s unchanged; K114c only its card compatible (apple,j714-macaudio->apple,k114-macaudio, same config); K114s gains exactly the K114c's amps, regulator and link; K116s, K116c and J714c byte-identical. macaudio KUnit 75/75 (arm64 qemu). K114s hardware row: pending (lane SGV2-K114S, silent first).Risk: two-way · K114s (gains a speaker link), K114c (compatible only), J714s (DTB unchanged). The speakers stay at the kernel floor until a "Speaker Protection" owner grants them: an ungranted start is refused and the amps' volume limit is the floor (
macaudio_sn012776_vlimit). speakerguardd v2 grants the K114 only once it qualifies its tuning (speakerguardd PR to follow).Not yet: K114s silent row (card, six amps bound, sense PCM, v2 self-check) and regression rows (J714s is not in the lab: DTB-identical instead; K114c compatible-only).
Details
Source: the live K114s ADT (27.2) and the live K116s ADT, plus the 26B8125 K114c and K116c device trees, compared sorted with phandles aside, against the J714s block. All describe six SN012776 on i2c1 (0x38-0x3a) and i2c3 (0x3b-0x3d),
speaker-configplayback slot N / V sense 4N / I sense 4N+2, shutdown on AP pin 107 (function-reset of the first amp), fault interrupt pin 106, speaker ID on 136/137 and the sameamp-tx-zd-configrows.t6050-sn012776-speakers.dtsi: the regulator, both I2C buses' amps,ps_i2c3/i2c3setup and&sound { dai-link@1 }. Included after a card labelledsound.t6050-j714s.dts: its inline copy replaced by the include (DTB unchanged).t6050-k114.dtsi(K114s + K114c chassis): includes it; the jack-only note goes.t6050-k114c.dts: its amp copy and its J714-compatible override go (now in the chassis).macaudio.c: K114 ->macaudio_j714_cfg;macaudio_k114_cfgremoved (KUnit references updated).K116s/K116c have no card described yet (no jack/AOP audio on those boards); the shared dtsi is ready for them once their audio block lands.
Revert:
git revertthis commit; the K114s returns to a jack-only card.Evidence