Repository navigation
Bluetooth: btcentauri: headset audio (SCO, wideband speech, HRB voice) - #3461
Conversation
…, and data path Add full station telemetry, channel survey, band capability reporting, ethtool firmware version reporting, and data-path improvements: - Parse firmware statistics reports using packed wire structures with compile-time layout checks: TX retries/failures and live RX/TX bitrates (TLV 0xf901), beacon RX/loss (TLV 0xf915), TX power and rate history (TLV 0xf920), per-chain RSSI and noise floor (TLV 0xf923), station noise (TLV 0xf908), and CCA channel survey (TLV 0xf903). - Populate wiphy->fw_version from firmware version query and wire ethtool_ops.get_drvinfo = cfg80211_get_drvinfo on both T8142/T8152 and T6050 Wi-Fi netdevs so ethtool -i reports the running firmware version. - Populate HT, VHT, and 2.4/5/6 GHz HE band capabilities, decode disconnect reason codes, apply initial firmware regulatory country hint, and avoid restricting channel widths absent from 20 MHz-only lists. - Add NAPI GRO receive processing, TX in-flight cap with bypass watchdog, and TCP pacing shift; add Centauri driver documentation. Signed-off-by: Nick <[email protected]>
…, and factory address Bring both btcentauri and btcentauri_t6050 to full audio, voice, and provisioning parity: - Open and wire SCO (rings 3/9) and LE Audio ISO (rings 5/11, H4 packet indicator framing) TX/RX rings on both drivers, with resilient per-frame error dropping that does not halt the transport. - Advertise HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED and set HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN so the core uses Setup Synchronous Connection (0x0428) instead of Enhanced Setup Synchronous Connection (0x043d), which N1 firmware rejects with status 0x11. - Implement hdev->set_bdaddr (vendor opcode 0xfc06) and hdev->reset timeout diagnostics on both drivers. - Fix RX cookie handling, lock scope, and duplicate-filter fallback on btcentauri, and update centauri-scan-tests.py mock structs for the new T6050 auxiliary TX queues. Signed-off-by: Nick <[email protected]>
…HCI voice routing Connections established via vendor HRB ACL setup (0xff7b) report a vendor link type (0xf0/0xf1) in Connection Complete, and Beta rejects standard Setup Synchronous Connection (0x0428) with status 0x11 on those handles. Add matching HRB synchronous voice support to both btcentauri.c and btcentauri_t6050.c: - Track active HRB ACL handles and peer addresses from Connection Complete until Disconnect Complete, HCI Reset, or device close. - Translate HCI_OP_SETUP_SYNC_CONN (0x0428, 17 B) to 0xfdc7 (18 B with 24-bit packet type) and HCI_OP_ACCEPT_SYNC_CONN_REQ (0x0429, 21 B) to 0xfdf8 (22 B) for tracked HRB links, restoring the standard opcode in the matching Command Status event. - Normalize Linux's 8-bit transparent voice setting (0x0003) to 16-bit 2's complement transparent (0x0063) for mSBC/WBS setup. - Send 0xfe10 (voice route = HCI rings 3/9) during post-init as a non-fatal setup step and expose voice_hci_routed and HRB SCO counters in debugfs status. - Add tools/asahi/centauri-bt-sco-tests.py covering handle tracking, command translation, voice setting normalization, Command Status restoration, T6050 constant parity, and negative controls. Signed-off-by: Nick <[email protected]>
…ded SCO events Extended Setup/Accept Synchronous Connection commands (0xfdc7/0xfdf8) on N1 Beta take a 24-bit packet-type mask. With bits 13:10 (0x3c00) set there, the remote rejects eSCO negotiation with Unsupported LMP Parameter Value (0x20), seen on the J815 against AirPods. Keep bits 13:10 clear on CVSD, mSBC and LC3-24kHz calls in both btcentauri and btcentauri_t6050. Also normalize vendor link types >= 0xf0 across Connection Complete (0x03), Connection Request (0x04) and Synchronous Connection Complete (0x2c) events in both drivers, guard against zero SCO buffer metrics in Read Buffer Size replies, expose sco_mtu/sco_pkts in debugfs status, and document the voice setup (HRB voice routing, transparent voice setting, extended synchronous connections). Extend the host tests and their negative controls. Signed-off-by: Nick <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Verdict: MERGE at 00428666
Blockers: none in code (note: stacked on #3458 — merge after #3458 lands and remaining queued KUnit CI jobs finish green; a T6050 smoke row is recommended for the btcentauri_t6050.c changes).
Checked: no Apple material, no AI attribution, no new chip/board/firmware gates, no cmdline hacks, human Signed-off-by, SCO/ISO RX and TX length bounds (skb->len + 1 > cen_aux_specs[2].footer for H4-prefixed ISO TX, packet_length > length checks on RX dropping malformed frames without halting transport), HRB sync command length validation, parity across btcentauri.c and btcentauri_t6050.c, J815 AirPods mSBC headset mic + playback hardware row PASS, 22/22 Centauri host tests, apple-build, host-tests, and pr-text green.
Evidence
- Inspected the incremental diff (
625fd0f1...00428666) acrossbtcentauri.c,btcentauri_t6050.c, and host test suites (centauri-bt-sco-tests.py,centauri-bt-arena-tests.py,centauri-scan-tests.py). - Verified TX bounds in both
btcentauri.candbtcentauri_t6050.c: ISO TX checksskb->len + 1 > cen_aux_specs[2].footerbefore writing H4 indicator byte atdescriptor[16]and copyingskb->lenbytes todescriptor + 17; SCO TX validatesskb->len == HCI_SCO_HDR_SIZE + skb->data[2]and<= cen_aux_specs[1].footer; HRBSETUP_SYNC_CONN/ACCEPT_SYNC_CONN_REQvalidate exact command length before rewrite. - Verified RX paths (
cen_receive_sco,cen_receive_iso) reject truncated/malformed frames and incrementerr_rxwithout stalling the ring. - Hardware row: J815 (
cded55efa713, identical diff, default cmdline) PASS:hci0factory BDADDR, wideband speech reported, AirPods HFP mSBC mic recording + playback working with 0 HCI timeouts; 22/22 host tests pass. - CI at
00428666:apple-build,host-tests,pr-text,KUnit ane-boot..spi-hid-applePASS; remaining KUnit jobs queued. - Merge order: merge #3458 first.
|
Merge-train status at |
|
K114s (Mac17,13, 14-inch M5 Pro, T6050) at
|
|
@RyanTheTide the K114s (T6050) smoke you asked for is in the row above: PASS at Since then this stack has also been running as the daily kernel on this K114s, and its first ordinary boot passed the same comparison. A Teams call now switches the AirPods to the headset profile and back to A2DP automatically, with WirePlumber's headset autoswitch. One side effect for the record: |
|
Merging under the 6-point rule (Ryan 09:29, permanent), at |
What: headset audio on the N1 Bluetooth. This adds SCO and LE Audio ISO rings, wideband speech, and voice setup on the HRB links the firmware reports with vendor link types, plus the factory Bluetooth address. Before this, a headset connected for A2DP only: HFP/HSP had no SCO path, the core's Enhanced Setup Synchronous Connection was rejected with status 0x11, and eSCO on HRB links failed. Both btcentauri and btcentauri_t6050 get the same changes. Stacked on #3458 (base
feat/centauri-wifi-stats625fd0f15687, needed for the shared-transport structures); this PR's own commits are the three listed under Details. This replaces the N1 test branch #3166 for this topic.Tested: J815 (MacBook Air 15" M5) with this head's code:
apple_centauriandbtcentauribuilt from the N1 tester mergecded55efa713and swapped live into the runningj815/prtest-r8(7b4bbe9) kernel (see Evidence), no centauri or Bluetooth words on the command line: PASS.hci0used the DT's factory address and reported wideband speech. AirPods worked as a headset: picked as the sound input, the mic recorded speech over mSBC (air coding "Transparent Data"), and a recording played back through the AirPods. No HCI timeouts. btcentauri host tests: SCO, arena and scan suites with their negative controls, 22/22 Centauri runs. Regression: 0 SELinux denials (SELinux not built on this image), 0 failed units, 0 N1 driver errors, 0 WARN/BUG/Oops.Risk: two-way door; every N1 board (shared transport through btcentauri, T6050 through btcentauri_t6050). Headsets that negotiated A2DP only before now also offer HFP/HSP. The voice route command after init is non-fatal: if the firmware refuses it, Bluetooth comes up as before without SCO.
Not yet: a T6050 board; LE Audio with an LC3 headset; CVSD narrowband (only mSBC was used); a J813 row; this branch tested on its own.
Details
Commits of this PR (on top of #3458):
Bluetooth: btcentauri: SCO and LE Audio, wideband speech, voice setup, and factory address: SCO rings 3/9 and LE Audio ISO rings 5/11 (H4 indicator framing), dropping a bad frame without halting the transport;HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTEDandHCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONNso the core uses Setup Synchronous Connection (0x0428);set_bdaddr(0xfc06); reset timeout diagnostics; RX cookie, lock scope and duplicate-filter fixes.Bluetooth: btcentauri: support HRB synchronous voice connections and HCI voice routing: track HRB ACL handles; translate 0x0428/0x0429 to the extended 0xfdc7/0xfdf8 forms for those handles and restore the standard opcode in Command Status; normalize the 8-bit transparent voice setting to 0x0063 for mSBC; send the voice route (rings 3/9) after init; newtools/asahi/centauri-bt-sco-tests.py, registered inrun-host-tests.py.Bluetooth: btcentauri: keep HDR packet bits clear and normalize extended SCO events: keep bits 13:10 clear in the 24-bit packet-type mask (with them set, the remote refuses eSCO with 0x20); normalize vendor link types >= 0xf0 in the 0x03/0x04/0x2c events; guard zero SCO buffer metrics;sco_mtu/sco_pktsin debugfs; the voice section ofcentauri.rst.Evidence
Tested tree:
cded55efa713= this branch + #3207, #3459, #3460 and the AWDL branch. This head differs from what was tested only in commit messages (two commits were squashed into the third one above, same tree). Modules swapped live into J8157.3.0-aurora-j815-dev(j815/prtest-r87b4bbe9), command lineconsole=tty0 user4k=on pcie_aspm=off idle=nop arm64.nowfxtplus the image's root/ESP words,apple_sep.xart_writes=0 apple_sep.provision_keybag=0(removed frommain, logged as unknown and ignored) andaurora.untested_commit=0 aurora.alphasleep=0(stop the test initramfs setting its opt-ins, so the module defaults are what run); no centauri or Bluetooth words.Level computed afterwards from that recording (7.06 s, 44.1 kHz stereo): per-second RMS -35 to -46 dBFS while talking, peaks about -15 dBFS, -90 dBFS in the silent first second. The headset run was in the same boot as the rest, with no module reload in between.