1

遵循这里提到的一切

在我的带有 Raspbian Bullseye 的 Raspberry Pi 4 上。

使用配对手机拨打电话时,HFP 的传入和传出声音有问题。我可以听到和说话,但它真的很吵,有时会延迟。而 A2DP 一切正常。

这是我的 /etc/pulse/default.pa 文件的一部分

.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

我更改了 /etc/bluetooth/main.conf 中的类

Class = 0x20041C

并添加了文件 /etc/bluetooth/audio.conf

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

使用 A2DP 听音乐时,这里是输出

pactl 列表来源简短

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 清单不足

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

使用 HFP 调用时,这里是输出

pactl 列表来源简短

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 清单不足

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

这是调用时 journalctl -f 的输出

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
4

0 回答 0