I am new to PulseAudio. As per my requirement, I need my audio output to be routed to either connected speaker, Bluetooth speaker, or both.
I am able to play the media file on speaker, or Bluetooth headset individually, however, I am not able to play on both.
I tried combining the two sinks, however, it always throws me the error:
Failure: Module initialization failed
Here's is the code snippet:
root@raspberrypi3:~# pactl list short sinks
1 palerts module-null-sink.c s16le 2ch 44100Hz SUSPENDED
2 pfeedback module-null-sink.c s16le 2ch 44100Hz SUSPENDED
3 pringtones module-null-sink.c s16le 2ch 44100Hz SUSPENDED
4 pmedia module-null-sink.c s16le 2ch 44100Hz SUSPENDED
5 pdefaultapp module-null-sink.c s16le 2ch 44100Hz SUSPENDED
6 peffects module-null-sink.c s16le 2ch 44100Hz SUSPENDED
7 pvoicerecognition module-null-sink.c s16le 2ch 44100Hz SUSPENDED
8 ptts module-null-sink.c s16le 2ch 44100Hz SUSPENDED
9 pndk module-null-sink.c s16le 2ch 44100Hz SUSPENDED
11 alsa_output.0.analog-stereo module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
13 bluez_sink.FC_58_FA_F3_07_6F module-bluez5-device.c s16le 2ch 44100Hz SUSPENDED
For music playback:
root@raspberrypi3:~# paplay abc.wav -d alsa_output.0.analog-stereo
root@raspberrypi3:~# paplay abc.wav -d bluez_sink.FC_58_FA_F3_07_6F
Both work as per expectation.
However the problem is with the following statement:
root@raspberrypi3:~# pactl load-module module-combine-sink sink-name=combine sink_properties=device.description=Combined slaves=alsa_output
.0.analog-stereo,bluez_sink.FC_58_FA_F3_07_6F
Failure: Module initialization failed
I tried cleaning ~/.pulse directory, Commenting module-suspend-on-idle, but nothing seems to be of any help. Any pointers will be of great help.