Re: Bluetooth phonecall is not working with pipewire

Ehsan Takalloo

Thanks, I'll check it out. 

On Tue, Jul 6, 2021 at 3:23 PM George Kiagiadakis <george.kiagiadakis@...> wrote:
Hello Ehsan,

PipeWire's HSP/HFP bluetooth integration is currently tuned to transmit
audio over the HCI channel and encode/decode the audio in software. The
bluez_input and bluez_output nodes that you see in wpctl are basically
portals to that functionality.

I have not previously worked with i2s bluetooth modules, but my
understanding of them is that they provide a side-channel, in parallel
to the HCI channel, where you can stream raw audio and it gets
encoded/decoded in hardware. This side-channel is exposed via ALSA, so
you can see individual nodes in wpctl for that.

I believe to make this work, WirePlumber needs to be instructed to link
your speakers and microphone directly to the bluetooth alsa device
instead of linking them to the bluez_input/bluez_output nodes, which are
using the HCI channel.

Before making any changes to the code, you can try this manually. When
you make a call and you see the streams that you have pasted below, use
the pw-link tool to create links between:

* the bt i2c input node and "Communication Playback Endpoint"
* the "tlv320aic3106" (which must be the microphone input?) to the bt
i2c output node

(and forget about bluez_input / bluez_output)

If this works, then all you need to do is to write a wireplumber lua
script to integrate this logic into wireplumber.

Best regards,

On 05/07/2021 16:55, Ehsan Takalloo wrote:
> Hello Everyone,
> Hi Goerge,
> I was testing pipewire and wireplumber with bluetooth and I played some
> music using pipewire and bluetooth successfully.
> However, for testing phone calls, I faced some issues. Since my bt
> module has I2S, I have to use pipewire for receiving phonecall audio and
> play it. Also, it is required to stream Microphone output to bt I2S.
> During phone call, phone call event was detected and "wpctl status"
> shows following streams:
> Streams:
> 113. bluez_input.XX_XX_XX_XX_XX_XX.headset-audio-gateway
>          117. output_MONO     > Communication Playback Endpoint:playback_FR
> 114. bluez_output.XX_XX_XX_XX_XX_XX.headset-audio-gateway
>          116. input_MONO      < tlv320aic3106:capture_1
> But bluez_input/output.XX_XX_XX_XX_XX_XX.headset-audio-gateway are not
> connected to my bt chip. I added bt I2S as a sound card and its source
> and sink are visible in "wpctl status" sources and sinks. My question
> is, how to introduce bt I2S as hfpSound card and who is responsible for
> it (pipewire, wireplumber or ...)?
> Best Regards
> E.Takalloo

Join to automatically receive all group messages.