Solved 2.1 Speaker kit USB Audio

I share here a find to use a 2.1 speaker kit USB plugged.

Adding USB Driver.


Add driver snd_uaudio(4) to rc.conf:

sudo nano /etc/rc.conf

Paste:

Code:
snd_uaudio="YES"


Automating boot:

sudo nano /boot/loader.conf

Paste:

Code:
snd_uaudio_load="YES"

Loading the driver:

kldload snd_driver


Output configuration.


How to know his output device:

cat /dev/sndstat

We configure a file in devd:

sudo nano /etc/devd/usb_hp.conf

Paste the lines and configure pcm unit/number with the output:

Code:
# /etc/devd/usb_hp.conf
attach 100 {
  device-name "pcm?";
  action "sysctl hw.snd.default_unit=?";
};

detach 100 {
  device-name "pcm?";
  action "sysctl hw.snd.default_unit=0";
};

Paste this line in sysctl with the right pcm:

sudo nano /etc/sysctl.conf

Then paste:

Code:
hw.snd.default_unit=?


Reboot, after boot 2.1 Kit are singing well
 
Back
Top