Bluetooth headphone

From: Dr. Amr Osman <dr3mro_at_gmail.com>
Date: Fri, 10 Nov 2023 14:28:23 UTC
I have WH-1000XM5 and I did connect it by following this procedure

1) run
```
# bluetooth-config scan
```
add add the headphone and make sure to name it 'headphone' .. now 3
files would be created in /etc/bluetooth

```
bthidd.conf
hcsecd.conf
hosts
```

now add those lines to /etc/rc.conf

```
#bt audio
sndiod_enable="YES"
bluetooth_enable="YES"
sdpd_enable="YES"
hcsecd_enable="YES"
bthidd_enable="YES"
bthidd_config="/etc/bluetooth/bthidd.conf"
bthidd_hids="/var/db/bthidd.hids"
virtual_oss_enable="YES"
virtual_oss_configs="dsp"
virtual_oss_dsp="-T /dev/sndstat -C 2 -c 2 -r 44100 -b 16 -s 1024 -R
/dev/null -P /dev/bluetooth/headphone -d dsp -t vdsp.ctl"

```
now reboot and audio will work from headphone when you boot up

the problem is I cannot control the output device every time I
disconnect the headphone I need to disable those lines and reboot to
restore audio from speakers
any idea how to change the output device without reboot.!
I use XFCE by the way
Thanks


Thank You
Dr. Amr Osman