Jump to content

Playback stutter / pause-unpause on bluetooth after (re)connecting to a device


Go to solution Solved by Lesso,

Recommended Posts

Hello Poweramp forum,

I'm having a problem with Poweramp. Whenever I reconnect to bluetooth output the audio keeps stuttering which is caused by a rapid pause / unpause coming from processed commands.

 

So basically the steps to reproduce are:

- connect phone to bluetooth output (headphones, speakers, etc)

- start playing music

 

In the "Last processed commands" section this problem looks like this:

Spoiler

==================
08:26:25.314 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:26.345 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:26.984 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:27.989 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:28.621 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:29.644 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:30.282 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:31.342 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:31.984 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:33.019 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:33.653 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:34.669 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:35.305 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:36.347 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:36.983 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:37.994 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:38.630 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:39.684 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:40.321 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:41.390 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:42.023 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:43.057 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:43.689 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:44.730 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:45.367 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:46.389 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:47.025 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:48.049 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2
==================
08:26:48.686 PlayerService reloadPipeline
 allowPlaying=true forceResume=false state after reload=2

As you can see, the commands are coming in very rapidly and it results in an annoying stutter.

What I tried (without success):

  • different bluetooth headsets
  • disable / enable "Resume On Bluetooth"
  • disable / enable OpenSL ES Output
  • enable unrestricted battery usage for PA

What helps temporarly:

  • stop the playback in Poweramp and wait for about 30 seconds --> for some reason this solves the problem until the next time I disconnect + reconnect my bluetooth output

 

Here is more information:

PA build: 971-976 (happens on older builds too though)

Phone: Sony Xperia 1V

Android: 14 (kernel 5.15.94)

 

I could also imagine that there is some sort of problem with the deep integration of music playback functionality in Sony phones?

There is a preinstalled Music app (from Sony) which hosts a couple of settings. Additionally there is the (optional) Sony Headphones App which also does provide various settings.

I tried forcefully stopping the Headphones App and even completely disabling the Music app, which didn't help.

 

I would be really happy if I could get some help with this as I really like Poweramp and I really like my phone but apparently they don't work together.

Edited by Lesso
typos

As you say, there's a lot of activity after connection, either from the headset, from Android, or from Sony's installed software.

There is a feature in the latest Poweramp builds (currently 981, available from the Downloads tab above) to ignore Bluetooth remote commands for up to the first 10 seconds of a Bluetooth connection, which might be worth trying. I'm not sure if that is limited to ignoring only button-simulating events though - e.g. KEYCODE_MEDIA_PLAY_PAUSE ACTION_DOWN and KEYCODE_MEDIA_PLAY_PAUSE ACTION_UP - which are not occurring in your log.

Andre

  • Solution

Hey @andrewilley

thanks for the fast response.

I did some more investigating because I really want to make this work.

I discovered this reddit post which indicates that there are several problems on the mentioned Sony Xperia phones including bluetooth connection issues and issues with the AptX implementation.

Now it's just speculation that this is actually related but it lead me to trying out different PA output settings after installing your suggested build (981).

So as said I mainly did two things:

- install PA 981 and set "ignore last processed commands" to 10 seconds

- change output from OpenSL ES to the experimental Hi-Res Output (under Output Plugins)

and apparently now the problem is gone.

I'm pretty certain that it isn't the "ignore last processed commands" setting that did it, because I can also not see the "PlayerService reloadPipeline" command spam any more at all. It just stopped happening for some reason.

 

That being said, I don't want to assume that the problem is resolved fully after just a few minutes of being gone.

I will report back in about a week or two (or earlier if the problem reoccurs).

Let's hope for the best.

AAudio is another good Output method to try, which does support some hi-res options. But the Experimental Hi-Res mode avoids a lot of Android audio processing, so that might be what is fixing your problem.

Andre

Okay, thanks for the input. I will try out different settings.

Is there any inherent advantage of AAudio or OpenSL?

I'm asking because I don't see a reason to switch back to these if the experimental Hi-Res works for me.

So far I can also not make out any audio quality loss.

 

Edited by Lesso

Just some feedback after about a week:

I tried AAudio and OpenSL with increased buffer size but both immediately recreate the original problem.

With experimental Hi-Res it stays gone, which is why I marked my own reply as the solution.

The only downside so far is that the overall volume seems to be lower compared to other outputs.

When I set the volume to about 50% I used to consider it to be fairly loud already.

Now 50% is where I start to hear output. The overall maximum volume is lower as well, but not drastically. The volume steps are not really linear anymore. It feels like an exponential curve.

It's not a big deal though. Thanks again for all the support.

Edited by Lesso

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...