Fix A2DP Bluetooth audio routing, stream migration, hotplug monitoring, and q6voice teardown

This commit is contained in:
Luxferre committed 2026-11-04 15:42:58 +02:00
1 parent b2ade2dc42
commit b8dea31b59
34 files changed
+533 -155

No files matched your search

+3 -3
View File
@@ -22,10 +22,10 @@ Release versions follow the `<year-letter><MM><DD>` format (where `2026` is `a`,
- **SIP VoIP (`sip.so` / `xsip`) and IRCv3 (`irc.so` / `xirc`) upgrades**:
- Upgraded **SIP (`sip.so` / `xsip`)** with direct accountless P2P/federated SIP URI calling (`user@host[:port]` or `sip:user@host[:port]`), alphanumeric username/password multi-tap entry, RFC 3263 DNS `SRV` (`_sip._udp.<domain>`) proxy discovery, RFC 3261 Timer A `INVITE` retransmission with multi-`A` proxy failover, `Record-Route`/`Contact` dialog routing, RFC 6189 **ZRTP** media-path key agreement (`DH3k` 3072-bit / `DH2k` 2048-bit Diffie-Hellman, `H0..H3` SHA-256 hash chain, Castagnoli CRC-32C framing, `a=zrtp-hash` SDP signaling, and 4-character Base32 `SAS` verification code) with RFC 3711 **SRTP** (`AES-128-CM` + `HMAC-SHA1-80`/`32`) encrypted voice media, incoming and active `[SIP/<codec>]` / `[SIP/<codec>:<sas>]` call badges in `xcallscreen`, wideband and narrowband multi-codec RTP/SRTP audio (`G.711 PCMU`/`PCMA` 8 kHz via PJSIP `pjmedia`, `GSM 06.10` Full Rate 8 kHz, `Opus` 16 kHz / 48 kHz RTP clock with in-band FEC, `ITU-T G.722` 16 kHz wideband SB-ADPCM via PJSIP `pjmedia-codec/g722`, `ITU-T G.726-32` 8 kHz ADPCM, `IMA ADPCM DVI4` 8/16 kHz, and `L16` uncompressed 16-bit PCM 8/16 kHz) with per-account and direct-mode codec preference selection, and seamless early-media (`183 Session Progress` -> `200 OK`) `arecord`/`aplay` stream continuity.
- Upgraded **IRC (`irc.so` / `xirc`)** with `1:Chat` default tab ordering, `433` nick-in-use fallback, `470` channel forwarding tracking, `/close` and `/clear` commands, targeted buffer closing (`Menu -> Close Buffer` or `BackSpace` in `Buffers`), and notification hook integration in `BG Mode`.
- **Bluetooth audio (`A2DP`, `HSP/HFP`), HID peripherals (keyboards, mice, gamepads), discoverability & alias settings, and active connection badges (`xnetworks`, `bananarchy-bt-obex`, `sxmo_audio.sh`, `dwm`, `libneoui.so`)**:
- Configured BlueZ (`/etc/bluetooth/main.conf`, `/etc/bluetooth/input.conf`), WirePlumber (`50-bluetooth.conf` with `bluetooth.autoswitch-to-headset-profile = false`, `bluetooth.use-persistent-storage = false`, and `bluez5.enable-msbc = false`), and the `6.12.1-msm8916` QDSP6/ASoC/SMD kernel stack (`0005-msm8909-qdsp6-bt-sco-support.patch` adding `INTERNAL_BT_SCO_RX` `0x3000` / `INTERNAL_BT_SCO_TX` `0x3001` `dai@136`/`dai@137` AFE ports, `AFE_PARAM_ID_INTERNAL_BT_FM_CONFIG`, dynamic mid-call `q6voice` CVP port switching, codec-less DPCM backend links in `snd-soc-qcom-common.ko.zst` / `snd-soc-apq8016-sbc.ko.zst`, and `HCI_SCODATA_PKT` handling in `btqcomsmd.ko.zst`) with full **A2DP** (`a2dp_sink`, `a2dp_source` with `sbc_xq`, `aac`, `ldac`, `aptx`, `aptx_hd`), **HSP/HFP** (`hsp_hs`, `hsp_ag`, `hfp_hf`, `hfp_ag` 8 kHz CVSD over hardware LPASS `INT_BT_SCO_RX`/`INT_BT_SCO_TX` with automatic PipeWire SCO socket keepalive), and **HID / BLE HOGP** (`uhid`, `hidp`, `uinput`, `rfcomm`, `bnep`, `xpad`) profile support, and added `Bluetooth` as a selectable audio output/input route in `sxmo_audio.sh`, `sxmo_modemaudio.sh`, `xcallscreen` (`[3] Audio Out`), `xdrawer`, and `dmenu` Audio menu (plus automatic PipeWire `"default"` ALSA routing in `gambatte` and `remedy` when Bluetooth audio is active).
- **Bluetooth audio (`A2DP`, `HSP/HFP`), HID peripherals (keyboards, mice, gamepads), discoverability & alias settings, and active connection badges (`xnetworks`, `bananarchy-bt-obex`, `sxmo_audio.sh`, `sxmo_soundmonitor.sh`, `dwm`, `libneoui.so`)**:
- Configured BlueZ (`/etc/bluetooth/main.conf`, `/etc/bluetooth/input.conf`), WirePlumber (`50-bluetooth.conf` with `bluetooth.autoswitch-to-headset-profile = false`, `bluetooth.use-persistent-storage = false`, and `bluez5.enable-msbc = false`), and the `6.12.1-msm8916` QDSP6/ASoC/SMD kernel stack (`0005-msm8909-qdsp6-bt-sco-support.patch` adding `INTERNAL_BT_SCO_RX` `0x3000` / `INTERNAL_BT_SCO_TX` `0x3001` `dai@136`/`dai@137` AFE ports, `AFE_PARAM_ID_INTERNAL_BT_FM_CONFIG`, dynamic mid-call `q6voice` CVP port switching with idempotent `q6voice_path_stop` / `q6voice_path_start` null-session guards, codec-less DPCM backend links in `snd-soc-qcom-common.ko.zst` / `snd-soc-apq8016-sbc.ko.zst`, and `HCI_SCODATA_PKT` handling in `btqcomsmd.ko.zst`) with full **A2DP** (`a2dp_sink`, `a2dp_source` with `sbc_xq`, `aac`, `ldac`, `aptx`, `aptx_hd`), **HSP/HFP** (`hsp_hs`, `hsp_ag`, `hfp_hf`, `hfp_ag` 8 kHz CVSD over hardware LPASS `INT_BT_SCO_RX`/`INT_BT_SCO_TX` with automatic PipeWire SCO socket keepalive), and **HID / BLE HOGP** (`uhid`, `hidp`, `uinput`, `rfcomm`, `bnep`, `xpad`) profile support, and added `Bluetooth` as a selectable and hotplug-monitored audio output/input route in `sxmo_audio.sh`, `sxmo_soundmonitor.sh`, `sxmo_modemaudio.sh`, `sxmo_hook_ring.sh`, `xcallscreen` (`[3] Audio Out`), `xdrawer`, `xmusic`, `xringtones`, `xfiles`, `webarchy`, `gambatte`, `remedy`, and `dmenu` Audio menu (with automatic `pactl move-sink-input` stream migration, non-blocking post-ACL AVDTP sink readiness polling, and `SPK DAC Switch` muting when routing to Bluetooth or Headphones).
- Added **Discoverable** (`ON (Visible)` / `OFF (Hidden)`, persisted in `~/.config/sxmo/bt_discoverable`) and **Bluetooth Device Name** (`Name: <Alias> [Edit]` with a multi-tap modal editor persisted in `~/.config/sxmo/bt_name` and applied via `bluetoothctl system-alias` independently of the system hostname) rows to the `3:Bluetooth` tab of `xnetworks`, alongside active connection count headers (`Bluetooth: ON (N Active)`), pinned active device cards with live profile and battery badges (`[ACTIVE: A2DP]`, `[ACTIVE: HSP/HFP]`, `[ACTIVE: HID Gamepad]`, `[ACTIVE: HID Keyboard]`, `[ACTIVE: HID Mouse]`), and a **Switch Audio (A2DP / HSP-HFP)** action.
- Added a persistent BlueZ `NoInputNoOutput` default pairing/authorization agent (`/org/bananarchy/bt_agent`) and D-Bus `connect`/`pair` handler inside `/usr/bin/bananarchy-bt-obex` (with a 15-second discovery scan window) for seamless BLE HOGP (`00001812`) and Classic HID (`00001124`) keyboard/mouse/gamepad SMP/SSP Just-Works bonding and auto-reconnection, an automatic `/dev/uinput` gamepad-to-keypad bridge (`Bananarchy BT Gamepad Bridge`, excluding QWERTY keyboards) so Bluetooth/USB gamepads (`D-Pad` / `Left Stick` -> `Up`/`Down`/`Left`/`Right`, `South/A` -> `Enter`, `East/B` -> `8`, `West/X` -> `5`, `North/Y` -> `6`, `Start` -> `2`, `Select` -> `3`, `L1`/`R1` -> `Left`/`Right softkey`, `L2`/`R2` -> `*`/`0`, `Mode` -> `Escape`) control all NeoUI apps and games (`snake`, `tetris`, `scoundrel`, `gambatte`, `remedy`) out of the box, automatic `[KBD]` external keyboard detection (`isExternalKeyboardActive()`) in `fcitx5-t9`, `libneoui.so`, and DWM plugins so connecting a Bluetooth/USB QWERTY keyboard automatically bypasses T9 multi-tap and preedit popups for all keys (`0-9`, `*`, `#`, `Shift+0-9`, and letters), and automatic `XFixes` cursor display in `dwm` (`dwm_has_external_mouse()`) whenever a Bluetooth/USB mouse is connected.
- Added a persistent BlueZ `NoInputNoOutput` default pairing/authorization agent (`/org/bananarchy/bt_agent`) and D-Bus `connect`/`pair` handler inside `/usr/bin/bananarchy-bt-obex` (skipping redundant pre-connect inquiry scans for known BlueZ devices and automatically recovering from stale `[LinkKey]` `br-connection-key-missing` errors) for seamless BLE HOGP (`00001812`), Classic HID (`00001124`), and A2DP/HFP bonding and reconnection, an automatic `/dev/uinput` gamepad-to-keypad bridge (`Bananarchy BT Gamepad Bridge`, excluding QWERTY keyboards) so Bluetooth/USB gamepads (`D-Pad` / `Left Stick` -> `Up`/`Down`/`Left`/`Right`, `South/A` -> `Enter`, `East/B` -> `8`, `West/X` -> `5`, `North/Y` -> `6`, `Start` -> `2`, `Select` -> `3`, `L1`/`R1` -> `Left`/`Right softkey`, `L2`/`R2` -> `*`/`0`, `Mode` -> `Escape`) control all NeoUI apps and games (`snake`, `tetris`, `scoundrel`, `gambatte`, `remedy`) out of the box, automatic `[KBD]` external keyboard detection (`isExternalKeyboardActive()`) in `fcitx5-t9`, `libneoui.so`, and DWM plugins so connecting a Bluetooth/USB QWERTY keyboard automatically bypasses T9 multi-tap and preedit popups for all keys (`0-9`, `*`, `#`, `Shift+0-9`, and letters), and automatic `XFixes` cursor display in `dwm` (`dwm_has_external_mouse()`) whenever a Bluetooth/USB mouse is connected.
- **Universal Power button (`dmenu power`) access, lockscreen X11 grab preemption, ReMEdy `Call (green)` pause menu, JSR expansion, and 64 MB mark-and-sweep GC**:
- Updated `dwm`, `dmenu`, `xdrawer`, `libneoui.so`, `sxmo_multikey.sh`, all standalone Xlib DWM plugins, and standalone games (`scoundrel`, `gambatte`, `remedy`) so pressing **End / Power (red)** (`XF86PowerOff`, keycode `124`) from any active window or menu immediately opens (or toggles) the system **Power menu (`dmenu power`)** while mapped **Call (green)** (`XF86Phone` / `XF86PickupPhone`) and `500 ms` **Right softkey** hold in `remedy` open the **ReMEdy Pause Menu**.
- Updated `locker.so` (`xlocker`) and `dwm` to preempt active X11 keyboard grabs and window stacking over any running fullscreen application or game (`webarchy`, `remedy`, `gambatte`, `scoundrel`, `snake`, `tetris`, and all NeoUI plugins) when the screen locks, cleanly restoring the previously focused application upon unlock.