Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Sep 2020 10:21:52 +0100
From:      Graham Perrin <grahamperrin@gmail.com>
To:        FreeBSD CURRENT <freebsd-current@freebsd.org>, FreeBSD questions <freebsd-questions@freebsd.org>
Subject:   USB sound devices with FreeBSD-CURRENT
Message-ID:  <9551111b-5dfb-c42b-6f58-81f6c8b8bbd1@gmail.com>

Next in thread | Raw E-Mail | Index | Archive | Help
I'm confused about use of USB devices for audio (primarily with Firefox 
and Chromium).

Re: 
<https://forums.freebsd.org/threads/switching-dsp-devices-on-the-fly.69773/#post-419100>; 
under 'switching dsp-devices on-the-fly'

 > … hw.snd.default_unit to "0", which will automatically assign
 > hw.snd.default_unit to the newly-attached devices. …"

– so in sysctl.conf I experimented with:

hw.snd.default_unit="0"

– and after signing in (to KDE Plasma) I attach first the USB microphone 
(Alctron USB700 Alctron USB700) then a USB headset (SteelSeries 
SteelSeries Siberia 350).

virtual_oss and sndiod are enabled.

With this setup, as far as I can tell:

1. Chromium simply does not play AV content e.g. 
<https://www.ted.com/talks/james_geary_metaphorically_speaking>; – after 
a click to play, there's a moment of visual motion but no playback

2. if Firefox media.cubeb.backend set to oss then behaviour is the same 
as Chromium

3. if Firefox media.cubeb.backend is not set (audio backend defaults to 
pulse-rust) then playback occurs through IDT 92HD81B1X (Analog) – not USB.

----

root@momh167-gjp4-8570p:~ # date ; uname -v
Sun Sep 13 08:25:39 BST 2020
FreeBSD 13.0-CURRENT #64 r365364: Sun Sep  6 01:38:18 BST 2020 
root@momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
root@momh167-gjp4-8570p:~ # service virtual_oss start ; service sndiod 
start ; service virtual_oss status ; service sndiod status ; cat 
/dev/sndstat ; grep " -f /dev/" /usr/local/etc/rc.d/virtual_oss | grep 
-v \# ; sysctl hw.snd.default_unit
Starting Virtual OSS config dsp ...hw.snd.basename_clone: 0 -> 0
  done
Starting sndiod.
virtual_oss is running as pid 5688.
sndiod is running as pid 5697.
Installed devices:
pcm0: <ATI R6xx (HDMI)> (play) default
pcm1: <IDT 92HD81B1X (Analog 2.0+HP/2.0)> (play/rec)
pcm2: <IDT 92HD81B1X (Analog)> (play/rec)
pcm3: <USB audio> (rec)
pcm4: <USB audio> (play/rec)
Installed devices from userspace:
dsp: <Virtual OSS> (play/rec)
   -f /dev/dsp0 \
hw.snd.default_unit: 0
root@momh167-gjp4-8570p:~ #

----

In addition, as far as I can tell:

4. if I remove then reconnect the two USB devices, the devices are no 
longer driven

* neither device 'lights up'

* playback in Firefox (with oss) and Chromium is visible, but no longer 
audible on any device

* playback in Firefox (with puse-rust) is visible, but no longer audible 
on any device.

----

root@momh167-gjp4-8570p:~ # grep Alctron /var/log/messages
Sep 13 06:17:08 momh167-gjp4-8570p kernel: ugen0.7: <Alctron USB700 
Alctron USB700> at usbus0 (disconnected)
Sep 13 06:19:07 momh167-gjp4-8570p kernel: ugen0.3: <Alctron USB700 
Alctron USB700> at usbus0
Sep 13 06:19:07 momh167-gjp4-8570p kernel: uaudio0: <Alctron USB700 
Alctron USB700, class 0/0, rev 1.10/1.00, addr 11> on usbus0
Sep 13 06:19:07 momh167-gjp4-8570p kernel: uhid1: <Alctron USB700 
Alctron USB700, class 0/0, rev 1.10/1.00, addr 11> on usbus0
Sep 13 09:13:08 momh167-gjp4-8570p kernel: ugen0.5: <Alctron USB700 
Alctron USB700> at usbus0
Sep 13 09:13:08 momh167-gjp4-8570p kernel: uaudio1: <Alctron USB700 
Alctron USB700, class 0/0, rev 1.10/1.00, addr 4> on usbus0
Sep 13 09:13:08 momh167-gjp4-8570p kernel: uhid0: <Alctron USB700 
Alctron USB700, class 0/0, rev 1.10/1.00, addr 4> on usbus0
Sep 13 09:48:51 momh167-gjp4-8570p kernel: ugen0.5: <Alctron USB700 
Alctron USB700> at usbus0 (disconnected)
root@momh167-gjp4-8570p:~ # grep SteelSeries /var/log/messages
Sep 13 06:17:22 momh167-gjp4-8570p kernel: ugen0.6: <SteelSeries 
SteelSeries Siberia 350> at usbus0 (disconnected)
Sep 13 06:17:51 momh167-gjp4-8570p kernel: ugen0.6: <SteelSeries 
SteelSeries Siberia 350> at usbus0
Sep 13 06:17:51 momh167-gjp4-8570p kernel: uaudio0: <SteelSeries 
SteelSeries Siberia 350, class 0/0, rev 1.10/2.08, addr 10> on usbus0
Sep 13 06:19:00 momh167-gjp4-8570p kernel: ugen0.6: <SteelSeries 
SteelSeries Siberia 350> at usbus0 (disconnected)
Sep 13 06:19:12 momh167-gjp4-8570p kernel: ugen0.7: <SteelSeries 
SteelSeries Siberia 350> at usbus0
Sep 13 06:19:12 momh167-gjp4-8570p kernel: uaudio1: <SteelSeries 
SteelSeries Siberia 350, class 0/0, rev 1.10/2.08, addr 13> on usbus0
Sep 13 09:13:08 momh167-gjp4-8570p kernel: ugen0.4: <SteelSeries 
SteelSeries Siberia 350> at usbus0
Sep 13 09:13:08 momh167-gjp4-8570p kernel: uaudio0: <SteelSeries 
SteelSeries Siberia 350, class 0/0, rev 1.10/2.08, addr 3> on usbus0
root@momh167-gjp4-8570p:~ # tail /var/log/messages
Sep 13 10:11:39 momh167-gjp4-8570p kernel: pcm4: unregister: mixer busy
Sep 13 10:11:39 momh167-gjp4-8570p kernel: pcm4: Waiting for sound 
application to exit!
Sep 13 10:11:39 momh167-gjp4-8570p kernel: pcm4: unregister: mixer busy
Sep 13 10:11:39 momh167-gjp4-8570p kernel: pcm4: Waiting for sound 
application to exit!
Sep 13 10:11:39 momh167-gjp4-8570p kernel: pcm4: unregister: mixer busy
Sep 13 10:11:39 momh167-gjp4-8570p kernel: pcm4: Waiting for sound 
application to exit!
Sep 13 10:11:39 momh167-gjp4-8570p kernel: pcm4: unregister: mixer busy
Sep 13 10:11:39 momh167-gjp4-8570p kernel: pcm4: Waiting for sound 
application to exit!
Sep 13 10:11:39 momh167-gjp4-8570p kernel: pcm4: unregister: mixer busy
Sep 13 10:11:39 momh167-gjp4-8570p kernel: pcm4: Waiting for sound 
application to exit!
root@momh167-gjp4-8570p:~ #

----

Clearly I'm doing something wrong.

If on-the-fly use of USB audio devices is not possible, then must I keep 
the devices connected whilst I'm signed in to the desktop environment?



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?9551111b-5dfb-c42b-6f58-81f6c8b8bbd1>