# 5.1 audio channels in Free BSD



## carlosalvet (Sep 16, 2010)

Hi I am new in Free BSD so that I am using PC-BSD for comfort.

Before i was using Ubuntu and i decided for this SO thinking in more stable system.

I have a 5.1 audio channel speakers and i don't know how to configure them in my PC-BSD i could read about a virtual channel but i didn't understand very well. Someone can tell me how can i do to has my 5.1 audio channel output working very well?

thanks before hand!


----------



## DutchDaemon (Sep 17, 2010)

Topics about PC-BSD / FreeNAS / DesktopBSD / m0N0WALL / pfSense


----------



## mav@ (Sep 17, 2010)

Start with reading sound(4) and snd_hda(4) manual pages. Consider looking on `dev.pcm.%d.play.vchanformat` sysctl. If your BIOS properly configured your CODEC - this single sysctl should allow to enable multichannel playback. Sure multichannel playback chould be also supported by your media player.


----------



## carlosalvet (Sep 20, 2010)

thanks mav@ i was searching and before last post i found this:

in this page http://www.freebsd.org/cgi/man.cgi?q...eBSD+8-current i found a several steps


```
cat /etc/sndstat
```

FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:

```
pcm0: <HDA Realtek ALC885 PCM #0 Analog> (play/rec) default
pcm1: <HDA Realtek ALC885 PCM #1 Analog> (play/rec)
pcm2: <HDA Realtek ALC885 PCM #2 Digital> (play/rec)
```
my sound driver is: snd_hda_load="YES"

it says in 

http://www.freebsd.org/cgi/man.cgi?q...eBSD+8-current

and I added this control in /etc/sysctl.conf with:


```
snd_hda_load="YES"
```
and then add the hints to start in the reboot

```
hint.pcm.0.at="isa"
           hint.pcm.0.irq="5"
           hint.pcm.0.drq="1"
           hint.pcm.0.flags="0x0"
```
and with the hints the sound drivers crash so after reboot the devices are undetected and i can't continue

in the first link following the instructions found with this hints added.


```
#hint.hdac.0.cad0.nid20.config="as=1 seq=0"
#hint.hdac.0.cad0.nid24.config="as=1 seq=1 device=Line-out"
#hint.hdac.0.cad0.nid26.config="as=1 seq=2 device=Line-out"
#hint.hdac.0.cad0.nid21.config="as=2 seq=0"
```
what's the meaning of "nid #" or where can i read about these? why 20,24 and 26? which may i use?

here is the data sheet of my sound card realtek ALC889

http://www.realtek.com.tw/downloads/...Downloads=true

I am really looking for information to my problem.

with this hints the 3th device is lost it and the SO recognize 2 sound drivers divece #0 and #1 but it doesn't care because these don't play any sound, just follow the song with play and without any sound.

thanks before hand!


----------



## DutchDaemon (Sep 20, 2010)

When a post is held for moderation there is really no point in posting it five times in a row, carlosalvet.


----------



## carlosalvet (Sep 27, 2010)

*success!!! issue finally end!*

This issue was result in this forum:

Thanks for help mav@:

Sorry for the repeat posts.

http://forums.pcbsd.org/showthread.php?t=13634

It wasn't so difficult, just what mav@ said, thanks.


----------

