[ZT] Playing Wireless Audio on OpenBSD

OpenBSD的安装、升级、更新等日常问题。

版主: chenjun天地乾坤

回复
头像
unreal
银 Ag
帖子: 1083
注册时间: 2010-06-07 18:52

[ZT] Playing Wireless Audio on OpenBSD

帖子 unreal » 2024-09-22 14:49

via https://xosc.org/bluetooth.html

$Id: bluetooth.md,v 1.13 2023/04/16 11:10:56 cvs Exp $
Update 2022

I recently bought the new USB-C version, the Creative BT-W3. It works way better that the BT-W2, my Bluetooth devices connects faster to the dongle and never loose connection so far.

Audio via proprietary Protocol

My employer offers Wireless Active Noise Cancellation (ANC) headphones (Jabra Evolve 2 85) for employees, so I decided to get one. I usually use the device with the corporate Windows but also tried it with OpenBSD and turns out, it works fine. Once you connect the wireless dongle via USB it announces itself as follows:
uhub3 at uhub0 port 3 configuration 1 interface 0 "Cambridge Silicon Radio product 0x4010" rev 2.00/15.46 add r 3
uaudio0 at uhub3 port 1 configuration 1 interface 1 " Jabra Link 380" rev 2.00/1.09 addr 4
uaudio0: class v1, full-speed, sync, channels: 2 play, 1 rec, 4 ctls
audio1 at uaudio0
uhidev1 at uhub3 port 1 configuration 1 interface 3 " Jabra Link 380" rev 2.00/1.09 addr 4
uhidev1: iclass 3/0, 155 report ids
The head phone and the USB-C dongle are shown in the following picture:

Photo of my Jabra
Evolve 2 85 headphone and a USB-C dongle.
Both are black lying on a wooden table.

Now just follow the steps in the section connect to sndiod and volume control below to enjoy wireless sound.

Audio via Bluetooth

OpenBSD removed Bluetooth support in 2014, so officially there is no way to connect a Bluetooth device to your OpenBSD system. However, jcs@ posted on Twitter that he found a simple way to play audio via Bluetooth. He recommended the Creative BT-W2 USB dongle.

图片

Just plug it in and you should be good to go and see messages similar to the following in your system’s log and the stick should show a flashing blue light.
uaudio0 at uhub0 port 2 configuration 1 interface 1 "Creative Labs Creative Bluetooth Audio W2"
rev 2.00/1.00 addr 2
uaudio0: class v1, full-speed, sync, channels: 2 play, 1 rec, 0 ctls
audio1 at uaudio0https://marc.info/?l=openbsd-cvs&m=140511572108715&w=2
uhidev0 at uhub0 port 2 configuration 1 interface 3 "Creative Labs Creative Bluetooth Audio W2"
rev 2.00/1.00 addr 2
uhidev0: iclass 3/0, 3 report ids
uhid0 at uhidev0 reportid 1: input=2, output=0, feature=0
uhid1 at uhidev0 reportid 2: input=18, output=18, feature=0
uhid2 at uhidev0 reportid 3: input=64, output=64, feature=0
If you see nothing at all, check your BIOS settings. The USB 3.0 mode setting in mine was set to Auto. Once I switched it to Enabled the dongle was attached. I use a Thinkpad T series so the name of your option might be different.

Bluetooth Pairing

To pair with an audio device set the device to pairing mode and long press the button on the stick. The blue light should flash rapidly.

Attach to sndiod and Volume Control

Once the Jabra Dongle or the Bluetooth stick is connected you need to add it to sndiod. One way to do this is by using the -F option. This lets you specify an alternative device which will be used by once it’s connected. If it’s not connected sndiod switches back to the default device set with -f. As soon as the dongle is connected it will be used, as soon as you disconnect it the internal speakers/headphones will be used.
# rcctl set sndiod flags "-f rsnd/0 -F rsnd/1"
# rcctl restart sndiod
Changing volume does not work with the regular utilities, you have to install the aucatctl package. Set the volume as follows (a lower value leads to a lower volume):
$ aucatctl master=20
Update for OpenBSD 6.8. Since this version sndioctl can control the volume and there is no need for an additional package:
$ sndioctl output.level=+0.05
$ sndioctl output.level=-0.05

头像
unreal
银 Ag
帖子: 1083
注册时间: 2010-06-07 18:52

有机会再测试蓝牙发射器

帖子 unreal » 2024-09-22 15:06

因为想在OB上使用蓝牙音频设备,搜索到上文,先贴过来。国内暂时未看到 创新BT-W2或BT-W3的蓝牙发射器。掏包上有国产蓝牙发射器,等有空及手头宽松了买来测试。

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 3 访客