summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-01-22 10:24:12 +0000
committermav <mav@FreeBSD.org>2012-01-22 10:24:12 +0000
commit0bff2999ef046949afb901ef7339258b70a228c0 (patch)
tree756a1753c84b667ebe58839ec84faaed0cf7a7fb /sys/netinet
parent5d0a4619603c5a23a070725ec7221cd056bbc559 (diff)
downloadFreeBSD-src-0bff2999ef046949afb901ef7339258b70a228c0.zip
FreeBSD-src-0bff2999ef046949afb901ef7339258b70a228c0.tar.gz
Complete rewrite of the snd_hda(4) volume control.
Previous code was relatively dumb. During CODEC probe it was tracing signals and statically binding amplifier controls to the OSS mixer controls. To set volume it just set all bound amplifier controls proportionally to mixer level, not looking on their hierarchy and amplification levels/offsets. New code is much smarter. It also traces signals during probe, but mostly to find out possible amplification control rages in dB for each specific signal. To set volume it retraces each affected signal again and sets amplifiers controls recursively to reach desired amplification level in dB. It would be nice to export values in dB to user, but unluckily our OSS mixer API is too simple for that. As result of this change: - cascaded amplifiers will work together to reach maximal precision. If some input has 0/+40dB preamplifier with 10dB step and -10/+10dB mixer with 1dB step after it, new code will use both to provide 0/+40dB control with 1dB step! We could even get -10/+50dB range there, but that is intentionally blocked for now. - different channels of multichannel associations on non-uniform CODECs such as VIA VT1708S will have the same volume, not looking that control ranges are different. It was not good when fronts were 12dB louder. - for multiplexed recording, when we can record from only one source at a time, we can now use recording amplifier controls to set different volume levels for different inputs if they have no own controls of they are less precise. If recording source change, amplifiers will be reconfigured. To improve out-of-the-box behavior, ignore default volume levels set by sound(4) and use own, more reasonable: +20dB for mics, -10dB for analog output volume and 0dB for the rest of controls. sound(4) defaults of 75% mean absolutely random things for different controls of different CODECs because of very different control ranges. Together with further planned automatic recording source selection this should allow users to get fine playback and recording without touching mixer first. Note that existing users should delete /var/db/mixer*-state and reboot or trigger CODEC reconfiguration to get new default values. MFC after: 2 months Sponsored by: iXsystems, Inc.
Diffstat (limited to 'sys/netinet')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud