Solved [Solved] Mixer volume doesn't affect actual volume

Hello everyone,

I'm starting to get the hang of configuring FreeBSD, since upgrading my DIY NAS from FreeBSD 8.2 to 10 and building another for my dad. But I've got this issue with the sound volume that I cannot seem to solve on my system. I'm using Music Player Daemon (musicpd in the ports collection) and have the PC connected to my stereo with an optical connection. When I change the (software) volume through a client for the MPD I can see the volume change reflected in FreeBSD when I check the mixer but the sound volume does not actually change :q Also if I manually change the volume with the mixer command it doesn't affect the actual volume :\

This has got me totally confused, since everything was working fine with the same hardware when the system was running on FreeBSD 8.2. Some relevant information:

Code:
dmesg | grep hda
hdac0: <NVIDIA MCP61 HDA Controller> mem 0xdfff4000-0xdfff7fff irq 23 at device 5.0 on pci0
hdacc0: <VIA VT1708S_0 HDA CODEC> at cad 0 on hdac0
hdaa0: <VIA VT1708S_0 Audio Function Group> at nid 1 on hdacc0
pcm0: <VIA VT1708S_0 (Analog 2.0+HP/2.0)> at nid 28,29 and 26,30,27 on hdaa0
pcm1: <VIA VT1708S_0 (Digital)> at nid 32 on hdaa0

Code:
cat /boot/loader.conf
# Tuning parameters for ZFS pool
vm.kmem.size="1024M"
vm.kmem_size_max="1024M"
vfs.zfs.arc_max="100M"

#Load sound driver on bootup
snd_driver_load="YES"
#snd_hda_driver_load="YES"

#Load NVIDIA X display driver on bootup
#nvidia_load="YES"

Code:
cat /dev/sndstat
Installed devices:
pcm0: <VIA VT1708S_0 (Analog 2.0+HP/2.0)> (play/rec)
pcm1: <VIA VT1708S_0 (Digital)> (play) default

Code:
cat /etc/sysctl.conf
# $FreeBSD: src/etc/sysctl.conf,v 1.8.34.1.4.1 2010/06/14 02:09:06 kensmith Exp $
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#

# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0

#SPDIF OUT
hw.snd.default_unit=1
dev.pcm.1.play.vchans=0
dev.pcm.1.bitperfect=1

#Analog out
#hw.snd.default_unit=0

I would like to ask if anyone has any suggestions as to what I can try to fix this? I was thinking of possibly installing OSS from the ports collection, but I'd like to avoid installing extra stuff if it's not needed. Any help is greatly appreciated, thank you.
 
Re: Mixer volume doesn't affect actual volume

There's more than one audio volume setting. There's volume, and then there's the PCM device, and others. What does the output of just mixer show?
 
Re: Mixer volume doesn't affect actual volume

Hi wblock@.

Thanks for replying.

Code:
mixer
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100

I tried changing both vol and pcm to 0:
Code:
mixer -s pcm 50
Setting the mixer pcm from 100:100 to 50:50.
[root@Thuis /usr/home/Jorn]# mixer 0
Setting the mixer vol from 100:100 to 0:0.
[root@Thuis /usr/home/Jorn]# mixer -s pcm 0
Setting the mixer pcm from 50:50 to 0:0.
[root@Thuis /usr/home/Jorn]# mixer
Mixer vol      is currently set to   0:0
Mixer pcm      is currently set to   0:0

But it is by no means silent after that, the volume does not change at the digital output apparently. :\

EDIT: for the record, changing the volume via the MPD client changes the pcm volume.
 
Re: Mixer volume doesn't affect actual volume

Bump, anyone got an idea for me to try?
 
Re: Mixer volume doesn't affect actual volume

No expert here, but could it be the
Code:
dev.pcm.1.bitperfect=1
that is causing it to act this way? According to sound(4), bitperfect mode will
skip all dsp processing, such as channel matrixing, rate converting and equalizing. The pure sound stream will be fed directly to the hardware.
, which sounds to me like it would even bypass the mixer for volume adjustments.
 
Re: Mixer volume doesn't affect actual volume

Thanks for replying. I will try that later this week, I'm abroad at the moment. I'll post the results. It would be surprising to say the least since volume adjustment was working with the same settings under FreeBSD 8.2.
 
Re: Mixer volume doesn't affect actual volume

@ljboiler, this setting is indeed causing the unwanted behaviour. When I set
Code:
dev.pcm.1.bitperfect=0
the volume adjustment works again. I still find it strange that this was working before under the older version of FreeBSD. Now I will need to find out how to get a similar unmodified stream, I only want volume adjustment.

Thanks for your help :h I could have tried this before I guess, but as I said it's really weird that this did work before on FreeBSD 8.2.
 
Last edited by a moderator:
Back
Top