linux/sound/soc/intel/atom/sst-mfld-dsp.h

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __SST_MFLD_DSP_H__
#define __SST_MFLD_DSP_H__
/*
 *  sst_mfld_dsp.h - Intel SST Driver for audio engine
 *
 *  Copyright (C) 2008-14 Intel Corporation
 *  Authors:	Vinod Koul <[email protected]>
 *  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 */

#define SST_MAX_BIN_BYTES

#define MAX_DBG_RW_BYTES
#define MAX_NUM_SCATTER_BUFFERS
#define MAX_LOOP_BACK_DWORDS
/* IPC base address and mailbox, timestamp offsets */
#define SST_MAILBOX_SIZE
#define SST_MAILBOX_SEND
#define SST_TIME_STAMP
#define SST_TIME_STAMP_MRFLD
#define SST_RESERVED_OFFSET
#define SST_SCU_LPE_MAILBOX
#define SST_LPE_SCU_MAILBOX
#define SST_SCU_LPE_LOG_BUF
#define PROCESS_MSG

/* Message ID's for IPC messages */
/* Bits B7: SST or IA/SC ; B6-B4: Msg Category; B3-B0: Msg Type */

/* I2L Firmware/Codec Download msgs */
#define IPC_IA_PREP_LIB_DNLD
#define IPC_IA_LIB_DNLD_CMPLT
#define IPC_IA_GET_FW_VERSION
#define IPC_IA_GET_FW_BUILD_INF
#define IPC_IA_GET_FW_INFO
#define IPC_IA_GET_FW_CTXT
#define IPC_IA_SET_FW_CTXT
#define IPC_IA_PREPARE_SHUTDOWN
/* I2L Codec Config/control msgs */
#define IPC_PREP_D3
#define IPC_IA_SET_CODEC_PARAMS
#define IPC_IA_GET_CODEC_PARAMS
#define IPC_IA_SET_PPP_PARAMS
#define IPC_IA_GET_PPP_PARAMS
#define IPC_SST_PERIOD_ELAPSED_MRFLD
#define IPC_IA_ALG_PARAMS
#define IPC_IA_TUNING_PARAMS
#define IPC_IA_SET_RUNTIME_PARAMS
#define IPC_IA_SET_PARAMS
#define IPC_IA_GET_PARAMS

#define IPC_EFFECTS_CREATE
#define IPC_EFFECTS_DESTROY

/* I2L Stream config/control msgs */
#define IPC_IA_ALLOC_STREAM_MRFLD
#define IPC_IA_ALLOC_STREAM
#define IPC_IA_FREE_STREAM_MRFLD
#define IPC_IA_FREE_STREAM
#define IPC_IA_SET_STREAM_PARAMS
#define IPC_IA_SET_STREAM_PARAMS_MRFLD
#define IPC_IA_GET_STREAM_PARAMS
#define IPC_IA_PAUSE_STREAM
#define IPC_IA_PAUSE_STREAM_MRFLD
#define IPC_IA_RESUME_STREAM
#define IPC_IA_RESUME_STREAM_MRFLD
#define IPC_IA_DROP_STREAM
#define IPC_IA_DROP_STREAM_MRFLD
#define IPC_IA_DRAIN_STREAM
#define IPC_IA_DRAIN_STREAM_MRFLD
#define IPC_IA_CONTROL_ROUTING
#define IPC_IA_VTSV_UPDATE_MODULES
#define IPC_IA_VTSV_DETECTED

#define IPC_IA_START_STREAM_MRFLD
#define IPC_IA_START_STREAM

#define IPC_IA_SET_GAIN_MRFLD
/* Debug msgs */
#define IPC_IA_DBG_MEM_READ
#define IPC_IA_DBG_MEM_WRITE
#define IPC_IA_DBG_LOOP_BACK
#define IPC_IA_DBG_LOG_ENABLE
#define IPC_IA_DBG_SET_PROBE_PARAMS

/* L2I Firmware/Codec Download msgs */
#define IPC_IA_FW_INIT_CMPLT
#define IPC_IA_FW_INIT_CMPLT_MRFLD
#define IPC_IA_FW_ASYNC_ERR_MRFLD

/* L2I Codec Config/control msgs */
#define IPC_SST_FRAGMENT_ELPASED

#define IPC_SST_BUF_UNDER_RUN
#define IPC_SST_BUF_OVER_RUN
#define IPC_SST_DRAIN_END
#define IPC_SST_CHNGE_SSP_PARAMS
#define IPC_SST_STREAM_PROCESS_FATAL_ERR
#define IPC_SST_PERIOD_ELAPSED

#define IPC_SST_ERROR_EVENT
/* L2S messages */
#define IPC_SC_DDR_LINK_UP
#define IPC_SC_DDR_LINK_DOWN
#define IPC_SC_SET_LPECLK_REQ
#define IPC_SC_SSP_BIT_BANG

/* L2I Error reporting msgs */
#define IPC_IA_MEM_ALLOC_FAIL
#define IPC_IA_PROC_ERR

/* L2I Debug msgs */
#define IPC_IA_PRINT_STRING

/* Buffer under-run */
#define IPC_IA_BUF_UNDER_RUN_MRFLD

/* Mrfld specific defines:
 * For asynchronous messages(INIT_CMPLT, PERIOD_ELAPSED, ASYNC_ERROR)
 * received from FW, the format is:
 *  - IPC High: pvt_id is set to zero. Always short message.
 *  - msg_id is in lower 16-bits of IPC low payload.
 *  - pipe_id is in higher 16-bits of IPC low payload for period_elapsed.
 *  - error id is in higher 16-bits of IPC low payload for async errors.
 */
#define SST_ASYNC_DRV_ID

/* Command Response or Acknowledge message to any IPC message will have
 * same message ID and stream ID information which is sent.
 * There is no specific Ack message ID. The data field is used as response
 * meaning.
 */
enum ackData {};

enum ipc_ia_msg_id {};

enum sst_codec_types {};

enum stream_type {};

enum sst_error_codes {};

struct ipc_dsp_hdr {} __packed;

ipc_header_high __packed;
/* IPC header */
ipc_header_mrfld __packed;
/* CAUTION NOTE: All IPC message body must be multiple of 32 bits.*/

/* IPC Header */
ipc_header __packed;

/* Firmware build info */
struct sst_fw_build_info {} __packed;

/* Firmware Version info */
struct snd_sst_fw_version {};

struct ipc_header_fw_init {} __packed;

struct snd_sst_tstamp {} __packed;

/* Stream type params structure for Alloc stream */
struct snd_sst_str_type {} __packed;

/* Library info structure */
struct module_info {} __packed;

/* Library slot info */
struct lib_slot_info {} __packed;

struct snd_ppp_mixer_params {} __packed;

struct snd_sst_lib_download {};

struct snd_sst_lib_download_info {};
struct snd_pcm_params {} __packed;

/* MP3 Music Parameters Message */
struct snd_mp3_params {} __packed;

#define AAC_BIT_STREAM_ADTS
#define AAC_BIT_STREAM_ADIF
#define AAC_BIT_STREAM_RAW

/* AAC Music Parameters Message */
struct snd_aac_params {} __packed;

/* WMA Music Parameters Message */
struct snd_wma_params {} __packed;

/* Codec params structure */
snd_sst_codec_params __packed;

/* Address and size info of a frame buffer */
struct sst_address_info {};

struct snd_sst_alloc_params_ext {};

struct snd_sst_stream_params {} __packed;

struct snd_sst_params {};

struct snd_sst_alloc_mrfld {} __packed;

/* Alloc stream params structure */
struct snd_sst_alloc_params {} __packed;

/* Alloc stream response message */
struct snd_sst_alloc_response {};

/* Drop response */
struct snd_sst_drop_response {};

struct snd_sst_async_msg {};

struct snd_sst_async_err_msg {} __packed;

struct snd_sst_vol {};

/* Gain library parameters for mrfld
 * based on DSP command spec v0.82
 */
struct snd_sst_gain_v2 {} __packed;

struct snd_sst_mute {};

struct snd_sst_runtime_params {} __packed;

enum stream_param_type {};

/* CSV Voice call routing structure */
struct snd_sst_control_routing {};

struct ipc_post {};

struct snd_sst_ctxt_params {};

struct snd_sst_lpe_log_params {} __packed;

enum snd_sst_bytes_type {};

struct snd_sst_bytes_v2 {};

#define MAX_VTSV_FILES
struct snd_sst_vtsv_info {} __packed;

#endif /* __SST_MFLD_DSP_H__ */