2 years ago

#48769

test-img

xavi-b

Noisy sound when using bluetooth HFP with Ofono and pulseaudio

Following everything mentionned here

On my Raspberry Pi 4 with Raspbian Bullseye.

I have an issue with the incoming and outgoing sound of HFP when calling with my paired phone. I can hear and speak but it is really really noisy and sometimes delayed. Whereas everything works fine with A2DP.

Here is a part of my /etc/pulse/default.pa file

.ifexists module-bluetooth-policy.so
#load-module module-bluetooth-policy
load-module module-bluetooth-policy auto_switch=2
.endif

.ifexists module-bluetooth-discover.so
#load-module module-bluetooth-discover autodetect_mtu=yes
load-module module-bluetooth-discover autodetect_mtu=no headset=auto
.endif

I changed the class in /etc/bluetooth/main.conf

Class = 0x20041C

And added the file /etc/bluetooth/audio.conf

[General]
Class = 0x20041C
Enable = Source,Sink,Media,Socket

When listening to music using A2DP, here is the output of

pactl list sources short

0   alsa_output.platform-bcm2835_audio.analog-stereo.monitor    module-alsa-card.c  s16le 2ch 44100Hz   IDLE
1   bluez_source.XX_XX_XX_XX_XX_XX.a2dp_source  module-bluez5-device.c  s16le 2ch 44100Hz   RUNNING

pactl list sinks short

0   alsa_output.platform-bcm2835_audio.analog-stereo    module-alsa-card.c  s16le 2ch 44100Hz   RUNNING

When calling using HFP, here is the output of

pactl list sources short

0   alsa_output.platform-bcm2835_audio.analog-stereo.monitor    module-alsa-card.c  s16le 2ch 48000Hz   IDLE
2   bluez_sink.XX_XX_XX_XX_XX_XX.headset_audio_gateway.monitor  module-bluez5-device.c  s16le 1ch 8000Hz    IDLE
3   bluez_source.XX_XX_XX_XX_XX_XX.headset_audio_gateway    module-bluez5-device.c  s16le 1ch 8000Hz    RUNNING

pactl list sinks short

0   alsa_output.platform-bcm2835_audio.analog-stereo    module-alsa-card.c  s16le 2ch 48000Hz   RUNNING
1   bluez_sink.XX_XX_XX_XX_XX_XX.headset_audio_gateway  module-bluez5-device.c  s16le 1ch 8000Hz    RUNNING

Here is the ouput of journalctl -f when calling

Jan 13 22:31:58 rpi4 rtkit-daemon[612]: Supervising 6 threads of 3 processes of 1 users.
Jan 13 22:31:58 rpi4 rtkit-daemon[612]: Successfully made thread 1505 of process 605 owned by '1000' RT at priority 5.
Jan 13 22:31:58 rpi4 rtkit-daemon[612]: Supervising 7 threads of 3 processes of 1 users.
Jan 13 22:31:58 rpi4 pulseaudio[605]: Cannot set requested sink latency of 66.67 ms, adjusting to 28.00 ms
Jan 13 22:31:58 rpi4 pulseaudio[605]: Cannot set requested source latency of 66.67 ms, adjusting to 28.00 ms
Jan 13 22:31:58 rpi4 pulseaudio[605]: Cannot set requested sink latency of 66.67 ms, adjusting to 59.95 ms
Jan 13 22:31:58 rpi4 pulseaudio[605]: Cannot set requested source latency of 66.67 ms, adjusting to 28.00 ms
Jan 13 22:31:58 rpi4 pulseaudio[605]: Cannot set requested source latency of 66.67 ms, adjusting to 28.00 ms
Jan 13 22:31:58 rpi4 dbus-daemon[341]: [system] Rejected send message, 1 matched rules; type="method_return", sender=":1.30" (uid=1000 pid=605 comm="/usr/bin/pulseaudio --daemonize=no --log-target=jo") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=357 comm="/usr/sbin/ofonod -n ")
Jan 13 22:32:09 rpi4 pulseaudio[605]: Too many underruns, increasing latency to 205.00 ms

bluetooth

raspbian

bluez

pulseaudio

hfp

0 Answers

Your Answer

Accepted video resources