# No Sound in FreeBSD 8.1



## jewsofeast (Nov 14, 2010)

Hi,

I have reinstalled oss twice [CMD="cd /usr/ports/audio/oss/ && make install clean"][/CMD] but it hasnt worked and have tried [CMD="kldload snd_driver"][/CMD]


```
FBSD# ossdetect -v
Detected Nvidia High Definition Audio (MCP61)
```


```
soundon
```
 doesnt return any errors.


```
ll /usr/local/lib/oss/modules/oss_audigyls.ko
-r-xr-xr-x  1 root  wheel  24488 Nov 14 22:19 /usr/local/lib/oss/modules/oss_audigyls.ko
```


```
kldload  /usr/local/lib/oss/modules/oss_audigyls.ko
```
 this loads the module.


```
FBSD# kldstat
Id Refs Address    Size     Name
 1   93 0xc0400000 bb5504   kernel
 2    1 0xc0fb6000 a4c4b0   nvidia.ko
 3    2 0xc1a03000 2d900    linux.ko
 4    1 0xc7a50000 2000     blank_saver.ko
 5    1 0xc838c000 2000     snd_driver.ko
 6    1 0xc838f000 5000     snd_vibes.ko
 7   34 0xc83a2000 4d000    sound.ko
 8    1 0xc846d000 4000     snd_via82c686.ko
 9    1 0xc8488000 7000     snd_via8233.ko
10    1 0xc8490000 5000     snd_t4dwave.ko
11    3 0xc8495000 3000     snd_spicds.ko
12    1 0xc8498000 5000     snd_solo.ko
13    4 0xc849d000 4000     snd_sbc.ko
14    1 0xc84a1000 4000     snd_sb8.ko
15    1 0xc84a6000 4000     snd_sb16.ko
16    1 0xc84aa000 11000    snd_neomagic.ko
17    2 0xc84bb000 a000     snd_mss.ko
18    1 0xc84c9000 a000     snd_maestro3.ko
19    1 0xc84d3000 8000     snd_maestro.ko
20    1 0xc84db000 6000     snd_ich.ko
21    1 0xc84e1000 1a000    snd_hda.ko
22    1 0xc8540000 4000     snd_fm801.ko
23    1 0xc854d000 5000     snd_ess.ko
24    1 0xc8555000 8000     snd_es137x.ko
25    1 0xc8564000 7000     snd_envy24ht.ko
26    1 0xc856b000 8000     snd_envy24.ko
27    1 0xc8573000 12000    snd_emu10kx.ko
28    1 0xc8585000 b000     snd_ds1.ko
29    2 0xc8598000 7000     snd_csa.ko
30    1 0xc85a1000 5000     snd_cs4281.ko
31    1 0xc85a6000 5000     snd_cmi.ko
32    1 0xc85ab000 6000     snd_atiixp.ko
33    1 0xc85b2000 5000     snd_als4000.ko
34    1 0xc85d4000 4000     snd_ad1816.ko
35    3 0xc8861000 7a000    osscore.ko
36    1 0xc88db000 28000    oss_hdaudio.ko
37    1 0xc87ab000 6000     oss_audigyls.ko
```


```
FBSD# pkg_info -Lx oss | grep audigy
/usr/local/man/man7/oss_audigyls.7.gz
/usr/local/lib/oss/conf/oss_audigyls.conf.sample
/usr/local/lib/oss/modules/oss_audigyls.ko
```


```
FBSD# ossinfo 
Version info: OSS 4.2 (b 2003/201011141418) (0x00040100) BSD
Platform: FreeBSD/i386 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC (FBSD.freebsd.org)

Number of audio devices:        0
Number of audio engines:        0
Number of MIDI devices:         0
Number of mixer devices:        0


Device objects

MIDI devices (/dev/midi*)

Mixer devices

Audio devices

Nodes
```

this doesnt show any audio devices. 


```
FBSD# ll /usr/local/lib/oss/modules
total 1582
-r-xr-xr-x  1 root  wheel   18439 Nov 14 22:19 oss_ali5455.ko
-r-xr-xr-x  1 root  wheel   19887 Nov 14 22:19 oss_atiaudio.ko
-r-xr-xr-x  1 root  wheel   24488 Nov 14 22:19 oss_audigyls.ko
-r-xr-xr-x  1 root  wheel   15917 Nov 14 22:19 oss_audioloop.ko
-r-xr-xr-x  1 root  wheel   23590 Nov 14 22:19 oss_audiopci.ko
-r-xr-xr-x  1 root  wheel   31571 Nov 14 22:19 oss_cmi878x.ko
-r-xr-xr-x  1 root  wheel   27333 Nov 14 22:19 oss_cmpci.ko
-r-xr-xr-x  1 root  wheel   18554 Nov 14 22:19 oss_cs4281.ko
-r-xr-xr-x  1 root  wheel   79050 Nov 14 22:19 oss_cs461x.ko
-r-xr-xr-x  1 root  wheel   18745 Nov 14 22:19 oss_digi96.ko
-r-xr-xr-x  1 root  wheel   20964 Nov 14 22:19 oss_emu10k1x.ko
-r-xr-xr-x  1 root  wheel  153367 Nov 14 22:19 oss_envy24.ko
-r-xr-xr-x  1 root  wheel   66395 Nov 14 22:19 oss_envy24ht.ko
-r-xr-xr-x  1 root  wheel   18726 Nov 14 22:19 oss_fmedia.ko
-r-xr-xr-x  1 root  wheel   17944 Nov 14 22:19 oss_geode.ko
-r-xr-xr-x  1 root  wheel  133011 Nov 14 22:19 oss_hdaudio.ko
-r-xr-xr-x  1 root  wheel   24389 Nov 14 22:19 oss_ich.ko
-r-xr-xr-x  1 root  wheel   18298 Nov 14 22:19 oss_imux.ko
-r-xr-xr-x  1 root  wheel   23644 Nov 14 22:19 oss_madi.ko
-r-xr-xr-x  1 root  wheel   12549 Nov 14 22:19 oss_midiloop.ko
-r-xr-xr-x  1 root  wheel   10288 Nov 14 22:19 oss_midimix.ko
-r-xr-xr-x  1 root  wheel   87128 Nov 14 22:19 oss_sblive.ko
-r-xr-xr-x  1 root  wheel   21246 Nov 14 22:19 oss_sbpci.ko
-r-xr-xr-x  1 root  wheel   31983 Nov 14 22:19 oss_sbxfi.ko
-r-xr-xr-x  1 root  wheel   19593 Nov 14 22:19 oss_solo.ko
-r-xr-xr-x  1 root  wheel   21712 Nov 14 22:19 oss_trident.ko
-r-xr-xr-x  1 root  wheel   21944 Nov 14 22:19 oss_userdev.ko
-r-xr-xr-x  1 root  wheel   19030 Nov 14 22:19 oss_via823x.ko
-r-xr-xr-x  1 root  wheel   17916 Nov 14 22:19 oss_via97.ko
-r-xr-xr-x  1 root  wheel   47952 Nov 14 22:19 oss_ymf7xx.ko
-r-xr-xr-x  1 root  wheel  495126 Nov 14 22:19 osscore.ko
```

How do I get the sound working.

Best,

David


----------



## adamk (Nov 14, 2010)

Well, first, OSSv4 from ports and OSSv3 from the FreeBSD base system do not mix.  All those snd_ modules you have loaded are from the base system and the oss_ modules are from OSSv4.  Having them loaded together is bad bad bad.  I highly recommend uninstalling OSSv4 from ports and only use it if we can't get your sound working with OSSv3 from the base system.  So uninstall that.

Then, add this line to /boot/loader.conf:


```
snd_hda_load="YES"
```

And reboot.  See if that gets sound working.

Adam


----------



## jewsofeast (Nov 27, 2010)

I deinstalled OSS v4 but still no sound.

here is my /boot/loader.conf


```
Realtek_ALC662_load="YES"
nvidia_load="YES"
snd_hda_load="YES"
```


```
FBSD# cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0: <HDA Realtek ALC662 PCM #0 Analog> (play/rec) default
pcm1: <HDA Realtek ALC662 PCM #1 Analog> (play/rec)
pcm2: <HDA Realtek ALC662 PCM #2 Digital> (play)
```

Not sure what's going on.


----------



## adamk (Nov 27, 2010)

So your sound card is now detected and the driver is loaded.  What applications have you tried to get sound from?

Adam


----------



## jewsofeast (Nov 28, 2010)

I am trying to configure multimedia under system settings from kde menu. It plays a wave file for detecting audio device. Its basically analog PCM for output device preference.


----------



## adamk (Nov 28, 2010)

If I had to guess, I'd say that you need to adjust some variables via devices.hints, per the snd_hda man page.  Unfortunately, I'm not sure I can be of any assistance with that since I've never had to deal with it before.  I'd start by taking a look at that man page, though.

Adam


----------



## aragon (Nov 28, 2010)

Do a verbose boot and post the contents of /var/run/dmesg.boot to pastebin.

(run boot -v at loader prompt to do a verbose boot)


----------



## jewsofeast (Nov 29, 2010)

aragon said:
			
		

> Do a verbose boot and post the contents of /var/run/dmesg.boot to pastebin.
> 
> (run boot -v at loader prompt to do a verbose boot)




I am running recursive portupgrade at the moment (pulling my hairs off over kdehier). 

I will post the boot messages after portupgrade.


----------



## jewsofeast (Nov 29, 2010)

jewsofeast said:
			
		

> I am running recursive portupgrade at the moment (pulling my hairs off over kdehier).
> 
> I will post the boot messages after portupgrade.



Here it is

http://pastebin.com/ucjZEab1

I guess this will save time -

```
grep pcm0 /var/run/dmesg.boot
pcm0: <HDA Realtek ALC662 PCM #0 Analog> at cad 0 nid 1 on hdac0
pcm0: +--------------------------------------+
pcm0: | DUMPING PCM Playback/Record Channels |
pcm0: +--------------------------------------+
pcm0: 
pcm0: Playback:
pcm0: 
pcm0:      Stream cap: 0x00000001
pcm0:                  PCM
pcm0:         PCM cap: 0x000e0160
pcm0:                  16 20 24 bits, 44 48 96 KHz
pcm0:             DAC: 2
pcm0: 
pcm0: Record:
pcm0: 
pcm0:      Stream cap: 0x00000001
pcm0:                  PCM
pcm0:         PCM cap: 0x00060160
pcm0:                  16 20 bits, 44 48 96 KHz
pcm0:             ADC: 8
pcm0: 
pcm0: +-------------------------------+
pcm0: | DUMPING Playback/Record Paths |
pcm0: +-------------------------------+
pcm0: 
pcm0: Playback:
pcm0: 
pcm0:     nid=20 [pin: Line-out (Green Jack)]
pcm0:       |
pcm0:       + <- nid=12 [audio mixer] [src: pcm, mix]
pcm0:              |
pcm0:              + <- nid=2 [audio output] [src: pcm]
pcm0:              + <- nid=11 [audio mixer] [src: mix]
pcm0: 
pcm0: Record:
pcm0: 
pcm0:     nid=8 [audio input]
pcm0:       |
pcm0:       + <- nid=35 [audio mixer] [src: line, mic, mix]
pcm0:              |
pcm0:              + <- nid=24 [pin: Mic (Pink Jack)] [src: mic]
pcm0:              + <- nid=26 [pin: Line-in (Blue Jack)] [src: line]
pcm0:              + <- nid=11 [audio mixer] [src: mix]
pcm0: 
pcm0: Input Mix:
pcm0: 
pcm0:     nid=11 [audio mixer]
pcm0:       |
pcm0:       + <- nid=24 [pin: Mic (Pink Jack)] [src: mic]
pcm0:       + <- nid=26 [pin: Line-in (Blue Jack)] [src: line]
pcm0: 
pcm0: +-------------------------+
pcm0: | DUMPING Volume Controls |
pcm0: +-------------------------+
pcm0: 
pcm0: Master Volume (OSS: vol)
pcm0:    |
pcm0:    +- ctl  1 (nid   2 out):    -64/0dB (65 steps)
pcm0:    +- ctl 15 (nid  12 in   0): mute
pcm0:    +- ctl 16 (nid  12 in   1): mute
pcm0:    +- ctl 21 (nid  20 in ):    mute
pcm0: 
pcm0: PCM Volume (OSS: pcm)
pcm0:    |
pcm0:    +- ctl  1 (nid   2 out):    -64/0dB (65 steps)
pcm0:    +- ctl 15 (nid  12 in   0): mute
pcm0: 
pcm0: Microphone Volume (OSS: mic)
pcm0:    |
pcm0:    +- ctl 25 (nid  24 out):    0/30dB (4 steps)
pcm0:    +- ctl 41 (nid  35 in   0): mute
pcm0: 
pcm0: Line-in Volume (OSS: line)
pcm0:    |
pcm0:    +- ctl  8 (nid  11 in   2): -34/12dB (32 steps) + mute
pcm0:    +- ctl 43 (nid  35 in   2): mute
pcm0: 
pcm0: Recording Level (OSS: rec)
pcm0:    |
pcm0:    +- ctl  4 (nid   8 in   0): -13/33dB (32 steps) + mute
pcm0:    +- ctl 41 (nid  35 in   0): mute
pcm0:    +- ctl 43 (nid  35 in   2): mute
pcm0:    +- ctl 50 (nid  35 in   9): mute
pcm0: 
pcm0: Input Mix Level (OSS: mix)
pcm0:    |
pcm0:    +- ctl  6 (nid  11 in   0): -34/12dB (32 steps) + mute
pcm0:    +- ctl  8 (nid  11 in   2): -34/12dB (32 steps) + mute
pcm0:    +- ctl 16 (nid  12 in   1): mute
pcm0:    +- ctl 50 (nid  35 in   9): mute
pcm0: 
pcm0: Input Monitoring Level (OSS: igain)
pcm0:    |
pcm0:    +- ctl 16 (nid  12 in   1): mute
pcm0: 
pcm0: Mixer "vol":
pcm0: Mixer "pcm":
pcm0: Mixer "line":
pcm0: Mixer "mic":
pcm0: Mixer "mix":
pcm0: Mixer "rec":
pcm0: Mixer "igain":
pcm0: Mixer "ogain":
pcm0: clone manager: deadline=750ms flags=0x8000001e
pcm0: sndbuf_setmap 1d30000, 4000; 0xe7368000 -> 1d30000
pcm0: sndbuf_setmap 1d40000, 4000; 0xe7378000 -> 1d40000
```


----------



## aragon (Dec 1, 2010)

Try this:

`# sysctl hw.snd.default_unit=1`

If it doesn't work, you might need to need to tweak hint.hdac.0.config.  See snd_hda(4) for available options.  For example, on my laptop I have to add to /boot/loader.conf:


```
hint.hdac.0.config="gpio2"
```


----------

