Commit 063a40d9 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] Add the definition of linear volume TLV

Added the definition of linear volume TLV type.
Some DSP chips and codecs (e.g. AK codec) use linear volume control.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 1f14d167
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */ #define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */
#define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */ #define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */
#define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */
#define DECLARE_TLV_DB_SCALE(name, min, step, mute) \ #define DECLARE_TLV_DB_SCALE(name, min, step, mute) \
unsigned int name[] = { \ unsigned int name[] = { \
...@@ -40,4 +41,13 @@ unsigned int name[] = { \ ...@@ -40,4 +41,13 @@ unsigned int name[] = { \
(min), ((step) & 0xffff) | ((mute) ? 0x10000 : 0) \ (min), ((step) & 0xffff) | ((mute) ? 0x10000 : 0) \
} }
/* linear volume between min_dB and max_dB (.01dB unit) */
#define DECLARE_TLV_DB_LINEAR(name, min_dB, max_dB) \
unsigned int name[] = { \
SNDRV_CTL_TLVT_DB_LINEAR, 2 * sizeof(unsigned int), \
(min_dB), (max_dB) \
}
#define TLV_DB_GAIN_MUTE -9999999
#endif /* __SOUND_TLV_H */ #endif /* __SOUND_TLV_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment