# Can't get sound to work



## astralfx (May 20, 2011)

I've spent almost the whole day trying different things out, searched thought so many posts, and sound still won't work, even though all the modules etc and loaded. I give up and resort to asking for help..

I used 2 music players to test it:
moc
ncmpc

And tried: cat filename > /dev/dsp

But I don't here a thing.. :/


```
FreeBSD  8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011     
root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
```


```
[file]/boot/loader.conf[/file]
sem_load="YES"
snd_driver_load="YES"

hint.pcm.0.at="isa"
hint.pcm.0.irq="5"
hint.pcm.0.drq="1"
hint.pcm.0.flags="0x0"
```

I put all this extra stuff to see if it works. I originally had just sem_load="YES" but that still doesn't work.



```
[file]/dev/sndstat[/file]
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm1: <HDA ATI R6xx HDMI PCM #0 HDMI> (play) default
pcm2: <HDA IDT 92HD75BX PCM #0 Analog> (play/rec)
pcm3: <HDA IDT 92HD75BX PCM #1 Analog> (play/rec)
pcm4: <HDA IDT 92HD75BX PCM #2 Digital> (play)
```



```
[file][B]kldstat[/B][/file]
Id Refs Address    Size     Name
 1   92 0xc0400000 bd97b4   kernel
 2    1 0xc0fda000 381c     snd_driver.ko
 3    1 0xc0fde000 52f4     snd_ad1816.ko
 4   35 0xc0fe4000 56794    sound.ko
 5    1 0xc103b000 58d4     snd_als4000.ko
 6    1 0xc1041000 7520     snd_atiixp.ko
 7    1 0xc1049000 5a30     snd_cmi.ko
 8    1 0xc104f000 5a20     snd_cs4281.ko
10    1 0xc105e000 b9cc     snd_ds1.ko
11    1 0xc106a000 14e8c    snd_emu10kx.ko
12    1 0xc107f000 9434     snd_envy24.ko
13    3 0xc1089000 29f0     snd_spicds.ko
14    1 0xc108c000 81f4     snd_envy24ht.ko
15    1 0xc1095000 8bc0     snd_es137x.ko
16    1 0xc109e000 5fa0     snd_ess.ko
17    4 0xc10a4000 4e30     snd_sbc.ko
18    1 0xc10a9000 4f40     snd_fm801.ko
19    2 0xc10ae000 c8a0     snd_mss.ko
20    1 0xc10bb000 1c260    snd_hda.ko
21    1 0xc10d8000 7120     snd_ich.ko
22    1 0xc10e0000 94a8     snd_maestro.ko
23    1 0xc10ea000 b50c     snd_maestro3.ko
24    1 0xc10f6000 11868    snd_neomagic.ko
25    1 0xc1108000 4768     snd_sb16.ko
26    1 0xc110d000 4ec0     snd_sb8.ko
27    1 0xc1112000 6070     snd_solo.ko
28    1 0xc1119000 5cbc     snd_t4dwave.ko
29    1 0xc111f000 8190     snd_via8233.ko
30    1 0xc1128000 5154     snd_via82c686.ko
31    1 0xc112e000 5d60     snd_vibes.ko
32    1 0xc72fc000 8000     linprocfs.ko
33    1 0xc7304000 26000    linux.ko
34    1 0xc779f000 68000    radeon.ko
35    1 0xc7807000 14000    drm.ko
```



```
[file]dmesg.boot[/file]
hdac0: <ATI RV730 High Definition Audio Controller> mem 0xd2310000-0xd2313fff irq 19 at device 0.1 on pci1
hdac0: HDA Driver Revision: 20100226_0142
hdac0: [ITHREAD]
hdac1: <ATI SB600 High Definition Audio Controller> mem 0xd2400000-0xd2403fff irq 16 at device 20.2 on pci0
hdac1: HDA Driver Revision: 20100226_0142
hdac1: [ITHREAD]
hdac0: HDA Codec #0: ATI R6xx HDMI
hdac1: HDA Codec #0: IDT 92HD75BX
..
pcm1: <HDA ATI R6xx HDMI PCM #0 HDMI> (play) default
pcm2: <HDA IDT 92HD75BX PCM #0 Analog> (play/rec)
pcm3: <HDA IDT 92HD75BX PCM #1 Analog> (play/rec)
pcm4: <HDA IDT 92HD75BX PCM #2 Digital> (play)
..
```

Help


----------



## SirDice (May 20, 2011)

sem_load is to load a kernel module that allows System V R4 style semaphores, it has nothing to do with audio. It's also not needed to load it as it's already part of the GENERIC kernel.

Looking at your /dev/sndstat output you'll need:

```
snd_hda_load="YES"
```

Have a look in the snd_hda(4) man page. This specific chipset can be wired differently depending on the manufacturer. You probably need to assign the correct output to the correct connectors.

Also note that the first "soundcard" that's detected is the sound output on your (HDMI) videocard.


----------



## astralfx (May 20, 2011)

Thanks sirdice, you got me thinking. I changed the output and it worked.

Here's the code I used:


```
sysctl hw.snd.default_unit=1
```

And 
	
	



```
cat rand.txt > /dev/dsp
```
 makes sound


----------

