No sound, cannot set hw.snd.default_unit.

Following the handbook, I loaded snd_driver. But I still get no sound. The driver seems to be loaded successfully:

Code:
# cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0: <Realtek ALC268 (Analog 2.0+HP/2.0)> (play/rec)
pcm1: <Realtek ALC268 (Front Digital)> (play) default

And I think the problem might be the hw.snd.default_unit value referred in the handbook since:

Code:
# dmesg | grep pcm
pcm0: <Realtek ALC268 (Analog 2.0+HP/2.0)> at nid 21,20 and 24,25,26 on hdaa0
pcm1: <Realtek ALC268 (Front Digital)> at nid 30 on hdaa0

So I guess I should set it to 30 or 20,21,24,25,26. But when trying to set it I got an invalid argument error:
Code:
# sysctl hw.snd.default_unit=30
hw.snd.default_unit: 1
sysctl: hw.snd.default_unit: Invalid argument

I get the same output for any value (from -1 to 30) except for the default value (1).
 
In the sound(4)() man page is explained how to setting properly the hw.snd.default_unit variable.

Add this line in your /etc/sysctl.conf
Code:
hw.snd.default_unit=0
Reboot.
 
Back
Top