History

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.

Takashi Sakamoto committed 8 years ago

Commit e6f32bf1 parent 16bafa71 file · +8 −0Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/sound/tlv.h+8−0
@@ -83,6 +83,10 @@ · 82 unmodified lines
83 SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \83 SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \
84 }84 }
85 85
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
86/* linear volume between min_dB and max_dB (.01dB unit) */90/* linear volume between min_dB and max_dB (.01dB unit) */
87#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \91#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \
88 SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB))92 SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB))
@@ -91,6 +95,10 @@ · 2 unmodified lines
91 SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \95 SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \
92 }96 }
93 97
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
94/* dB range container:102/* dB range container:
95 * Items in dB range container must be ordered by their values and by their103 * Items in dB range container must be ordered by their values and by their
96 * dB values. This implies that larger values must correspond with larger104 * dB values. This implies that larger values must correspond with larger

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t