Hi PulseAudio team,
Hope you are having a good day.
I’m trying to connect my Raspberry Pi 4 and mobile phone via Bluetooth to access both media audio and phone call audio (A2DP and HFP), with the goal of streaming this audio using GStreamer.
I successfully connected my Raspberry Pi to my phone and managed to get both HFP and A2DP profiles. Running pacmd list-cards gave the following output:
index: 5
name: <bluez_card.2C_BE_EB_8B_F2_D7>
driver: <module-bluez5-device.c>
owner module: 39
properties:
device.description = "melphone"
device.string = "2C:BE:EB:8B:F2:D7"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "phone"
bluez.path = "/org/bluez/hci1/dev_2C_BE_EB_8B_F2_D7"
bluez.class = "0x5a420c"
bluez.alias = "melphone"
device.icon_name = "audio-card-bluetooth"
bluetooth.codec = "CVSD"
profiles:
a2dp_source: High Fidelity Capture (A2DP Source) (priority 20, available: unknown)
headset_audio_gateway: Headset Audio Gateway (HSP) (priority 10, available: unknown)
off: Off (priority 0, available: yes)
active profile: <headset_audio_gateway>
sinks:
bluez_sink.2C_BE_EB_8B_F2_D7.headset_audio_gateway/#5: melphone
sources:
bluez_sink.2C_BE_EB_8B_F2_D7.headset_audio_gateway.monitor/#14: Monitor of melphone
bluez_source.2C_BE_EB_8B_F2_D7.headset_audio_gateway/#15: melphone
ports:
phone-output: Phone (priority 0, latency offset 0 usec, available: unknown)
phone-input: Phone (priority 0, latency offset 0 usec, available: unknown)
To test audio streaming, I used the following GStreamer command:
gst-launch-1.0 -v pulsesrc device=bluez_source.2C_BE_EB_8B_F2_D7.headset_audio_gateway ! audioconvert ! audioresample ! wavenc ! filesink location=output.wav
However, I encountered an issue: the media doesn’t play. The Video is not paused, but playback doesn’t progress beyond 0:00.
Any guidance on resolving this would be greatly appreciated!
I am happy to provide any more info required.
Best regards,
Dhruv Menon