[alsa-devel] [PATCH] ASoC: introduce SOC_SINGLE_S8_TLV macro
Lars-Peter Clausen
lars at metafoo.de
Mon Jan 9 09:21:19 CET 2012
On 01/08/2012 09:23 PM, Mark Brown wrote:
> On Sat, Jan 07, 2012 at 05:53:26PM -0800, Patrick Lai wrote:
>> ASoC currently has macro for double 8-bit signed TLV.
>> Enhance info,get,put callback functions of SOC_DOUBLE_S8_TLV
>> for single single 8-bit signed TLV.
>
> Actually now I look at this I'm not sure that the existing macro isn't
> just misnamed:
>
> | #define SOC_DOUBLE_S8_TLV(xname, xreg, xmin, xmax, tlv_array) \
>
> Since no shifts are specified the signature is just the same as your
> SOC_SINGLE_S8_TLV:
>
There is a shift, but it is hard coded to 8 in snd_soc_get_volsw_s8, which
isn't considered by the patch currently. So either SOC_DOUBLE_S8_TLV should
initialize rshift to 8 or a shift and rshift parameter should be added. It
might also makes sense to add a shift parameter to SOC_SINGLE_S8_TLV as well.
- Lars
More information about the Alsa-devel
mailing list