The sound volume is too low!!

Hi Folks,

I'm using FreeBSD 8.1 Release amd64 on a MacBook Pro 4.1.

Code:
$ uname -a
FreeBSD mbp13x17.localhost 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 
2010     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

As you can see I have this sound card:
Code:
$ cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA Realtek ALC885 PCM #0 Analog> (play/rec)
pcm1: <HDA Realtek ALC885 PCM #1 Analog> (play/rec) default
pcm2: <HDA Realtek ALC885 PCM #2 Digital> (play/rec)

The problem is (no matter if I'm using the kernel module snd_hda or OSS 4.2 from ports):

The output sound volume is too low, It seems the output volume is about at most 1/30 of what I've got from Gentoo/Windoz/OSX.

I must adhere my ears to the speakers to hear the sound.
Code:
$ mixer vol 100 pcm 100 speaker 100 line 100 mix 100 rec 100 igain 100
Setting the mixer vol from 100:100 to 100:100.
Setting the mixer pcm from 100:100 to 100:100.
Setting the mixer speaker from 75:75 to 100:100.
Setting the mixer line from 75:75 to 100:100.
Setting the mixer mix from 100:100 to 100:100.
Setting the mixer rec from 100:100 to 100:100.
Setting the mixer igain from 100:100 to 100:100.

$ mixer
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer line     is currently set to 100:100
Mixer mix      is currently set to 100:100
Mixer rec      is currently set to 100:100
Mixer igain    is currently set to 100:100
Recording source: line

For a long long time I want to install FreeBSD as my desktop OS (I had it as a server OS for about two years already). The only thing that kept me away from it, is hardware issue.

Now I have installed FreeBSD and I'm loving it so much (I came from a Gentoo background, and never looked back).

The only major problems I have are (Of course there are minor things that I've miss from Gentoo, but who cares):
1. SOUND (Any help will be *REALLY REALLY* appreciated).
2. Freeze with 8.2 Release (I'll stick with 8.1 until 9.0-current solve this issue).
http://forums.freebsd.org/showthread.php?t=22083
http://docs.freebsd.org/cgi/getmsg....2011/freebsd-current/20110313.freebsd-current


PLZ HELPPPP �e
 
Is the volume low only in speakers or in headphones also? If headphones are fine, problem can be related to some off-chip power amplifier. On many laptops they are controlled via CODECs General Purpose I/O pins. You may wish to experiment with setting hint.hdac.0.config="gpioX" tunables.
 
Hi, and thanks for replying.

formateur_fou said:
Hi,

Apparently, the default in your case is pcm.1. Maybe you can try to append this to the file /boot/device.hints:
[CMD=]hint.pcm.1.vol="90"[/CMD]

I tried various values but that won't work.

dandelion said:
Try increasing hw.snd.vpc_0db sysctl, mixers on other pcm%d devices and/or tweaking hint.hdac.%d.config.

Tried different values for this one too but that won't work too.

Code:
babaei@mbp13x17 /usr/home/babaei $ sudo sysctl -i hw.snd
hw.snd.feeder_rate_quality: 1
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.feeder_eq_exact_rate: 0
hw.snd.feeder_eq_presets: PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
hw.snd.vpc_reset: 0
hw.snd.vpc_0db: 90
hw.snd.vpc_autoreset: 1
hw.snd.latency_profile: 1
hw.snd.latency: 5
hw.snd.report_soft_matrix: 1
hw.snd.report_soft_formats: 1
hw.snd.compat_linux_mmap: 0
hw.snd.vpc_mixer_bypass: 1
hw.snd.verbose: 0
hw.snd.maxautovchans: 16
hw.snd.default_unit: 1
hw.snd.version: 2009061500/amd64
hw.snd.default_auto: 0


mav@ said:
Is the volume low only in speakers or in headphones also? If headphones are fine, problem can be related to some off-chip power amplifier. On many laptops they are controlled via CODECs General Purpose I/O pins. You may wish to experiment with setting hint.hdac.0.config="gpioX" tunables.

The only one that matters is hint.hdac.0.config="gpio0".

When I tried this one it produces a very very annoying loud sound (whistling) upon boot.

Anyway thanks for help. Is there any other suggestions that I could try?

PS. Forgot to mention:
I plugged this laptop to an external monitor which also has a speaker. When I unplug the monitor's speaker from laptop, there is absolutely no sound on laptop's own speaker (Even if I try sudo sysctl hw.snd.default_unit=0, no matter).
Also headphone is working but with a very very lower sound than the monitor's speaker.
 
Whistle usually means analog audio loopback. Try to set all controls except pcm, vol and ogain to zero to cut all unrequired paths.
 
Thanks for replying.

But first I must mention that I didn't have any ogain channel
Code:
$ mixer
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer line     is currently set to 100:100
Mixer mix      is currently set to 100:100
Mixer rec      is currently set to 100:100
Mixer igain    is currently set to 100:100
Recording source: line

# I did these changes to /boot/device.hints
Code:
hint.hdac.0.config="gpio0"
hint.pcm.1.vol="100"
hint.pcm.1.pcm="100"
hint.pcm.1.speaker="0"
hint.pcm.1.line="0"
hint.pcm.1.mix="0"
hint.pcm.1.rec="0"
hint.pcm.1.igain="0"

It seems these settings does not change the mixer volumes. Then again I ran
$ mixer vol 100 pcm 100 speaker 0 line 0 mix 0 rec 0 igain 0

But the result is still the same. Whistling forever. :(
It whistles through the laptop's own speaker not the external speaker connected through jack.
 
NuLL3rr0r said:
But the result is still the same. Whistling forever.
It whistles through the laptop's own speaker not the external speaker connected through jack.

For me, the terrible whistling occurs when igain is anything but zero.

I also have strange volume troubles. For me, when my volume sounds low despite "mixer vol" showing "100" I can restore a louder volume by opening a movie in multimedia/mplayer and telling mplayer to increase the volume. This seems to increase some volume control separate from the one controlled by the mixer command.

You might be able to find some help from the sysctl options documented in snd(4).
 
Thanks, I tried that too without any luck.

Setting up a desktop system based on FreeBSD was full of fun, and it proves me FreeBSD is actually ready for the desktop. But I think I'm not ready for BSD on the desktop, still. I have no choice other than going back to Gentoo (trying Funtoo now). Next time I'll buy FreeBSD compatible hardware to have fun again.

Thanks for your support.
 
mav@ said:
Try to set all controls except pcm, vol and ogain to zero to cut all unrequired paths.
Shouldn't this also include mixers on other pcm devices? Smth like
$ mixer [b][file]-f /dev/mixer0[/file][/b] line 0 mix 0 ... # for pcm0
$ mixer [b][file]-f /dev/mixer2[/file][/b] line 0 mix 0 ... # for pcm2
 
Hi again,
I figured out this is not only FreeBSD issue, But Linux has this issue too (Just some tweaking needed to make it work).

I formatted the BSD partition and downloaded Gentoo 11 LiveDVD to install Funtoo.

I noticed the exact same problem with Gentoo. The sound volume is as low as FreeBSD. When I completed setting up my Funtoo Box, I noticed the same thing.
Then I remembered while ago I had this problem with my first Gentoo Installation on this MacBook Pro.

The solution for Gentoo/Funtoo is adding
Code:
options snd-hda-intel model=mbp3
to /etc/modprobe.d/alsa.conf.

Certainly some tweaking for FreeBSD is possible since the sound is working. Since ALSA is Linuxish, I'll hope I'll found a similar solution for FreeBSD.
 
Back
Top