Skip to content

refactor(pulseaudio): use OpenSL ES under AID_SHELL, reuse active host socket, drop pactl fork - #395

Open
cattyopdud87-rgb wants to merge 1 commit into
ravindu644:mainfrom
cattyopdud87-rgb:pr/opensles-uid2000-audio
Open

cattyopdud87-rgb wants to merge 1 commit into
ravindu644:mainfrom
cattyopdud87-rgb:pr/opensles-uid2000-audio

Conversation

@cattyopdud87-rgb

@cattyopdud87-rgb cattyopdud87-rgb commented Nov 19, 2026 •

Copy link
Copy Markdown

On Android 15 (SM6150), spawning PulseAudio under the Termux UID ran into two issues: Termux doesn't declare RECORD_AUDIO so mic capture fails, and module-aaudio-sink can hang on a futex when backgrounded.

This cleans up src/android/pulseaudio.c (-29 lines):

  • Checks if /data/local/tmp/awl/pulse.sock is already live and symlinks it instead of spawning a second daemon.
  • When spawning PulseAudio, runs as UID 2000 (AID_SHELL, which has RECORD_AUDIO) with -n and loads module-sles-sink + module-sles-source directly.
  • Drops the extra run_pactl_set_default() fork/exec.

Tested with -Wall -Wextra -Wpedantic -Werror on aarch64.

…e unified host socket, and eliminate pactl fork
@cattyopdud87-rgb
cattyopdud87-rgb marked this pull request as ready for review November 19, 2026 09:27
@cattyopdud87-rgb cattyopdud87-rgb changed the title refactor(pulseaudio): use OpenSL ES sink+source under AID_SHELL, reuse active host socket, and drop pactl fork refactor(pulseaudio): use OpenSL ES under AID_SHELL, reuse active host socket, drop pactl fork Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants