| 1 |
|
| 2 | |
| 3 | * The MIPI SDCA specification is available for public downloads at
|
| 4 | * https://www.mipi.org/mipi-sdca-v1-0-download
|
| 5 | *
|
| 6 | * Copyright(c) 2024 Intel Corporation
|
| 7 |
|
| 8 |
|
| 9 | #ifndef __SDCA_FUNCTION_H__
|
| 10 | #define __SDCA_FUNCTION_H__
|
| 11 |
|
| 12 | #include <linux/bits.h>
|
| 13 | #include <linux/types.h>
|
| 14 | #include <linux/hid.h>
|
| 15 |
|
| 16 | struct acpi_table_swft;
|
| 17 | struct device;
|
| 18 | struct sdca_entity;
|
| 19 | struct sdca_function_desc;
|
| 20 |
|
| 21 | #define SDCA_NO_INTERRUPT -1
|
| 22 |
|
| 23 | |
| 24 | * The addressing space for SDCA relies on 7 bits for Entities, so a
|
| 25 | * maximum of 128 Entities per function can be represented.
|
| 26 |
|
| 27 | #define SDCA_MAX_ENTITY_COUNT 128
|
| 28 |
|
| 29 | |
| 30 | * The Cluster IDs are 16-bit, so a maximum of 65535 Clusters per
|
| 31 | * function can be represented, however limit this to a slightly
|
| 32 | * more reasonable value. Can be expanded if needed.
|
| 33 |
|
| 34 | #define SDCA_MAX_CLUSTER_COUNT 256
|
| 35 |
|
| 36 | |
| 37 | * Sanity check on number of channels per Cluster, can be expanded if needed.
|
| 38 |
|
| 39 | #define SDCA_MAX_CHANNEL_COUNT 32
|
| 40 |
|
| 41 | |
| 42 | * Sanity check on number of PDE delays, can be expanded if needed.
|
| 43 |
|
| 44 | #define SDCA_MAX_DELAY_COUNT 256
|
| 45 |
|
| 46 | |
| 47 | * Sanity check on size of affected controls data, can be expanded if needed.
|
| 48 |
|
| 49 | #define SDCA_MAX_AFFECTED_COUNT 2048
|
| 50 |
|
| 51 | |
| 52 | * enum sdca_function_type - SDCA Function Type codes
|
| 53 | * @SDCA_FUNCTION_TYPE_SMART_AMP: Amplifier with protection features.
|
| 54 | * @SDCA_FUNCTION_TYPE_SIMPLE_AMP: Subset of SmartAmp.
|
| 55 | * @SDCA_FUNCTION_TYPE_SMART_MIC: Smart microphone with acoustic triggers.
|
| 56 | * @SDCA_FUNCTION_TYPE_SIMPLE_MIC: Subset of SmartMic.
|
| 57 | * @SDCA_FUNCTION_TYPE_SPEAKER_MIC: Combination of SmartMic and SmartAmp.
|
| 58 | * @SDCA_FUNCTION_TYPE_UAJ: 3.5mm Universal Audio jack.
|
| 59 | * @SDCA_FUNCTION_TYPE_RJ: Retaskable jack.
|
| 60 | * @SDCA_FUNCTION_TYPE_SIMPLE_JACK: Subset of UAJ.
|
| 61 | * @SDCA_FUNCTION_TYPE_HID: Human Interface Device, for e.g. buttons.
|
| 62 | * @SDCA_FUNCTION_TYPE_COMPANION_AMP: Sources audio from another amp.
|
| 63 | * @SDCA_FUNCTION_TYPE_IMP_DEF: Implementation-defined function.
|
| 64 | *
|
| 65 | * SDCA Function Types from SDCA specification v1.0a Section 5.1.2
|
| 66 | * all Function types not described are reserved.
|
| 67 | *
|
| 68 | * Note that SIMPLE_AMP, SIMPLE_MIC and SIMPLE_JACK Function Types
|
| 69 | * are NOT defined in SDCA 1.0a, but they were defined in earlier
|
| 70 | * drafts and are planned for 1.1.
|
| 71 |
|
| 72 | enum sdca_function_type {
|
| 73 | SDCA_FUNCTION_TYPE_SMART_AMP = 0x01,
|
| 74 | SDCA_FUNCTION_TYPE_SIMPLE_AMP = 0x02,
|
| 75 | SDCA_FUNCTION_TYPE_SMART_MIC = 0x03,
|
| 76 | SDCA_FUNCTION_TYPE_SIMPLE_MIC = 0x04,
|
| 77 | SDCA_FUNCTION_TYPE_SPEAKER_MIC = 0x05,
|
| 78 | SDCA_FUNCTION_TYPE_UAJ = 0x06,
|
| 79 | SDCA_FUNCTION_TYPE_RJ = 0x07,
|
| 80 | SDCA_FUNCTION_TYPE_SIMPLE_JACK = 0x08,
|
| 81 | SDCA_FUNCTION_TYPE_HID = 0x0A,
|
| 82 | SDCA_FUNCTION_TYPE_COMPANION_AMP = 0x0B,
|
| 83 | SDCA_FUNCTION_TYPE_IMP_DEF = 0x1F,
|
| 84 | };
|
| 85 |
|
| 86 |
|
| 87 | #define SDCA_FUNCTION_TYPE_SMART_AMP_NAME "SmartAmp"
|
| 88 | #define SDCA_FUNCTION_TYPE_SIMPLE_AMP_NAME "SimpleAmp"
|
| 89 | #define SDCA_FUNCTION_TYPE_SMART_MIC_NAME "SmartMic"
|
| 90 | #define SDCA_FUNCTION_TYPE_SIMPLE_MIC_NAME "SimpleMic"
|
| 91 | #define SDCA_FUNCTION_TYPE_SPEAKER_MIC_NAME "SpeakerMic"
|
| 92 | #define SDCA_FUNCTION_TYPE_UAJ_NAME "UAJ"
|
| 93 | #define SDCA_FUNCTION_TYPE_RJ_NAME "RJ"
|
| 94 | #define SDCA_FUNCTION_TYPE_SIMPLE_NAME "SimpleJack"
|
| 95 | #define SDCA_FUNCTION_TYPE_HID_NAME "HID"
|
| 96 | #define SDCA_FUNCTION_TYPE_COMPANION_AMP_NAME "CompanionAmp"
|
| 97 | #define SDCA_FUNCTION_TYPE_IMP_DEF_NAME "ImplementationDefined"
|
| 98 |
|
| 99 | |
| 100 | * struct sdca_init_write - a single initialization write
|
| 101 | * @addr: Register address to be written
|
| 102 | * @val: Single byte value to be written
|
| 103 |
|
| 104 | struct sdca_init_write {
|
| 105 | u32 addr;
|
| 106 | u8 val;
|
| 107 | };
|
| 108 |
|
| 109 | |
| 110 | * define SDCA_CTL_TYPE - create a unique identifier for an SDCA Control
|
| 111 | * @ent: Entity Type code.
|
| 112 | * @sel: Control Selector code.
|
| 113 | *
|
| 114 | * Sometimes there is a need to identify a type of Control, for example to
|
| 115 | * determine what name the control should have. SDCA Selectors are reused
|
| 116 | * across Entity types, as such it is necessary to combine both the Entity
|
| 117 | * Type and the Control Selector to obtain a unique identifier.
|
| 118 |
|
| 119 | #define SDCA_CTL_TYPE(ent, sel) ((ent) << 8 | (sel))
|
| 120 |
|
| 121 | |
| 122 | * define SDCA_CTL_TYPE_S - static version of SDCA_CTL_TYPE
|
| 123 | * @ent: Entity name, for example IT, MFPU, etc. this string can be read
|
| 124 | * from the last characters of the SDCA_ENTITY_TYPE_* macros.
|
| 125 | * @sel: Control Selector name, for example MIC_BIAS, MUTE, etc. this
|
| 126 | * string can be read from the last characters of the SDCA_CTL_*_*
|
| 127 | * macros.
|
| 128 | *
|
| 129 | * Short hand to specific a Control type statically for example:
|
| 130 | * SDCA_CTL_TYPE_S(IT, MIC_BIAS).
|
| 131 |
|
| 132 | #define SDCA_CTL_TYPE_S(ent, sel) SDCA_CTL_TYPE(SDCA_ENTITY_TYPE_##ent, \
|
| 133 | SDCA_CTL_##ent##_##sel)
|
| 134 |
|
| 135 | |
| 136 | * enum sdca_messageoffset_range - Column definitions UMP MessageOffset
|
| 137 |
|
| 138 | enum sdca_messageoffset_range {
|
| 139 | SDCA_MESSAGEOFFSET_BUFFER_START_ADDRESS = 0,
|
| 140 | SDCA_MESSAGEOFFSET_BUFFER_LENGTH = 1,
|
| 141 | SDCA_MESSAGEOFFSET_UMP_MODE = 2,
|
| 142 | SDCA_MESSAGEOFFSET_NCOLS = 3,
|
| 143 | };
|
| 144 |
|
| 145 | |
| 146 | * enum sdca_ump_mode - SDCA UMP Mode
|
| 147 |
|
| 148 | enum sdca_ump_mode {
|
| 149 | SDCA_UMP_MODE_DIRECT = 0x00,
|
| 150 | SDCA_UMP_MODE_INDIRECT = 0x01,
|
| 151 | };
|
| 152 |
|
| 153 | |
| 154 | * enum sdca_ump_owner - SDCA UMP Owner
|
| 155 |
|
| 156 | enum sdca_ump_owner {
|
| 157 | SDCA_UMP_OWNER_HOST = 0x00,
|
| 158 | SDCA_UMP_OWNER_DEVICE = 0x01,
|
| 159 | };
|
| 160 |
|
| 161 | |
| 162 | * enum sdca_it_controls - SDCA Controls for Input Terminal
|
| 163 | *
|
| 164 | * Control Selectors for Input Terminal from SDCA specification v1.0
|
| 165 | * section 6.2.1.3.
|
| 166 |
|
| 167 | enum sdca_it_controls {
|
| 168 | SDCA_CTL_IT_MIC_BIAS = 0x03,
|
| 169 | SDCA_CTL_IT_USAGE = 0x04,
|
| 170 | SDCA_CTL_IT_LATENCY = 0x08,
|
| 171 | SDCA_CTL_IT_CLUSTERINDEX = 0x10,
|
| 172 | SDCA_CTL_IT_DATAPORT_SELECTOR = 0x11,
|
| 173 | SDCA_CTL_IT_MATCHING_GUID = 0x12,
|
| 174 | SDCA_CTL_IT_KEEP_ALIVE = 0x13,
|
| 175 | SDCA_CTL_IT_NDAI_STREAM = 0x14,
|
| 176 | SDCA_CTL_IT_NDAI_CATEGORY = 0x15,
|
| 177 | SDCA_CTL_IT_NDAI_CODINGTYPE = 0x16,
|
| 178 | SDCA_CTL_IT_NDAI_PACKETTYPE = 0x17,
|
| 179 | };
|
| 180 |
|
| 181 | |
| 182 | * enum sdca_ot_controls - SDCA Controls for Output Terminal
|
| 183 | *
|
| 184 | * Control Selectors for Output Terminal from SDCA specification v1.0
|
| 185 | * section 6.2.2.3.
|
| 186 |
|
| 187 | enum sdca_ot_controls {
|
| 188 | SDCA_CTL_OT_USAGE = 0x04,
|
| 189 | SDCA_CTL_OT_LATENCY = 0x08,
|
| 190 | SDCA_CTL_OT_DATAPORT_SELECTOR = 0x11,
|
| 191 | SDCA_CTL_OT_MATCHING_GUID = 0x12,
|
| 192 | SDCA_CTL_OT_KEEP_ALIVE = 0x13,
|
| 193 | SDCA_CTL_OT_NDAI_STREAM = 0x14,
|
| 194 | SDCA_CTL_OT_NDAI_CATEGORY = 0x15,
|
| 195 | SDCA_CTL_OT_NDAI_CODINGTYPE = 0x16,
|
| 196 | SDCA_CTL_OT_NDAI_PACKETTYPE = 0x17,
|
| 197 | };
|
| 198 |
|
| 199 | |
| 200 | * enum sdca_usage_range - Column definitions for Usage
|
| 201 |
|
| 202 | enum sdca_usage_range {
|
| 203 | SDCA_USAGE_NUMBER = 0,
|
| 204 | SDCA_USAGE_CBN = 1,
|
| 205 | SDCA_USAGE_SAMPLE_RATE = 2,
|
| 206 | SDCA_USAGE_SAMPLE_WIDTH = 3,
|
| 207 | SDCA_USAGE_FULL_SCALE = 4,
|
| 208 | SDCA_USAGE_NOISE_FLOOR = 5,
|
| 209 | SDCA_USAGE_TAG = 6,
|
| 210 | SDCA_USAGE_NCOLS = 7,
|
| 211 | };
|
| 212 |
|
| 213 | |
| 214 | * enum sdca_dataport_selector_range - Column definitions for DataPort_Selector
|
| 215 |
|
| 216 | enum sdca_dataport_selector_range {
|
| 217 | SDCA_DATAPORT_SELECTOR_NCOLS = 16,
|
| 218 | SDCA_DATAPORT_SELECTOR_NROWS = 4,
|
| 219 | };
|
| 220 |
|
| 221 | |
| 222 | * enum sdca_mu_controls - SDCA Controls for Mixer Unit
|
| 223 | *
|
| 224 | * Control Selectors for Mixer Unit from SDCA specification v1.0
|
| 225 | * section 6.3.4.2.
|
| 226 |
|
| 227 | enum sdca_mu_controls {
|
| 228 | SDCA_CTL_MU_MIXER = 0x01,
|
| 229 | SDCA_CTL_MU_LATENCY = 0x06,
|
| 230 | };
|
| 231 |
|
| 232 | |
| 233 | * enum sdca_su_controls - SDCA Controls for Selector Unit
|
| 234 | *
|
| 235 | * Control Selectors for Selector Unit from SDCA specification v1.0
|
| 236 | * section 6.3.8.3.
|
| 237 |
|
| 238 | enum sdca_su_controls {
|
| 239 | SDCA_CTL_SU_SELECTOR = 0x01,
|
| 240 | SDCA_CTL_SU_LATENCY = 0x02,
|
| 241 | };
|
| 242 |
|
| 243 | |
| 244 | * enum sdca_fu_controls - SDCA Controls for Feature Unit
|
| 245 | *
|
| 246 | * Control Selectors for Feature Unit from SDCA specification v1.0
|
| 247 | * section 6.3.2.3.
|
| 248 |
|
| 249 | enum sdca_fu_controls {
|
| 250 | SDCA_CTL_FU_MUTE = 0x01,
|
| 251 | SDCA_CTL_FU_CHANNEL_VOLUME = 0x02,
|
| 252 | SDCA_CTL_FU_AGC = 0x07,
|
| 253 | SDCA_CTL_FU_BASS_BOOST = 0x09,
|
| 254 | SDCA_CTL_FU_LOUDNESS = 0x0A,
|
| 255 | SDCA_CTL_FU_GAIN = 0x0B,
|
| 256 | SDCA_CTL_FU_LATENCY = 0x10,
|
| 257 | };
|
| 258 |
|
| 259 | |
| 260 | * enum sdca_volume_range - Column definitions for Q7.8dB volumes/gains
|
| 261 |
|
| 262 | enum sdca_volume_range {
|
| 263 | SDCA_VOLUME_LINEAR_MIN = 0,
|
| 264 | SDCA_VOLUME_LINEAR_MAX = 1,
|
| 265 | SDCA_VOLUME_LINEAR_STEP = 2,
|
| 266 | SDCA_VOLUME_LINEAR_NCOLS = 3,
|
| 267 | };
|
| 268 |
|
| 269 | |
| 270 | * enum sdca_xu_controls - SDCA Controls for Extension Unit
|
| 271 | *
|
| 272 | * Control Selectors for Extension Unit from SDCA specification v1.0
|
| 273 | * section 6.3.10.3.
|
| 274 |
|
| 275 | enum sdca_xu_controls {
|
| 276 | SDCA_CTL_XU_BYPASS = 0x01,
|
| 277 | SDCA_CTL_XU_LATENCY = 0x06,
|
| 278 | SDCA_CTL_XU_XU_ID = 0x07,
|
| 279 | SDCA_CTL_XU_XU_VERSION = 0x08,
|
| 280 | SDCA_CTL_XU_FDL_CURRENTOWNER = 0x10,
|
| 281 | SDCA_CTL_XU_FDL_MESSAGEOFFSET = 0x12,
|
| 282 | SDCA_CTL_XU_FDL_MESSAGELENGTH = 0x13,
|
| 283 | SDCA_CTL_XU_FDL_STATUS = 0x14,
|
| 284 | SDCA_CTL_XU_FDL_SET_INDEX = 0x15,
|
| 285 | SDCA_CTL_XU_FDL_HOST_REQUEST = 0x16,
|
| 286 |
|
| 287 |
|
| 288 | SDCA_CTL_XU_FDLH_TRANSFERRED_CHUNK = BIT(0),
|
| 289 | SDCA_CTL_XU_FDLH_TRANSFERRED_FILE = BIT(1),
|
| 290 | SDCA_CTL_XU_FDLH_SET_IN_PROGRESS = BIT(2),
|
| 291 | SDCA_CTL_XU_FDLH_RESET_ACK = BIT(4),
|
| 292 | SDCA_CTL_XU_FDLH_REQ_ABORT = BIT(5),
|
| 293 |
|
| 294 | SDCA_CTL_XU_FDLD_REQ_RESET = BIT(4),
|
| 295 | SDCA_CTL_XU_FDLD_REQ_ABORT = BIT(5),
|
| 296 | SDCA_CTL_XU_FDLD_ACK_TRANSFER = BIT(6),
|
| 297 | SDCA_CTL_XU_FDLD_NEEDS_SET = BIT(7),
|
| 298 | };
|
| 299 |
|
| 300 | |
| 301 | * enum sdca_fdl_set_index_range - Column definitions UMP SetIndex
|
| 302 |
|
| 303 | enum sdca_fdl_set_index_range {
|
| 304 | SDCA_FDL_SET_INDEX_SET_NUMBER = 0,
|
| 305 | SDCA_FDL_SET_INDEX_FILE_SET_ID = 1,
|
| 306 | SDCA_FDL_SET_INDEX_NCOLS = 2,
|
| 307 | };
|
| 308 |
|
| 309 | |
| 310 | * enum sdca_cs_controls - SDCA Controls for Clock Source
|
| 311 | *
|
| 312 | * Control Selectors for Clock Source from SDCA specification v1.0
|
| 313 | * section 6.4.1.3.
|
| 314 |
|
| 315 | enum sdca_cs_controls {
|
| 316 | SDCA_CTL_CS_CLOCK_VALID = 0x02,
|
| 317 | SDCA_CTL_CS_SAMPLERATEINDEX = 0x10,
|
| 318 | };
|
| 319 |
|
| 320 | |
| 321 | * enum sdca_samplerateindex_range - Column definitions for SampleRateIndex
|
| 322 |
|
| 323 | enum sdca_samplerateindex_range {
|
| 324 | SDCA_SAMPLERATEINDEX_INDEX = 0,
|
| 325 | SDCA_SAMPLERATEINDEX_RATE = 1,
|
| 326 | SDCA_SAMPLERATEINDEX_NCOLS = 2,
|
| 327 | };
|
| 328 |
|
| 329 | |
| 330 | * enum sdca_cx_controls - SDCA Controls for Clock Selector
|
| 331 | *
|
| 332 | * Control Selectors for Clock Selector from SDCA specification v1.0
|
| 333 | * section 6.4.2.3.
|
| 334 |
|
| 335 | enum sdca_cx_controls {
|
| 336 | SDCA_CTL_CX_CLOCK_SELECT = 0x01,
|
| 337 | };
|
| 338 |
|
| 339 | |
| 340 | * enum sdca_pde_controls - SDCA Controls for Power Domain Entity
|
| 341 | *
|
| 342 | * Control Selectors for Power Domain Entity from SDCA specification
|
| 343 | * v1.0 section 6.5.2.2.
|
| 344 |
|
| 345 | enum sdca_pde_controls {
|
| 346 | SDCA_CTL_PDE_REQUESTED_PS = 0x01,
|
| 347 | SDCA_CTL_PDE_ACTUAL_PS = 0x10,
|
| 348 | };
|
| 349 |
|
| 350 | |
| 351 | * enum sdca_requested_ps_range - Column definitions for Requested PS
|
| 352 |
|
| 353 | enum sdca_requested_ps_range {
|
| 354 | SDCA_REQUESTED_PS_STATE = 0,
|
| 355 | SDCA_REQUESTED_PS_NCOLS = 1,
|
| 356 | };
|
| 357 |
|
| 358 | |
| 359 | * enum sdca_ge_controls - SDCA Controls for Group Unit
|
| 360 | *
|
| 361 | * Control Selectors for Group Unit from SDCA specification v1.0
|
| 362 | * section 6.5.1.4.
|
| 363 |
|
| 364 | enum sdca_ge_controls {
|
| 365 | SDCA_CTL_GE_SELECTED_MODE = 0x01,
|
| 366 | SDCA_CTL_GE_DETECTED_MODE = 0x02,
|
| 367 | };
|
| 368 |
|
| 369 | |
| 370 | * enum sdca_selected_mode_range - Column definitions for Selected Mode
|
| 371 |
|
| 372 | enum sdca_selected_mode_range {
|
| 373 | SDCA_SELECTED_MODE_INDEX = 0,
|
| 374 | SDCA_SELECTED_MODE_TERM_TYPE = 1,
|
| 375 | SDCA_SELECTED_MODE_NCOLS = 2,
|
| 376 | };
|
| 377 |
|
| 378 | |
| 379 | * enum sdca_detected_mode_values - Predefined GE Detected Mode values
|
| 380 |
|
| 381 | enum sdca_detected_mode_values {
|
| 382 | SDCA_DETECTED_MODE_JACK_UNPLUGGED = 0,
|
| 383 | SDCA_DETECTED_MODE_JACK_UNKNOWN = 1,
|
| 384 | SDCA_DETECTED_MODE_DETECTION_IN_PROGRESS = 2,
|
| 385 | };
|
| 386 |
|
| 387 | |
| 388 | * enum sdca_spe_controls - SDCA Controls for Security & Privacy Unit
|
| 389 | *
|
| 390 | * Control Selectors for Security & Privacy Unit from SDCA
|
| 391 | * specification v1.0 Section 6.5.3.2.
|
| 392 |
|
| 393 | enum sdca_spe_controls {
|
| 394 | SDCA_CTL_SPE_PRIVATE = 0x01,
|
| 395 | SDCA_CTL_SPE_PRIVACY_POLICY = 0x02,
|
| 396 | SDCA_CTL_SPE_PRIVACY_LOCKSTATE = 0x03,
|
| 397 | SDCA_CTL_SPE_PRIVACY_OWNER = 0x04,
|
| 398 | SDCA_CTL_SPE_AUTHTX_CURRENTOWNER = 0x10,
|
| 399 | SDCA_CTL_SPE_AUTHTX_MESSAGEOFFSET = 0x12,
|
| 400 | SDCA_CTL_SPE_AUTHTX_MESSAGELENGTH = 0x13,
|
| 401 | SDCA_CTL_SPE_AUTHRX_CURRENTOWNER = 0x14,
|
| 402 | SDCA_CTL_SPE_AUTHRX_MESSAGEOFFSET = 0x16,
|
| 403 | SDCA_CTL_SPE_AUTHRX_MESSAGELENGTH = 0x17,
|
| 404 | };
|
| 405 |
|
| 406 | |
| 407 | * enum sdca_cru_controls - SDCA Controls for Channel Remapping Unit
|
| 408 | *
|
| 409 | * Control Selectors for Channel Remapping Unit from SDCA
|
| 410 | * specification v1.0 Section 6.3.1.3.
|
| 411 |
|
| 412 | enum sdca_cru_controls {
|
| 413 | SDCA_CTL_CRU_LATENCY = 0x06,
|
| 414 | SDCA_CTL_CRU_CLUSTERINDEX = 0x10,
|
| 415 | };
|
| 416 |
|
| 417 | |
| 418 | * enum sdca_udmpu_controls - SDCA Controls for Up-Down Mixer Processing Unit
|
| 419 | *
|
| 420 | * Control Selectors for Up-Down Mixer Processing Unit from SDCA
|
| 421 | * specification v1.0 Section 6.3.9.3.
|
| 422 |
|
| 423 | enum sdca_udmpu_controls {
|
| 424 | SDCA_CTL_UDMPU_LATENCY = 0x06,
|
| 425 | SDCA_CTL_UDMPU_CLUSTERINDEX = 0x10,
|
| 426 | SDCA_CTL_UDMPU_ACOUSTIC_ENERGY_LEVEL_MONITOR = 0x11,
|
| 427 | SDCA_CTL_UDMPU_ULTRASOUND_LOOP_GAIN = 0x12,
|
| 428 | SDCA_CTL_UDMPU_OPAQUESET_0 = 0x18,
|
| 429 | SDCA_CTL_UDMPU_OPAQUESET_1 = 0x19,
|
| 430 | SDCA_CTL_UDMPU_OPAQUESET_2 = 0x1A,
|
| 431 | SDCA_CTL_UDMPU_OPAQUESET_3 = 0x1B,
|
| 432 | SDCA_CTL_UDMPU_OPAQUESET_4 = 0x1C,
|
| 433 | SDCA_CTL_UDMPU_OPAQUESET_5 = 0x1D,
|
| 434 | SDCA_CTL_UDMPU_OPAQUESET_6 = 0x1E,
|
| 435 | SDCA_CTL_UDMPU_OPAQUESET_7 = 0x1F,
|
| 436 | SDCA_CTL_UDMPU_OPAQUESET_8 = 0x20,
|
| 437 | SDCA_CTL_UDMPU_OPAQUESET_9 = 0x21,
|
| 438 | SDCA_CTL_UDMPU_OPAQUESET_10 = 0x22,
|
| 439 | SDCA_CTL_UDMPU_OPAQUESET_11 = 0x23,
|
| 440 | SDCA_CTL_UDMPU_OPAQUESET_12 = 0x24,
|
| 441 | SDCA_CTL_UDMPU_OPAQUESET_13 = 0x25,
|
| 442 | SDCA_CTL_UDMPU_OPAQUESET_14 = 0x26,
|
| 443 | SDCA_CTL_UDMPU_OPAQUESET_15 = 0x27,
|
| 444 | SDCA_CTL_UDMPU_OPAQUESET_16 = 0x28,
|
| 445 | SDCA_CTL_UDMPU_OPAQUESET_17 = 0x29,
|
| 446 | SDCA_CTL_UDMPU_OPAQUESET_18 = 0x2A,
|
| 447 | SDCA_CTL_UDMPU_OPAQUESET_19 = 0x2B,
|
| 448 | SDCA_CTL_UDMPU_OPAQUESET_20 = 0x2C,
|
| 449 | SDCA_CTL_UDMPU_OPAQUESET_21 = 0x2D,
|
| 450 | SDCA_CTL_UDMPU_OPAQUESET_22 = 0x2E,
|
| 451 | SDCA_CTL_UDMPU_OPAQUESET_23 = 0x2F,
|
| 452 | };
|
| 453 |
|
| 454 | |
| 455 | * enum sdca_mfpu_controls - SDCA Controls for Multi-Function Processing Unit
|
| 456 | *
|
| 457 | * Control Selectors for Multi-Function Processing Unit from SDCA
|
| 458 | * specification v1.0 Section 6.3.3.4.
|
| 459 |
|
| 460 | enum sdca_mfpu_controls {
|
| 461 | SDCA_CTL_MFPU_BYPASS = 0x01,
|
| 462 | SDCA_CTL_MFPU_ALGORITHM_READY = 0x04,
|
| 463 | SDCA_CTL_MFPU_ALGORITHM_ENABLE = 0x05,
|
| 464 | SDCA_CTL_MFPU_LATENCY = 0x08,
|
| 465 | SDCA_CTL_MFPU_ALGORITHM_PREPARE = 0x09,
|
| 466 | SDCA_CTL_MFPU_CLUSTERINDEX = 0x10,
|
| 467 | SDCA_CTL_MFPU_CENTER_FREQUENCY_INDEX = 0x11,
|
| 468 | SDCA_CTL_MFPU_ULTRASOUND_LEVEL = 0x12,
|
| 469 | SDCA_CTL_MFPU_AE_NUMBER = 0x13,
|
| 470 | SDCA_CTL_MFPU_AE_CURRENTOWNER = 0x14,
|
| 471 | SDCA_CTL_MFPU_AE_MESSAGEOFFSET = 0x16,
|
| 472 | SDCA_CTL_MFPU_AE_MESSAGELENGTH = 0x17,
|
| 473 | };
|
| 474 |
|
| 475 | |
| 476 | * enum sdca_smpu_controls - SDCA Controls for Smart Mic Processing Unit
|
| 477 | *
|
| 478 | * Control Selectors for Smart Mic Processing Unit from SDCA
|
| 479 | * specification v1.0 Section 6.3.7.3.
|
| 480 |
|
| 481 | enum sdca_smpu_controls {
|
| 482 | SDCA_CTL_SMPU_LATENCY = 0x06,
|
| 483 | SDCA_CTL_SMPU_TRIGGER_ENABLE = 0x10,
|
| 484 | SDCA_CTL_SMPU_TRIGGER_STATUS = 0x11,
|
| 485 | SDCA_CTL_SMPU_HIST_BUFFER_MODE = 0x12,
|
| 486 | SDCA_CTL_SMPU_HIST_BUFFER_PREAMBLE = 0x13,
|
| 487 | SDCA_CTL_SMPU_HIST_ERROR = 0x14,
|
| 488 | SDCA_CTL_SMPU_TRIGGER_EXTENSION = 0x15,
|
| 489 | SDCA_CTL_SMPU_TRIGGER_READY = 0x16,
|
| 490 | SDCA_CTL_SMPU_HIST_CURRENTOWNER = 0x18,
|
| 491 | SDCA_CTL_SMPU_HIST_MESSAGEOFFSET = 0x1A,
|
| 492 | SDCA_CTL_SMPU_HIST_MESSAGELENGTH = 0x1B,
|
| 493 | SDCA_CTL_SMPU_DTODTX_CURRENTOWNER = 0x1C,
|
| 494 | SDCA_CTL_SMPU_DTODTX_MESSAGEOFFSET = 0x1E,
|
| 495 | SDCA_CTL_SMPU_DTODTX_MESSAGELENGTH = 0x1F,
|
| 496 | SDCA_CTL_SMPU_DTODRX_CURRENTOWNER = 0x20,
|
| 497 | SDCA_CTL_SMPU_DTODRX_MESSAGEOFFSET = 0x22,
|
| 498 | SDCA_CTL_SMPU_DTODRX_MESSAGELENGTH = 0x23,
|
| 499 | };
|
| 500 |
|
| 501 | |
| 502 | * enum sdca_sapu_controls - SDCA Controls for Smart Amp Processing Unit
|
| 503 | *
|
| 504 | * Control Selectors for Smart Amp Processing Unit from SDCA
|
| 505 | * specification v1.0 Section 6.3.6.3.
|
| 506 |
|
| 507 | enum sdca_sapu_controls {
|
| 508 | SDCA_CTL_SAPU_LATENCY = 0x05,
|
| 509 | SDCA_CTL_SAPU_PROTECTION_MODE = 0x10,
|
| 510 | SDCA_CTL_SAPU_PROTECTION_STATUS = 0x11,
|
| 511 | SDCA_CTL_SAPU_OPAQUESETREQ_INDEX = 0x12,
|
| 512 | SDCA_CTL_SAPU_DTODTX_CURRENTOWNER = 0x14,
|
| 513 | SDCA_CTL_SAPU_DTODTX_MESSAGEOFFSET = 0x16,
|
| 514 | SDCA_CTL_SAPU_DTODTX_MESSAGELENGTH = 0x17,
|
| 515 | SDCA_CTL_SAPU_DTODRX_CURRENTOWNER = 0x18,
|
| 516 | SDCA_CTL_SAPU_DTODRX_MESSAGEOFFSET = 0x1A,
|
| 517 | SDCA_CTL_SAPU_DTODRX_MESSAGELENGTH = 0x1B,
|
| 518 | };
|
| 519 |
|
| 520 | |
| 521 | * enum sdca_ppu_controls - SDCA Controls for Post Processing Unit
|
| 522 | *
|
| 523 | * Control Selectors for Post Processing Unit from SDCA specification
|
| 524 | * v1.0 Section 6.3.5.3.
|
| 525 |
|
| 526 | enum sdca_ppu_controls {
|
| 527 | SDCA_CTL_PPU_LATENCY = 0x06,
|
| 528 | SDCA_CTL_PPU_POSTURENUMBER = 0x10,
|
| 529 | SDCA_CTL_PPU_POSTUREEXTENSION = 0x11,
|
| 530 | SDCA_CTL_PPU_HORIZONTALBALANCE = 0x12,
|
| 531 | SDCA_CTL_PPU_VERTICALBALANCE = 0x13,
|
| 532 | };
|
| 533 |
|
| 534 | |
| 535 | * enum sdca_tg_controls - SDCA Controls for Tone Generator Entity
|
| 536 | *
|
| 537 | * Control Selectors for Tone Generator from SDCA specification v1.0
|
| 538 | * Section 6.5.4.4.
|
| 539 |
|
| 540 | enum sdca_tg_controls {
|
| 541 | SDCA_CTL_TG_TONE_DIVIDER = 0x10,
|
| 542 | };
|
| 543 |
|
| 544 | |
| 545 | * enum sdca_hide_controls - SDCA Controls for HIDE Entity
|
| 546 | *
|
| 547 | * Control Selectors for HIDE from SDCA specification v1.0 Section
|
| 548 | * 6.6.1.2.
|
| 549 |
|
| 550 | enum sdca_hide_controls {
|
| 551 | SDCA_CTL_HIDE_HIDTX_CURRENTOWNER = 0x10,
|
| 552 | SDCA_CTL_HIDE_HIDTX_MESSAGEOFFSET = 0x12,
|
| 553 | SDCA_CTL_HIDE_HIDTX_MESSAGELENGTH = 0x13,
|
| 554 | SDCA_CTL_HIDE_HIDRX_CURRENTOWNER = 0x14,
|
| 555 | SDCA_CTL_HIDE_HIDRX_MESSAGEOFFSET = 0x16,
|
| 556 | SDCA_CTL_HIDE_HIDRX_MESSAGELENGTH = 0x17,
|
| 557 | };
|
| 558 |
|
| 559 | |
| 560 | * enum sdca_entity0_controls - SDCA Controls for Entity 0
|
| 561 | *
|
| 562 | * Control Selectors for Entity 0 from SDCA specification v1.0 Section
|
| 563 | * 6.7.1.1.
|
| 564 |
|
| 565 | enum sdca_entity0_controls {
|
| 566 | SDCA_CTL_ENTITY_0_COMMIT_GROUP_MASK = 0x01,
|
| 567 | SDCA_CTL_ENTITY_0_FUNCTION_SDCA_VERSION = 0x04,
|
| 568 | SDCA_CTL_ENTITY_0_FUNCTION_TYPE = 0x05,
|
| 569 | SDCA_CTL_ENTITY_0_FUNCTION_MANUFACTURER_ID = 0x06,
|
| 570 | SDCA_CTL_ENTITY_0_FUNCTION_ID = 0x07,
|
| 571 | SDCA_CTL_ENTITY_0_FUNCTION_VERSION = 0x08,
|
| 572 | SDCA_CTL_ENTITY_0_FUNCTION_EXTENSION_ID = 0x09,
|
| 573 | SDCA_CTL_ENTITY_0_FUNCTION_EXTENSION_VERSION = 0x0A,
|
| 574 | SDCA_CTL_ENTITY_0_FUNCTION_STATUS = 0x10,
|
| 575 | SDCA_CTL_ENTITY_0_FUNCTION_ACTION = 0x11,
|
| 576 | SDCA_CTL_ENTITY_0_MATCHING_GUID = 0x12,
|
| 577 | SDCA_CTL_ENTITY_0_DEVICE_MANUFACTURER_ID = 0x2C,
|
| 578 | SDCA_CTL_ENTITY_0_DEVICE_PART_ID = 0x2D,
|
| 579 | SDCA_CTL_ENTITY_0_DEVICE_VERSION = 0x2E,
|
| 580 | SDCA_CTL_ENTITY_0_DEVICE_SDCA_VERSION = 0x2F,
|
| 581 |
|
| 582 |
|
| 583 | SDCA_CTL_ENTITY_0_DEVICE_NEWLY_ATTACHED = BIT(0),
|
| 584 | SDCA_CTL_ENTITY_0_INTS_DISABLED_ABNORMALLY = BIT(1),
|
| 585 | SDCA_CTL_ENTITY_0_STREAMING_STOPPED_ABNORMALLY = BIT(2),
|
| 586 | SDCA_CTL_ENTITY_0_FUNCTION_FAULT = BIT(3),
|
| 587 | SDCA_CTL_ENTITY_0_UMP_SEQUENCE_FAULT = BIT(4),
|
| 588 | SDCA_CTL_ENTITY_0_FUNCTION_NEEDS_INITIALIZATION = BIT(5),
|
| 589 | SDCA_CTL_ENTITY_0_FUNCTION_HAS_BEEN_RESET = BIT(6),
|
| 590 | SDCA_CTL_ENTITY_0_FUNCTION_BUSY = BIT(7),
|
| 591 |
|
| 592 |
|
| 593 | SDCA_CTL_ENTITY_0_RESET_FUNCTION_NOW = BIT(0),
|
| 594 | };
|
| 595 |
|
| 596 | #define SDCA_CTL_MIC_BIAS_NAME "Mic Bias"
|
| 597 | #define SDCA_CTL_USAGE_NAME "Usage"
|
| 598 | #define SDCA_CTL_LATENCY_NAME "Latency"
|
| 599 | #define SDCA_CTL_CLUSTERINDEX_NAME "Cluster Index"
|
| 600 | #define SDCA_CTL_DATAPORT_SELECTOR_NAME "Dataport Selector"
|
| 601 | #define SDCA_CTL_MATCHING_GUID_NAME "Matching GUID"
|
| 602 | #define SDCA_CTL_KEEP_ALIVE_NAME "Keep Alive"
|
| 603 | #define SDCA_CTL_NDAI_STREAM_NAME "NDAI Stream"
|
| 604 | #define SDCA_CTL_NDAI_CATEGORY_NAME "NDAI Category"
|
| 605 | #define SDCA_CTL_NDAI_CODINGTYPE_NAME "NDAI Coding Type"
|
| 606 | #define SDCA_CTL_NDAI_PACKETTYPE_NAME "NDAI Packet Type"
|
| 607 | #define SDCA_CTL_MIXER_NAME "Mixer"
|
| 608 | #define SDCA_CTL_SELECTOR_NAME "Selector"
|
| 609 | #define SDCA_CTL_MUTE_NAME "Channel"
|
| 610 | #define SDCA_CTL_CHANNEL_VOLUME_NAME "Channel Volume"
|
| 611 | #define SDCA_CTL_AGC_NAME "AGC"
|
| 612 | #define SDCA_CTL_BASS_BOOST_NAME "Bass Boost"
|
| 613 | #define SDCA_CTL_LOUDNESS_NAME "Loudness"
|
| 614 | #define SDCA_CTL_GAIN_NAME "Gain"
|
| 615 | #define SDCA_CTL_BYPASS_NAME "Bypass"
|
| 616 | #define SDCA_CTL_XU_ID_NAME "XU ID"
|
| 617 | #define SDCA_CTL_XU_VERSION_NAME "XU Version"
|
| 618 | #define SDCA_CTL_FDL_CURRENTOWNER_NAME "FDL Current Owner"
|
| 619 | #define SDCA_CTL_FDL_MESSAGEOFFSET_NAME "FDL Message Offset"
|
| 620 | #define SDCA_CTL_FDL_MESSAGELENGTH_NAME "FDL Message Length"
|
| 621 | #define SDCA_CTL_FDL_STATUS_NAME "FDL Status"
|
| 622 | #define SDCA_CTL_FDL_SET_INDEX_NAME "FDL Set Index"
|
| 623 | #define SDCA_CTL_FDL_HOST_REQUEST_NAME "FDL Host Request"
|
| 624 | #define SDCA_CTL_CLOCK_VALID_NAME "Clock Valid"
|
| 625 | #define SDCA_CTL_SAMPLERATEINDEX_NAME "Sample Rate Index"
|
| 626 | #define SDCA_CTL_CLOCK_SELECT_NAME "Clock Select"
|
| 627 | #define SDCA_CTL_REQUESTED_PS_NAME "Requested PS"
|
| 628 | #define SDCA_CTL_ACTUAL_PS_NAME "Actual PS"
|
| 629 | #define SDCA_CTL_SELECTED_MODE_NAME "Selected Mode"
|
| 630 | #define SDCA_CTL_DETECTED_MODE_NAME "Detected Mode"
|
| 631 | #define SDCA_CTL_PRIVATE_NAME "Private"
|
| 632 | #define SDCA_CTL_PRIVACY_POLICY_NAME "Privacy Policy"
|
| 633 | #define SDCA_CTL_PRIVACY_LOCKSTATE_NAME "Privacy Lockstate"
|
| 634 | #define SDCA_CTL_PRIVACY_OWNER_NAME "Privacy Owner"
|
| 635 | #define SDCA_CTL_AUTHTX_CURRENTOWNER_NAME "AuthTX Current Owner"
|
| 636 | #define SDCA_CTL_AUTHTX_MESSAGEOFFSET_NAME "AuthTX Message Offset"
|
| 637 | #define SDCA_CTL_AUTHTX_MESSAGELENGTH_NAME "AuthTX Message Length"
|
| 638 | #define SDCA_CTL_AUTHRX_CURRENTOWNER_NAME "AuthRX Current Owner"
|
| 639 | #define SDCA_CTL_AUTHRX_MESSAGEOFFSET_NAME "AuthRX Message Offset"
|
| 640 | #define SDCA_CTL_AUTHRX_MESSAGELENGTH_NAME "AuthRX Message Length"
|
| 641 | #define SDCA_CTL_ACOUSTIC_ENERGY_LEVEL_MONITOR_NAME "Acoustic Energy Level Monitor"
|
| 642 | #define SDCA_CTL_ULTRASOUND_LOOP_GAIN_NAME "Ultrasound Loop Gain"
|
| 643 | #define SDCA_CTL_OPAQUESET_0_NAME "Opaqueset 0"
|
| 644 | #define SDCA_CTL_OPAQUESET_1_NAME "Opaqueset 1"
|
| 645 | #define SDCA_CTL_OPAQUESET_2_NAME "Opaqueset 2"
|
| 646 | #define SDCA_CTL_OPAQUESET_3_NAME "Opaqueset 3"
|
| 647 | #define SDCA_CTL_OPAQUESET_4_NAME "Opaqueset 4"
|
| 648 | #define SDCA_CTL_OPAQUESET_5_NAME "Opaqueset 5"
|
| 649 | #define SDCA_CTL_OPAQUESET_6_NAME "Opaqueset 6"
|
| 650 | #define SDCA_CTL_OPAQUESET_7_NAME "Opaqueset 7"
|
| 651 | #define SDCA_CTL_OPAQUESET_8_NAME "Opaqueset 8"
|
| 652 | #define SDCA_CTL_OPAQUESET_9_NAME "Opaqueset 9"
|
| 653 | #define SDCA_CTL_OPAQUESET_10_NAME "Opaqueset 10"
|
| 654 | #define SDCA_CTL_OPAQUESET_11_NAME "Opaqueset 11"
|
| 655 | #define SDCA_CTL_OPAQUESET_12_NAME "Opaqueset 12"
|
| 656 | #define SDCA_CTL_OPAQUESET_13_NAME "Opaqueset 13"
|
| 657 | #define SDCA_CTL_OPAQUESET_14_NAME "Opaqueset 14"
|
| 658 | #define SDCA_CTL_OPAQUESET_15_NAME "Opaqueset 15"
|
| 659 | #define SDCA_CTL_OPAQUESET_16_NAME "Opaqueset 16"
|
| 660 | #define SDCA_CTL_OPAQUESET_17_NAME "Opaqueset 17"
|
| 661 | #define SDCA_CTL_OPAQUESET_18_NAME "Opaqueset 18"
|
| 662 | #define SDCA_CTL_OPAQUESET_19_NAME "Opaqueset 19"
|
| 663 | #define SDCA_CTL_OPAQUESET_20_NAME "Opaqueset 20"
|
| 664 | #define SDCA_CTL_OPAQUESET_21_NAME "Opaqueset 21"
|
| 665 | #define SDCA_CTL_OPAQUESET_22_NAME "Opaqueset 22"
|
| 666 | #define SDCA_CTL_OPAQUESET_23_NAME "Opaqueset 23"
|
| 667 | #define SDCA_CTL_ALGORITHM_READY_NAME "Algorithm Ready"
|
| 668 | #define SDCA_CTL_ALGORITHM_ENABLE_NAME "Algorithm Enable"
|
| 669 | #define SDCA_CTL_ALGORITHM_PREPARE_NAME "Algorithm Prepare"
|
| 670 | #define SDCA_CTL_CENTER_FREQUENCY_INDEX_NAME "Center Frequency Index"
|
| 671 | #define SDCA_CTL_ULTRASOUND_LEVEL_NAME "Ultrasound Level"
|
| 672 | #define SDCA_CTL_AE_NUMBER_NAME "AE Number"
|
| 673 | #define SDCA_CTL_AE_CURRENTOWNER_NAME "AE Current Owner"
|
| 674 | #define SDCA_CTL_AE_MESSAGEOFFSET_NAME "AE Message Offset"
|
| 675 | #define SDCA_CTL_AE_MESSAGELENGTH_NAME "AE Message Length"
|
| 676 | #define SDCA_CTL_TRIGGER_ENABLE_NAME "Trigger Enable"
|
| 677 | #define SDCA_CTL_TRIGGER_STATUS_NAME "Trigger Status"
|
| 678 | #define SDCA_CTL_HIST_BUFFER_MODE_NAME "Hist Buffer Mode"
|
| 679 | #define SDCA_CTL_HIST_BUFFER_PREAMBLE_NAME "Hist Buffer Preamble"
|
| 680 | #define SDCA_CTL_HIST_ERROR_NAME "Hist Error"
|
| 681 | #define SDCA_CTL_TRIGGER_EXTENSION_NAME "Trigger Extension"
|
| 682 | #define SDCA_CTL_TRIGGER_READY_NAME "Trigger Ready"
|
| 683 | #define SDCA_CTL_HIST_CURRENTOWNER_NAME "Hist Current Owner"
|
| 684 | #define SDCA_CTL_HIST_MESSAGEOFFSET_NAME "Hist Message Offset"
|
| 685 | #define SDCA_CTL_HIST_MESSAGELENGTH_NAME "Hist Message Length"
|
| 686 | #define SDCA_CTL_DTODTX_CURRENTOWNER_NAME "DTODTX Current Owner"
|
| 687 | #define SDCA_CTL_DTODTX_MESSAGEOFFSET_NAME "DTODTX Message Offset"
|
| 688 | #define SDCA_CTL_DTODTX_MESSAGELENGTH_NAME "DTODTX Message Length"
|
| 689 | #define SDCA_CTL_DTODRX_CURRENTOWNER_NAME "DTODRX Current Owner"
|
| 690 | #define SDCA_CTL_DTODRX_MESSAGEOFFSET_NAME "DTODRX Message Offset"
|
| 691 | #define SDCA_CTL_DTODRX_MESSAGELENGTH_NAME "DTODRX Message Length"
|
| 692 | #define SDCA_CTL_PROTECTION_MODE_NAME "Protection Mode"
|
| 693 | #define SDCA_CTL_PROTECTION_STATUS_NAME "Protection Status"
|
| 694 | #define SDCA_CTL_OPAQUESETREQ_INDEX_NAME "Opaqueset Req Index"
|
| 695 | #define SDCA_CTL_DTODTX_CURRENTOWNER_NAME "DTODTX Current Owner"
|
| 696 | #define SDCA_CTL_DTODTX_MESSAGEOFFSET_NAME "DTODTX Message Offset"
|
| 697 | #define SDCA_CTL_DTODTX_MESSAGELENGTH_NAME "DTODTX Message Length"
|
| 698 | #define SDCA_CTL_DTODRX_CURRENTOWNER_NAME "DTODRX Current Owner"
|
| 699 | #define SDCA_CTL_DTODRX_MESSAGEOFFSET_NAME "DTODRX Message Offset"
|
| 700 | #define SDCA_CTL_DTODRX_MESSAGELENGTH_NAME "DTODRX Message Length"
|
| 701 | #define SDCA_CTL_POSTURENUMBER_NAME "Posture Number"
|
| 702 | #define SDCA_CTL_POSTUREEXTENSION_NAME "Posture Extension"
|
| 703 | #define SDCA_CTL_HORIZONTALBALANCE_NAME "Horizontal Balance"
|
| 704 | #define SDCA_CTL_VERTICALBALANCE_NAME "Vertical Balance"
|
| 705 | #define SDCA_CTL_TONE_DIVIDER_NAME "Tone Divider"
|
| 706 | #define SDCA_CTL_HIDTX_CURRENTOWNER_NAME "HIDTX Current Owner"
|
| 707 | #define SDCA_CTL_HIDTX_MESSAGEOFFSET_NAME "HIDTX Message Offset"
|
| 708 | #define SDCA_CTL_HIDTX_MESSAGELENGTH_NAME "HIDTX Message Length"
|
| 709 | #define SDCA_CTL_HIDRX_CURRENTOWNER_NAME "HIDRX Current Owner"
|
| 710 | #define SDCA_CTL_HIDRX_MESSAGEOFFSET_NAME "HIDRX Message Offset"
|
| 711 | #define SDCA_CTL_HIDRX_MESSAGELENGTH_NAME "HIDRX Message Length"
|
| 712 | #define SDCA_CTL_COMMIT_GROUP_MASK_NAME "Commit Group Mask"
|
| 713 | #define SDCA_CTL_FUNCTION_SDCA_VERSION_NAME "Function SDCA Version"
|
| 714 | #define SDCA_CTL_FUNCTION_TYPE_NAME "Function Type"
|
| 715 | #define SDCA_CTL_FUNCTION_MANUFACTURER_ID_NAME "Function Manufacturer ID"
|
| 716 | #define SDCA_CTL_FUNCTION_ID_NAME "Function ID"
|
| 717 | #define SDCA_CTL_FUNCTION_VERSION_NAME "Function Version"
|
| 718 | #define SDCA_CTL_FUNCTION_EXTENSION_ID_NAME "Function Extension ID"
|
| 719 | #define SDCA_CTL_FUNCTION_EXTENSION_VERSION_NAME "Function Extension Version"
|
| 720 | #define SDCA_CTL_FUNCTION_STATUS_NAME "Function Status"
|
| 721 | #define SDCA_CTL_FUNCTION_ACTION_NAME "Function Action"
|
| 722 | #define SDCA_CTL_DEVICE_MANUFACTURER_ID_NAME "Device Manufacturer ID"
|
| 723 | #define SDCA_CTL_DEVICE_PART_ID_NAME "Device Part ID"
|
| 724 | #define SDCA_CTL_DEVICE_VERSION_NAME "Device Version"
|
| 725 | #define SDCA_CTL_DEVICE_SDCA_VERSION_NAME "Device SDCA Version"
|
| 726 |
|
| 727 | |
| 728 | * enum sdca_control_datatype - SDCA Control Data Types
|
| 729 | *
|
| 730 | * Data Types as described in the SDCA specification v1.0 section
|
| 731 | * 7.3.
|
| 732 |
|
| 733 | enum sdca_control_datatype {
|
| 734 | SDCA_CTL_DATATYPE_ONEBIT,
|
| 735 | SDCA_CTL_DATATYPE_INTEGER,
|
| 736 | SDCA_CTL_DATATYPE_SPEC_ENCODED_VALUE,
|
| 737 | SDCA_CTL_DATATYPE_BCD,
|
| 738 | SDCA_CTL_DATATYPE_Q7P8DB,
|
| 739 | SDCA_CTL_DATATYPE_BYTEINDEX,
|
| 740 | SDCA_CTL_DATATYPE_POSTURENUMBER,
|
| 741 | SDCA_CTL_DATATYPE_DP_INDEX,
|
| 742 | SDCA_CTL_DATATYPE_BITINDEX,
|
| 743 | SDCA_CTL_DATATYPE_BITMAP,
|
| 744 | SDCA_CTL_DATATYPE_GUID,
|
| 745 | SDCA_CTL_DATATYPE_IMPDEF,
|
| 746 | };
|
| 747 |
|
| 748 | |
| 749 | * enum sdca_access_mode - SDCA Control access mode
|
| 750 | *
|
| 751 | * Access modes as described in the SDCA specification v1.0 section
|
| 752 | * 7.1.8.2.
|
| 753 |
|
| 754 | enum sdca_access_mode {
|
| 755 | SDCA_ACCESS_MODE_RW = 0x0,
|
| 756 | SDCA_ACCESS_MODE_DUAL = 0x1,
|
| 757 | SDCA_ACCESS_MODE_RW1C = 0x2,
|
| 758 | SDCA_ACCESS_MODE_RO = 0x3,
|
| 759 | SDCA_ACCESS_MODE_RW1S = 0x4,
|
| 760 | SDCA_ACCESS_MODE_DC = 0x5,
|
| 761 | };
|
| 762 |
|
| 763 | |
| 764 | * enum sdca_access_layer - SDCA Control access layer
|
| 765 | *
|
| 766 | * Access layers as described in the SDCA specification v1.0 section
|
| 767 | * 7.1.9.
|
| 768 |
|
| 769 | enum sdca_access_layer {
|
| 770 | SDCA_ACCESS_LAYER_USER = 1 << 0,
|
| 771 | SDCA_ACCESS_LAYER_APPLICATION = 1 << 1,
|
| 772 | SDCA_ACCESS_LAYER_CLASS = 1 << 2,
|
| 773 | SDCA_ACCESS_LAYER_PLATFORM = 1 << 3,
|
| 774 | SDCA_ACCESS_LAYER_DEVICE = 1 << 4,
|
| 775 | SDCA_ACCESS_LAYER_EXTENSION = 1 << 5,
|
| 776 | };
|
| 777 |
|
| 778 | |
| 779 | * struct sdca_control_range - SDCA Control range table
|
| 780 | * @cols: Number of columns in the range table.
|
| 781 | * @rows: Number of rows in the range table.
|
| 782 | * @data: Array of values contained in the range table.
|
| 783 |
|
| 784 | struct sdca_control_range {
|
| 785 | unsigned int cols;
|
| 786 | unsigned int rows;
|
| 787 | u32 *data;
|
| 788 | };
|
| 789 |
|
| 790 | |
| 791 | * struct sdca_control - information for one SDCA Control
|
| 792 | * @label: Name for the Control, from SDCA Specification v1.0, section 7.1.7.
|
| 793 | * @sel: Identifier used for addressing.
|
| 794 | * @nbits: Number of bits used in the Control.
|
| 795 | * @values: Holds the Control value for constants and defaults.
|
| 796 | * @reset: Defined reset value for the Control.
|
| 797 | * @cn_list: A bitmask showing the valid Control Numbers within this Control,
|
| 798 | * Control Numbers typically represent channels.
|
| 799 | * @interrupt_position: SCDA interrupt line that will alert to changes on this
|
| 800 | * Control.
|
| 801 | * @type: Format of the data in the Control.
|
| 802 | * @range: Buffer describing valid range of values for the Control.
|
| 803 | * @mode: Access mode of the Control.
|
| 804 | * @layers: Bitmask of access layers of the Control.
|
| 805 | * @deferrable: Indicates if the access to the Control can be deferred.
|
| 806 | * @is_volatile: Indicates the Control registers are forced to be treated
|
| 807 | * as volatile.
|
| 808 | * @has_default: Indicates the Control has a default value to be written.
|
| 809 | * @has_reset: Indicates the Control has a defined reset value.
|
| 810 | * @has_fixed: Indicates the Control only supports a single value.
|
| 811 |
|
| 812 | struct sdca_control {
|
| 813 | const char *label;
|
| 814 | int sel;
|
| 815 |
|
| 816 | int nbits;
|
| 817 | int *values;
|
| 818 | int reset;
|
| 819 | u64 cn_list;
|
| 820 | int interrupt_position;
|
| 821 |
|
| 822 | enum sdca_control_datatype type;
|
| 823 | struct sdca_control_range range;
|
| 824 | enum sdca_access_mode mode;
|
| 825 | u8 layers;
|
| 826 |
|
| 827 | bool deferrable;
|
| 828 | bool is_volatile;
|
| 829 | bool has_default;
|
| 830 | bool has_reset;
|
| 831 | bool has_fixed;
|
| 832 | };
|
| 833 |
|
| 834 | |
| 835 | * enum sdca_terminal_type - SDCA Terminal Types
|
| 836 | *
|
| 837 | * Indicate what a Terminal Entity is used for, see in section 6.2.3
|
| 838 | * of the SDCA v1.0 specification.
|
| 839 |
|
| 840 | enum sdca_terminal_type {
|
| 841 |
|
| 842 | SDCA_TERM_TYPE_GENERIC = 0x101,
|
| 843 | SDCA_TERM_TYPE_ULTRASOUND = 0x180,
|
| 844 | SDCA_TERM_TYPE_CAPTURE_DIRECT_PCM_MIC = 0x181,
|
| 845 | SDCA_TERM_TYPE_RAW_PDM_MIC = 0x182,
|
| 846 | SDCA_TERM_TYPE_SPEECH = 0x183,
|
| 847 | SDCA_TERM_TYPE_VOICE = 0x184,
|
| 848 | SDCA_TERM_TYPE_SECONDARY_PCM_MIC = 0x185,
|
| 849 | SDCA_TERM_TYPE_ACOUSTIC_CONTEXT_AWARENESS = 0x186,
|
| 850 | SDCA_TERM_TYPE_DTOD_STREAM = 0x187,
|
| 851 | SDCA_TERM_TYPE_REFERENCE_STREAM = 0x188,
|
| 852 | SDCA_TERM_TYPE_SENSE_CAPTURE = 0x189,
|
| 853 | SDCA_TERM_TYPE_STREAMING_MIC = 0x18A,
|
| 854 | SDCA_TERM_TYPE_OPTIMIZATION_STREAM = 0x190,
|
| 855 | SDCA_TERM_TYPE_PDM_RENDER_STREAM = 0x191,
|
| 856 | SDCA_TERM_TYPE_COMPANION_DATA = 0x192,
|
| 857 |
|
| 858 | SDCA_TERM_TYPE_MICROPHONE_TRANSDUCER = 0x201,
|
| 859 | SDCA_TERM_TYPE_MICROPHONE_ARRAY_TRANSDUCER = 0x205,
|
| 860 | SDCA_TERM_TYPE_PRIMARY_FULL_RANGE_SPEAKER = 0x380,
|
| 861 | SDCA_TERM_TYPE_PRIMARY_LFE_SPEAKER = 0x381,
|
| 862 | SDCA_TERM_TYPE_PRIMARY_TWEETER_SPEAKER = 0x382,
|
| 863 | SDCA_TERM_TYPE_PRIMARY_ULTRASOUND_SPEAKER = 0x383,
|
| 864 | SDCA_TERM_TYPE_SECONDARY_FULL_RANGE_SPEAKER = 0x390,
|
| 865 | SDCA_TERM_TYPE_SECONDARY_LFE_SPEAKER = 0x391,
|
| 866 | SDCA_TERM_TYPE_SECONDARY_TWEETER_SPEAKER = 0x392,
|
| 867 | SDCA_TERM_TYPE_SECONDARY_ULTRASOUND_SPEAKER = 0x393,
|
| 868 | SDCA_TERM_TYPE_TERTIARY_FULL_RANGE_SPEAKER = 0x3A0,
|
| 869 | SDCA_TERM_TYPE_TERTIARY_LFE_SPEAKER = 0x3A1,
|
| 870 | SDCA_TERM_TYPE_TERTIARY_TWEETER_SPEAKER = 0x3A2,
|
| 871 | SDCA_TERM_TYPE_TERTIARY_ULTRASOUND_SPEAKER = 0x3A3,
|
| 872 | SDCA_TERM_TYPE_SPDIF = 0x605,
|
| 873 | SDCA_TERM_TYPE_NDAI_DISPLAY_AUDIO = 0x610,
|
| 874 | SDCA_TERM_TYPE_NDAI_USB = 0x612,
|
| 875 | SDCA_TERM_TYPE_NDAI_BLUETOOTH_MAIN = 0x614,
|
| 876 | SDCA_TERM_TYPE_NDAI_BLUETOOTH_ALTERNATE = 0x615,
|
| 877 | SDCA_TERM_TYPE_NDAI_BLUETOOTH_BOTH = 0x616,
|
| 878 | SDCA_TERM_TYPE_LINEIN_STEREO = 0x680,
|
| 879 | SDCA_TERM_TYPE_LINEIN_FRONT_LR = 0x681,
|
| 880 | SDCA_TERM_TYPE_LINEIN_CENTER_LFE = 0x682,
|
| 881 | SDCA_TERM_TYPE_LINEIN_SURROUND_LR = 0x683,
|
| 882 | SDCA_TERM_TYPE_LINEIN_REAR_LR = 0x684,
|
| 883 | SDCA_TERM_TYPE_LINEOUT_STEREO = 0x690,
|
| 884 | SDCA_TERM_TYPE_LINEOUT_FRONT_LR = 0x691,
|
| 885 | SDCA_TERM_TYPE_LINEOUT_CENTER_LFE = 0x692,
|
| 886 | SDCA_TERM_TYPE_LINEOUT_SURROUND_LR = 0x693,
|
| 887 | SDCA_TERM_TYPE_LINEOUT_REAR_LR = 0x694,
|
| 888 | SDCA_TERM_TYPE_MIC_JACK = 0x6A0,
|
| 889 | SDCA_TERM_TYPE_STEREO_JACK = 0x6B0,
|
| 890 | SDCA_TERM_TYPE_FRONT_LR_JACK = 0x6B1,
|
| 891 | SDCA_TERM_TYPE_CENTER_LFE_JACK = 0x6B2,
|
| 892 | SDCA_TERM_TYPE_SURROUND_LR_JACK = 0x6B3,
|
| 893 | SDCA_TERM_TYPE_REAR_LR_JACK = 0x6B4,
|
| 894 | SDCA_TERM_TYPE_HEADPHONE_JACK = 0x6C0,
|
| 895 | SDCA_TERM_TYPE_HEADSET_JACK = 0x6D0,
|
| 896 |
|
| 897 | SDCA_TERM_TYPE_SENSE_DATA = 0x280,
|
| 898 | SDCA_TERM_TYPE_PRIVACY_SIGNALING = 0x741,
|
| 899 | SDCA_TERM_TYPE_PRIVACY_INDICATORS = 0x747,
|
| 900 | };
|
| 901 |
|
| 902 | #define SDCA_TERM_TYPE_LINEIN_STEREO_NAME "LineIn Stereo"
|
| 903 | #define SDCA_TERM_TYPE_LINEIN_FRONT_LR_NAME "LineIn Front-LR"
|
| 904 | #define SDCA_TERM_TYPE_LINEIN_CENTER_LFE_NAME "LineIn Center-LFE"
|
| 905 | #define SDCA_TERM_TYPE_LINEIN_SURROUND_LR_NAME "LineIn Surround-LR"
|
| 906 | #define SDCA_TERM_TYPE_LINEIN_REAR_LR_NAME "LineIn Rear-LR"
|
| 907 | #define SDCA_TERM_TYPE_LINEOUT_STEREO_NAME "LineOut Stereo"
|
| 908 | #define SDCA_TERM_TYPE_LINEOUT_FRONT_LR_NAME "LineOut Front-LR"
|
| 909 | #define SDCA_TERM_TYPE_LINEOUT_CENTER_LFE_NAME "LineOut Center-LFE"
|
| 910 | #define SDCA_TERM_TYPE_LINEOUT_SURROUND_LR_NAME "LineOut Surround-LR"
|
| 911 | #define SDCA_TERM_TYPE_LINEOUT_REAR_LR_NAME "LineOut Rear-LR"
|
| 912 | #define SDCA_TERM_TYPE_MIC_JACK_NAME "Microphone"
|
| 913 | #define SDCA_TERM_TYPE_STEREO_JACK_NAME "Speaker Stereo"
|
| 914 | #define SDCA_TERM_TYPE_FRONT_LR_JACK_NAME "Speaker Front-LR"
|
| 915 | #define SDCA_TERM_TYPE_CENTER_LFE_JACK_NAME "Speaker Center-LFE"
|
| 916 | #define SDCA_TERM_TYPE_SURROUND_LR_JACK_NAME "Speaker Surround-LR"
|
| 917 | #define SDCA_TERM_TYPE_REAR_LR_JACK_NAME "Speaker Rear-LR"
|
| 918 | #define SDCA_TERM_TYPE_HEADPHONE_JACK_NAME "Headphone"
|
| 919 | #define SDCA_TERM_TYPE_HEADSET_JACK_NAME "Headset"
|
| 920 |
|
| 921 | |
| 922 | * enum sdca_connector_type - SDCA Connector Types
|
| 923 | *
|
| 924 | * Indicate the type of Connector that a Terminal Entity represents,
|
| 925 | * see section 6.2.4 of the SDCA v1.0 specification.
|
| 926 |
|
| 927 | enum sdca_connector_type {
|
| 928 | SDCA_CONN_TYPE_UNKNOWN = 0x00,
|
| 929 | SDCA_CONN_TYPE_2P5MM_JACK = 0x01,
|
| 930 | SDCA_CONN_TYPE_3P5MM_JACK = 0x02,
|
| 931 | SDCA_CONN_TYPE_QUARTER_INCH_JACK = 0x03,
|
| 932 | SDCA_CONN_TYPE_XLR = 0x05,
|
| 933 | SDCA_CONN_TYPE_SPDIF_OPTICAL = 0x06,
|
| 934 | SDCA_CONN_TYPE_RCA = 0x07,
|
| 935 | SDCA_CONN_TYPE_DIN = 0x0E,
|
| 936 | SDCA_CONN_TYPE_MINI_DIN = 0x0F,
|
| 937 | SDCA_CONN_TYPE_EIAJ_OPTICAL = 0x13,
|
| 938 | SDCA_CONN_TYPE_HDMI = 0x14,
|
| 939 | SDCA_CONN_TYPE_DISPLAYPORT = 0x17,
|
| 940 | SDCA_CONN_TYPE_LIGHTNING = 0x1B,
|
| 941 | SDCA_CONN_TYPE_USB_C = 0x1E,
|
| 942 | SDCA_CONN_TYPE_OTHER = 0xFF,
|
| 943 | };
|
| 944 |
|
| 945 | |
| 946 | * struct sdca_entity_iot - information specific to Input/Output Entities
|
| 947 | * @clock: Pointer to the Entity providing this Terminal's clock.
|
| 948 | * @type: Usage of the Terminal Entity.
|
| 949 | * @connector: Physical Connector of the Terminal Entity.
|
| 950 | * @reference: Physical Jack number of the Terminal Entity.
|
| 951 | * @num_transducer: Number of transducers attached to the Terminal Entity.
|
| 952 | * @is_dataport: Boolean indicating if this Terminal represents a Dataport.
|
| 953 |
|
| 954 | struct sdca_entity_iot {
|
| 955 | struct sdca_entity *clock;
|
| 956 |
|
| 957 | enum sdca_terminal_type type;
|
| 958 | enum sdca_connector_type connector;
|
| 959 | int reference;
|
| 960 | int num_transducer;
|
| 961 |
|
| 962 | bool is_dataport;
|
| 963 | };
|
| 964 |
|
| 965 | |
| 966 | * enum sdca_clock_type - SDCA Clock Types
|
| 967 | *
|
| 968 | * Indicate the synchronicity of an Clock Entity, see section 6.4.1.3
|
| 969 | * of the SDCA v1.0 specification.
|
| 970 |
|
| 971 | enum sdca_clock_type {
|
| 972 | SDCA_CLOCK_TYPE_EXTERNAL = 0x00,
|
| 973 | SDCA_CLOCK_TYPE_INTERNAL_ASYNC = 0x01,
|
| 974 | SDCA_CLOCK_TYPE_INTERNAL_SYNC = 0x02,
|
| 975 | SDCA_CLOCK_TYPE_INTERNAL_SOURCE_SYNC = 0x03,
|
| 976 | };
|
| 977 |
|
| 978 | |
| 979 | * struct sdca_entity_cs - information specific to Clock Source Entities
|
| 980 | * @type: Synchronicity of the Clock Source.
|
| 981 | * @max_delay: The maximum delay in microseconds before the clock is stable.
|
| 982 |
|
| 983 | struct sdca_entity_cs {
|
| 984 | enum sdca_clock_type type;
|
| 985 | unsigned int max_delay;
|
| 986 | };
|
| 987 |
|
| 988 | |
| 989 | * enum sdca_pde_power_state - SDCA Power States
|
| 990 | *
|
| 991 | * SDCA Power State values from SDCA specification v1.0 Section 7.12.4.
|
| 992 |
|
| 993 | enum sdca_pde_power_state {
|
| 994 | SDCA_PDE_PS0 = 0x0,
|
| 995 | SDCA_PDE_PS1 = 0x1,
|
| 996 | SDCA_PDE_PS2 = 0x2,
|
| 997 | SDCA_PDE_PS3 = 0x3,
|
| 998 | SDCA_PDE_PS4 = 0x4,
|
| 999 | };
|
| 1000 |
|
| 1001 | |
| 1002 | * struct sdca_pde_delay - describes the delay changing between 2 power states
|
| 1003 | * @from_ps: The power state being exited.
|
| 1004 | * @to_ps: The power state being entered.
|
| 1005 | * @us: The delay in microseconds switching between the two states.
|
| 1006 |
|
| 1007 | struct sdca_pde_delay {
|
| 1008 | int from_ps;
|
| 1009 | int to_ps;
|
| 1010 | unsigned int us;
|
| 1011 | };
|
| 1012 |
|
| 1013 | |
| 1014 | * struct sdca_entity_pde - information specific to Power Domain Entities
|
| 1015 | * @managed: Dynamically allocated array pointing to each Entity
|
| 1016 | * controlled by this PDE.
|
| 1017 | * @max_delay: Dynamically allocated array of delays for switching
|
| 1018 | * between power states.
|
| 1019 | * @num_managed: Number of Entities controlled by this PDE.
|
| 1020 | * @num_max_delay: Number of delays specified for state changes.
|
| 1021 |
|
| 1022 | struct sdca_entity_pde {
|
| 1023 | struct sdca_entity **managed;
|
| 1024 | struct sdca_pde_delay *max_delay;
|
| 1025 | int num_managed;
|
| 1026 | int num_max_delay;
|
| 1027 | };
|
| 1028 |
|
| 1029 | |
| 1030 | * enum sdca_entity_type - SDCA Entity Type codes
|
| 1031 | * @SDCA_ENTITY_TYPE_ENTITY_0: Entity 0, not actually from the
|
| 1032 | * specification but useful internally as an Entity structure
|
| 1033 | * is allocated for Entity 0, to hold Entity 0 controls.
|
| 1034 | * @SDCA_ENTITY_TYPE_IT: Input Terminal.
|
| 1035 | * @SDCA_ENTITY_TYPE_OT: Output Terminal.
|
| 1036 | * @SDCA_ENTITY_TYPE_MU: Mixer Unit.
|
| 1037 | * @SDCA_ENTITY_TYPE_SU: Selector Unit.
|
| 1038 | * @SDCA_ENTITY_TYPE_FU: Feature Unit.
|
| 1039 | * @SDCA_ENTITY_TYPE_XU: Extension Unit.
|
| 1040 | * @SDCA_ENTITY_TYPE_CS: Clock Source.
|
| 1041 | * @SDCA_ENTITY_TYPE_CX: Clock selector.
|
| 1042 | * @SDCA_ENTITY_TYPE_PDE: Power-Domain Entity.
|
| 1043 | * @SDCA_ENTITY_TYPE_GE: Group Entity.
|
| 1044 | * @SDCA_ENTITY_TYPE_SPE: Security & Privacy Entity.
|
| 1045 | * @SDCA_ENTITY_TYPE_CRU: Channel Remapping Unit.
|
| 1046 | * @SDCA_ENTITY_TYPE_UDMPU: Up-Down Mixer Processing Unit.
|
| 1047 | * @SDCA_ENTITY_TYPE_MFPU: Multi-Function Processing Unit.
|
| 1048 | * @SDCA_ENTITY_TYPE_SMPU: Smart Microphone Processing Unit.
|
| 1049 | * @SDCA_ENTITY_TYPE_SAPU: Smart Amp Processing Unit.
|
| 1050 | * @SDCA_ENTITY_TYPE_PPU: Posture Processing Unit.
|
| 1051 | * @SDCA_ENTITY_TYPE_TG: Tone Generator.
|
| 1052 | * @SDCA_ENTITY_TYPE_HIDE: Human Interface Device Entity.
|
| 1053 | *
|
| 1054 | * SDCA Entity Types from SDCA specification v1.0 Section 6.1.2
|
| 1055 | * all Entity Types not described are reserved.
|
| 1056 |
|
| 1057 | enum sdca_entity_type {
|
| 1058 | SDCA_ENTITY_TYPE_ENTITY_0 = 0x00,
|
| 1059 | SDCA_ENTITY_TYPE_IT = 0x02,
|
| 1060 | SDCA_ENTITY_TYPE_OT = 0x03,
|
| 1061 | SDCA_ENTITY_TYPE_MU = 0x05,
|
| 1062 | SDCA_ENTITY_TYPE_SU = 0x06,
|
| 1063 | SDCA_ENTITY_TYPE_FU = 0x07,
|
| 1064 | SDCA_ENTITY_TYPE_XU = 0x0A,
|
| 1065 | SDCA_ENTITY_TYPE_CS = 0x0B,
|
| 1066 | SDCA_ENTITY_TYPE_CX = 0x0C,
|
| 1067 | SDCA_ENTITY_TYPE_PDE = 0x11,
|
| 1068 | SDCA_ENTITY_TYPE_GE = 0x12,
|
| 1069 | SDCA_ENTITY_TYPE_SPE = 0x13,
|
| 1070 | SDCA_ENTITY_TYPE_CRU = 0x20,
|
| 1071 | SDCA_ENTITY_TYPE_UDMPU = 0x21,
|
| 1072 | SDCA_ENTITY_TYPE_MFPU = 0x22,
|
| 1073 | SDCA_ENTITY_TYPE_SMPU = 0x23,
|
| 1074 | SDCA_ENTITY_TYPE_SAPU = 0x24,
|
| 1075 | SDCA_ENTITY_TYPE_PPU = 0x25,
|
| 1076 | SDCA_ENTITY_TYPE_TG = 0x30,
|
| 1077 | SDCA_ENTITY_TYPE_HIDE = 0x31,
|
| 1078 | };
|
| 1079 |
|
| 1080 | |
| 1081 | * struct sdca_ge_control - control entry in the affected controls list
|
| 1082 | * @id: Entity ID of the Control affected.
|
| 1083 | * @sel: Control Selector of the Control affected.
|
| 1084 | * @cn: Control Number of the Control affected.
|
| 1085 | * @val: Value written to Control for this Mode.
|
| 1086 |
|
| 1087 | struct sdca_ge_control {
|
| 1088 | int id;
|
| 1089 | int sel;
|
| 1090 | int cn;
|
| 1091 | int val;
|
| 1092 | };
|
| 1093 |
|
| 1094 | |
| 1095 | * struct sdca_ge_mode - mode entry in the affected controls list
|
| 1096 | * @controls: Dynamically allocated array of controls written for this Mode.
|
| 1097 | * @num_controls: Number of controls written in this Mode.
|
| 1098 | * @val: GE Selector Mode value.
|
| 1099 |
|
| 1100 | struct sdca_ge_mode {
|
| 1101 | struct sdca_ge_control *controls;
|
| 1102 | int num_controls;
|
| 1103 | int val;
|
| 1104 | };
|
| 1105 |
|
| 1106 | |
| 1107 | * struct sdca_entity_ge - information specific to Group Entities
|
| 1108 | * @kctl: ALSA control pointer that can be used by linked Entities.
|
| 1109 | * @modes: Dynamically allocated array of Modes and the Controls written
|
| 1110 | * in each mode.
|
| 1111 | * @num_modes: Number of Modes.
|
| 1112 |
|
| 1113 | struct sdca_entity_ge {
|
| 1114 | struct snd_kcontrol_new *kctl;
|
| 1115 | struct sdca_ge_mode *modes;
|
| 1116 | int num_modes;
|
| 1117 | };
|
| 1118 |
|
| 1119 | |
| 1120 | * struct sdca_entity_hide - information specific to HIDE Entities
|
| 1121 | * @num_hidtx_ids: number of HIDTx Report ID
|
| 1122 | * @num_hidrx_ids: number of HIDRx Report ID
|
| 1123 | * @hidtx_ids: HIDTx Report ID
|
| 1124 | * @hidrx_ids: HIDRx Report ID
|
| 1125 | * @af_number_list: which Audio Function Numbers within this Device are
|
| 1126 | * sending/receiving the messages in this HIDE
|
| 1127 | * @hide_reside_function_num: indicating which Audio Function Numbers
|
| 1128 | * within this Device
|
| 1129 | * @max_delay: the maximum time in microseconds allowed for the Device
|
| 1130 | * to change the ownership from Device to Host
|
| 1131 |
|
| 1132 | struct sdca_entity_hide {
|
| 1133 | unsigned int *hidtx_ids;
|
| 1134 | unsigned int *hidrx_ids;
|
| 1135 | int num_hidtx_ids;
|
| 1136 | int num_hidrx_ids;
|
| 1137 | unsigned int af_number_list[SDCA_MAX_FUNCTION_COUNT];
|
| 1138 | unsigned int hide_reside_function_num;
|
| 1139 | unsigned int max_delay;
|
| 1140 | };
|
| 1141 |
|
| 1142 | |
| 1143 | * enum sdca_xu_reset_mechanism - SDCA FDL Resets
|
| 1144 |
|
| 1145 | enum sdca_xu_reset_mechanism {
|
| 1146 | SDCA_XU_RESET_FUNCTION = 0x0,
|
| 1147 | SDCA_XU_RESET_DEVICE = 0x1,
|
| 1148 | SDCA_XU_RESET_BUS = 0x2,
|
| 1149 | };
|
| 1150 |
|
| 1151 | |
| 1152 | * struct sdca_entity_xu - information specific to XU Entities
|
| 1153 | * @max_delay: the maximum time in microseconds allowed for the Device
|
| 1154 | * to change the ownership from Device to Host
|
| 1155 | * @reset_mechanism: indicates the type of reset that can be requested
|
| 1156 | * the end of an FDL.
|
| 1157 |
|
| 1158 | struct sdca_entity_xu {
|
| 1159 | unsigned int max_delay;
|
| 1160 | enum sdca_xu_reset_mechanism reset_mechanism;
|
| 1161 | };
|
| 1162 |
|
| 1163 | |
| 1164 | * struct sdca_entity - information for one SDCA Entity
|
| 1165 | * @label: String such as "OT 12".
|
| 1166 | * @id: Identifier used for addressing.
|
| 1167 | * @type: Type code for the Entity.
|
| 1168 | * @group: Pointer to Group Entity controlling this one, NULL if N/A.
|
| 1169 | * @sources: Dynamically allocated array pointing to each input Entity
|
| 1170 | * connected to this Entity.
|
| 1171 | * @controls: Dynamically allocated array of Controls.
|
| 1172 | * @num_sources: Number of sources for the Entity.
|
| 1173 | * @num_controls: Number of Controls for the Entity.
|
| 1174 | * @iot: Input/Output Terminal specific Entity properties.
|
| 1175 | * @cs: Clock Source specific Entity properties.
|
| 1176 | * @pde: Power Domain Entity specific Entity properties.
|
| 1177 | * @ge: Group Entity specific Entity properties.
|
| 1178 | * @hide: HIDE Entity specific Entity properties.
|
| 1179 | * @xu: XU Entity specific Entity properties.
|
| 1180 |
|
| 1181 | struct sdca_entity {
|
| 1182 | const char *label;
|
| 1183 | int id;
|
| 1184 | enum sdca_entity_type type;
|
| 1185 |
|
| 1186 | struct sdca_entity *group;
|
| 1187 | struct sdca_entity **sources;
|
| 1188 | struct sdca_control *controls;
|
| 1189 | int num_sources;
|
| 1190 | int num_controls;
|
| 1191 | union {
|
| 1192 | struct sdca_entity_iot iot;
|
| 1193 | struct sdca_entity_cs cs;
|
| 1194 | struct sdca_entity_pde pde;
|
| 1195 | struct sdca_entity_ge ge;
|
| 1196 | struct sdca_entity_hide hide;
|
| 1197 | struct sdca_entity_xu xu;
|
| 1198 | };
|
| 1199 | };
|
| 1200 |
|
| 1201 | |
| 1202 | * enum sdca_channel_purpose - SDCA Channel Purpose code
|
| 1203 | *
|
| 1204 | * Channel Purpose codes as described in the SDCA specification v1.0
|
| 1205 | * section 11.4.3.
|
| 1206 |
|
| 1207 | enum sdca_channel_purpose {
|
| 1208 |
|
| 1209 | SDCA_CHAN_PURPOSE_GENERIC_AUDIO = 0x01,
|
| 1210 | SDCA_CHAN_PURPOSE_VOICE = 0x02,
|
| 1211 | SDCA_CHAN_PURPOSE_SPEECH = 0x03,
|
| 1212 | SDCA_CHAN_PURPOSE_AMBIENT = 0x04,
|
| 1213 | SDCA_CHAN_PURPOSE_REFERENCE = 0x05,
|
| 1214 | SDCA_CHAN_PURPOSE_ULTRASOUND = 0x06,
|
| 1215 | SDCA_CHAN_PURPOSE_SENSE = 0x08,
|
| 1216 | SDCA_CHAN_PURPOSE_SILENCE = 0xFE,
|
| 1217 | SDCA_CHAN_PURPOSE_NON_AUDIO = 0xFF,
|
| 1218 |
|
| 1219 | SDCA_CHAN_PURPOSE_SENSE_V1 = 0x09,
|
| 1220 | SDCA_CHAN_PURPOSE_SENSE_V2 = 0x0A,
|
| 1221 | SDCA_CHAN_PURPOSE_SENSE_V12_INTERLEAVED = 0x10,
|
| 1222 | SDCA_CHAN_PURPOSE_SENSE_V21_INTERLEAVED = 0x11,
|
| 1223 | SDCA_CHAN_PURPOSE_SENSE_V12_PACKED = 0x12,
|
| 1224 | SDCA_CHAN_PURPOSE_SENSE_V21_PACKED = 0x13,
|
| 1225 | SDCA_CHAN_PURPOSE_SENSE_V1212_INTERLEAVED = 0x14,
|
| 1226 | SDCA_CHAN_PURPOSE_SENSE_V2121_INTERLEAVED = 0x15,
|
| 1227 | SDCA_CHAN_PURPOSE_SENSE_V1122_INTERLEAVED = 0x16,
|
| 1228 | SDCA_CHAN_PURPOSE_SENSE_V2211_INTERLEAVED = 0x17,
|
| 1229 | SDCA_CHAN_PURPOSE_SENSE_V1212_PACKED = 0x18,
|
| 1230 | SDCA_CHAN_PURPOSE_SENSE_V2121_PACKED = 0x19,
|
| 1231 | SDCA_CHAN_PURPOSE_SENSE_V1122_PACKED = 0x1A,
|
| 1232 | SDCA_CHAN_PURPOSE_SENSE_V2211_PACKED = 0x1B,
|
| 1233 | };
|
| 1234 |
|
| 1235 | |
| 1236 | * enum sdca_channel_relationship - SDCA Channel Relationship code
|
| 1237 | *
|
| 1238 | * Channel Relationship codes as described in the SDCA specification
|
| 1239 | * v1.0 section 11.4.2.
|
| 1240 |
|
| 1241 | enum sdca_channel_relationship {
|
| 1242 |
|
| 1243 | SDCA_CHAN_REL_UNDEFINED = 0x00,
|
| 1244 | SDCA_CHAN_REL_GENERIC_MONO = 0x01,
|
| 1245 | SDCA_CHAN_REL_GENERIC_LEFT = 0x02,
|
| 1246 | SDCA_CHAN_REL_GENERIC_RIGHT = 0x03,
|
| 1247 | SDCA_CHAN_REL_GENERIC_TOP = 0x48,
|
| 1248 | SDCA_CHAN_REL_GENERIC_BOTTOM = 0x49,
|
| 1249 | SDCA_CHAN_REL_CAPTURE_DIRECT = 0x4E,
|
| 1250 | SDCA_CHAN_REL_RENDER_DIRECT = 0x4F,
|
| 1251 | SDCA_CHAN_REL_FRONT_LEFT = 0x0B,
|
| 1252 | SDCA_CHAN_REL_FRONT_RIGHT = 0x0C,
|
| 1253 | SDCA_CHAN_REL_FRONT_CENTER = 0x0D,
|
| 1254 | SDCA_CHAN_REL_SIDE_LEFT = 0x12,
|
| 1255 | SDCA_CHAN_REL_SIDE_RIGHT = 0x13,
|
| 1256 | SDCA_CHAN_REL_BACK_LEFT = 0x16,
|
| 1257 | SDCA_CHAN_REL_BACK_RIGHT = 0x17,
|
| 1258 | SDCA_CHAN_REL_LOW_FREQUENCY_EFFECTS = 0x43,
|
| 1259 | SDCA_CHAN_REL_SOUNDWIRE_MIC = 0x55,
|
| 1260 | SDCA_CHAN_REL_SENSE_TRANSDUCER_1 = 0x58,
|
| 1261 | SDCA_CHAN_REL_SENSE_TRANSDUCER_2 = 0x59,
|
| 1262 | SDCA_CHAN_REL_SENSE_TRANSDUCER_12 = 0x5A,
|
| 1263 | SDCA_CHAN_REL_SENSE_TRANSDUCER_21 = 0x5B,
|
| 1264 | SDCA_CHAN_REL_ECHOREF_NONE = 0x70,
|
| 1265 | SDCA_CHAN_REL_ECHOREF_1 = 0x71,
|
| 1266 | SDCA_CHAN_REL_ECHOREF_2 = 0x72,
|
| 1267 | SDCA_CHAN_REL_ECHOREF_3 = 0x73,
|
| 1268 | SDCA_CHAN_REL_ECHOREF_4 = 0x74,
|
| 1269 | SDCA_CHAN_REL_ECHOREF_ALL = 0x75,
|
| 1270 | SDCA_CHAN_REL_ECHOREF_LFE_ALL = 0x76,
|
| 1271 |
|
| 1272 | SDCA_CHAN_REL_PRIMARY_TRANSDUCER = 0x50,
|
| 1273 | SDCA_CHAN_REL_SECONDARY_TRANSDUCER = 0x51,
|
| 1274 | SDCA_CHAN_REL_TERTIARY_TRANSDUCER = 0x52,
|
| 1275 | SDCA_CHAN_REL_LOWER_LEFT_ALLTRANSDUCER = 0x60,
|
| 1276 | SDCA_CHAN_REL_LOWER_RIGHT_ALLTRANSDUCER = 0x61,
|
| 1277 | SDCA_CHAN_REL_UPPER_LEFT_ALLTRANSDUCER = 0x62,
|
| 1278 | SDCA_CHAN_REL_UPPER_RIGHT_ALLTRANSDUCER = 0x63,
|
| 1279 | SDCA_CHAN_REL_LOWER_LEFT_PRIMARY = 0x64,
|
| 1280 | SDCA_CHAN_REL_LOWER_RIGHT_PRIMARY = 0x65,
|
| 1281 | SDCA_CHAN_REL_UPPER_LEFT_PRIMARY = 0x66,
|
| 1282 | SDCA_CHAN_REL_UPPER_RIGHT_PRIMARY = 0x67,
|
| 1283 | SDCA_CHAN_REL_LOWER_LEFT_SECONDARY = 0x68,
|
| 1284 | SDCA_CHAN_REL_LOWER_RIGHT_SECONDARY = 0x69,
|
| 1285 | SDCA_CHAN_REL_UPPER_LEFT_SECONDARY = 0x6A,
|
| 1286 | SDCA_CHAN_REL_UPPER_RIGHT_SECONDARY = 0x6B,
|
| 1287 | SDCA_CHAN_REL_LOWER_LEFT_TERTIARY = 0x6C,
|
| 1288 | SDCA_CHAN_REL_LOWER_RIGHT_TERTIARY = 0x6D,
|
| 1289 | SDCA_CHAN_REL_UPPER_LEFT_TERTIARY = 0x6E,
|
| 1290 | SDCA_CHAN_REL_UPPER_RIGHT_TERTIARY = 0x6F,
|
| 1291 | SDCA_CHAN_REL_DERIVED_LOWER_LEFT_PRIMARY = 0x94,
|
| 1292 | SDCA_CHAN_REL_DERIVED_LOWER_RIGHT_PRIMARY = 0x95,
|
| 1293 | SDCA_CHAN_REL_DERIVED_UPPER_LEFT_PRIMARY = 0x96,
|
| 1294 | SDCA_CHAN_REL_DERIVED_UPPER_RIGHT_PRIMARY = 0x97,
|
| 1295 | SDCA_CHAN_REL_DERIVED_LOWER_LEFT_SECONDARY = 0x98,
|
| 1296 | SDCA_CHAN_REL_DERIVED_LOWER_RIGHT_SECONDARY = 0x99,
|
| 1297 | SDCA_CHAN_REL_DERIVED_UPPER_LEFT_SECONDARY = 0x9A,
|
| 1298 | SDCA_CHAN_REL_DERIVED_UPPER_RIGHT_SECONDARY = 0x9B,
|
| 1299 | SDCA_CHAN_REL_DERIVED_LOWER_LEFT_TERTIARY = 0x9C,
|
| 1300 | SDCA_CHAN_REL_DERIVED_LOWER_RIGHT_TERTIARY = 0x9D,
|
| 1301 | SDCA_CHAN_REL_DERIVED_UPPER_LEFT_TERTIARY = 0x9E,
|
| 1302 | SDCA_CHAN_REL_DERIVED_UPPER_RIGHT_TERTIARY = 0x9F,
|
| 1303 | SDCA_CHAN_REL_DERIVED_MONO_PRIMARY = 0xA0,
|
| 1304 | SDCA_CHAN_REL_DERIVED_MONO_SECONDARY = 0xAB,
|
| 1305 | SDCA_CHAN_REL_DERIVED_MONO_TERTIARY = 0xAC,
|
| 1306 |
|
| 1307 | SDCA_CHAN_REL_EQUIPMENT_LEFT = 0x02,
|
| 1308 | SDCA_CHAN_REL_EQUIPMENT_RIGHT = 0x03,
|
| 1309 | SDCA_CHAN_REL_EQUIPMENT_COMBINED = 0x47,
|
| 1310 | SDCA_CHAN_REL_EQUIPMENT_TOP = 0x48,
|
| 1311 | SDCA_CHAN_REL_EQUIPMENT_BOTTOM = 0x49,
|
| 1312 | SDCA_CHAN_REL_EQUIPMENT_TOP_LEFT = 0x4A,
|
| 1313 | SDCA_CHAN_REL_EQUIPMENT_BOTTOM_LEFT = 0x4B,
|
| 1314 | SDCA_CHAN_REL_EQUIPMENT_TOP_RIGHT = 0x4C,
|
| 1315 | SDCA_CHAN_REL_EQUIPMENT_BOTTOM_RIGHT = 0x4D,
|
| 1316 | SDCA_CHAN_REL_EQUIPMENT_SILENCED_OUTPUT = 0x57,
|
| 1317 |
|
| 1318 | SDCA_CHAN_REL_ARRAY = 0x04,
|
| 1319 | SDCA_CHAN_REL_MIC = 0x53,
|
| 1320 | SDCA_CHAN_REL_RAW = 0x54,
|
| 1321 | SDCA_CHAN_REL_SILENCED_MIC = 0x56,
|
| 1322 | SDCA_CHAN_REL_MULTI_SOURCE_1 = 0x78,
|
| 1323 | SDCA_CHAN_REL_MULTI_SOURCE_2 = 0x79,
|
| 1324 | SDCA_CHAN_REL_MULTI_SOURCE_3 = 0x7A,
|
| 1325 | SDCA_CHAN_REL_MULTI_SOURCE_4 = 0x7B,
|
| 1326 | };
|
| 1327 |
|
| 1328 | |
| 1329 | * struct sdca_channel - a single Channel with a Cluster
|
| 1330 | * @id: Identifier used for addressing.
|
| 1331 | * @purpose: Indicates the purpose of the Channel, usually to give
|
| 1332 | * semantic meaning to the audio, eg. voice, ultrasound.
|
| 1333 | * @relationship: Indicates the relationship of this Channel to others
|
| 1334 | * in the Cluster, often used to identify the physical position of the
|
| 1335 | * Channel eg. left.
|
| 1336 |
|
| 1337 | struct sdca_channel {
|
| 1338 | int id;
|
| 1339 | enum sdca_channel_purpose purpose;
|
| 1340 | enum sdca_channel_relationship relationship;
|
| 1341 | };
|
| 1342 |
|
| 1343 | |
| 1344 | * struct sdca_cluster - information about an SDCA Channel Cluster
|
| 1345 | * @id: Identifier used for addressing.
|
| 1346 | * @num_channels: Number of Channels within this Cluster.
|
| 1347 | * @channels: Dynamically allocated array of Channels.
|
| 1348 |
|
| 1349 | struct sdca_cluster {
|
| 1350 | int id;
|
| 1351 | int num_channels;
|
| 1352 | struct sdca_channel *channels;
|
| 1353 | };
|
| 1354 |
|
| 1355 | |
| 1356 | * enum sdca_cluster_range - SDCA Range column definitions for ClusterIndex
|
| 1357 |
|
| 1358 | enum sdca_cluster_range {
|
| 1359 | SDCA_CLUSTER_BYTEINDEX = 0,
|
| 1360 | SDCA_CLUSTER_CLUSTERID = 1,
|
| 1361 | SDCA_CLUSTER_NCOLS = 2,
|
| 1362 | };
|
| 1363 |
|
| 1364 | |
| 1365 | * struct sdca_fdl_file - information about a file from a fileset used in FDL
|
| 1366 | * @vendor_id: Vendor ID of the file.
|
| 1367 | * @file_id: File ID of the file.
|
| 1368 | * @fdl_offset: Offset information for FDL.
|
| 1369 |
|
| 1370 | struct sdca_fdl_file {
|
| 1371 | u16 vendor_id;
|
| 1372 | u32 file_id;
|
| 1373 | u32 fdl_offset;
|
| 1374 | };
|
| 1375 |
|
| 1376 | |
| 1377 | * struct sdca_fdl_set - information about a set of files used in FDL
|
| 1378 | * @files: Array of files in this FDL set.
|
| 1379 | * @num_files: Number of files in this FDL set.
|
| 1380 | * @id: ID of the FDL set.
|
| 1381 |
|
| 1382 | struct sdca_fdl_set {
|
| 1383 | struct sdca_fdl_file *files;
|
| 1384 | int num_files;
|
| 1385 | u32 id;
|
| 1386 | };
|
| 1387 |
|
| 1388 | |
| 1389 | * struct sdca_fdl_data - information about a function's FDL data
|
| 1390 | * @swft: Pointer to the SoundWire File Table.
|
| 1391 | * @sets: Array of FDL sets used by this function.
|
| 1392 | * @num_sets: Number of FDL sets used by this function.
|
| 1393 |
|
| 1394 | struct sdca_fdl_data {
|
| 1395 | struct acpi_table_swft *swft;
|
| 1396 | struct sdca_fdl_set *sets;
|
| 1397 | int num_sets;
|
| 1398 | };
|
| 1399 |
|
| 1400 | |
| 1401 | * struct sdca_function_hid - information about a function's HID descriptors
|
| 1402 | * @report_desc: HID Report Descriptor for the HID Function
|
| 1403 | * @desc: HID descriptor for the HID Function
|
| 1404 |
|
| 1405 | struct sdca_function_hid {
|
| 1406 | unsigned char *report_desc;
|
| 1407 | struct hid_descriptor desc;
|
| 1408 | };
|
| 1409 |
|
| 1410 | |
| 1411 | * struct sdca_function_data - top-level information for one SDCA function
|
| 1412 | * @desc: Pointer to short descriptor from initial parsing.
|
| 1413 | * @init_table: Pointer to a table of initialization writes.
|
| 1414 | * @entities: Dynamically allocated array of Entities.
|
| 1415 | * @clusters: Dynamically allocated array of Channel Clusters.
|
| 1416 | * @num_init_table: Number of initialization writes.
|
| 1417 | * @num_entities: Number of Entities reported in this Function.
|
| 1418 | * @num_clusters: Number of Channel Clusters reported in this Function.
|
| 1419 | * @busy_max_delay: Maximum Function busy delay in microseconds, before an
|
| 1420 | * error should be reported.
|
| 1421 | * @reset_max_delay: Maximum Function reset delay in microseconds, before an
|
| 1422 | * error should be reported.
|
| 1423 | * @fdl_data: FDL data for this Function, if available.
|
| 1424 | * @hid: HID data for this Function, if available.
|
| 1425 |
|
| 1426 | struct sdca_function_data {
|
| 1427 | struct sdca_function_desc *desc;
|
| 1428 |
|
| 1429 | struct sdca_init_write *init_table;
|
| 1430 | struct sdca_entity *entities;
|
| 1431 | struct sdca_cluster *clusters;
|
| 1432 | int num_init_table;
|
| 1433 | int num_entities;
|
| 1434 | int num_clusters;
|
| 1435 |
|
| 1436 | unsigned int busy_max_delay;
|
| 1437 | unsigned int reset_max_delay;
|
| 1438 |
|
| 1439 | struct sdca_fdl_data fdl_data;
|
| 1440 |
|
| 1441 | union {
|
| 1442 | struct sdca_function_hid hid;
|
| 1443 | };
|
| 1444 | };
|
| 1445 |
|
| 1446 | static inline u32 sdca_range(struct sdca_control_range *range,
|
| 1447 | unsigned int col, unsigned int row)
|
| 1448 | {
|
| 1449 | return range->data[(row * range->cols) + col];
|
| 1450 | }
|
| 1451 |
|
| 1452 | static inline u32 sdca_range_search(struct sdca_control_range *range,
|
| 1453 | int search_col, int value, int result_col)
|
| 1454 | {
|
| 1455 | int i;
|
| 1456 |
|
| 1457 | for (i = 0; i < range->rows; i++) {
|
| 1458 | if (sdca_range(range, search_col, i) == value)
|
| 1459 | return sdca_range(range, result_col, i);
|
| 1460 | }
|
| 1461 |
|
| 1462 | return 0;
|
| 1463 | }
|
| 1464 |
|
| 1465 | int sdca_parse_function(struct device *dev, struct sdca_function_data *function);
|
| 1466 |
|
| 1467 | const char *sdca_find_terminal_name(enum sdca_terminal_type type);
|
| 1468 |
|
| 1469 | struct sdca_control *sdca_selector_find_control(struct device *dev,
|
| 1470 | struct sdca_entity *entity,
|
| 1471 | const int sel);
|
| 1472 | struct sdca_control_range *sdca_control_find_range(struct device *dev,
|
| 1473 | struct sdca_entity *entity,
|
| 1474 | struct sdca_control *control,
|
| 1475 | int cols, int rows);
|
| 1476 | struct sdca_control_range *sdca_selector_find_range(struct device *dev,
|
| 1477 | struct sdca_entity *entity,
|
| 1478 | int sel, int cols, int rows);
|
| 1479 | struct sdca_cluster *sdca_id_find_cluster(struct device *dev,
|
| 1480 | struct sdca_function_data *function,
|
| 1481 | const int id);
|
| 1482 | struct sdca_entity *sdca_find_entity_by_label(struct sdca_function_data *function,
|
| 1483 | const char *entity_label);
|
| 1484 |
|
| 1485 | #endif
|