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)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c
- 領域
- networking
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C
- スター
- 12
- フォーク
- 3
- 平均マージ
- 2時間 4分
- マージ済み PR(30日)
- 79
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextbsd/nextbsd-kernel のほかの issue
-
area:bluetooth area:desktop bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
nextbsd/nextbsd-kernel#236 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area:vm bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
nextbsd/nextbsd-kernel#226 ·
メンテナーはふだん 1 日以内に返信
-
area:storage needs-audit status:parked
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
nextbsd/nextbsd-kernel#364 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
nextbsd/nextbsd-kernel#361 ·
メンテナーはふだん 1 日以内に返信
-
area:mach area:research enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
nextbsd/nextbsd-kernel#304 ·
メンテナーはふだん 1 日以内に返信
nextbsd/nextbsd-kernel の issue をすべて見る
似ている issue
-
vim.filetype.match() prefixes a URL buffer name with the cwd before passing it to filetype functionsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
stream_curl: retry_count never resets after a successful reconnect, so long sequential streams die after 5 drops対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
mpv-player/mpv#18728 ·
メンテナーはふだん 1 日以内に返信
-
followup Prio 📌
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cyrusimap/cyrus-imapd#6640 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
メンテナーはふだん 1 日以内に返信