audio: the APK build compiles the AAudio sink into the bundle; the committed bundle carries no sink module any more

The inherited module is gone from app/src/main/assets/pulseaudio.tzst (74 → 73 modules); CI adds
the app's own at build time and refuses a bundle that already has one. BUNDLE_STAMP bumped so an
installed app re-unpacks.
This commit is contained in:
The412Banner committed 2026-09-23 09:12:15 -04:00
1 parent 74b9ea9f89
commit cb99269a6d
3 files changed
+33 -3

No files matched your search

+30
View File
@@ -199,6 +199,36 @@ jobs:
install -Dm644 tools/linuxfs/desktop/firefox-steamdeck.js "$D/usr/lib/firefox/defaults/pref/steamdeck.js"
ls -lR "$D"
# The daemon's AAudio sink (tools/aaudio-sink), compiled here against upstream PulseAudio 13
# headers and the app's own libpulse*, then put into the audio bundle the apk carries. The
# committed bundle holds every other module and no sink, so a build without this step would
# have no audio - the unpack check in PulseAudioComponent would then fail loudly, not quietly.
- name: Cache PulseAudio 13.0 source
id: pa-src
uses: actions/cache@v4
with:
path: pa13
key: pulseaudio-src-13.0
- name: Fetch PulseAudio 13.0 source
if: steps.pa-src.outputs.cache-hit != 'true'
run: |
set -euo pipefail
curl -fsSL -o pa.tar.gz https://github.com/pulseaudio/pulseaudio/archive/refs/tags/v13.0.tar.gz
mkdir -p pa13 && tar -xzf pa.tar.gz -C pa13 --strip-components=1 && rm pa.tar.gz
- name: Build the AAudio sink into the audio bundle
run: |
set -euo pipefail
export NDK="${ANDROID_NDK_LATEST_HOME:-${ANDROID_NDK_HOME:-$ANDROID_NDK_ROOT}}"
tools/aaudio-sink/build.sh "$PWD/pa13" "$PWD/module-aaudio-sink.so"
rm -rf pa-bundle && mkdir -p pa-bundle
tar --use-compress-program=unzstd -xf app/src/main/assets/pulseaudio.tzst -C pa-bundle
test ! -f pa-bundle/modules/arm64/module-aaudio-sink.so
install -m755 module-aaudio-sink.so pa-bundle/modules/arm64/module-aaudio-sink.so
(cd pa-bundle && tar --use-compress-program='zstd -19' -cf ../pulseaudio.tzst .)
mv pulseaudio.tzst app/src/main/assets/pulseaudio.tzst
tar --use-compress-program=unzstd -tf app/src/main/assets/pulseaudio.tzst | grep -c '\.so$'
rm -rf pa-bundle module-aaudio-sink.so
# Runs whether the preloads were built or restored: readelf reads any ELF whatever the host,
# so these assertions cost nothing and need no cross toolchain.
- name: Check the preloads
Binary file not shown.
@@ -31,7 +31,7 @@ public class PulseAudioComponent extends SessionPart {
/** Where the guest reaches the daemon; the session exports PULSE_SERVER=unix:<this>. */
public static final String SOCKET_NAME = "PS0";
/** Identifies the bundled pulseaudio.tzst; a change here re-unpacks it over what a device has. */
private static final String BUNDLE_STAMP = "2026-09-21-pa13-pipe-modules";
private static final String BUNDLE_STAMP = "2026-09-23-pa13-aaudio-sink-r2";
private final File workingDir;
/** Where the daemon's own output is kept for this session, or null for logcat only. */
@@ -72,8 +72,8 @@ public class PulseAudioComponent extends SessionPart {
workingDir.mkdirs();
FileUtils.chmod(workingDir, 0771);
}
// The loadable modules (module-aaudio-sink, the native protocol, the pipe modules) ride in
// the apk; the daemon and its libraries come from the native library directory, the one
// The loadable modules (module-aaudio-sink - the app's own, from tools/aaudio-sink - the
// native protocol, the pipe modules) ride in the apk; the daemon and its libraries come from the native library directory, the one
// place an app may execute a file from. The bundle is unpacked once per BUNDLE_STAMP, not
// once ever: an installed app kept the modules it unpacked on its first run, so a bundle
// fixed in a later build never reached the device - which is how a 17.0 glibc build of