• M
    ASoC: core: Add signed register volume control logic · f227b88f
    Markus Pargmann 提交于
    Some codecs use signed volume control representation with non standard
    register sizes, e.g. 6 or 7 bit signed integers.
    
    This patch adds generic signed register volume control logic to
    soc-core. Instead of a fixed width signed register control, this
    implementation uses a 'min' value and the signed bit location to translate
    it to an absolute volume. Using the 'sign_bit' we can calculate a
    correct mask for the register values and translate it back into signed
    integers of standard size.
    Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
    Signed-off-by: NMark Brown <broonie@linaro.org>
    f227b88f
soc.h 40.3 KB