# Sound in FreeBSD 8.0 & Notebook HP 4510s



## Antarex (Jan 9, 2010)

Hi to All! Sorry for my bad English...

I am have the notebook HP ProBook 4510s <NX668EA> (Sound HDA Analog Devices AD1984A). On FreeBSD 8.0 and PC-BSD 8.0 Beta I have faced with one problem: sound play only from internal notebook speakers even if external stereo speakers are plugged.

In Russian ALT Linux 5.0.0 KDE 4.3.4 Desktop sound play fine from external stereo speakers.

How can I fix this problem?

P.S. In Russian BSD Forum was suggestion to correct setting in Ð² /boot/device.hints (hint.pcm.0.config="gpio2"), but this not works.


----------



## mav@ (Jan 9, 2010)

Start from reading snd_hda man page. Hint you've tried spells differently since 7.2. There are also a lot if different hints possible to try, but it is difficult to recommend without seeing your _verbose_ dmesg.


----------



## Antarex (Jan 9, 2010)

verbose dmesg


----------



## Antarex (Jan 11, 2010)

How can I fix this problem?


----------



## mdg583 (Jan 11, 2010)

Are you using the oss from ports? (if oss is installed and oss_enable="YES" in rc.conf)

I think oss from ports doesn't yet support detection of whether or not something is plugged in to one of the jacks. At least it didn't for me about 6 months ago. You could mute and unmute internal speakers and/or jacks seperately, I think using ossmix.

I used the following two commands:


```
ossmix jack.int-speaker.mute ON
ossmix jack.green.mute OFF
```


----------



## mav@ (Jan 12, 2010)

As I can see from dmesg, your codec configured to provide two separate audio devices: pcm0 (dsp0) does to speaker and built-in mic, pcm1 (dsp1) goes to headphones and external mic. You'll see these two devices if you do `cat /dev/sndstat`.

In this situation you may either just use second device as default by setting `sysctl hw.snd.default_unit=1`, or read snd_hda man page and write some device hints to configure codec for auto-switching.


----------



## Antarex (Jan 13, 2010)

[Solved] With setting in /etc/sysctl.conf


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

sound play fine from external stereo speakers!


----------

