# Having problems with sound hardware



## razixx (May 23, 2011)

Hi guys, currently I'm having problems with trying to get the sound to work.  I've installed FreeBSD on an Asus n61Jq laptop and am unable to get the sound working.  The wm is kde4


```
> uname -a
FreeBSD CHRIS-IT-LT.kelsey.local 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

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

Here is my loader.conf:


```
> cat /boot/loader.conf
kern.maxfiles="25000"

# Kernel Modules
if_ath_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"

sound_load="YES"
snd_uaudio_load="YES"
hw.snd.default_unit="1"
snd_hda_load="YES"
```

When I log in to the desktop this is the error message that gets displayed ever with the above and a reboot:

```
The audio playback device HDA ATI R6xx HDMI PCM #0 HDMI (pcm) does not work.
Falling back to default.
```

I have to apologize because I did double post in this [thread=23916]thread[/thread] but because it's marked solved, I think people are just skipping over it (that post was removed - Mod.). I have the exact same problem but the solution doesn't work.


----------



## SirDice (May 23, 2011)

Same issue: Thread 23916


----------



## DutchDaemon (May 23, 2011)

Oops, I see I chopped off the tail end of OP's opening post after I removed that double post. Added back.


----------



## SirDice (May 23, 2011)

The "problem" is that the sound chip on your videocard is detected first and is then used as the default.

This should fix it:

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

You can add the sysctl to /etc/sysctl.conf to keep the setting after a reboot.


----------



## razixx (May 23, 2011)

Just to confirm, I've already declared this value in /boot/loader.conf.


```
CHRIS-IT-LT# sysctl hw.snd.default_unit
hw.snd.default_unit: 1
```

Any other suggestions?


```
CHRIS-IT-LT# kldstat
Id Refs Address    Size     Name
 1   11 0xc0400000 bd97b4   kernel
 3    4 0xc104f000 56794    sound.ko
 4    1 0xc10a6000 1c260    snd_hda.ko
 5    1 0xc10c3000 e618     snd_uaudio.ko
```

dmesg.boot/verbose
http://paste.pocoo.org/show/393853/


----------



## razixx (May 23, 2011)

So this is what I've found so far, I've read snd_hda(4) in its entirety, but will probably need to reread a few more times as the information is a little hard to digest.

Sound works through the jacks, but the laptop's internal speakers do not work.  So in a worst case scenario, I can just plug in some external speakers and can live with that.  But it would be really neat to get the internal ones working.  I'm going to keep playing around with it and when I find a solution, I will post back.  Unless someone finds one before me :e.

Thanks for your suggestions SirDice.


----------



## jb_fvwm2 (May 24, 2011)

Found a post (linux) (2009) that suggests with that posts' tweaks you might fix this sound issue by seeing the post I put about oss4 in the HowTo subforum (a few months ago), installing oss4, and using tweaks to that to see if the internal speakers would work...  That was so easy (on a desktop anyway) that I quit trying to configure the snd_hda per se...


----------

