Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1311232 > unrolled thread
| Started by | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| First post | 2016-01-18 04:30 +0100 |
| Last post | 2016-01-18 04:30 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 3.2 10/70] ALSA: tlv: add DECLARE_TLV_DB_RANGE() Ben Hutchings <ben@decadent.org.uk> - 2016-01-18 04:30 +0100
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2016-01-18 04:30 +0100 |
| Subject | [PATCH 3.2 10/70] ALSA: tlv: add DECLARE_TLV_DB_RANGE() |
| Message-ID | <qS8FY-3hu-13@gated-at.bofh.it> |
3.2.76-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Clemens Ladisch <clemens@ladisch.de>
commit bf1d1c9b6179faa3bc32cee882462bc8eebde25d upstream.
Add a DECLARE_TLV_DB_RANGE() macro so that dB range information
can be specified without having to count the items manually for
TLV_DB_RANGE_HEAD().
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
include/sound/tlv.h | 4 ++++
1 file changed, 4 insertions(+)
--- a/include/sound/tlv.h
+++ b/include/sound/tlv.h
@@ -71,6 +71,10 @@
/* dB range container */
/* Each item is: <min> <max> <TLV> */
+#define TLV_DB_RANGE_ITEM(...) \
+ TLV_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__)
+#define DECLARE_TLV_DB_RANGE(name, ...) \
+ unsigned int name[] = { TLV_DB_RANGE_ITEM(__VA_ARGS__) }
/* The below assumes that each item TLV is 4 words like DB_SCALE or LINEAR */
#define TLV_DB_RANGE_HEAD(num) \
SNDRV_CTL_TLVT_DB_RANGE, 6 * (num) * sizeof(unsigned int)
Back to top | Article view | linux.kernel
csiph-web