[alsa-devel] [PATCH 02/16] ASoC: core: Add 8bit multi reg control accessors

Kristoffer KARLSSON kristoffer.karlsson at stericsson.com
Thu Mar 22 17:58:41 CET 2012


On 2012-03-13 22:25, Mark Brown wrote:

> On Tue, Mar 13, 2012 at 04:11:29PM +0100, Ola Lilja wrote:
>> From: Kristoffer KARLSSON <kristoffer.karlsson at stericsson.com>
>>
>> Added get/put accessors for controls that span multiple 8bit registers
>> which together forms a single signed value in a MSB/LSB manner.
>>
>> snd_soc_get_xr8_sx
>> snd_soc_put_xr8_sx
>>
>> Signed-off-by: Kristoffer KARLSSON <kristoffer.karlsson at stericsson.com>
> 
> This needs to be part of a patch adding one or more actual control
> types, just adding bits like this makes things harder to review as it's
> hard to see how things fit together.


I agree. I will provide a more complete patch including actual control type so
that reviewing would be made easier. The patch will expose parameters like
"register base" and "register count". This control will then fully support any
composite values composed from a parameterized number of contiguous 8-bit
registers in only one single macro while fully supporting both writing and
reading back the composite values transparently to the client.

We do have several controls composed by chunks of 8-bit registers that both are
contiguous and supports reading back in our hardware and I guess that this
might not be such an unusual setup for other hardwares either, which would make
for a useful generic control I believe.

Do you agree that such a control type could be an useful generic one in the
framework?


More information about the Alsa-devel mailing list