# Multiple sound problems FreeBSD 8.0



## Caliante (Apr 6, 2010)

Pfff 

Hi all :e

Ok, yesterday I was fooling around in order to get my sound working, because it didn't from the start. I learned I need snd_hda so I loaded that (in /boot/loader.conf). Next I learned that I need to 'tweak' sysctl:


```
hw.snd.default_unit=2
```

So I had sound (mp3's in Amarok, Xmms), so I thought 'on to the next step of installing my system'. That was too happy thinking, I learned.

This morning on booting I again have no sound, but instead, a lot of new error messages I haven't seen before (see screenshots), and the funny thing is:


```
cat /dev/sndstat
```

returns nothing, but, to make it even more funny:


```
sysctl -a | grep hw.snd
```

Also doesn't return anything at all.

Now, before you start to laugh please accept that I am a complete noob who is just trying to find his way around, whereas Google has decided today is it's day off when it comes to providing useful answers to me e).

I suspect the problem is that I didn't write the above sysctl in the right config file (as this was a mystery to me yesterday already and Google decided it was on holiday as far as me was concerned yesterday as well), and writing it in the proper file would make all these problems go away. I first wrote it in /boot/loader.conf (as somebody wrote that) but later figured out it had to be /etc/sysctl.conf (which made more sense to me) but still, after rebooting, the problem remains as described above.

Now, the funny thing is, when I set the hw.snd.default_unit manually yesterday, everything worked. When I try to do the same while typing this message I again get the "xine was unable to initialize any audio drivers".

As you may understand, I am completely lost: I get a stack of new error messages that I didn't have yesterday when I set the sysctl manually.

Could anybody help me out? I am grateful, please ben assured of that 

(Damn, how nice does FreeBSD look as compared to Windows :f).

Sorry, the pics seem to large to attach so I had to post them on an external site:


----------



## SirDice (Apr 7, 2010)

Check to see if snd_hda is actually loaded; `# kldstat`


----------



## Caliante (Apr 7, 2010)

SirDice said:
			
		

> Check to see if snd_hda is actually loaded; `# kldstat`



Thank you for your reply, SirDice; much appreciated that you are trying to help me :e

And it turns out your hunch is correct, as I found out myself: I just saw your message after I have been fooling around with this problem for two hours, and the result of my analysis is:

I would like to nominate myself for the award for most stupid person of 2010: 





:beergrin


```
snd_hda_[B]L[/B]oad="YES"
```

:r

Although I now still have this:





What should I do with this? Ly awake at night wondering about it, or?

Thanks again


----------



## Bunyan (Apr 7, 2010)

KDE has its own sound infrastructure - arts.
Perhaps it conflicts with the FreeBSD's sound system.
To accept what KDE suggests is a bad ideea, I think.
You probably should open KControl > Sound & Multimedia
and choose OSS.


----------



## Caliante (Apr 7, 2010)

Bunyan said:
			
		

> KDE has its own sound infrastructure - arts.
> Perhaps it conflicts with the FreeBSD's sound system.
> To accept what KDE suggests is a bad ideea, I think.
> You probably should open KControl > Sound & Multimedia
> and choose OSS.



Thank you for your reply :e

I tried what you said, but on reboot I still get the above message :r


----------



## Bunyan (Apr 7, 2010)

Reading of *man snd_hda* might help you a lot in this matter.
Unfortunately, I don't use this driver and cannot suggest you anything
more than that.
I use *snd_ich* which is statically compiled into the kernel, because I hate modules.

```
device  sound
      device  snd_ich
```
Then I added to */boot/loader.conf* the following lines:

```
dev.pcm.0.play.vchans=4
hint.pcm.0.eq=1
hint.pcm.0.vpc=1
```

As a result, I can play 4 (!) audio/video files simultaneously, the microphone works and everything is fine.
KDE-3/4 never complained.
The fact is that I haven't used KDE for a very,very long time.
I would suggest you installing */usr/ports/audio/oss*.
Comment out the line *snd_hda_load="YES"*
and issue:
[CMD=]"~#:echo 'oss_enable="YES"' >> /etc/rc.conf"[/CMD]
KDE will run smoothly with Open Sound System.
You'll have to tune your volume settins with *ossxmixer*.
BTW, *BSD sound drivers are kind of OSS, too.


----------

