Skip to content

Commit e6f32bf

Browse files
takaswietiwai
authored andcommitted
ALSA: control: complement TLV macro for db-minmax and db-linear types
A commit 08f9f44 ('ALSA: core api: define offsets for TLV items') introduced a series of macro for offset of db-scale type of TLV, however there are some types of TLV to add similar macros. This commit complements macros for offset of db-minmax and db-linear types of TLV data. Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 16bafa7 commit e6f32bf

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎include/uapi/sound/tlv.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \
8484
}
8585

86+
/* Accessor offsets for min, max items in db-minmax types of TLV. */
87+
#define SNDRV_CTL_TLVO_DB_MINMAX_MIN 2
88+
#define SNDRV_CTL_TLVO_DB_MINMAX_MAX 3
89+
8690
/* linear volume between min_dB and max_dB (.01dB unit) */
8791
#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \
8892
SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB))
@@ -91,6 +95,10 @@
9195
SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \
9296
}
9397

98+
/* Accessor offsets for min, max items in db-linear type of TLV. */
99+
#define SNDRV_CTL_TLVO_DB_LINEAR_MIN 2
100+
#define SNDRV_CTL_TLVO_DB_LINEAR_MAX 3
101+
94102
/* dB range container:
95103
* Items in dB range container must be ordered by their values and by their
96104
* dB values. This implies that larger values must correspond with larger

0 commit comments

Comments
 (0)