summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2018-05-14 07:09:50 +0900
committerTakashi Iwai <tiwai@suse.de>2018-05-14 17:47:37 +0200
commite6f32bf48fb1d3b7aedc0deb6e791362af71cb17 (patch)
treea94fe3b862c03fcb45fe734488d78d51faa28451
parent16bafa792c860e50768b2527ded364137c6ed21e (diff)
downloadlinux-e6f32bf48fb1d3b7aedc0deb6e791362af71cb17.tar.bz2
ALSA: control: complement TLV macro for db-minmax and db-linear types
A commit 08f9f4485f21 ('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>
-rw-r--r--include/uapi/sound/tlv.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/uapi/sound/tlv.h b/include/uapi/sound/tlv.h
index e3437e96519a..7d6d65f60a42 100644
--- a/include/uapi/sound/tlv.h
+++ b/include/uapi/sound/tlv.h
@@ -83,6 +83,10 @@
SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \
}
+/* Accessor offsets for min, max items in db-minmax types of TLV. */
+#define SNDRV_CTL_TLVO_DB_MINMAX_MIN 2
+#define SNDRV_CTL_TLVO_DB_MINMAX_MAX 3
+
/* linear volume between min_dB and max_dB (.01dB unit) */
#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \
SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB))
@@ -91,6 +95,10 @@
SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \
}
+/* Accessor offsets for min, max items in db-linear type of TLV. */
+#define SNDRV_CTL_TLVO_DB_LINEAR_MIN 2
+#define SNDRV_CTL_TLVO_DB_LINEAR_MAX 3
+
/* dB range container:
* Items in dB range container must be ordered by their values and by their
* dB values. This implies that larger values must correspond with larger