linux/include/uapi/sound/sof/tokens.h

/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
/*
 * This file is provided under a dual BSD/GPLv2 license.  When using or
 * redistributing this file, you may do so under either license.
 *
 * Copyright(c) 2018 Intel Corporation
 * Author: Liam Girdwood <[email protected]>
 *         Keyon Jie <[email protected]>
 */

/*
 * Topology IDs and tokens.
 *
 * ** MUST BE ALIGNED WITH TOPOLOGY CONFIGURATION TOKEN VALUES **
 */

#ifndef __INCLUDE_UAPI_SOF_TOPOLOGY_H__
#define __INCLUDE_UAPI_SOF_TOPOLOGY_H__

/*
 * Kcontrol IDs
 */
#define SOF_TPLG_KCTL_VOL_ID
#define SOF_TPLG_KCTL_ENUM_ID
#define SOF_TPLG_KCTL_BYTES_ID
#define SOF_TPLG_KCTL_SWITCH_ID
#define SOF_TPLG_KCTL_BYTES_VOLATILE_RO
#define SOF_TPLG_KCTL_BYTES_VOLATILE_RW
#define SOF_TPLG_KCTL_BYTES_WO_ID

/*
 * Tokens - must match values in topology configurations
 */

/* buffers */
#define SOF_TKN_BUF_SIZE
#define SOF_TKN_BUF_CAPS
#define SOF_TKN_BUF_FLAGS

/* DAI */
/* Token retired with ABI 3.2, do not use for new capabilities
 * #define	SOF_TKN_DAI_DMAC_CONFIG			153
 */
#define SOF_TKN_DAI_TYPE
#define SOF_TKN_DAI_INDEX
#define SOF_TKN_DAI_DIRECTION

/* scheduling */
#define SOF_TKN_SCHED_PERIOD
#define SOF_TKN_SCHED_PRIORITY
#define SOF_TKN_SCHED_MIPS
#define SOF_TKN_SCHED_CORE
#define SOF_TKN_SCHED_FRAMES
#define SOF_TKN_SCHED_TIME_DOMAIN
#define SOF_TKN_SCHED_DYNAMIC_PIPELINE
#define SOF_TKN_SCHED_LP_MODE
#define SOF_TKN_SCHED_MEM_USAGE
#define SOF_TKN_SCHED_USE_CHAIN_DMA

/* volume */
#define SOF_TKN_VOLUME_RAMP_STEP_TYPE
#define SOF_TKN_VOLUME_RAMP_STEP_MS

#define SOF_TKN_GAIN_RAMP_TYPE
#define SOF_TKN_GAIN_RAMP_DURATION
#define SOF_TKN_GAIN_VAL

/* SRC */
#define SOF_TKN_SRC_RATE_IN
#define SOF_TKN_SRC_RATE_OUT

/* ASRC */
#define SOF_TKN_ASRC_RATE_IN
#define SOF_TKN_ASRC_RATE_OUT
#define SOF_TKN_ASRC_ASYNCHRONOUS_MODE
#define SOF_TKN_ASRC_OPERATION_MODE

/* PCM */
#define SOF_TKN_PCM_DMAC_CONFIG

/* Generic components */
#define SOF_TKN_COMP_PERIOD_SINK_COUNT
#define SOF_TKN_COMP_PERIOD_SOURCE_COUNT
#define SOF_TKN_COMP_FORMAT
/* Token retired with ABI 3.2, do not use for new capabilities
 * #define SOF_TKN_COMP_PRELOAD_COUNT		403
 */
#define SOF_TKN_COMP_CORE_ID
#define SOF_TKN_COMP_UUID
#define SOF_TKN_COMP_CPC
#define SOF_TKN_COMP_IS_PAGES
#define SOF_TKN_COMP_NUM_AUDIO_FORMATS
#define SOF_TKN_COMP_NUM_INPUT_PINS
#define SOF_TKN_COMP_NUM_OUTPUT_PINS
/*
 * The token for input/output pin binding, it specifies the widget
 * name that the input/output pin is connected from/to.
 */
#define SOF_TKN_COMP_INPUT_PIN_BINDING_WNAME
#define SOF_TKN_COMP_OUTPUT_PIN_BINDING_WNAME
#define SOF_TKN_COMP_NUM_INPUT_AUDIO_FORMATS
#define SOF_TKN_COMP_NUM_OUTPUT_AUDIO_FORMATS
/*
 * The token value is copied to the dapm_widget's
 * no_wname_in_kcontrol_name.
 */
#define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME

/* SSP */
#define SOF_TKN_INTEL_SSP_CLKS_CONTROL
#define SOF_TKN_INTEL_SSP_MCLK_ID
#define SOF_TKN_INTEL_SSP_SAMPLE_BITS
#define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH
#define SOF_TKN_INTEL_SSP_QUIRKS
#define SOF_TKN_INTEL_SSP_TDM_PADDING_PER_SLOT
#define SOF_TKN_INTEL_SSP_BCLK_DELAY

/* DMIC */
#define SOF_TKN_INTEL_DMIC_DRIVER_VERSION
#define SOF_TKN_INTEL_DMIC_CLK_MIN
#define SOF_TKN_INTEL_DMIC_CLK_MAX
#define SOF_TKN_INTEL_DMIC_DUTY_MIN
#define SOF_TKN_INTEL_DMIC_DUTY_MAX
#define SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE
#define SOF_TKN_INTEL_DMIC_SAMPLE_RATE
#define SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH
#define SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS

/* DMIC PDM */
#define SOF_TKN_INTEL_DMIC_PDM_CTRL_ID
#define SOF_TKN_INTEL_DMIC_PDM_MIC_A_Enable
#define SOF_TKN_INTEL_DMIC_PDM_MIC_B_Enable
#define SOF_TKN_INTEL_DMIC_PDM_POLARITY_A
#define SOF_TKN_INTEL_DMIC_PDM_POLARITY_B
#define SOF_TKN_INTEL_DMIC_PDM_CLK_EDGE
#define SOF_TKN_INTEL_DMIC_PDM_SKEW

/* Tone */
#define SOF_TKN_TONE_SAMPLE_RATE

/* Processing Components */
#define SOF_TKN_PROCESS_TYPE

/* for backward compatibility */
#define SOF_TKN_EFFECT_TYPE

/* SAI */
#define SOF_TKN_IMX_SAI_MCLK_ID

/* ESAI */
#define SOF_TKN_IMX_ESAI_MCLK_ID

/* Stream */
#define SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3
#define SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3

/* Led control for mute switches */
#define SOF_TKN_MUTE_LED_USE
#define SOF_TKN_MUTE_LED_DIRECTION

/* ALH */
#define SOF_TKN_INTEL_ALH_RATE
#define SOF_TKN_INTEL_ALH_CH

/* HDA */
#define SOF_TKN_INTEL_HDA_RATE
#define SOF_TKN_INTEL_HDA_CH

/* AFE */
#define SOF_TKN_MEDIATEK_AFE_RATE
#define SOF_TKN_MEDIATEK_AFE_CH
#define SOF_TKN_MEDIATEK_AFE_FORMAT

/* MIXER */
#define SOF_TKN_MIXER_TYPE

/* ACPDMIC */
#define SOF_TKN_AMD_ACPDMIC_RATE
#define SOF_TKN_AMD_ACPDMIC_CH

/* CAVS AUDIO FORMAT */
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_RATE
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_BIT_DEPTH
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_VALID_BIT_DEPTH
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CHANNELS
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_MAP
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_CFG
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_INTERLEAVING_STYLE
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_FMT_CFG
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_SAMPLE_TYPE
#define SOF_TKN_CAVS_AUDIO_FORMAT_INPUT_PIN_INDEX
/* intentional token numbering discontinuity, reserved for future use */
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_RATE
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_BIT_DEPTH
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_VALID_BIT_DEPTH
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CHANNELS
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_MAP
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_CFG
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_INTERLEAVING_STYLE
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_FMT_CFG
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_SAMPLE_TYPE
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUTPUT_PIN_INDEX
/* intentional token numbering discontinuity, reserved for future use */
#define SOF_TKN_CAVS_AUDIO_FORMAT_IBS
#define SOF_TKN_CAVS_AUDIO_FORMAT_OBS
#define SOF_TKN_CAVS_AUDIO_FORMAT_DMA_BUFFER_SIZE

/* COPIER */
#define SOF_TKN_INTEL_COPIER_NODE_TYPE
#define SOF_TKN_INTEL_COPIER_DEEP_BUFFER_DMA_MS

/* ACP I2S */
#define SOF_TKN_AMD_ACPI2S_RATE
#define SOF_TKN_AMD_ACPI2S_CH
#define SOF_TKN_AMD_ACPI2S_TDM_MODE

/* MICFIL PDM */
#define SOF_TKN_IMX_MICFIL_RATE
#define SOF_TKN_IMX_MICFIL_CH

/* ACP SDW */
#define SOF_TKN_AMD_ACP_SDW_RATE
#define SOF_TKN_AMD_ACP_SDW_CH

#endif