[XA2] Choppy audio on Android due to memory usage?
TL;DR: Uninstall unused Android apps » less background processes » more RAM available » no more choppy audio!
This is probably / somewhat likely unrelated to Bluetooth audiostream is choppy when WLAN is on as I only use my LTE data connection to witness, and because this happens with speaker and headset, too.
I have used my XA2 and XA2 Ultra devices (SFOS 3.0.3.10) for a month now, and I noticed that - using Deezer as a test case - XA2 didn't skip a single sound, but my XA2U is very, very choppy using Deezer, no matter if I use Bluetooth speaker, loudspeaker or headset as output. This got me digging the matter deeper; and I think I found something.
XA2U had a lot more Android apps installed, and because most of the apps had background services running all the time, the memory usage was more than 2.5GB constantly, even after Android support restart with no Android apps started. Swap was used up to around 300MB. I uninstalled ten-ish apps I didn't need or use anymore, and restarted Anroid support again. Now my memory usage is around 1.6GB...1.8GB and swap usage dropped to ~30MB after I stopped and restarted Android support.
Yesterday my Deezer was almost useless because the audio chopped every 2-3 seconds. After the above, I just now listened to my favourite music using my Bluetooth speaker for 50 minutes straight, and it didn't chop the audio once.
I just now realized that this is not actually a question, but rather a discovery. I hope this helps others. Discussion welcome - and your RAM findings, too. I simply started htop
and grouped by process by typing H
.
I've also noticed chopping on bluetooth earphones while using WhatsApp. Other Android apps work generally okay without chopping. I think it could also be related to this memory case, maybe WhatsApp interrupts the bluetooth in some way
Sakke ( 2019-07-02 20:59:12 +0200 )editThanks for the findings! I have created an internal bug report about the issue.
jiit ( 2019-07-03 14:39:59 +0200 )editI suspected WA also, but I have so little data about it that I didn't include any of it.
Direc ( 2019-07-04 14:58:14 +0200 )editIn 3.1 with only Spotify running and over 500MB free memory the audio stops when I navigate back and forth in spotify itself.
ixevix ( 2019-07-19 20:53:44 +0200 )edit@ixevix That really sounds like an issue in Spotify itself.
Would you like to test a thing for me? Uninstall Spotify, install Deezer and see how it behaves when you listen to music while browsing its menus? I suspect that Spotify is turning into so heavy app that it starts to kneel under its own weight...
Direc ( 2019-07-21 11:34:44 +0200 )edit