Skip to main content

No sound on FreeBSD 8.0

Posted in

I have successfully upgraded my FreeBSD 7.1 to 8.0, set up wifi (dues to wlan changes in 8.0) and everything worked just excellent. The only thing I missed to test was sound. Only a couple of days ago, when I decided to watch a movie I found out that it is not working.

Well, that seemed strange for me, because the kld modules were the same, the hardware the same and my sound card has been successfully detected.

$ cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0: <HDA Realtek ALC883 PCM #0 Analog> at cad 0 nid 1 on hdac0  [MPSAFE] (1p:1v/1r:1v channels duplex)
pcm1: <HDA Realtek ALC883 PCM #1 Analog> at cad 0 nid 1 on hdac0  [MPSAFE] (1p:1v/0r:0v channels simplex default)
pcm2: <HDA Realtek ALC883 PCM #2 Digital> at cad 0 nid 1 on hdac0  [MPSAFE] (1p:1v/0r:0v channels simplex)

I have never had such problems before, that's why for a moment I didn't know where to start from.

Later I found hw.snd.default_unit parameter for sysctl.
It used to be equal to 0. This means that pcm0 is the default device. But there are pcm1 and pcm2 besides pcm0. Apparantely, one of them became the default sound device. Setting hw.snd.default_unit to 1 solved my sound issue.

$ sudo sysctl hw.snd.default_unit=1

A quick sound test:

$ sudo cat some_text_file > /dev/dsp1.0
...hear some noise...

I used README file from some package as some_text_file used above :) .

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
tes_imoni_l: