i.MX8MP BlueZ + PulseAudio: Multiple A2DP sources stream simultaneously (audio overlap)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8MP BlueZ + PulseAudio: Multiple A2DP sources stream simultaneously (audio overlap)

820 Views
monsteera
Contributor II

Hi,
I’m working on a Bluetooth media player on i.MX8MP with Qt. I’m using BlueZ with PulseAudio. One phone(A2DP source) can connect and stream music to the board (A2DP sink) without problems. But while the first phone is playing, a second phone can also connect and start playing, and then I hear two songs mixed together.

What I notice is that when Bluetooth is running, every connected device gets its own PulseAudio Bluetooth card/profile (A2DP). So if two phones stream, PulseAudio just mixes both streams to the output.

I want only one active A2DP stream at a time (single source policy). Ideally, when a second phone starts streaming, the first one should be stopped/disconnected, or the second stream should be rejected. Is there a recommended way to enforce this with BlueZ + PulseAudio on i.MX8MP? Should this be solved with a BlueZ D-Bus policy (monitor MediaTransport state and disconnect the previous device), or is there a simpler config/module setting to prevent multiple A2DP streams?

3 Replies

725 Views
RomanVR
NXP Employee
NXP Employee

Hi @monsteera, hope you are doing well.

Could you please provide more details on your setup? The following details would be very helpful:

  • If you are using a custom board or one of our hardware solutions.
  • Which Bluetooth connectivity SoC/module are you using?

 

Best Regards!
0 Kudos
Reply

716 Views
monsteera
Contributor II
I'm using IMX8MP custom board with Quectel FGS061N (NXP IW611 chipset)
0 Kudos
Reply

670 Views
RomanVR
NXP Employee
NXP Employee

Hi @monsteera.

Thank you for sharing your setup details. Unfortunately, we do not provide any specific guide to integrate BlueZ+PulseAudio on the i.MX8MP, however it seems from different sources that there might be an issue when integrating BlueZ+PulseAudio, therefore I suggest to try to solve the issue with BlueZ APIs as you proposed.

Best Regards!
0 Kudos
Reply