Decide: HFP/HSP headset microphone — needs eSCO in ng_hci, alt-setting fix in ng_ubt, sco hook wiring, and a from-scratch HFP daemon (XL)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- networking
Direzione di ricerca
Start with the linked epic nextbsd/nextbsd#473 and the E16 audio research in e16/5-audio.md section 2 to understand the scope decision. The issue names ng_hci_ulpi.c, ng_hci_evnt.c, ng_ubt.c, ng_btsocket_sco.c, the bluetooth rc script, and sdpd/profile.c as relevant entry points. Done means recording the scope decision and, regardless of that decision, wiring the SCO hook and reporting its status; any spike or full implementation also needs the listed sub-issues.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
E16 draft id A6 · epic nextbsd/nextbsd#473
Why
A2DP (A4) gives playback only. Using a headset's microphone needs HFP or HSP: an RFCOMM AT-command channel plus a SCO/eSCO voice link. Nothing in FreeBSD base or ports implements either profile (0 code-search hits for handsfree/HFP; sdpd has no Headset/Handsfree records — usr.sbin/bluetooth/sdpd/profile.c:51-76), and the kernel half is incomplete. Quantified against releng/15.1 sys/netgraph/bluetooth:
| piece | state | where |
|---|---|---|
| SCO over USB isochronous | works (4 isoc xfers, reassembly) | drivers/ubt/ng_ubt.c:281-282, 336-378, 1290-1366; sysctl net.bluetooth.usb_isoc_enable |
| isoc alt-setting selection | picks the largest wMaxPacketSize alt (:738-780) instead of the alt that matches SCO bandwidth (BT-USB spec: alt 1 = one CVSD link ...) — frame-size mismatch on many dongles |
ng_ubt.c |
| HCI SCO setup | legacy Add_SCO_Connection only, HV1/HV2/HV3 CVSD (ng_hci_ulpi.c:322-450); no Setup_Synchronous_Connection -> no eSCO, no mSBC wideband, no transparent air mode |
hci/ |
| HCI sync events | Synchronous_Connection_Complete (0x2C) / _Changed (0x2D) absent from the event switch (ng_hci_evnt.c:107-200); headset-initiated eSCO is an unhandled event |
hci/ |
| SCO socket | exists: PF_BLUETOOTH/SOCK_SEQPACKET/BLUETOOTH_PROTO_SCO, SO_SCO_MTU, listen/accept/connect |
socket/ng_btsocket_sco.c |
| stack wiring | stock rc.d/bluetooth:119-127 never connects hci: sco to btsock_sco:; routes only appear on NGM_HCI_NODE_UP over a connected hook (ng_btsocket_sco.c:821-856) |
bring-up script / bluetoothd |
| RFCOMM | exists | socket/ng_btsocket_rfcomm.c |
| HFP AG state machine, SCO<->OSS bridge, SDP records | do not exist anywhere | — |
Prior art: NetBSD sys/dev/bluetooth/btsco.c (Itronix, BSD-2-Clause) — a kernel audio device on a SCO PCB; design reference only, different stack API.
What shipping it would take
- Kernel (this repo, as
patches/):Setup_Synchronous_Connection+ the two sync events inng_hci; alt-setting selection by requested SCO packet size inng_ubt; expose eSCO parameters throughSO_SCO_*sockopts. Hardware-verified only — the netgraph BT stack has no tests. - bluetoothd (K/D tracks):
ngctl connect ${dev}hci: btsock_sco: sco ${dev}scoat stack bring-up so SCO sockets are routable at all (cheap; do it regardless, it unblocks experiments). - New userland: an HFP AG (
AT+BRSF,+CIND,+CMER,AT+VGS/VGM,AT+BCC/+BCScodec select, ring/answer/hangup) over RFCOMM, SDPHANDSFREE_AUDIO_GATEWAY(0x111F) record (extendsdpdor bluetoothd-owned SDP), and an SCO<->cuse bridge (8 kHz mono CVSD, 48-byte frames / 3.75 ms) surfacing as/dev/dsp.hfpforvirtual_oss.
Result even then: telephone-grade narrowband until eSCO/mSBC lands. Estimate XL.
The question
Is narrowband headset mic in scope for E16 at all, or does E16 ship A2DP-only and file HFP as its own epic (or park until LE Audio forces a BLE-side stack anyway)? Options:
- Park (recommended): A2DP-only for E16; keep step 2 (sco hook) so the socket path is testable; file the rest as a follow-up epic.
- Kernel-first spike: land step 1 + 2 and prove
hccontrol+SCO socket can carry CVSD both ways with one dongle before committing to the daemon. - Full: all three, XL.
Acceptance criteria
- Decision recorded on the epic (A2DP-only vs. spike vs. full) and this issue re-labelled/re-sized accordingly
- Regardless of decision: bluetoothd's stack bring-up connects the
scohook (ngctl listshowsubt0sco), andbluetooth statusreports whether the adapter's SCO path is wired - If spike/full: sub-issues filed for (1) ng_hci eSCO, (2) ng_ubt alt-setting, (3) HFP daemon + bridge
Links
- Epic nextbsd/nextbsd#473 · A4
sys/netgraph/bluetooth/{drivers/ubt/ng_ubt.c,hci/ng_hci_ulpi.c,hci/ng_hci_evnt.c,socket/ng_btsocket_sco.c},libexec/rc/rc.d/bluetooth,usr.sbin/bluetooth/sdpd/profile.c(releng/15.1); NetBSDsys/dev/bluetooth/btsco.c- Research:
e16/5-audio.mdsection 2
Dependencies (E16)
- Depends on: nextbsd/nextbsd-kernel#231 (K1), nextbsd/nextbsd-userland#218 (A4)
- Blocks: nothing
Draft ids (K = kernel & hardware, B = engine/BLE, D = bluetoothd/CLI, H = HID, A = audio) are listed with their issue numbers in nextbsd/nextbsd#473.
- Lingua principale
- C
- Stelle
- 12
- Fork
- 3
- Merge medio
- 2h 5m
- PR unite (30g)
- 77
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nextbsd/nextbsd-kernel
-
area:bluetooth area:desktop bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
nextbsd/nextbsd-kernel#236 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area:vm bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
nextbsd/nextbsd-kernel#226 ·
I maintainer di solito rispondono entro 1 giorno
-
area:storage needs-audit status:parked
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
nextbsd/nextbsd-kernel#364 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
nextbsd/nextbsd-kernel#361 ·
I maintainer di solito rispondono entro 1 giorno
-
compat/mach: Mach VM calls on another task (mach_vm_read/write/region) for debuggers and toolsApertaarea:mach area:research enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
nextbsd/nextbsd-kernel#304 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nextbsd/nextbsd-kernel
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
libsdl-org/SDL#16607 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
PowerShell/Win32-OpenSSH#2482 · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
zephyrproject-rtos/zephyr#123881 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno