termux / x11-packages

A set of packages using X11 Windows System.
Other
547 stars 145 forks source link

No sound in SDL-supported package on Arm #175

Closed IntyLab closed 4 years ago

IntyLab commented 4 years ago

Over the weekend, I ran my build of jzintv on my tablet. There was no sound, and when I pressed the device volume keys, the "system volume" slider appeared instead of the "media volume" which indicates that nothing was producing sound. jzintv whistles a lot in the terminal window at launch, especially with my configuration, and so I looked to see if there was a pulseaudio issue. There were no sound errors at all; just the normal "requested" and "got" output for an audio thread.

The sound was last known to be working fine three weeks ago. Since then, I believe there was a pkg upgrade for pulseaudio. Sound is working fine on my phone, which uses aarch64.

termux-info:

Packages CPU architecture: arm Subscribed repositories:

sources.list

deb https://termux.net stable main

sources.list.d/pointless.list

deb https://its-pointless.github.io/files/ termux extras

science-repo (sources.list.d/science.list)

deb https://dl.bintray.com/grimler/science-packages-21 science stable

game-repo (sources.list.d/game.list)

deb https://dl.bintray.com/grimler/game-packages-21 games stable

x11-repo (sources.list.d/x11.list)

deb https://dl.bintray.com/xeffyr/x11-packages-21 x11 main Updatable packages: All packages up to date Android version: 5.0.1 Kernel build information: Linux localhost 3.10.49-ga5dcd91-00038-g982d285 #1 SMP PREEMPT Thu Mar 9 12:47:14 KST 2017 armv7l Android Device manufacturer: LGE Device model: LGLK430

ghost commented 4 years ago
  1. Is pulseaudio working at all for you ?

  2. Is sound support was before update ?

ghost commented 4 years ago

I'll rebuild the SDL packages.

IntyLab commented 4 years ago

I don't know whether pulseaudio is working, because the only other SDL package I have installed right now is a game that never had sound.

The sound was working before on my tablet.

I installed the updated SDL package, but that didn't change anything. I think it was the pulseaudio package that was updated recently.

If it helps, these are the two lines from jzintv at launch:

snd: Requested 1 chan @ 11025Hz, Signed 16-bit (native), bufsize 2048 snd: Got 1 chan @ 11025Hz, Signed 16-bit (native), bufsize 1024

A year ago, when I couldn't get sound at all, the "snd" lines were reporting either no audio device, or couldn't create audio thread.

ghost commented 4 years ago

Can you run jzintv under strace, e.g.

strace -s 2000 -fv -o jzintv-strace.log jzintv

then attach the generated log file ?

IntyLab commented 4 years ago

Okay. It's available here: https://drive.google.com/file/d/1WxpVV9YbAgIhu-FLc6ri7Xd8YQTLOae7/view?usp=drivesdk Thanks again for your help on this.

ghost commented 4 years ago

You have

4497  writev(6, [{iov_base="\6", iov_len=1}, {iov_base="syslog\0", iov_len=7}, {iov_base="/data/data/com.termux/files/usr/libexec/pulseaudio - [pulseaudio] module.c: Failed to open module \"module-sles-sink\".\0", iov_len=118}], 3) = 126

Pulseaudio seems to be broken on your device and it just discards audio output.

ghost commented 4 years ago

Issue is now tracked in https://github.com/termux/termux-packages/issues/4594.

ghost commented 4 years ago

Try to execute pulseaudio in a separate session before running jzintv.

IntyLab commented 4 years ago

Funny. That did the trick. I created a pulseaudio daemon with "pulseaudio -D" before using my Run script to launch jzintv, and then afterwards killed it with "pulseaudio --kill". Now I'm getting sound again.

That's strange because I was only able to get sound before by NOT doing that. In the past, SDL would fail to start a pulseaudio daemon because there was already one running.

Also, I had to uninstall and reinstall Xserver XSDL yesterday. A recent update made it able to be moved to External Storage, but when I did, it would give me a message about failing to launch the X server. Simply moving it back to Internal Storage didn't work.

Again, thanks for all your help.