Topping D10s

For a quick sanity check on 14.4-RELEASE. I plugged in a usb dac; then

$ cat /dev/sndstat
Installed devices:
pcm0: <Conexant CX20590 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Intel Cougar Point (HDMI/DP 8ch)> (play)
pcm2: <Intel Cougar Point (HDMI/DP 8ch)> (play)
pcm3: <Intel Cougar Point (HDMI/DP 8ch)> (play)
pcm4: <Shenzhen CBHT Technology Co., Ltd CS43131 HIFI Audio> (play)

The usb dac I plugged in is pcm4, so I need to set that to be the default unit.
$ sysctl hw.snd.default_unit=4
hw.snd.default_unit: 0 -> 4

And audio out through the usb dac now works correctly.

Unfortunately setting hw.snd.default_auto to 1 does not appear to result in assigning the default_unit automatically when I plug the usb dac into the system, despite the description given by:-

$ sysctl -d hw.snd.default_auto
hw.snd.default_auto: assign default unit to a newly attached device

I guess you can't have everything.
 
One little gotcha: if you're not getting any sound out of firefox, you need to set it's backend to 'oss'.
Go to 'about:config' and set the system variable:-
media.cubeb.backend = oss
 
I guess you can't have everything.
Take a look at the devd.conf man page. Then create a file /usr/local/etc/devd/usb_dac.conf with content similar to this:
Code:
notify 100 {
    match "system"      "USB";
    match "subsystem"   "DEVICE";
    match "type"        "ATTACH";
    match "vendor"      "0x....";
    match "product"     "0x....";
    action "sysctl <set default unit when attached>";
};

notify 100 {
    match "system"      "USB";
    match "subsystem"   "DEVICE";
    match "type"        "DETACH";
    match "vendor"      "0x....";
    match "product"     "0x....";
    action "sysctl <reset default unit when detached>";
};

Don't forget to service devd restart after making changes.
 
Back
Top