addpkg(main/oboe) + enhance(main/openal-soft, main/pulseaudio): Oboe audio stack#29319
addpkg(main/oboe) + enhance(main/openal-soft, main/pulseaudio): Oboe audio stack#29319ferrumclaudepilgrim wants to merge 3 commits into
Conversation
06d6508 to
13792dc
Compare
robertkirkman
left a comment
There was a problem hiding this comment.
This works for me and it fixes the problem with openal-soft on certain devices.
Add Oboe 1.10.0, Google's C++ library for high-performance audio on Android. Builds shared library only (no static archive). Includes hand-written pkg-config and CMake config files since upstream does not provide them. Suggested by @twaik in termux#28861 as a replacement for the PulseAudio SLES backend to resolve vendor-specific linking failures on newer Android devices. Also discussed in termux#29074.
Add oboe to TERMUX_PKG_DEPENDS and enable -DALSOFT_REQUIRE_OBOE=ON. Upstream already has the Oboe backend (alc/backends/oboe.cpp) which picks up the oboe package via find_package(oboe CONFIG). Tested on S26 Ultra (Android 16) and Pixel 10 Pro (Android 17 Beta). Oboe backend works on both. OpenSL ES backend fails on both with "undefined symbol: swift_demangle" (the same dlopen issue from termux#23149 and kcat/openal-soft#1111). Closes termux#29318
13792dc to
ed2d72f
Compare
Add module-oboe-sink and module-oboe-source using Google's Oboe library. Oboe handles audio backend selection and vendor quirks internally, addressing vendor-specific SLES breakage affecting Xiaomi, OnePlus, Samsung, and Redmi devices (termux#28861, termux#27978, termux#27367). Cross-device verified: Samsung S26 Ultra (Android 16 / API 36) and Pixel 10 Pro (Android 17 Beta / API 37). Both modules load, record, play, suspend/resume, and unload cleanly with multi-cycle stress. Add module-oboe-sink and module-oboe-source as commented-out options in default.pa. SLES remains the active default. Users experiencing SLES breakage can uncomment the Oboe modules. Suggested by twaik in termux#28861 and termux#29074.
|
Landed commit 3 per @robertkirkman's invite on #29074. PR title and body Evidence for commit 3:
SLES remains the active default; Oboe modules are commented-out options in |
|
When Termux is running in the background, plugging in or unplugging headphones causes pulseaudio to freeze. |
|
Sorry for the delay, I've been moving and it's been... fun. @shiumano thanks for surfacing this. I dug into it pretty heavily. I was able to reproduce the issue in question using BT headphones as that is all I have currently. While definitely a thing it predates this PR based on my research. It is in I reproduced it on my S26 Ultra by playing a 5 minute sine wave, backgrounding Termux, then disconnecting my headphones. PA went into deadlock almost immediately. The new Oboe modules in this PR inherit the same pattern, character for character. So the bug shape is shared across multiple modules. I see a fix: replace the direct suspend with |
Summary
Adds Oboe 1.10.0 as a new package and wires
it into openal-soft and pulseaudio.
Oboe is Google's C++ library for high-performance audio on Android, wrapping
AAudio (API 26+) and OpenSL ES with automatic fallback.
Commit 1: addpkg(main/oboe)
provide install(EXPORT) or .pc templates)
Tested on 2 devices:
linking stress, all PASS
Commit 2: enhance(main/openal-soft)
Three changes to
packages/openal-soft/build.sh:TERMUX_PKG_REVISION=1oboeadded toTERMUX_PKG_DEPENDS-DALSOFT_REQUIRE_OBOE=ONinTERMUX_PKG_EXTRA_CONFIGURE_ARGSUpstream's existing Oboe backend (alc/backends/oboe.cpp) compiles in via
find_package(oboe CONFIG). No patches needed.
A/B comparison on both devices:
undefined symbol: swift_demangle(the samedlopen issue from fix(main/openal-soft): disable dlopen() of opensles for luanti #23149 and ALSOFT_DLOPEN=ON ALSOFT_REQUIRE_OPENSL=ON builds not working at runtime inside Termux on random Android devices kcat/openal-soft#1111)
Commit 3: enhance(main/pulseaudio)
Adds
module-oboe-sinkandmodule-oboe-source.TERMUX_PKG_REVISIONbumped from 1 to 2.
Tested on Samsung S26 Ultra (Android 16) and Google Pixel 10 Pro (Android 17
Beta). Multi-arch build clean across aarch64, arm, i686, x86_64.
Relates to #28861, #27978, #27367, #26871.