David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ |
| 2 | /* |
| 3 | * This file is provided under a dual BSD/GPLv2 license. When using or |
| 4 | * redistributing this file, you may do so under either license. |
| 5 | * |
| 6 | * Copyright(c) 2018 Intel Corporation. All rights reserved. |
| 7 | * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> |
| 8 | * Keyon Jie <yang.jie@linux.intel.com> |
| 9 | */ |
| 10 | |
| 11 | /* |
| 12 | * Topology IDs and tokens. |
| 13 | * |
| 14 | * ** MUST BE ALIGNED WITH TOPOLOGY CONFIGURATION TOKEN VALUES ** |
| 15 | */ |
| 16 | |
| 17 | #ifndef __INCLUDE_UAPI_SOF_TOPOLOGY_H__ |
| 18 | #define __INCLUDE_UAPI_SOF_TOPOLOGY_H__ |
| 19 | |
| 20 | /* |
| 21 | * Kcontrol IDs |
| 22 | */ |
| 23 | #define SOF_TPLG_KCTL_VOL_ID 256 |
| 24 | #define SOF_TPLG_KCTL_ENUM_ID 257 |
| 25 | #define SOF_TPLG_KCTL_BYTES_ID 258 |
| 26 | #define SOF_TPLG_KCTL_SWITCH_ID 259 |
| 27 | |
| 28 | /* |
| 29 | * Tokens - must match values in topology configurations |
| 30 | */ |
| 31 | |
| 32 | /* buffers */ |
| 33 | #define SOF_TKN_BUF_SIZE 100 |
| 34 | #define SOF_TKN_BUF_CAPS 101 |
| 35 | |
| 36 | /* DAI */ |
| 37 | /* Token retired with ABI 3.2, do not use for new capabilities |
| 38 | * #define SOF_TKN_DAI_DMAC_CONFIG 153 |
| 39 | */ |
| 40 | #define SOF_TKN_DAI_TYPE 154 |
| 41 | #define SOF_TKN_DAI_INDEX 155 |
| 42 | #define SOF_TKN_DAI_DIRECTION 156 |
| 43 | |
| 44 | /* scheduling */ |
| 45 | #define SOF_TKN_SCHED_PERIOD 200 |
| 46 | #define SOF_TKN_SCHED_PRIORITY 201 |
| 47 | #define SOF_TKN_SCHED_MIPS 202 |
| 48 | #define SOF_TKN_SCHED_CORE 203 |
| 49 | #define SOF_TKN_SCHED_FRAMES 204 |
| 50 | #define SOF_TKN_SCHED_TIME_DOMAIN 205 |
| 51 | |
| 52 | /* volume */ |
| 53 | #define SOF_TKN_VOLUME_RAMP_STEP_TYPE 250 |
| 54 | #define SOF_TKN_VOLUME_RAMP_STEP_MS 251 |
| 55 | |
| 56 | /* SRC */ |
| 57 | #define SOF_TKN_SRC_RATE_IN 300 |
| 58 | #define SOF_TKN_SRC_RATE_OUT 301 |
| 59 | |
| 60 | /* PCM */ |
| 61 | #define SOF_TKN_PCM_DMAC_CONFIG 353 |
| 62 | |
| 63 | /* Generic components */ |
| 64 | #define SOF_TKN_COMP_PERIOD_SINK_COUNT 400 |
| 65 | #define SOF_TKN_COMP_PERIOD_SOURCE_COUNT 401 |
| 66 | #define SOF_TKN_COMP_FORMAT 402 |
| 67 | /* Token retired with ABI 3.2, do not use for new capabilities |
| 68 | * #define SOF_TKN_COMP_PRELOAD_COUNT 403 |
| 69 | */ |
| 70 | |
| 71 | /* SSP */ |
| 72 | #define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500 |
| 73 | #define SOF_TKN_INTEL_SSP_MCLK_ID 501 |
| 74 | #define SOF_TKN_INTEL_SSP_SAMPLE_BITS 502 |
| 75 | #define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH 503 |
| 76 | #define SOF_TKN_INTEL_SSP_QUIRKS 504 |
| 77 | #define SOF_TKN_INTEL_SSP_TDM_PADDING_PER_SLOT 505 |
| 78 | #define SOF_TKN_INTEL_SSP_BCLK_DELAY 506 |
| 79 | |
| 80 | /* DMIC */ |
| 81 | #define SOF_TKN_INTEL_DMIC_DRIVER_VERSION 600 |
| 82 | #define SOF_TKN_INTEL_DMIC_CLK_MIN 601 |
| 83 | #define SOF_TKN_INTEL_DMIC_CLK_MAX 602 |
| 84 | #define SOF_TKN_INTEL_DMIC_DUTY_MIN 603 |
| 85 | #define SOF_TKN_INTEL_DMIC_DUTY_MAX 604 |
| 86 | #define SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE 605 |
| 87 | #define SOF_TKN_INTEL_DMIC_SAMPLE_RATE 608 |
| 88 | #define SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH 609 |
| 89 | #define SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS 610 |
| 90 | |
| 91 | /* DMIC PDM */ |
| 92 | #define SOF_TKN_INTEL_DMIC_PDM_CTRL_ID 700 |
| 93 | #define SOF_TKN_INTEL_DMIC_PDM_MIC_A_Enable 701 |
| 94 | #define SOF_TKN_INTEL_DMIC_PDM_MIC_B_Enable 702 |
| 95 | #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_A 703 |
| 96 | #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_B 704 |
| 97 | #define SOF_TKN_INTEL_DMIC_PDM_CLK_EDGE 705 |
| 98 | #define SOF_TKN_INTEL_DMIC_PDM_SKEW 706 |
| 99 | |
| 100 | /* Tone */ |
| 101 | #define SOF_TKN_TONE_SAMPLE_RATE 800 |
| 102 | |
| 103 | /* Processing Components */ |
| 104 | #define SOF_TKN_PROCESS_TYPE 900 |
| 105 | |
| 106 | /* for backward compatibility */ |
| 107 | #define SOF_TKN_EFFECT_TYPE SOF_TKN_PROCESS_TYPE |
| 108 | |
| 109 | /* SAI */ |
| 110 | #define SOF_TKN_IMX_SAI_FIRST_TOKEN 1000 |
| 111 | /* TODO: Add SAI tokens */ |
| 112 | |
| 113 | /* ESAI */ |
| 114 | #define SOF_TKN_IMX_ESAI_FIRST_TOKEN 1100 |
| 115 | /* TODO: Add ESAI tokens */ |
| 116 | |
| 117 | #endif |