Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/sound
File: tlv.h
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
[0] Fix | Delete
[1] Fix | Delete
#ifndef __UAPI_SOUND_TLV_H
[2] Fix | Delete
#define __UAPI_SOUND_TLV_H
[3] Fix | Delete
[4] Fix | Delete
#define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */
[5] Fix | Delete
#define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */
[6] Fix | Delete
#define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */
[7] Fix | Delete
#define SNDRV_CTL_TLVT_DB_RANGE 3 /* dB range container */
[8] Fix | Delete
#define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */
[9] Fix | Delete
#define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */
[10] Fix | Delete
[11] Fix | Delete
/*
[12] Fix | Delete
* channel-mapping TLV items
[13] Fix | Delete
* TLV length must match with num_channels
[14] Fix | Delete
*/
[15] Fix | Delete
#define SNDRV_CTL_TLVT_CHMAP_FIXED 0x101 /* fixed channel position */
[16] Fix | Delete
#define SNDRV_CTL_TLVT_CHMAP_VAR 0x102 /* channels freely swappable */
[17] Fix | Delete
#define SNDRV_CTL_TLVT_CHMAP_PAIRED 0x103 /* pair-wise swappable */
[18] Fix | Delete
[19] Fix | Delete
/*
[20] Fix | Delete
* TLV structure is right behind the struct snd_ctl_tlv:
[21] Fix | Delete
* unsigned int type - see SNDRV_CTL_TLVT_*
[22] Fix | Delete
* unsigned int length
[23] Fix | Delete
* .... data aligned to sizeof(unsigned int), use
[24] Fix | Delete
* block_length = (length + (sizeof(unsigned int) - 1)) &
[25] Fix | Delete
* ~(sizeof(unsigned int) - 1)) ....
[26] Fix | Delete
*/
[27] Fix | Delete
#define SNDRV_CTL_TLVD_ITEM(type, ...) \
[28] Fix | Delete
(type), SNDRV_CTL_TLVD_LENGTH(__VA_ARGS__), __VA_ARGS__
[29] Fix | Delete
#define SNDRV_CTL_TLVD_LENGTH(...) \
[30] Fix | Delete
((unsigned int)sizeof((const unsigned int[]) { __VA_ARGS__ }))
[31] Fix | Delete
[32] Fix | Delete
/* Accessor offsets for TLV data items */
[33] Fix | Delete
#define SNDRV_CTL_TLVO_TYPE 0
[34] Fix | Delete
#define SNDRV_CTL_TLVO_LEN 1
[35] Fix | Delete
[36] Fix | Delete
#define SNDRV_CTL_TLVD_CONTAINER_ITEM(...) \
[37] Fix | Delete
SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__)
[38] Fix | Delete
#define SNDRV_CTL_TLVD_DECLARE_CONTAINER(name, ...) \
[39] Fix | Delete
unsigned int name[] = { \
[40] Fix | Delete
SNDRV_CTL_TLVD_CONTAINER_ITEM(__VA_ARGS__) \
[41] Fix | Delete
}
[42] Fix | Delete
[43] Fix | Delete
#define SNDRV_CTL_TLVD_DB_SCALE_MASK 0xffff
[44] Fix | Delete
#define SNDRV_CTL_TLVD_DB_SCALE_MUTE 0x10000
[45] Fix | Delete
#define SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) \
[46] Fix | Delete
SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_SCALE, \
[47] Fix | Delete
(min), \
[48] Fix | Delete
((step) & SNDRV_CTL_TLVD_DB_SCALE_MASK) | \
[49] Fix | Delete
((mute) ? SNDRV_CTL_TLVD_DB_SCALE_MUTE : 0))
[50] Fix | Delete
#define SNDRV_CTL_TLVD_DECLARE_DB_SCALE(name, min, step, mute) \
[51] Fix | Delete
unsigned int name[] = { \
[52] Fix | Delete
SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) \
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
/* Accessor offsets for min, mute and step items in dB scale type TLV */
[56] Fix | Delete
#define SNDRV_CTL_TLVO_DB_SCALE_MIN 2
[57] Fix | Delete
#define SNDRV_CTL_TLVO_DB_SCALE_MUTE_AND_STEP 3
[58] Fix | Delete
[59] Fix | Delete
/* dB scale specified with min/max values instead of step */
[60] Fix | Delete
#define SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) \
[61] Fix | Delete
SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB))
[62] Fix | Delete
#define SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \
[63] Fix | Delete
SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX_MUTE, (min_dB), (max_dB))
[64] Fix | Delete
#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(name, min_dB, max_dB) \
[65] Fix | Delete
unsigned int name[] = { \
[66] Fix | Delete
SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) \
[67] Fix | Delete
}
[68] Fix | Delete
#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX_MUTE(name, min_dB, max_dB) \
[69] Fix | Delete
unsigned int name[] = { \
[70] Fix | Delete
SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
/* Accessor offsets for min, max items in db-minmax types of TLV. */
[74] Fix | Delete
#define SNDRV_CTL_TLVO_DB_MINMAX_MIN 2
[75] Fix | Delete
#define SNDRV_CTL_TLVO_DB_MINMAX_MAX 3
[76] Fix | Delete
[77] Fix | Delete
/* linear volume between min_dB and max_dB (.01dB unit) */
[78] Fix | Delete
#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \
[79] Fix | Delete
SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB))
[80] Fix | Delete
#define SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(name, min_dB, max_dB) \
[81] Fix | Delete
unsigned int name[] = { \
[82] Fix | Delete
SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \
[83] Fix | Delete
}
[84] Fix | Delete
[85] Fix | Delete
/* Accessor offsets for min, max items in db-linear type of TLV. */
[86] Fix | Delete
#define SNDRV_CTL_TLVO_DB_LINEAR_MIN 2
[87] Fix | Delete
#define SNDRV_CTL_TLVO_DB_LINEAR_MAX 3
[88] Fix | Delete
[89] Fix | Delete
/* dB range container:
[90] Fix | Delete
* Items in dB range container must be ordered by their values and by their
[91] Fix | Delete
* dB values. This implies that larger values must correspond with larger
[92] Fix | Delete
* dB values (which is also required for all other mixer controls).
[93] Fix | Delete
*/
[94] Fix | Delete
/* Each item is: <min> <max> <TLV> */
[95] Fix | Delete
#define SNDRV_CTL_TLVD_DB_RANGE_ITEM(...) \
[96] Fix | Delete
SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__)
[97] Fix | Delete
#define SNDRV_CTL_TLVD_DECLARE_DB_RANGE(name, ...) \
[98] Fix | Delete
unsigned int name[] = { \
[99] Fix | Delete
SNDRV_CTL_TLVD_DB_RANGE_ITEM(__VA_ARGS__) \
[100] Fix | Delete
}
[101] Fix | Delete
[102] Fix | Delete
#define SNDRV_CTL_TLVD_DB_GAIN_MUTE -9999999
[103] Fix | Delete
[104] Fix | Delete
#endif
[105] Fix | Delete
[106] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function