Re: Using USB sound card with FreeBSD

From: Tomasz CEDRO <tomek_at_cedro.info>
Date: Mon, 25 Oct 2021 12:04:23 UTC
On Mon, Oct 25, 2021 at 11:35 AM Olivier wrote:
> Hi,
> I have a system with no sound interface. I have tried to install a USB
> sound card, but so far, I don't see how to use it.
> What is the device (/dev/xvz) that I should be sending my sound to? In
> the past I had devices like /dev/dspW0.0 but I see nothing with that USB
> sound card.
> TIA,
> Olivier

Hey Olivier, I assume you are using RELEASE / GENERIC kernel, so
modules / drivers should be already in the system, you need to load
them if they do not auto-load. Then using USB Audio card looks exactly
the same as built-in audio card.

As root execute:
kldload snd_uaudio

This will load the USB Audio module. After that attach USB Audio card
and /dev/dspXX should show up.

If you want this module auto-loaded at boot time put
`snd_uaudio_load="YES"` in `/boot/loader.conf`.

Make sure your card is recognised and supported. See `dmesg` output or
watch first console after connecting the USB Audio card (Ctrl+Alt+F1
to go there from X). If you do not have /dev/dsp despite loaded
`snd_uaudio` try `usbconfig` to see if the card is attached and
visible to the computer among other USB devices. If usb subsystem does
not see the card then audio also won't see the card. In that case you
may want to try different USB port, cable, check if that card works on
another computer / os, etc.

The simplest way to test if sound card works is to `cat /dev/random >
/dev/dspXX` providing the device of interest you should hear random
noise in the speakers. Also make sure with mixer that output is not
muted.

If you haven't read yet there is a Handbook section dedicated to Multimedia:

https://docs.freebsd.org/en/books/handbook/multimedia/

Good luck and have fun! :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info