# configure sound on freeBSD 8.1



## ccc (Sep 12, 2010)

hi

Howto configure sound on freeBSD 8.1 Release?
I added these lines:
	
	



```
# cat /boot/loader.conf
sound_load="YES"
snd_ich_load="YES"
```
but still doesn't work.


```
# dmesg | grep multimedia
pci0: <multimedia, audio> at device 17.5 (no driver attached)

# cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:

# kldstat
Id Refs Address    Size     Name
 1   12 0xc0400000 bb5504   kernel
 2    2 0xc0fb6000 57824    sound.ko
 3    1 0xc100e000 7224     snd_ich.ko
 4    1 0xc6518000 26000    linux.ko

# pciconf -vl
hostb0@pci0:0:0:0:      class=0x060000 card=0x02961106 chip=0x02961106 rev=0x00 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'P4M800 Standard Host Bridge'
    class      = bridge
    subclass   = HOST-PCI
hostb1@pci0:0:0:1:      class=0x060000 card=0x00000000 chip=0x12961106 rev=0x00 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'P4M800 Standard Host Bridge'
    class      = bridge
    subclass   = HOST-PCI
hostb2@pci0:0:0:2:      class=0x060000 card=0x00000000 chip=0x22961106 rev=0x00 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'P4M800 Standard Host Bridge'
    class      = bridge
    subclass   = HOST-PCI
hostb3@pci0:0:0:3:      class=0x060000 card=0x00000000 chip=0x32961106 rev=0x00 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'P4M800 Standard Host Bridge'
    class      = bridge
    subclass   = HOST-PCI
hostb4@pci0:0:0:4:      class=0x060000 card=0x00000000 chip=0x42961106 rev=0x00 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'P4M800 Standard Host Bridge'
    class      = bridge
    subclass   = HOST-PCI
hostb5@pci0:0:0:7:      class=0x060000 card=0x00000000 chip=0x72961106 rev=0x00 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'P4M800 Standard Host Bridge'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:1:0:       class=0x060400 card=0x00000000 chip=0xb1981106 rev=0x00 hdr=0x01
    vendor     = 'VIA Technologies, Inc.'
    device     = 'ProSavageDDR P4X600,Apollo KT400/A/600 CPU to AGP Bridge'
    class      = bridge
    subclass   = PCI-PCI
em0@pci0:0:7:0: class=0x020000 card=0x13768086 chip=0x107c8086 rev=0x05 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Gigabit Ethernet Controller (Copper) rev 5 (82541PI)'
    class      = network
    subclass   = ethernet
atapci0@pci0:0:15:0:    class=0x010400 card=0x70711462 chip=0x31491106 rev=0x80 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'SATA RAID Controller (VT8237 Family/ VT6420)'
    class      = mass storage
    subclass   = RAID
atapci1@pci0:0:15:1:    class=0x01018a card=0x70711462 chip=0x05711106 rev=0x06 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'Bus Master IDE Controller (VT82C686B/VT823x/A/C)'
    class      = mass storage
    subclass   = ATA
uhci0@pci0:0:16:0:      class=0x0c0300 card=0x70711462 chip=0x30381106 rev=0x81 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'VT82xxxxx UHCI USB 1.1 Controller (All VIA Chipsets)'
    class      = serial bus
    subclass   = USB
uhci1@pci0:0:16:1:      class=0x0c0300 card=0x70711462 chip=0x30381106 rev=0x81 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'VT82xxxxx UHCI USB 1.1 Controller (All VIA Chipsets)'
    class      = serial bus
    subclass   = USB
uhci2@pci0:0:16:2:      class=0x0c0300 card=0x70711462 chip=0x30381106 rev=0x81 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'VT82xxxxx UHCI USB 1.1 Controller (All VIA Chipsets)'
    class      = serial bus
    subclass   = USB
uhci3@pci0:0:16:3:      class=0x0c0300 card=0x70711462 chip=0x30381106 rev=0x81 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'VT82xxxxx UHCI USB 1.1 Controller (All VIA Chipsets)'
    class      = serial bus
    subclass   = USB
ehci0@pci0:0:16:4:      class=0x0c0320 card=0x70711462 chip=0x31041106 rev=0x86 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'VT6202/12 USB 2.0 Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
isab0@pci0:0:17:0:      class=0x060100 card=0x32271106 chip=0x32271106 rev=0x00 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'PCI-to-ISA Bridge (VT8237)'
    class      = bridge
    subclass   = PCI-ISA
none0@pci0:0:17:5:      class=0x040100 card=0xb0121462 chip=0x30591106 rev=0x60 hdr=0x00
    [B]vendor     = 'VIA Technologies, Inc.'
    device     = 'VT8233/A AC'97 Enhanced Audio Controller'
    class      = multimedia
    subclass   = audio[/B]
vr0@pci0:0:18:0:        class=0x020000 card=0x70711462 chip=0x30651106 rev=0x78 hdr=0x00
    vendor     = 'VIA Technologies, Inc.'
    device     = 'Rhine II PCI Fast Ethernet Controller (VT6103)'
    class      = network
    subclass   = ethernet
vgapci0@pci0:1:0:0:     class=0x030000 card=0x98901462 chip=0x00f210de rev=0xa2 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    device     = 'NVIDIA GeForce 6600 (BR02)'
    class      = display
    subclass   = VGA
```


----------



## Beastie (Sep 12, 2010)

ccc said:
			
		

> I added these lines:
> 
> 
> 
> ...


First, you can remove *sound_load*. It will be loaded automatically anyway if you load any driver.

Also, are you sure snd_ich(4) is the appropriate driver for your audio device? Find out using `% pciconf -lv`


----------



## Beastie (Sep 12, 2010)

Then maybe snd_via8233(4)?


----------



## ccc (Sep 12, 2010)

Thx, I added the following lines in /boot/loader.conf:
	
	



```
# cat /boot/loader.conf
[B][color="DarkGreen"]snd_via8233_load="YES"
hw.ata.atapi_dma=1
hw.ata.ata_dma=1[/color][/B]
```
and now it sems to work.

```
# cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0: <VIA VT8237> (play/rec) default
```


----------



## hedgehog (Sep 12, 2010)

how to find out which driver you need for your sound card: handbook

by the way, usually you can simple do this. load all drivers:
`# kldload snd_driver`
unload it :] 
`# kldunload snd_driver`
check what's left loaded:
`$ kldstat`


----------

