]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: core: Change SOC_SINGLE/DOUBLE_VALUE representation
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 5 Oct 2011 07:29:22 +0000 (10:29 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 5 Oct 2011 16:10:09 +0000 (17:10 +0100)
commita21eff8a8a486201aecd32d886e774909a0b29aa
tree07dbc0f940832ca806f81f8adbb91b0e80273dab
parent39a487c2b8ed3ee5d63eb0d38a3959b47d8371d5
ASoC: core: Change SOC_SINGLE/DOUBLE_VALUE representation

SOC_SINGLE/DOUBLE_VALUE is used for mixer controls, where the
bits are within one register.

Assign .rreg to be the same as .reg for these types.

With this change we can tell if the mixer in question:
is mono:
mc->reg == mc->rreg && mc->shift == mc->rshift

is stereo, within single register:
mc->reg == mc->rreg && mc->shift != mc->rshift

is stereo, in two registers:
mc->reg != mc->rreg

The patch provide a small inline function to query, if the mixer
is stereo, or mono.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
include/sound/soc.h