]> git.alsa-project.org Git - alsa-utils.git/commit
alsactl: correctly restore dB values of controls with changed range
authorClemens Ladisch <clemens@ladisch.de>
Wed, 26 May 2010 08:27:25 +0000 (10:27 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 12 Sep 2012 13:45:59 +0000 (15:45 +0200)
commit4cc6e48eede5a43303666999a72f226f1b5d2aa8
tree17e67c7e5c78caf504ff500ab10817e9ff584d3b
parent764b1049c16d955a7f30044fc54800db71e1908e
alsactl: correctly restore dB values of controls with changed range

When the range of a control has changed between driver versions, it is a
good idea to restore the same dB value of the control.  However,
computing the dB value by interpolating betweem the min/max dB values
duplicates alsa-lib's TLV functions and does not even work for controls
with a linear dB range.

A simple conversion to dB and back can be done if we add the dB value(s)
to the saved state.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
alsactl/state.c