Audio disconnects after seconds of silence on Xiaomi phones

Hy

I was using Oppo phone with audiorelay and it worked even after 12-24h of silence from the Pc, just played something and audio worked.

Changed phone to Xiaomi Note 15 and if audio on Pc is paused for a few seconds it doesn’t work when I play something again on Pc.

Audiorelay is still functioning on the phone, and when I come back to the app audio will start playing again.

I’ve already set the battery settings to not close this app and the seeing for Android to keep the app opened.

Tried on Xiaomi 12 lite and does the same.

Does anyone know what can I do?

Hi,

Please try the latest version from Announcements.
As far as I know, the best tips around battery optimization are on this site Xiaomi | Don’t kill my app!

Description

I was using the app normally for a long time on my Poco F5 phone until a little over a month ago when it started going silent if there was no sound from my PC for about 15 or 20 seconds. It’s as if it stops working in the background. If that happens, I have to open the app for it to work again. I don’t need to do anything else; I just have to open the app for it to continue playing the audio from my PC.

I tried the tips shared in another post with the same problem, but they didn’t work for me.

Devices

Phone:
Android 15 / HyperOs 3.0.3.0
Xiaomi Poco F5
AudioRelay 0.26.1

Laptop:
Windows 11 desktop PC
AudioRelay 0.27.5

@Popescu.oge @Frank_Rios_Palacio Could you please confirm whether it still occurs with the early access version from Announcements?

All the 3 devices mentioned in this thread are using HyperOS… If the issue is still present, I’ll try to get one to test things out.

I just tested the latest version (1.0.0-alpha07) on both my PC and my Xiaomi phone, but the issue still persists.

If I pause the audio on my PC for a few minutes and then resume it, I get no sound on the Xiaomi device. However, the moment I open the AudioRelay app on the phone—even in the fraction of a second before the UI fully loads—the sound immediately returns.

Troubleshooting already performed:

  • Set Battery Saver to “No restrictions” for AudioRelay.

  • Disabled the “Pause app activity if unused” option in Android settings

One simple solution may be to add an option in the PC/Android app to emit a “silent noise” (inaudible pilot tone) at specific intervals or continuously when the audio is paused. I tested playing a very low-volume sound through a browser on my PC while the main audio was paused. With this constant stream of data, the connection stayed active and did not cut off. As soon as I stop the background noise and leave it in total silence for a few minutes, the Xiaomi device loses the connection again.

I tried the early access version and the problem persists; I’ve tried various battery saving settings on my phone and it’s not fixed.

@here Hi, I’ve added a workaround in 1.0.0-alpha08. Would you mind testing it? It seems to work OK on a Xiaomi POCO M7.

The fix is pretty much what you’ve outlined here:

This doesn’t seem to be completely fixed, or is there a time limit?

Hi @Asapha,

Thanks for adding the workaround so quickly!

I tested it last night for a few minutes, but it seems the audio still cuts off after a few seconds.

Additionally, I’m experiencing an issue on PC: if I bring the app interface to the foreground to look at the settings, the application completely closes by itself after 10–15 seconds without any warning or error message, and I have to reopen it.

@hwf1324 @Popescu.oge First, we should verify that AudioRelay correctly enabled the workaround on your end. Go to Settings → Audio → Regularly play an inaudible tone.

If that’s the case, then maybe the cutoff is more aggressive than on my test device. The OS kills the output after 1 min of silence on my end.

On my device, there are some clues about what’s happening in the OS logs. Would you mind sending them? (Not the app’s logs as they don’t contain the OS’ messages)

  • Install ADB
    • if adb devices works, then it’s correctly setup
  • Run adb logcat > logcat.log
  • Reproduce the issue
    • Play audio on the PC
    • Play silence until you reproduce the cutoff
    • (Try to play audio from the PC to ensure that the issue happened)
  • Ctrl-C
  • Send the logcat file by private message or at [email protected]

It should be fixed in 1.0.0-alpha08+build.2, is that the version you’re using? (I updated the Windows build after I posted the initial message)