Re: USB audio stopped working between p7 and p8

From: Alban Hertroys <>
Date: Sun, 30 Jul 2023 11:13:46 UTC

> On 25 Jul 2023, at 13:19, Alban Hertroys <> wrote:
> Hi list,
> I recently upgraded my home server with musicpd from 13.1-RELEASE-p7 to 13.1-RELEASE-p8, and now USB audio stopped working.


> For the upgrade, I used:
> freebsd-update fetch
> freebsd-update install
> Before the upgrade, the USB DAC registered as pcm0 while now it registers as pcm2, so the sysctl’s applied to the device now obviously go to another device (namely one of the HDMI outputs), but even then I should get audio from it.


I got this working again.
I had entirely forgotten that I had a custom kernel in place (and also that freebsd-update updates the sources too, so that you can compile a custom kernel based on updated sources). 
That kernel conf contains this bit:

# Sound support
nodevice        sound                   # Generic sound driver (required)
nodevice        snd_cmi                 # CMedia CMI8338/CMI8738
nodevice        snd_csa                 # Crystal Semiconductor CS461x/428x
nodevice        snd_emu10kx             # Creative SoundBlaster Live! and Audigy
nodevice        snd_es137x              # Ensoniq AudioPCI ES137x
nodevice        snd_hda                 # Intel High Definition Audio
nodevice        snd_ich                 # Intel, NVidia and other ICH AC'97 Audio
nodevice        snd_via8233             # VIA VT8233x Audio

That in turn causes only the necessary Audio subsystem kernel modules to be loaded, probably from the USB uaudio device detection:

> kldstat
Id Refs Address                Size Name
 1   66 0xffffffff80200000  1487e60 kernel
 7    1 0xffffffff82214000     6730 cuse.ko
 8    1 0xffffffff8221b000     3378 acpi_wmi.ko
 9    1 0xffffffff8221f000     3218 intpm.ko
10    1 0xffffffff82223000     2180 smbus.ko
11    1 0xffffffff82226000     2280 uhid.ko
12    1 0xffffffff82229000     3320 usbhid.ko
13    1 0xffffffff8222d000     31f8 hidbus.ko
14    1 0xffffffff82231000     32c0 wmt.ko
15    1 0xffffffff82235000     3268 ums.ko
16    1 0xffffffff82239000     c4d0 snd_uaudio.ko
17    2 0xffffffff82246000    43488 sound.ko

And now the only PCM device is:
> cat /dev/sndstat 
Installed devices:
pcm0: <USB audio> (play) default
No devices installed from userspace.

And everything falls into place again.

It’s still unclear to me why it didn’t work with sound and snd_hda included in the GENERIC kernel, or is it perhaps because uaudio isn’t in that kernel and instead gets loaded on demand after the other drivers?
If so, was this the expected result?


Alban Hertroys
There is always an exception to always.