[alsa-devel] Question about snd_soc_add_controls
broonie at opensource.wolfsonmicro.com
Mon Jun 21 11:41:31 CEST 2010
On 21 Jun 2010, at 10:19, Kuninori Morimoto wrote:
> But I wonder
> #define DECLARE_TLV_DB_SCALE(name, min, step, mute)
> Does this "mute" mean that it can use mute ?
> But how to ?
In many chips the lowest gain setting is defined as mute rather than
a dB value. Setting the mute flag indicates that this is the case for
this gain control.
> #define SOC_DOUBLE_R_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert, tlv_array)
> What is this "xinvert" ?
It means that instead of the lowest register value being the lowest
volume the highest register value is the lowest volume. This is used
to ensure the control is mapped properly in userspace so sliders
raise the volume when moved upwards.
> Can you please teach me about above ?
> And where is these code used ?
> It seems very complex for me...
See the functions that are specified in the macro - these values are
used to generate ALSA controls for the specified bitfields.
More information about the Alsa-devel