Krolyxon
Commit 8ff50e2

Branches

Refs →

budctl8ff50e2

budctl set spatial on|off (W5b)

This adds 3D sound (switch 1B) to the T310's writable switches. It is
read back at once.

Verified on the owner's T310 (W5b, 2026-10-27): on and off were acked,
the immediate read-back showed the change, and the owner heard a
difference.

No new dependencies.
Author
krolyxon
Date
2026-10-27 17:29 +0530
Parent
b37b005
Commit
8ff50e2812ceb45bba81b6c45179aceaf1548a79

+10 −4

3 files changed

  1. M crates/budctl-cli/src/main.rs +1 −1
  2. M crates/budctl-core/src/devices/realme_t310/mod.rs +6 −2
  3. M docs/protocol/realme_t310.md +3 −1
M crates/budctl-cli/src/main.rs View
@@ -48,7 +48,7 @@ enum Command {
4848 },
4949 /// Select an EQ preset (pure-raw, deep-bass, pure-vocals, pure-bass), then read it back.
5050 Eq { preset: String },
51− /// Turn an on/off setting on or off, then read it back. Switches: game, bass-boost.
51+ /// Turn an on/off setting on or off, then read it back. Switches: game, bass-boost, spatial (3D sound).
5252 Set {
5353 /// The switch's name, as `status --json` lists it.
5454 switch: String,
M crates/budctl-core/src/devices/realme_t310/mod.rs View
@@ -43,7 +43,11 @@ const READ_BACK_PAUSE: Duration = Duration::from_millis(300);
4343
4444 /// The switches budctl may write, each added after the previous one passed its hardware
4545 /// checkpoint (CLAUDE.md rule 4). Spec: realme_t310.md#switch-write
46−const WRITABLE_SWITCHES: [(&str, ReadBack); 2] = [("game", GAME_READ_BACK), ("bass-boost", READ_BACK)];
46+const WRITABLE_SWITCHES: [(&str, ReadBack); 3] = [
47+ ("game", GAME_READ_BACK),
48+ ("bass-boost", READ_BACK),
49+ ("spatial", READ_BACK),
50+];
4751
4852 fn on_off(on: bool) -> &'static str {
4953 if on { "on" } else { "off" }
@@ -674,7 +678,7 @@ mod tests {
674678 steps.pop();
675679 let script = Script::new(steps);
676680 let mut session = open(&script).unwrap();
677− for key in ["dual", "wind", "spatial"] {
681+ for key in ["dual", "wind"] {
678682 assert!(
679683 matches!(session.set_switch(key, true), Err(Error::Unsupported(_))),
680684 "{key}"
M docs/protocol/realme_t310.md View
@@ -361,7 +361,7 @@ Evidence: *vendor*
361361 <a id="writes"></a>
362362 ## 10. Writes
363363
364−**One at a time.** budctl adds a write only after the previous one passes its hardware checkpoint (see the [roadmap](#roadmap)). Sent so far: [§10.1](#anc-write) off/transparency/on (W1, verified *ours-2026-10-27*), the light/medium/deep levels (W2, verified *ours-2026-10-27*), and [§10.2](#switch-write) game mode (W3, verified *ours-2026-10-27*), and [§10.3](#eq-write) the built-in EQ presets (W4, verified *ours-2026-10-27*), and the bass-boost switch `1D` (W5a, verified *ours-2026-10-27*). budctl reads it back at once, because the spec gives it no special timing. The others are not sent yet.
364+**One at a time.** budctl adds a write only after the previous one passes its hardware checkpoint (see the [roadmap](#roadmap)). Sent so far: [§10.1](#anc-write) off/transparency/on (W1, verified *ours-2026-10-27*), the light/medium/deep levels (W2, verified *ours-2026-10-27*), and [§10.2](#switch-write) game mode (W3, verified *ours-2026-10-27*), and [§10.3](#eq-write) the built-in EQ presets (W4, verified *ours-2026-10-27*), the bass-boost switch `1D` (W5a, verified *ours-2026-10-27*), and 3D sound `1B` (W5b, verified *ours-2026-10-27*). budctl reads it back at once, because the spec gives it no special timing. The others are not sent yet.
365365
366366 **General rule**:
367367 - A write reply is `0x84xx <status …>`, and `00` means accepted.
@@ -389,6 +389,7 @@ Evidence: *vendor*
389389 - **Check:** read `0x010D` again.
390390 - **Game mode on the T310.** The buds never push the new value (*t310*). On Buds 4 the change lands about 1 s after the ack, and a read sooner still returns the old value (*buds4*). So budctl reads back 1 s after the ack, then every 300 ms until 3 s after the ack.
391391 - **Bass boost on the owner's T310** (*ours-2026-10-27*, W5a): `0x0403 1D 01` and `1D 00` were acked with `00` within 30 ms. The immediate read-back already showed the new value, and no push came. With the EQ on pure-bass, the owner heard no clear difference.
392+- **3D sound on the owner's T310** (*ours-2026-10-27*, W5b): `0x0403 1B 01` and `1B 00` were acked with `00` within 30 ms. The immediate read-back showed the new value. The owner heard a difference but could not name it.
392393 - **Game mode on the owner's T310** (*ours-2026-10-27*, W3): `0x0403 06 01` and `06 00` were acked with `00` within 13 ms. The read 1 s later already showed the new value. No push came, and the buds played no prompt.
393394 - **Dual connection.** Other clients also send `0x0413` afterwards. The T310's bitmap lacks it, so budctl sends only `0x0403 11`. Turning dual connection off may drop the link to one host, so it is tested last.
394395
@@ -513,6 +514,7 @@ Ask for an Android HCI snoop of realme Link before W11, and for any write that d
513514
514515 | Date | Checkpoint | Result | Notes |
515516 |---|---|---|---|
517+| 2026-10-27 | W5b `set spatial on`, `off` | pass | Acked, the immediate read-back showed the change, and the owner heard a difference. See [§10.2](#switch-write) |
516518 | 2026-10-27 | W5a `set bass-boost on`, `off` | pass (protocol) | Acked, and the immediate read-back showed the change. The owner heard no clear difference with EQ pure-bass. See [§10.2](#switch-write) |
517519 | 2026-10-27 | W4 `eq pure-raw`, `deep-bass`, `pure-vocals`, `pure-bass` | pass | Acked and read back on the first try; the presets sound clearly different. See [§10.3](#eq-write) |
518520 | 2026-10-27 | W3 `game on`, `game off` | pass | Acked, and the 1 s read-back showed the change. No push or prompt. See [§10.2](#switch-write) |