I recently set up a FreeBSD desktop, and I've managed to get Bluetooth headphones working using the following command:
Admittedly, I have only a cursory understanding of what that does. I'm more used to how Linux does things, and I don't understand OSS very well yet. This setup works for audio, and I can adjust the headphones' volume with their built-in volume keys. But the Bluetooth headphones don't seem to exist in any audio mixer or settings, and I can't adjust them with the volume keys on my keyboard or with the MATE desktop's sound settings GUI.
I can list my audio devices from
I can start YouTube videos in Firefox (after setting the necessary about:config flag to make it use OSS) and they will play on the Bluetooth headphones. But MATE claims that my selected audio device is my monitor, and its volume controls adjust the monitor volume.
So the Bluetooth headphones are selected, but nothing in the system thinks they're selected... even if it works, this is a very strange, buggy state for the system to be in. Surely this isn't the only way to do Bluetooth audio?
I only partially understand what
The only GUI control for virtual_oss I'm aware of is
Am I missing something, or is this just the state of Bluetooth audio in FreeBSD? I'm open to writing my own GUI to handle volume control for Bluetooth devices, but, if that's necessary, where should I start looking to figure out how to interact with virtual_oss?
virtual_oss -T /dev/sndstat -C 2 -c 2 -r 48000 -b 16 -s 20ms -P /dev/bluetooth/headphones -R /dev/null -w vdsp.ctl -d dsp -l mixer
Admittedly, I have only a cursory understanding of what that does. I'm more used to how Linux does things, and I don't understand OSS very well yet. This setup works for audio, and I can adjust the headphones' volume with their built-in volume keys. But the Bluetooth headphones don't seem to exist in any audio mixer or settings, and I can't adjust them with the volume keys on my keyboard or with the MATE desktop's sound settings GUI.
I can list my audio devices from
/dev/sndstat
:
Code:
Installed devices:
pcm0: <ATI R6xx (HDMI)> (play) default
pcm1: <ATI R6xx (HDMI)> (play)
pcm2: <ATI R6xx (HDMI)> (play)
pcm3: <ATI R6xx (HDMI)> (play)
pcm4: <ATI R6xx (HDMI)> (play)
pcm5: <ATI R6xx (HDMI)> (play)
pcm6: <Realtek ALCS1200A (Rear Analog 5.1/2.0)> (play/rec)
pcm7: <Realtek ALCS1200A (Front Analog)> (play/rec)
pcm8: <Realtek ALCS1200A (Rear Digital)> (play)
Installed devices from userspace:
dsp: <Virtual OSS> (play/rec)
mixer: <Virtual OSS> (play/rec)
dsp
and mixer
were created by virtual_oss
, and they appear in their own category. But they don't appear anywhere else. They're not listed in the GUI sound settings, and I can't select dsp
as my main audio device. It's not a "PCM device". I've seen that term come up repeatedly when googling this and in other forum threads, but I haven't found a good explanation of the difference between PCM devices and these virtual devices, or why /dev/bluetooth/<addr>
, which doesn't even exist as a file, isn't a PCM device.I can start YouTube videos in Firefox (after setting the necessary about:config flag to make it use OSS) and they will play on the Bluetooth headphones. But MATE claims that my selected audio device is my monitor, and its volume controls adjust the monitor volume.
mixer
also thinks the monitor is the current audio device:
Code:
pcm0:mixer: <ATI R6xx (HDMI)> on hdaa0 (play) (default)
vol = 1.00:1.00 pbk
pcm = 1.00:1.00 pbk
So the Bluetooth headphones are selected, but nothing in the system thinks they're selected... even if it works, this is a very strange, buggy state for the system to be in. Surely this isn't the only way to do Bluetooth audio?
I only partially understand what
-d dsp
is doing in the virtual_oss
command, but it's probably related. I know /dev/dsp
is the main OSS audio device, and writing to it will output sound. So virtual_oss has... replaced it with its own copy, rendering mixer
's output meaningless? Or is something else going on?The only GUI control for virtual_oss I'm aware of is
virtual_oss_ctl
, which is equally confusing. It has VOL+ and VOL- keys, but they don't seem to do anything. I can't find any way to adjust the Bluetooth headphones' volume from any command-line or GUI program.Am I missing something, or is this just the state of Bluetooth audio in FreeBSD? I'm open to writing my own GUI to handle volume control for Bluetooth devices, but, if that's necessary, where should I start looking to figure out how to interact with virtual_oss?