How I managed to use BlueTooth audio with ThinkPad X220:

  1. Enable BlueTooth support:
kldload acpi_ibm ; echo 'acpi_ibm_load="YES"' >> /boot/loader.conf
sysctl dev.acpi_ibm.0.bluetooth=1 ; echo dev.acpi_ibm.0.bluetooth=1 >> /etc/sysctl.conf
  1. Ensure kernel module ng_ubt is loaded, though it should be loaded automatically by devd:
kldload ng_ubt
  1. Ensure bthidd service is enabled and started:
sysrc bthidd_enable=yes ; service bthidd start
  1. Ensure hcsecd service is enabled and started:
sysrc hcsecd_enable=yes ; service hcsecd start
  1. Put device in pairing mode and pair with FreeBSD. Can be done manually using hccontrol or using bluetooth-config script from Phabricator review
bluetooth-config
  1. Ensure that the connection exists by running hccontrol:
hccontrol -n ubt0hci create_connection BT_ADDR_OF_DEVICE
  1. Verify connection using:
hccontrol -n ubt0hci read_connection_list
  1. Install virtual_oss port:
pkg install virtual_oss
  1. Start virtual_oss:
virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 1024 -R /dev/null -P /dev/bluetooth/BT_ADDR_OF_DEVICE -d dsp

If after src r295440, add -T /dev/sndstat before the -d to enable the device to show up in /dev/sndstat. If you want to use the virtual_oss_ctl package to control the virtual_oss device via GUI, add -t vdsp.ctl to the end. If you have trouble, try changing 48000 to 44100.

  1. Play audio via vlc or other app

Further reading: