Bluetooth HFP switching Error

Hi,
I am currently working on Orin NX with a BT (UART) module on Jetpack 6 (R36.3). I am trying to play audio with the Bluetooth headset. I came across the link and applied the same which solved to connectivity issue. However i want the headset to work with HFP by default, but it is always getting connected to A2DP (which has poor audio quality and latency as well). Also, I am not able to change the profile to HFP in sound settings as well.

I am using Sample rootfs for the Jetpack 6 (R36.3) ubuntu 22.04 LTS. Please Let me know how to fix this.

Hi,
Please also apply this and see if it helps this use-case:

Jetson/L4T/r36.3.x patches - eLinux.org
Enable BT function of receiving files

1 Like

Hi DaneLLL,

Thanks for the reply.

I do already came across that patch you shared, the issue is with the patch applied already. Looking forward for anyother possiblities.

Thanks,
Jai.

Hi,
Please check the discussion in
How to get bluetooth headset to default to HFP Profile and mSBC codec on Ubuntu 22.04 - Ask Ubuntu

And give it a try.

1 Like

Hi DaneLLL,

Thanks for the reply.

I have tried the suggestion you provided and switched to pulsewire using.

sudo apt install libldacbt-{abr,enc}2
sudo apt install libspa-0.2-bluetooth pipewire-audio-client-libraries  pipewire-media-session- wireplumber
systemctl --user daemon-reload
systemctl --user --now enable wireplumber.service
sudo cp /usr/share/doc/pipewire/examples/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/
sudo apt remove pulseaudio-module-bluetooth
LANG=C pactl info | grep '^Server Name'

The output is
Server Name: PulseAudio (on PipeWire 0.3.48)

which has profile

        Profiles:
                off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
                a2dp-sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 16, available: yes)
                headset-head-unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 1, available: yes)
                a2dp-sink-sbc: High Fidelity Playback (A2DP Sink, codec SBC) (sinks: 1, sources: 0, priority: 18, available: yes)
                a2dp-sink-sbc_xq: High Fidelity Playback (A2DP Sink, codec SBC-XQ) (sinks: 1, sources: 0, priority: 17, available: yes)
                headset-head-unit-cvsd: Headset Head Unit (HSP/HFP, codec CVSD) (sinks: 1, sources: 1, priority: 2, available: yes)
                headset-head-unit-msbc: Headset Head Unit (HSP/HFP, codec mSBC) (sinks: 1, sources: 1, priority: 3, available: yes)

But, switching profile to anything apart from A2DP is not giving any audio output. Also, the audio quality in A2DP is choppy in the bluetooth headset as same as in Pulseaudio.

I just need to enable the HFP by default in Pulseaudio itself. which has profile

        Profiles:                                                                                                                        
                a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: yes)                       
                handsfree_head_unit: Handsfree Head Unit (HFP) (sinks: 1, sources: 1, priority: 30, available: no)                       
                off: Off (sinks: 0, sources: 0, priority: 0, available: yes)                                                             

HFP not available. Is it possible to fix this with pulseaudio and make this profile by default?

Thanks,
Jai.

Hi DaneLLL,
Is there any update on this issue?

Hi
For now we don’t have further idea. It looks like kernel driver is good and certain userspace setting needs to be modified. Would see if other users can share experience.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.