Skip to content

ASoC: tas2764: J604 amplifier shutdown as macOS does it - #1894

Draft
IronsideXXVI wants to merge 6 commits into
aurora-silicon:integration/aurorafrom
IronsideXXVI:j604-tas2764-shutdown-dance
Draft

IronsideXXVI wants to merge 6 commits into
aurora-silicon:integration/aurorafrom
IronsideXXVI:j604-tas2764-shutdown-dance

Conversation

@IronsideXXVI

@IronsideXXVI IronsideXXVI commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

The J604 (MacBook Pro 14" M4, T8132) has six SN012776 amplifiers. macOS 26B123 brackets every software shutdown of all six with writes to the vendor's hidden page 0xfd. I measured it on the J604 by tracing the I2C3 controller under macOS:

  • before: 0x0d = 0x0d, 0x64 = 0x04, 0x0d = 0x00
  • then PWR_CTRL shutdown
  • after: 0x0d = 0x0d, 0x64 = 0x00, 0x0d = 0x00

The writes come 0.59 s after the last mute; power-up and mute transitions carry none. tas2764.c already implements exactly this as TAS2764_SHUTDOWN_DANCE, but only as a switch for every amplifier at once through ENABLED_APPLE_QUIRKS, which leaves it off. These patches add a boolean apple,shutdown-dance property and honour it per amplifier, together with the dance's immediate-SDZ init step. The J604's six amplifiers set it.

Machines without the property are unchanged.

Why this is a draft. On a second J604, @davishann15-commits found that with the dance the speakers stay silent: V and I sense read powered down during playback (0x02 = 0x98/0x99), and with the dance alone every stream stop reports bad TDM clock on all six amps. With only the init writes they play clean. Until I know why, this stays a draft and is not meant for merging.

The init writes that used to be patches 4-6 here are now their own PR: #2595.

Checked on top of integration/aurora df62a8c:

  • checkpatch --strict: clean on each patch
  • tools/asahi/run-host-tests.py and scripts/dtc/apple-dt-check.sh, as the CI runs them: the same results as on the base (checkpatch clean; run-host-tests.py fails only the tests that also fail on the base on my arm64 host, no rustc 1.96 there; apple-dt-check.sh: binding ok, no new DT warnings; ADT coverage and DART power-domain checks pass)
  • the codec builds with W=1 and no warnings

(Updated 2026-11-20: rebased onto integration/aurora df62a8c; the init writes moved out to #2595.)

(Updated 2026-11-21: three commits on top from Ryan's review: the dance path no longer passes update_bits()'s 1 up as an error, the post sequence always runs, and only the SDZ mode field is set. From reading the code, the first one alone keeps every amp in MUTE for the whole stream, which may explain the silence above; the J604 rows run again on the new head before I draw conclusions.)

Assisted-by: LLM (Claude:Opus 5.5, Claude:Fable 5.2)

IronsideXXVI added a commit to IronsideXXVI/omarchy-j604 that referenced this pull request Nov 14, 2026
…ng; rollback measured on the machine; upstream state

STATUS.md: the 1.901 reset cause is confirmed on the machine (the memory-controller state read at
probe, patch 0531): with that driver kept from starting, 1.901 starts, unlocks with no hands, joins
the network and has 0 failed units. The rollback pieces are now measured on the machine: the last
good kernel beside the new one, Limine's one-shot with the last good kernel as default, the 15 s
Stage 1 window a second Mac can hold, the failed-boot count clear, and the forced USB-C
port-controller reset. kernel/ is unchanged; the published series stays 1.888, the last kernel
that passed all checks.

UPSTREAM.md: new aurora-silicon/aurora-bless#6 and aurora-silicon/linux#1894; the rule for what we
open on aurora-silicon/linux now; the panel colour matrix rebases onto the set_matrix conversion
already upstream.
@IronsideXXVI
IronsideXXVI force-pushed the j604-tas2764-shutdown-dance branch from b8e9ffb to 20e0882 Compare November 14, 2026 13:19
@IronsideXXVI IronsideXXVI changed the title ASoC: tas2764: per-amplifier Apple shutdown dance, on for the J604 ASoC: tas2764: J604 amplifier init and shutdown as macOS does them Nov 14, 2026
IronsideXXVI added a commit to IronsideXXVI/omarchy-j604 that referenced this pull request Nov 14, 2026
…writes; new #1895 (headset codec)

UPSTREAM.md: #1894 carries the three amplifier initialisation writes macOS makes besides the
shutdown sequence; #1895 gives the J604 headset codec the 20 probe writes macOS makes. Both are
byte-for-byte what macOS writes on the machine and have not run under Linux yet.
@davishann15-commits

Copy link
Copy Markdown

On a J604 under Linux, this series leaves the speakers silent. The amplifiers stay muted during playback.

Tested on a J604 (MacBook Pro 14", M4, Mac16,1; os-fw 26.6.2, system-fw 27.0; aura 1.0.0b13). The kernel was alarm-aurora's pkgrel 38 recipe on integration/aurora 7c71d6d, plus #1543, #1894, #1895, #1917, #1918, #1919 and #1922. It booted on its own J604 tree as an aura-try trial. Userspace: Hyprland 0.57.2, mesa-aurora 26.3.0_devel.202611130318, speakerguardd-v2 1.0.0alpha.1-40.

I booted the same kernel twice:

J604 tree with apple,init-writes + apple,shutdown-dance (this series) Same kernel, tree without both properties
speakerguardd v2 silent switch test pass pass (record reused)
grant during playback yes, Speaker Volume 201 (0 dB), fault status 0 yes, Speaker Volume 201
amp 0x38 PWR_CTRL (page 0 0x02) during playback 0x99, MUTE set 0x98, active
page 0 0x07 0x68 (the init write) 0x20
audible (test signal at 30-35 %) nothing, three tries clear and clean

The tree without the properties came from a kernel without this series: it is the J604 tree of linux 2129f55 plus #1888, and it otherwise differs from the trial tree only by #1895, #1917 and #1919's properties the trackpad actuator node and two cell properties on pmp-report. Without the properties the code paths of this series stay off, so the comparison isolates the two properties together. I did not test apple,init-writes and apple,shutdown-dance separately. I can test a build with only one of them, or with a single init triple, if that helps.


Disclosure: an LLM (Claude) ran these tests on my Mac and drafted this. I did the listening and looking, reviewed it, and am responsible for it.

Assisted-by: LLM

@IronsideXXVI

Copy link
Copy Markdown
Contributor Author

Thank you, this is exactly the comparison we needed, and it's a real problem. I'm holding this PR until we understand it.

Our own J604 runs these six patches in our kernel series (since our 1.905, now 1.913) and its six amplifiers play there. Our userspace differs from yours, though (speakersafetyd plus our own DSP graph, not speakerguardd-v2), and so does our tree. So we may never hit the path where an amp stays at 0x99. Your table points at the init writes: page 0 0x07 reads 0x68 on the silent boot.

Next on our side: read amp 0x38 page 0 0x02 and 0x07 during playback on our J604 and post the values here. If ours also reads 0x99, the silence is ours too and comes from these patches. If ours reads 0x98, the difference is in how the unmute reaches the amp, and we'll look at that path.

If you have the time, a build with only apple,shutdown-dance (no apple,init-writes) would split the two properties. That's the test you offered, and it's the useful one.

@davishann15-commits

Copy link
Copy Markdown

@IronsideXXVI, re your comment: here is the split you asked for. The shutdown dance alone also leaves the speakers silent, in a different way: the amps report active but stay silent, and fault at every stream stop. The same kernel with neither property plays clean.

Same J604 and kernel as before (alarm-aurora's pkgrel 38 recipe on 7c71d6d plus #1543, #1894, #1895, #1917, #1918, #1919, #1922), speakerguardd-v2 1.0.0alpha.1-40. Each row is one aura-try boot of that kernel's own J604 tree, with only the amp properties edited (fdtput -d on the six codec@38..codec@3d nodes). Nothing else in the tree differs between the rows.

amp properties amp 0x38 PWR_CTRL (p0 0x02) p0 0x07 audible amp faults
both (this PR as is) 0x99 during playback (MUTE) 0x68 no, 3 plays at 30-35 % none
apple,shutdown-dance only 0x98 during playback 0x60 no, 2 plays at 30 % and 1 at 45 % fault: bad TDM clock on all six amps at every stream stop (20 lines in two stops), e.g. tas2764 1-003a: other context to the fault: 02,99,00,00,06
neither (control) 0x9a idle 0x20 idle yes, clean (2 plays at 35 %) none

In every boot, speakerguardd v2's silent switch test record was valid, every stream got its grant (Speaker protection granted / withdrawn: released by the owner), and Speaker Volume read 201 (0 dB) while granted. The control boot's 0x02/0x07 are idle values; my read during playback timed out (debugfs regmap reads of these amps take about 5 s each).

Two observations, for what they are worth:

  • With the dance, p0 0x07 reads 0x60, where the control reads 0x20. Bit 0x40 is set without any init write, so something in the dance path seems to reach page 0 0x07.
  • The faults only appear in the dance-only boot. In the full boot the amps stay muted, which may hide them.

I also have the opposite variant (apple,init-writes only) ready if you want that row too. I can also try a single init triple, or log the I2C transactions around a stream stop, if you tell me what would help most.


Disclosure: an LLM (Claude) ran these boots and measurements on my Mac and drafted this. I did the listening, reviewed it, and am responsible for it.

Assisted-by: LLM

@davishann15-commits

Copy link
Copy Markdown

@IronsideXXVI One more data point. The amp silence is not caused by the cs42l84 interrupt storm from #1895.

I rebuilt the same kernel with #1895's fourth commit (c0a5945, code-identical to f0ca074) and checked that cs42l84 and both I2C controllers show 0 interrupts in 10 s. Then I booted this PR as is (both properties) on its own J604 tree:

  • amp 0x38 PWR_CTRL during playback: 0x99 (MUTE). Page 0 0x07: 0x68.
  • Nothing audible: two plays at 35 % and two at 50 %.
  • speakerguardd v2's switch test passed on this kernel. Every stream was granted, and there were no amp faults.

So the rows in my previous comment stand with the storm gone: both properties mute, dance-only is silent with bad TDM clock at every stop, and neither plays clean.


Disclosure: an LLM (Claude) ran these tests on my Mac and drafted this. I did the listening, reviewed it, and am responsible for it.

Assisted-by: LLM

@IronsideXXVI

Copy link
Copy Markdown
Contributor Author

@davishann15-commits Thank you for the split and for ruling out the #1895 storm. Here is what we have on our side, and what we don't have yet.

Our J604. The six amps play on our J604 with this series: Dylan listened on our 1.914 kernel, playing his own audio. Our tas2764.c matches this PR's head (20e0882) apart from a local boot hook, and our six codec@38..codec@3d nodes carry the same apple,init-writes and apple,shutdown-dance. So the amp code that plays here is the code that stays muted for you.

Our register values (idle only so far). With both playback PCMs closed, all six amps read page 0 0x02 = 0x81 (BOP_SRC, MUTE) and 0x07 = 0x68, on kernels 1.913 to 1.916. We don't have a read during playback yet; it needs Dylan's own audio playing, and we'll post it as soon as we have it. 0x07 = 0x68 matches your full-series row, so the init write lands the same way on both machines.

A note on 0x02: bits 3 and 4 are the VSENSE and ISENSE power-down bits (the inverted "VSENSE Switch" / "ISENSE Switch" DAPM controls). Ours are clear at idle (sense powered). Yours are set in all three rows, including the control that plays, so they don't explain the silence. Between your rows only the MUTE bit differs (0x99 vs 0x98).

Where we think the difference is. Your kernel and ours differ in sound/soc/apple/macaudio.c, not in the amp driver. Upstream's macaudio_j604_cfg sets .tweeter_hpf_granted = true, and playback waits for macaudio_spk_admitted(): speakersafetyd's J604 profile or a speakerguardd v2 lease. Our tree has neither the flag nor the spk_fixed_ceiling path, and our userspace is speakersafetyd, not speakerguardd v2. So our boots never take the grant path, and yours always do. Our best guess, not yet tested, is that the unmute after a grant (with the tweeter corner restore) and the dance's mute handling meet in a way that leaves MUTE set, and that the dance-only row shows the other side of the same race as bad TDM clock at stop.

Two rows that would split it. Either would help a lot:

  1. apple,init-writes only (the variant you have ready).
  2. This PR as is, with speakersafetyd (its J604 profile) in place of speakerguardd v2 for one boot, if your setup allows it. That keeps the amp properties and swaps only what admits playback.

On the stop-time bad TDM clock: we have a candidate change to the dance's stop sequence, but it is not verified. We'll push it here only after a boot that started a stream shows zero of those lines.

@davishann15-commits

Copy link
Copy Markdown

@IronsideXXVI, re your comment: here is row 1. With apple,init-writes alone, the speakers play clean. That leaves the shutdown dance as the property that silences them on this J604.

Same J604 and method as before: one aura-try boot of the 38.1/38.2 J604 tree with only apple,shutdown-dance removed from the six codec@38..codec@3d nodes. The kernel is the 38.2 build from my last reply: alarm-aurora's pkgrel 38 recipe on 7c71d6d plus #1543, this PR at 20e0882, #1895 at its 4th commit (no codec interrupt storm), #1917, #1918, #1919 and #1922. speakerguardd-v2 is 1.0.0alpha.1-41.

amp properties amp 0x38 p0 0x02 p0 0x07 audible amp faults
both (this PR as is) 0x99 during playback 0x68 no none
apple,shutdown-dance only 0x98 during playback 0x60 no bad TDM clock on all six at every stream stop
apple,init-writes only (new) 0x80 during playback 0x68 yes, clean (2 plays at 35 %) none
neither (control) 0x9a idle 0x20 idle yes, clean none

As in the other rows, the speakerguardd v2 self-check and switch test passed, and each stream got its grant and was released at its end.

On 0x02, a correction to my earlier table: the control's 0x9a was an idle read (shutdown mode), because my read during playback timed out. So it doesn't show sense powered down while playing. In this row the read landed during playback: 0x80 has bits 3 and 4 clear, so V and I sense are powered, the same as your idle 0x81 apart from MUTE. The two rows with the dance read 0x98/0x99 during playback, with both sense power-down bits set. With the dance, sense is powered down during playback; without it, sense is on. 0x07 = 0x68 here matches the full row, so the init writes land the same with or without the dance.

About row 2: I'd rather not run the speakers under speakersafetyd on this Mac. On this J604, speaker protection is speakerguardd v2, set up as Aurora's maintainers asked for this board. The speakersafetyd J604 board file is still in review (alarm-aurora#320), and I don't want to play through the speakers under a protection setup that hasn't been checked on this machine. If you have another way to split the grant path that keeps v2, I'm glad to run it. For example, a debug parameter or a test patch that skips the tweeter-corner restore on a grant, or one that leaves the unmute alone. I can also test your stop-sequence change when it's up.


Disclosure: an LLM (Claude) ran this boot and the measurements on my Mac and drafted this. I did the listening, reviewed it, and am responsible for it.

Assisted-by: LLM

@IronsideXXVI

Copy link
Copy Markdown
Contributor Author

@davishann15-commits thanks, row 1 settles it. With apple,init-writes alone the amps play clean with V and I sense powered (0x80). The dance is what powers sense down during playback (0x98/0x99) and leaves them muted. Row 2 isn't needed, and I wouldn't ask you to change the protection setup on your Mac. The speakersafetyd board file you mentioned (alarm-aurora#320) is now closed in favour of #311.

So the init writes will go up as their own PR: binding, driver and J604 DT, on current integration/aurora. This PR goes back to draft with only the shutdown dance. Our tree also masks the TDM clock error on amps that dance (062e74cd71). It hasn't been tested on a granted stream, so it stays out of here until it has. I'll link the new PR here once it's open.

@IronsideXXVI
IronsideXXVI marked this pull request as draft November 20, 2026 13:24
Some Apple machines bracket every software shutdown of their SN012776
amplifiers with writes to the vendor's hidden page 0xfd. Add a boolean
property that tells the driver to do the same on that amplifier.

Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
macOS brackets every software shutdown of the J604's six SN012776
amplifiers with writes to the vendor's hidden page 0xfd: 0x0d = 0x0d,
0x64 = 0x04, 0x0d = 0x00, then PWR_CTRL shutdown, then 0x0d = 0x0d,
0x64 = 0x00, 0x0d = 0x00. Measured on the J604 under macOS 26B123 with
the I2C3 controller traced around a short system sound: the same
sequence on all six amplifiers, 0.59 s after the last mute; power-up
and mute transitions carry no hidden-page writes.

The driver already implements exactly this as TAS2764_SHUTDOWN_DANCE,
but only for every amplifier at once through ENABLED_APPLE_QUIRKS,
which leaves it off. Honour the "apple,shutdown-dance" property on
SN012776 amplifiers, with the dance's immediate-SDZ init step. Machines
without the property are unchanged.

Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
Set apple,shutdown-dance on the J604's six SN012776 amplifiers, the
sequence macOS 26B123 writes on all six at every software shutdown.

Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
@IronsideXXVI
IronsideXXVI force-pushed the j604-tas2764-shutdown-dance branch from 20e0882 to cdce368 Compare November 20, 2026 19:00
@IronsideXXVI IronsideXXVI changed the title ASoC: tas2764: J604 amplifier init and shutdown as macOS does them ASoC: tas2764: J604 amplifier shutdown as macOS does it Nov 20, 2026
@IronsideXXVI

Copy link
Copy Markdown
Contributor Author

The init writes are now #2595 (binding, driver and J604 DT, on integration/aurora df62a8c, with no dance under them).

This PR is rebased onto the same base and holds only the shutdown dance (patches 1-3). It stays a draft until I understand why the dance leaves the speakers silent on @davishann15-commits' J604.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of the draft; nothing here needs action before you're ready.

  • davishann15-commits' rows settle the current state:

    • with the dance, V and I sense read powered down during playback (0x98/0x99);
    • the speakers are silent, and with the dance alone they fault with bad TDM clock at every stream stop;
    • without the dance they play clean.

    Until that's understood this can't go in, as you say.

  • When it comes back, the selection question from #2595/#2615 applies here too. The dance is already a built-in quirk (TAS2764_SHUTDOWN_DANCE). If macOS does it on every SN012776, the quirk mask is the place, as #2615 does for page 0 0x07 and page 1 0x47. A per-board apple,shutdown-dance property would need a stated hardware reason why the J604 differs.

  • Once #2615 is in, its init write leaves page 0 0x07 at 0x68 after the dance's own 0x60 (immediate SDZ) init step. When you retest the dance, check which value the dance actually needs there, since the silent rows differ in exactly that register.

@IronsideXXVI

Copy link
Copy Markdown
Contributor Author

Thanks, noted. When I retest the dance I'll check which page 0 0x07 value it actually needs.

@IronsideXXVI
IronsideXXVI force-pushed the j604-tas2764-shutdown-dance branch from cdce368 to a202f14 Compare November 21, 2026 15:15
@RyanTheTide

Copy link
Copy Markdown
Contributor

Blockers: 1.

  1. sound/soc/codecs/tas2764.c:348-349 returns the result of tas2764_do_quirky_pwr_ctrl_change() unchanged, and that ends with snd_soc_component_update_bits() (sound/soc/codecs/tas2764-quirks.h:148-151), which returns 1 whenever it changes the register. Every non-shutdown transition through the dance path therefore returns 1, and the callers treat any non-zero value as an error and return early:
    • unmute, tas2764.c:639-641: SHUTDOWN -> MUTE returns 1, so tas2764_mute() returns before tas2764->unmuted = true and the MUTE -> ACTIVE write at 645. The amp stays in MUTE for the whole stream. That is the 0x02 = 0x99 (mode MUTE) read during playback in the "both properties" row above.
    • mute, tas2764.c:645-647: ACTIVE -> MUTE returns 1, so the 6 ms ramp wait, stream_stopped = true and the deferred shutdown at 651-656 are all skipped. The amp stays in MUTE while the bus clock stops, and stream_stopped stays false, so the fault handler reports the clock loss. That fits the "bad TDM clock on all six at every stream stop" in the dance-only row.
      The plain path at 351-356 already maps a positive return to 0. Do the same for the dance path (ret = tas2764_do_quirky_pwr_ctrl_change(...); return ret < 0 ? ret : 0;), or make the helper return 0 on success. Then rerun the split rows before drawing any conclusion about the hidden-page writes themselves. As far as the code shows, the silence so far may come from this return value and not from the dance.
  2. sound/soc/codecs/tas2764-quirks.h:133-150: if tas2764_pre_shutdown_seq fails, the final update_bits at 148 overwrites ret, so the failure is lost. If the post sequence fails, 0xfd:0x64 stays at 4 with the hidden page selected, and that error is lost too. The helper is reachable from DT for the first time with this PR. Return the first error, and always attempt the post sequence once the pre sequence has written 0x64.

Nit: the dance init step (tas2764-quirks.h:104) writes the whole of page 0 0x07 (REG_SEQ0, 0x60), so the final value depends on which init sequence runs last. A regmap_update_bits() on the SDZ mode field alone would leave the other bits of the register as the other init writes set them.

CI (host-tests, dt-checks) passes, the commits carry a human Signed-off-by, and machines without apple,shutdown-dance take the existing path unchanged.

HW row: J604 on this head with the return-value fix, speakerguardd v2 granted stream: page 0 0x02 reads ACTIVE during playback on all six amps, audible playback, no bad TDM clock at stream stop, then 10 start/stop cycles and one s2idle cycle; 0 AVC, 0 failed units, no new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

tas2764_update_pwr_ctrl() returned the shutdown dance helper's result
unchanged. The helper ends with snd_soc_component_update_bits(), which
returns 1 when it changed the register, and both callers in
tas2764_mute() treat any non-zero value as an error:

- unmute: SHUTDOWN -> MUTE returns 1, so tas2764_mute() returns before
  it sets unmuted and writes MUTE -> ACTIVE. The amplifier stays in
  MUTE for the whole stream.
- mute: ACTIVE -> MUTE returns 1, so the ramp wait, stream_stopped and
  the deferred shutdown are skipped. The amplifier is still in MUTE when
  the bus clock stops, and the fault handler reports the clock loss.

Map a positive result to 0, as the plain path already does.

Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
…undo it

tas2764_do_quirky_pwr_ctrl_change() chained its steps on !ret, and the
shutdown write in the middle is an update_bits() that returns 1 when it
changes the register. So on every real ACTIVE or MUTE -> SHUTDOWN
transition the post sequence was skipped: 0xfd:0x64 stayed at 4. The
final update_bits() then overwrote ret, so a failed pre sequence was
lost as well.

Treat only a negative value as an error, keep the first one, and always
run the post sequence once the pre sequence has been tried, so 0xfd:0x64
goes back to 0 and the hidden page is deselected even when a step before
it failed. Return 0 on success. The helper is reachable from the device
tree for the first time with apple,shutdown-dance.

Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
The dance's init step wrote all of page 0 0x07 (0x60), so the final
value depended on which init write ran last. The register is MISC_CFG2
in the TAS2764 data sheet (reset 0x20): SDZ_MODE in bits 7:6,
SDZ_TIMEOUT in 5:4 and DVC_RAMP_RATE in 3:2.

Name it, and set SDZ_MODE to immediate with regmap_update_bits(), so the
other fields keep what reset and the other writes left. From reset the
register ends at 0x60 as before.

Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
@IronsideXXVI

Copy link
Copy Markdown
Contributor Author

Thanks Ryan, you were right on both.

  1. The dance path now returns ret < 0 ? ret : 0, the same as the plain path, so a changed register no longer looks like an error. Unmute goes on to MUTE -> ACTIVE, and mute gets its ramp wait, stream_stopped and the deferred shutdown again.

  2. The shutdown write only runs if the pre sequence went through, the post sequence always runs, and the first error is the one returned. While fixing this I found one more problem in the same helper. The update_bits() before the post sequence returns 1 when it changes the register, so the old if (!ret) skipped the post sequence every time the amp really did shut down. 0xfd:0x64 stayed at 4 with the hidden page selected after every stop, not only when something failed. That is fixed by the same commit.

Nit: the init table no longer writes all of page 0 0x07. There is a regmap_update_bits() on the SDZ mode field only (new TAS2764_MISC_CFG2_SDZ_MODE defines), so the other bits keep what the other init writes set.

These are three small commits on top, so the earlier ones are easy to compare. I can squash them before merge if you'd rather.

What I ran on the new head (1c00ab3): checkpatch --strict is clean on all three commits. clang and gcc builds of the codec and the J604 dtb at W=1 give no warnings. The dtb check shows no new warnings against the base, and the ti,tas27xx binding passes. The host test suite gives 423 passed and 28 failed on both this head and the old head, with the same four failing suites (GPU and Thunderbolt tests, nothing in sound).

How bad it was on the J604, from reading the code (not from a trace): with the deferred shutdown, every stream starts from SHUTDOWN. The first write in mute() is SHUTDOWN -> MUTE, which returns 1, and mute() returned before the MUTE -> ACTIVE write. So as far as I can tell, all six amps sat in MUTE through every stream since the dance went on for this machine. That also means the earlier rows in the description (amps in MUTE during playback, bad TDM clock at stop) may come from this return value and the skipped post sequence alone. I'm not drawing any conclusion about the hidden-page writes until those rows run again.

Nothing from this head has run on the J604 yet. The same two fixes go into my next J604 kernel. Your HW row is queued on it, and on the current kernel first, so there is a before and after: page 0 0x02 read on all six amps during playback, audible, no bad TDM clock at stop, 10 start/stop cycles, one s2idle cycle, no AVC, no failed units, no new kernel errors. I'll post the results here.

Overlap: #1895 touches t8132-j604.dts. #2615 adds the same MISC_CFG2 lines to tas2764.h, so whichever lands second gets rebased.

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