首先,备份以下文件(您永远不会知道):
cp /etc/bluetooth/audio.conf /etc/bluetooth/audio.conf.bak
cp /etc/pulse/default.pa /etc/pulse/default.pa.bak
cp /usr/bin/start-pulseaudio-x11 /usr/bin/start-pulseaudio-x11.bak
编辑/etc/bluetooth/audio.conf
并使其与此相似:
# Configuration file for the audio service
# This section contains options which are not specific to any
# particular interface
[General]
Enable=Gateway,Source
# Switch to master role for incoming connections (defaults to true)
Master=true
# If we want to disable support for specific services
# Defaults to supporting all implemented services
#Disable=Gateway,Source,Socket
Disable=Socket
# SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
# Defaults to HCI
#SCORouting=HCI
# Automatically connect both A2DP and HFP/HSP profiles for incoming
# connections. Some headsets that support both profiles will only connect the
# other one automatically so the default setting of true is usually a good
# idea.
AutoConnect=true
# Headset interface specific options (i.e. options which affect how the audio
# service interacts with remote headset devices)
[Headset]
# Set to true to support HFP, false means only HSP is supported
# Defaults to true
HFP=true
# Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
MaxConnected=2
# Set to true to enable use of fast connectable mode (faster page scanning)
# for HFP when incoming call starts. Default settings are restored after
# call is answered or rejected. Page scan interval is much shorter and page
# scan type changed to interlaced. Such allows faster connection initiated
# by a headset.
FastConnectable=true
# Just an example of potential config options for the other interfaces
#[A2DP]
#SBCSources=1
#MPEG12Sources=0
编辑/etc/pulse/default.pa
并注释掉该行
#load-module module-bluetooth-discover
(您实际上只需要#
在开始时添加)
加载模块后编辑/usr/bin/start-pulseaudio-x11
并添加该行;在实践中,您应该在文件末尾编辑一个节,例如/usr/bin/pactl load-module module-bluetooth-discover
module-x11-xsmp
if [ x"$SESSION_MANAGER" != x ] ; then
/usr/bin/pactl load-module module-x11-xsmp "display=$DISPLAY session_manager=$SESSION_MANAGER" > /dev/null
# add this line here:
/usr/bin/pactl load-module module-bluetooth-discover
fi
重启。
现在,您应该可以将设备设置为A2DP并享受高品质的音乐了:
请注意,有时您需要断开并重新连接设备以重新启用A2DP:
...是的,这是个漏洞。但是,当它起作用时,它的效果很漂亮。
重新启动后出现问题
在完成所有这些操作之后,有时该技巧似乎仅在下一次重新启动后才起作用。在这种情况下,请尝试遵循rmfought的回答:
对我有用的是连接蓝牙设备,切换到HSP / HFP模式,断开连接,重新连接,然后再切换到A2DP模式。
...也为我工作(再次,有时)。我什至必须取消配对一次重新配对的加密狗。
如果还是不行...
如果这也不适合您,则可以尝试使用 此脚本 -它的作者正在使它保持最新。