From: Markus Pargmann Date: Thu, 16 Jan 2014 15:02:10 +0000 (+0100) Subject: ASoC: core: Add signed register volume control logic X-Git-Tag: v3.15-rc1~36^2~1^2~5^2~3^4~6^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f227b88f0fce5f9b82aa934f8829a741c2e06d82;p=pandora-kernel.git ASoC: core: Add signed register volume control logic 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: Markus Pargmann Signed-off-by: Mark Brown --- Reading git-diff-tree failed