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.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -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 their | 103 | * 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 larger | 104 | * dB values. This implies that larger values must correspond with larger |