第一次尝试连接时,我连接上了耳机,但“高保真播放(A2DP 接收器)”不可用,只有“耳机主机(HSP/HFP)”,听起来很糟糕。然后我这样做,systemctl restart bluetooth
这次出现了“高保真播放(A2DP 接收器)”,但要使声音正常工作,我需要启动pavucontrol
并将配置文件切换为“关闭”,然后返回“高保真播放(A2DP 接收器)”。如果我再次重新启动服务,它将返回到初始状态(headset_head_unit 可用,a2dp_sink 不可用)。
服务重启后我得到这个systemctl status bluetooth
:
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-02-01 20:40:36 CET; 6s ago
Docs: man:bluetoothd(8)
Main PID: 6250 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 19013)
Memory: 660.0K
CGroup: /system.slice/bluetooth.service
└─6250 /usr/lib/bluetooth/bluetoothd
Feb 01 20:40:36 user-tobefilledbyoem bluetoothd[6250]: Bluetooth daemon 5.53
Feb 01 20:40:36 user-tobefilledbyoem systemd[1]: Started Bluetooth service.
Feb 01 20:40:36 user-tobefilledbyoem bluetoothd[6250]: Starting SDP server
Feb 01 20:40:36 user-tobefilledbyoem bluetoothd[6250]: Bluetooth management interface 1.18 initialized
Feb 01 20:40:36 user-tobefilledbyoem bluetoothd[6250]: Endpoint registered: sender=:1.36 path=/MediaEndpoint/A2DPSink/sbc
Feb 01 20:40:36 user-tobefilledbyoem bluetoothd[6250]: Endpoint registered: sender=:1.36 path=/MediaEndpoint/A2DPSource/sbc
Feb 01 20:40:36 user-tobefilledbyoem bluetoothd[6250]: Endpoint registered: sender=:1.46 path=/MediaEndpoint/A2DPSink/sbc
Feb 01 20:40:36 user-tobefilledbyoem bluetoothd[6250]: Endpoint registered: sender=:1.46 path=/MediaEndpoint/A2DPSource/sbc
Feb 01 20:40:36 user-tobefilledbyoem bluetoothd[6250]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
Feb 01 20:40:36 user-tobefilledbyoem bluetoothd[6250]: RFCOMM server failed for :1.36/Profile/HSPHSProfile/00001108-0000-1000-8000-00805f9b34fb: rfcomm_bind: Address already in use (98)
当我连接耳机时,我得到了 3 条额外的行:
Feb 01 20:40:50 user-tobefilledbyoem bluetoothd[6250]: Unable to connect Headset Voice gateway: connect: Device or resource busy (16)
Feb 01 20:40:50 user-tobefilledbyoem bluetoothd[6250]: Connecting Headset Voice gateway failed: Input/output error
Feb 01 20:40:53 user-tobefilledbyoem bluetoothd[6250]: /org/bluez/hci0/dev_00_1B_66_E9_40_9A/sep1/fd0: fd(44) ready
pacmd list-cards
当没有 a2dp 时:
index: 6
name: <bluez_card.00_1B_66_E9_40_9A>
driver: <module-bluez5-device.c>
owner module: 32
properties:
device.description = "MOMENTUM 3"
device.string = "00:1B:66:E9:40:9A"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_00_1B_66_E9_40_9A"
bluez.class = "0x240404"
bluez.alias = "MOMENTUM 3"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
profiles:
headset_head_unit: Headset Head Unit (HSP/HFP) (priority 30, available: yes)
a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 40, available: no)
off: Off (priority 0, available: yes)
active profile: <headset_head_unit>
sinks:
bluez_sink.00_1B_66_E9_40_9A.headset_head_unit/#4: MOMENTUM 3
sources:
bluez_sink.00_1B_66_E9_40_9A.headset_head_unit.monitor/#7: Monitor of MOMENTUM 3
bluez_source.00_1B_66_E9_40_9A.headset_head_unit/#8: MOMENTUM 3
ports:
headset-output: Headset (priority 0, latency offset 0 usec, available: yes)
properties:
headset-input: Headset (priority 0, latency offset 0 usec, available: yes)
properties:
pacmd list-cards
当有 a2dp 时:
index: 7
name: <bluez_card.00_1B_66_E9_40_9A>
driver: <module-bluez5-device.c>
owner module: 33
properties:
device.description = "MOMENTUM 3"
device.string = "00:1B:66:E9:40:9A"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_00_1B_66_E9_40_9A"
bluez.class = "0x240404"
bluez.alias = "MOMENTUM 3"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
profiles:
headset_head_unit: Headset Head Unit (HSP/HFP) (priority 30, available: no)
a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 40, available: unknown)
off: Off (priority 0, available: yes)
active profile: <a2dp_sink>
sinks:
bluez_sink.00_1B_66_E9_40_9A.a2dp_sink/#5: MOMENTUM 3
sources:
bluez_sink.00_1B_66_E9_40_9A.a2dp_sink.monitor/#9: Monitor of MOMENTUM 3
ports:
headset-output: Headset (priority 0, latency offset 0 usec, available: unknown)
properties:
headset-input: Headset (priority 0, latency offset 0 usec, available: no)
properties:
操作系统 - KDE neon 5.20 又名 Ubuntu 20.04
内核 - 5.10.0-1011-oem,但 linux-image-5.4.0 上的情况也一样