Just some notes around the Sony WH-1000XM2
bluetooth profiles supported by the headset:
One can choose between pure Audio output (A2DP profile) in good quality, or hearing/listening (HFP/HSP profile) with lower quality. HFP in version 1.6 seems to also support better audio transport. The bluez5 implementation on Linux seems to support HFP v1.6 and HSP v1.2 (reference). Not sure how to see which version is used for communication with the headset.
“Hands-Free Profile (HFP) Version 1.6 adds optional support for wide band speech with the mSBC codec, a 16 kHz monaural configuration of the SBC codec mandated by the A2DP profile.”
# get the card index CARDINDEX=$(pacmd list-cards | grep index|tail -1|awk '{print $2}') echo $CARDINDEX pacmd set-card-profile $CARDINDEX a2dp_sink # set-card-profile $CARDINDEX headset_head_unit pacmd list-cards|grep active|tail -1
On Fedora31 and later, these profiles became available:
headset_head_unit: Headset Head Unit (HSP/HFP) (priority 30, available: unknown) a2dp_sink_sbc: High Fidelity Playback (A2DP Sink: SBC) (priority 40, available: unknown) a2dp_sink_aac: High Fidelity Playback (A2DP Sink: AAC) (priority 40, available: unknown) a2dp_sink_aptx: High Fidelity Playback (A2DP Sink: aptX) (priority 40, available: unknown) a2dp_sink_aptx_hd: High Fidelity Playback (A2DP Sink: aptX HD) (priority 40, available: yes) a2dp_sink_ldac: High Fidelity Playback (A2DP Sink: LDAC) (priority 40, available: unknown)
# Let's install the required packages. Pulls in pulseaudio. # Before these codecs became available, package # pulseaudio-module-bluetooth got installed instead. [root@спутник ~]# dnf install pulseaudio-module-bluetooth-freeworld # Now restart pulseaudio. Typically, one daemon is running # on your system. Execute the following as user, not root. [chris@спутник ~]$ killall pulseaudio [chris@спутник ~]$ pulseaudio --start [root@спутник ~]# systemctl status bluetooth.service [chris@спутник ~]$ bluetoothctl Agent registered [CHG] Controller XX:XX:XX:XX:XX:B7 Pairable: yes [LE_WH-1000XM2]# scan on Discovery started [CHG] Controller XX:XX:XX:XX:XX:B7 Discovering: yes [CHG] Device XX:XX:XX:XX:XX:85 RSSI: -48 [CHG] Device XX:XX:XX:XX:XX:85 TxPower: 4 [CHG] Device XX:XX:XX:XX:XX:85 Name: WH-1000XM2 [CHG] Device XX:XX:XX:XX:XX:85 Alias: WH-1000XM2 [NEW] Device XX:XX:XX:XX:XX:6D XX:XX:XX:XX:XX:6D [LE_WH-1000XM2]# trust XX:XX:XX:XX:XX:85 Changing XX:XX:XX:XX:XX:85 trust succeeded [LE_WH-1000XM2]# connect XX:XX:XX:XX:XX:85 Attempting to connect to XX:XX:XX:XX:XX:85 Connection successful [CHG] Device XX:XX:XX:XX:XX:85 RSSI: -59 [CHG] Device XX:XX:XX:XX:XX:85 Name: LE_WH-1000XM2 $ sudo bluetoothctl [bluetooth]# power on [bluetooth]# agent on [bluetooth]# default-agent [bluetooth]# scan on [NEW] Device XX:XX:XX:XX:XX:XX WH-1000XM2 [bluetooth]# scan off [bluetooth]# trust XX:XX:XX:XX:XX:XX [bluetooth]# pair XX:XX:XX:XX:XX:XX Attempting to pair with XX:XX:XX:XX:XX:XX [CHG] Device XX:XX:XX:XX:XX:XX Connected: yes [CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... [CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... [CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... [CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... [CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... [CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... [CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... [CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... [CHG] Device XX:XX:XX:XX:XX:XX Paired: yes Pairing successful [CHG] Device XX:XX:XX:XX:XX:XX Connected: no [bluetooth]# connect XX:XX:XX:XX:XX:XX Attempting to connect to XX:XX:XX:XX:XX:XX [CHG] Device XX:XX:XX:XX:XX:XX Connected: yes Connection successful [bluetooth]# quit
[chris@電脳 ~]$ bluetoothctl Agent registered [CHG] Controller 34:E1:2D:7C:61:B7 Pairable: yes [bluetooth]# scan on Discovery started [CHG] Controller 34:E1:2D:7C:61:B7 Discovering: yes [..] [CHG] Device 70:26:05:9D:31:85 Name: LE_WH-1000XM2 [CHG] Device 70:26:05:9D:31:85 Alias: LE_WH-1000XM2 [bluetooth]# trust 70:26:05:9D:31:85 Changing 70:26:05:9D:31:85 trust succeeded [NEW] Device 4D:E9:CA:BF:05:3B 4D-E9-CA-BF-05-3B [bluetooth]# connect 70:26:05:9D:31:85 Attempting to connect to 70:26:05:9D:31:85 Failed to connect: org.bluez.Error.Failed
bluetoothd[23]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 70:26:05:9D:31:85: Protocol not available bluetoothd[23]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 70:26:05:9D:31:85: Protocol not available
killall pulseaudio pulseaudio --start