linux/include/sound/hda_verbs.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * HD-audio codec verbs
 */

#ifndef __SOUND_HDA_VERBS_H
#define __SOUND_HDA_VERBS_H

/*
 * nodes
 */
#define AC_NODE_ROOT

/*
 * function group types
 */
enum {};

/*
 * widget types
 */
enum {};

/*
 * GET verbs
 */
#define AC_VERB_GET_STREAM_FORMAT
#define AC_VERB_GET_AMP_GAIN_MUTE
#define AC_VERB_GET_PROC_COEF
#define AC_VERB_GET_COEF_INDEX
#define AC_VERB_PARAMETERS
#define AC_VERB_GET_CONNECT_SEL
#define AC_VERB_GET_CONNECT_LIST
#define AC_VERB_GET_PROC_STATE
#define AC_VERB_GET_SDI_SELECT
#define AC_VERB_GET_POWER_STATE
#define AC_VERB_GET_CONV
#define AC_VERB_GET_PIN_WIDGET_CONTROL
#define AC_VERB_GET_UNSOLICITED_RESPONSE
#define AC_VERB_GET_PIN_SENSE
#define AC_VERB_GET_BEEP_CONTROL
#define AC_VERB_GET_EAPD_BTLENABLE
#define AC_VERB_GET_DIGI_CONVERT_1
#define AC_VERB_GET_DIGI_CONVERT_2
#define AC_VERB_GET_VOLUME_KNOB_CONTROL
/* f10-f1a: GPIO */
#define AC_VERB_GET_GPIO_DATA
#define AC_VERB_GET_GPIO_MASK
#define AC_VERB_GET_GPIO_DIRECTION
#define AC_VERB_GET_GPIO_WAKE_MASK
#define AC_VERB_GET_GPIO_UNSOLICITED_RSP_MASK
#define AC_VERB_GET_GPIO_STICKY_MASK
#define AC_VERB_GET_CONFIG_DEFAULT
/* f20: AFG/MFG */
#define AC_VERB_GET_SUBSYSTEM_ID
#define AC_VERB_GET_STRIPE_CONTROL
#define AC_VERB_GET_CVT_CHAN_COUNT
#define AC_VERB_GET_HDMI_DIP_SIZE
#define AC_VERB_GET_HDMI_ELDD
#define AC_VERB_GET_HDMI_DIP_INDEX
#define AC_VERB_GET_HDMI_DIP_DATA
#define AC_VERB_GET_HDMI_DIP_XMIT
#define AC_VERB_GET_HDMI_CP_CTRL
#define AC_VERB_GET_HDMI_CHAN_SLOT
#define AC_VERB_GET_DEVICE_SEL
#define AC_VERB_GET_DEVICE_LIST

/*
 * SET verbs
 */
#define AC_VERB_SET_STREAM_FORMAT
#define AC_VERB_SET_AMP_GAIN_MUTE
#define AC_VERB_SET_PROC_COEF
#define AC_VERB_SET_COEF_INDEX
#define AC_VERB_SET_CONNECT_SEL
#define AC_VERB_SET_PROC_STATE
#define AC_VERB_SET_SDI_SELECT
#define AC_VERB_SET_POWER_STATE
#define AC_VERB_SET_CHANNEL_STREAMID
#define AC_VERB_SET_PIN_WIDGET_CONTROL
#define AC_VERB_SET_UNSOLICITED_ENABLE
#define AC_VERB_SET_PIN_SENSE
#define AC_VERB_SET_BEEP_CONTROL
#define AC_VERB_SET_EAPD_BTLENABLE
#define AC_VERB_SET_DIGI_CONVERT_1
#define AC_VERB_SET_DIGI_CONVERT_2
#define AC_VERB_SET_DIGI_CONVERT_3
#define AC_VERB_SET_VOLUME_KNOB_CONTROL
#define AC_VERB_SET_GPIO_DATA
#define AC_VERB_SET_GPIO_MASK
#define AC_VERB_SET_GPIO_DIRECTION
#define AC_VERB_SET_GPIO_WAKE_MASK
#define AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK
#define AC_VERB_SET_GPIO_STICKY_MASK
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_0
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_1
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_2
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_3
#define AC_VERB_SET_EAPD
#define AC_VERB_SET_CODEC_RESET
#define AC_VERB_SET_STRIPE_CONTROL
#define AC_VERB_SET_CVT_CHAN_COUNT
#define AC_VERB_SET_HDMI_DIP_INDEX
#define AC_VERB_SET_HDMI_DIP_DATA
#define AC_VERB_SET_HDMI_DIP_XMIT
#define AC_VERB_SET_HDMI_CP_CTRL
#define AC_VERB_SET_HDMI_CHAN_SLOT
#define AC_VERB_SET_DEVICE_SEL

/*
 * Parameter IDs
 */
#define AC_PAR_VENDOR_ID
#define AC_PAR_SUBSYSTEM_ID
#define AC_PAR_REV_ID
#define AC_PAR_NODE_COUNT
#define AC_PAR_FUNCTION_TYPE
#define AC_PAR_AUDIO_FG_CAP
#define AC_PAR_AUDIO_WIDGET_CAP
#define AC_PAR_PCM
#define AC_PAR_STREAM
#define AC_PAR_PIN_CAP
#define AC_PAR_AMP_IN_CAP
#define AC_PAR_CONNLIST_LEN
#define AC_PAR_POWER_STATE
#define AC_PAR_PROC_CAP
#define AC_PAR_GPIO_CAP
#define AC_PAR_AMP_OUT_CAP
#define AC_PAR_VOL_KNB_CAP
#define AC_PAR_DEVLIST_LEN
#define AC_PAR_HDMI_LPCM_CAP

/*
 * AC_VERB_PARAMETERS results (32bit)
 */

/* Function Group Type */
#define AC_FGT_TYPE
#define AC_FGT_TYPE_SHIFT
#define AC_FGT_UNSOL_CAP

/* Audio Function Group Capabilities */
#define AC_AFG_OUT_DELAY
#define AC_AFG_IN_DELAY
#define AC_AFG_BEEP_GEN

/* Audio Widget Capabilities */
#define AC_WCAP_STEREO
#define AC_WCAP_IN_AMP
#define AC_WCAP_OUT_AMP
#define AC_WCAP_AMP_OVRD
#define AC_WCAP_FORMAT_OVRD
#define AC_WCAP_STRIPE
#define AC_WCAP_PROC_WID
#define AC_WCAP_UNSOL_CAP
#define AC_WCAP_CONN_LIST
#define AC_WCAP_DIGITAL
#define AC_WCAP_POWER
#define AC_WCAP_LR_SWAP
#define AC_WCAP_CP_CAPS
#define AC_WCAP_CHAN_CNT_EXT
#define AC_WCAP_DELAY
#define AC_WCAP_DELAY_SHIFT
#define AC_WCAP_TYPE
#define AC_WCAP_TYPE_SHIFT

/* supported PCM rates and bits */
#define AC_SUPPCM_RATES
#define AC_SUPPCM_BITS_8
#define AC_SUPPCM_BITS_16
#define AC_SUPPCM_BITS_20
#define AC_SUPPCM_BITS_24
#define AC_SUPPCM_BITS_32

/* supported PCM stream format */
#define AC_SUPFMT_PCM
#define AC_SUPFMT_FLOAT32
#define AC_SUPFMT_AC3

/* GP I/O count */
#define AC_GPIO_IO_COUNT
#define AC_GPIO_O_COUNT
#define AC_GPIO_O_COUNT_SHIFT
#define AC_GPIO_I_COUNT
#define AC_GPIO_I_COUNT_SHIFT
#define AC_GPIO_UNSOLICITED
#define AC_GPIO_WAKE

/* Converter stream, channel */
#define AC_CONV_CHANNEL
#define AC_CONV_STREAM
#define AC_CONV_STREAM_SHIFT

/* Input converter SDI select */
#define AC_SDI_SELECT

/* stream format id */
#define AC_FMT_CHAN_SHIFT
#define AC_FMT_CHAN_MASK
#define AC_FMT_BITS_SHIFT
#define AC_FMT_BITS_MASK
#define AC_FMT_BITS_8
#define AC_FMT_BITS_16
#define AC_FMT_BITS_20
#define AC_FMT_BITS_24
#define AC_FMT_BITS_32
#define AC_FMT_DIV_SHIFT
#define AC_FMT_DIV_MASK
#define AC_FMT_MULT_SHIFT
#define AC_FMT_MULT_MASK
#define AC_FMT_BASE_SHIFT
#define AC_FMT_BASE_48K
#define AC_FMT_BASE_44K
#define AC_FMT_TYPE_SHIFT
#define AC_FMT_TYPE_PCM
#define AC_FMT_TYPE_NON_PCM

/* Unsolicited response control */
#define AC_UNSOL_TAG
#define AC_UNSOL_ENABLED
#define AC_USRSP_EN

/* Unsolicited responses */
#define AC_UNSOL_RES_TAG
#define AC_UNSOL_RES_TAG_SHIFT
#define AC_UNSOL_RES_SUBTAG
#define AC_UNSOL_RES_SUBTAG_SHIFT
#define AC_UNSOL_RES_DE
#define AC_UNSOL_RES_DE_SHIFT
#define AC_UNSOL_RES_IA
#define AC_UNSOL_RES_ELDV
#define AC_UNSOL_RES_PD
#define AC_UNSOL_RES_CP_STATE
#define AC_UNSOL_RES_CP_READY

/* Pin widget capabilies */
#define AC_PINCAP_IMP_SENSE
#define AC_PINCAP_TRIG_REQ
#define AC_PINCAP_PRES_DETECT
#define AC_PINCAP_HP_DRV
#define AC_PINCAP_OUT
#define AC_PINCAP_IN
#define AC_PINCAP_BALANCE
/* Note: This LR_SWAP pincap is defined in the Realtek ALC883 specification,
 *       but is marked reserved in the Intel HDA specification.
 */
#define AC_PINCAP_LR_SWAP
/* Note: The same bit as LR_SWAP is newly defined as HDMI capability
 *       in HD-audio specification
 */
#define AC_PINCAP_HDMI
#define AC_PINCAP_DP
#define AC_PINCAP_VREF
#define AC_PINCAP_VREF_SHIFT
#define AC_PINCAP_EAPD
#define AC_PINCAP_HBR
/* Vref status (used in pin cap) */
#define AC_PINCAP_VREF_HIZ
#define AC_PINCAP_VREF_50
#define AC_PINCAP_VREF_GRD
#define AC_PINCAP_VREF_80
#define AC_PINCAP_VREF_100

/* Amplifier capabilities */
#define AC_AMPCAP_OFFSET
#define AC_AMPCAP_OFFSET_SHIFT
#define AC_AMPCAP_NUM_STEPS
#define AC_AMPCAP_NUM_STEPS_SHIFT
#define AC_AMPCAP_STEP_SIZE
#define AC_AMPCAP_STEP_SIZE_SHIFT
#define AC_AMPCAP_MUTE
#define AC_AMPCAP_MUTE_SHIFT

/* driver-specific amp-caps: using bits 24-30 */
#define AC_AMPCAP_MIN_MUTE

/* Connection list */
#define AC_CLIST_LENGTH
#define AC_CLIST_LONG

/* Supported power status */
#define AC_PWRST_D0SUP
#define AC_PWRST_D1SUP
#define AC_PWRST_D2SUP
#define AC_PWRST_D3SUP
#define AC_PWRST_D3COLDSUP
#define AC_PWRST_S3D3COLDSUP
#define AC_PWRST_CLKSTOP
#define AC_PWRST_EPSS

/* Power state values */
#define AC_PWRST_SETTING
#define AC_PWRST_ACTUAL
#define AC_PWRST_ACTUAL_SHIFT
#define AC_PWRST_D0
#define AC_PWRST_D1
#define AC_PWRST_D2
#define AC_PWRST_D3
#define AC_PWRST_ERROR
#define AC_PWRST_CLK_STOP_OK
#define AC_PWRST_SETTING_RESET

/* Processing capabilies */
#define AC_PCAP_BENIGN
#define AC_PCAP_NUM_COEF
#define AC_PCAP_NUM_COEF_SHIFT

/* Volume knobs capabilities */
#define AC_KNBCAP_NUM_STEPS
#define AC_KNBCAP_DELTA

/* HDMI LPCM capabilities */
#define AC_LPCMCAP_48K_CP_CHNS
#define AC_LPCMCAP_48K_NO_CHNS
#define AC_LPCMCAP_48K_20BIT
#define AC_LPCMCAP_48K_24BIT
#define AC_LPCMCAP_96K_CP_CHNS
#define AC_LPCMCAP_96K_NO_CHNS
#define AC_LPCMCAP_96K_20BIT
#define AC_LPCMCAP_96K_24BIT
#define AC_LPCMCAP_192K_CP_CHNS
#define AC_LPCMCAP_192K_NO_CHNS
#define AC_LPCMCAP_192K_20BIT
#define AC_LPCMCAP_192K_24BIT
#define AC_LPCMCAP_44K
#define AC_LPCMCAP_44K_MS

/* Display pin's device list length */
#define AC_DEV_LIST_LEN_MASK
#define AC_MAX_DEV_LIST_LEN

/*
 * Control Parameters
 */

/* Amp gain/mute */
#define AC_AMP_MUTE
#define AC_AMP_GAIN
#define AC_AMP_GET_INDEX

#define AC_AMP_GET_LEFT
#define AC_AMP_GET_RIGHT
#define AC_AMP_GET_OUTPUT
#define AC_AMP_GET_INPUT

#define AC_AMP_SET_INDEX
#define AC_AMP_SET_INDEX_SHIFT
#define AC_AMP_SET_RIGHT
#define AC_AMP_SET_LEFT
#define AC_AMP_SET_INPUT
#define AC_AMP_SET_OUTPUT

/* DIGITAL1 bits */
#define AC_DIG1_ENABLE
#define AC_DIG1_V
#define AC_DIG1_VCFG
#define AC_DIG1_EMPHASIS
#define AC_DIG1_COPYRIGHT
#define AC_DIG1_NONAUDIO
#define AC_DIG1_PROFESSIONAL
#define AC_DIG1_LEVEL

/* DIGITAL2 bits */
#define AC_DIG2_CC

/* DIGITAL3 bits */
#define AC_DIG3_ICT
#define AC_DIG3_KAE

/* Pin widget control - 8bit */
#define AC_PINCTL_EPT
#define AC_PINCTL_EPT_NATIVE
#define AC_PINCTL_EPT_HBR
#define AC_PINCTL_VREFEN
#define AC_PINCTL_VREF_HIZ
#define AC_PINCTL_VREF_50
#define AC_PINCTL_VREF_GRD
#define AC_PINCTL_VREF_80
#define AC_PINCTL_VREF_100
#define AC_PINCTL_IN_EN
#define AC_PINCTL_OUT_EN
#define AC_PINCTL_HP_EN

/* Pin sense - 32bit */
#define AC_PINSENSE_IMPEDANCE_MASK
#define AC_PINSENSE_PRESENCE
#define AC_PINSENSE_ELDV

/* EAPD/BTL enable - 32bit */
#define AC_EAPDBTL_BALANCED
#define AC_EAPDBTL_EAPD
#define AC_EAPDBTL_LR_SWAP

/* HDMI ELD data */
#define AC_ELDD_ELD_VALID
#define AC_ELDD_ELD_DATA

/* HDMI DIP size */
#define AC_DIPSIZE_ELD_BUF
#define AC_DIPSIZE_PACK_IDX

/* HDMI DIP index */
#define AC_DIPIDX_PACK_IDX
#define AC_DIPIDX_BYTE_IDX

/* HDMI DIP xmit (transmit) control */
#define AC_DIPXMIT_MASK
#define AC_DIPXMIT_DISABLE
#define AC_DIPXMIT_ONCE
#define AC_DIPXMIT_BEST

/* HDMI content protection (CP) control */
#define AC_CPCTRL_CES
#define AC_CPCTRL_READY
#define AC_CPCTRL_SUBTAG
#define AC_CPCTRL_STATE

/* Converter channel <-> HDMI slot mapping */
#define AC_CVTMAP_HDMI_SLOT
#define AC_CVTMAP_CHAN

/* configuration default - 32bit */
#define AC_DEFCFG_SEQUENCE
#define AC_DEFCFG_DEF_ASSOC
#define AC_DEFCFG_ASSOC_SHIFT
#define AC_DEFCFG_MISC
#define AC_DEFCFG_MISC_SHIFT
#define AC_DEFCFG_MISC_NO_PRESENCE
#define AC_DEFCFG_COLOR
#define AC_DEFCFG_COLOR_SHIFT
#define AC_DEFCFG_CONN_TYPE
#define AC_DEFCFG_CONN_TYPE_SHIFT
#define AC_DEFCFG_DEVICE
#define AC_DEFCFG_DEVICE_SHIFT
#define AC_DEFCFG_LOCATION
#define AC_DEFCFG_LOCATION_SHIFT
#define AC_DEFCFG_PORT_CONN
#define AC_DEFCFG_PORT_CONN_SHIFT

/* Display pin's device list entry */
#define AC_DE_PD
#define AC_DE_ELDV
#define AC_DE_IA

/* device types (0x0-0xf) */
enum {};

/* jack connection types (0x0-0xf) */
enum {};

/* jack colors (0x0-0xf) */
enum {};

/* Jack location (0x0-0x3f) */
/* common case */
enum {};
/* bits 4-5 */
enum {};
enum {};

/* Port connectivity (0-3) */
enum {};

/* max. codec address */
#define HDA_MAX_CODEC_ADDRESS

#endif /* __SOUND_HDA_VERBS_H */