2015-08-01 19:40:41 +05:30
/*
* skl - tplg - interface . h - Intel DSP FW private data interface
*
* Copyright ( C ) 2015 Intel Corp
* Author : Jeeja KP < jeeja . kp @ intel . com >
* Nilofer , Samreen < samreen . nilofer @ intel . com >
* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as version 2 , as
* published by the Free Software Foundation .
*
* This program is distributed in the hope that it will be useful , but
* WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
* General Public License for more details .
*/
# ifndef __HDA_TPLG_INTERFACE_H__
# define __HDA_TPLG_INTERFACE_H__
2015-10-07 11:31:56 +01:00
/*
* Default types range from 0 ~ 12. type can range from 0 to 0xff
* SST types start at higher to avoid any overlapping in future
*/
2015-11-28 15:01:50 +05:30
# define SKL_CONTROL_TYPE_BYTE_TLV 0x100
2015-10-07 11:31:56 +01:00
# define HDA_SST_CFG_MAX 900 /* size of copier cfg*/
# define MAX_IN_QUEUE 8
# define MAX_OUT_QUEUE 8
2015-10-27 09:22:57 +09:00
# define SKL_UUID_STR_SZ 40
2015-10-07 11:31:56 +01:00
/* Event types goes here */
/* Reserve event type 0 for no event handlers */
enum skl_event_types {
SKL_EVENT_NONE = 0 ,
SKL_MIXER_EVENT ,
SKL_MUX_EVENT ,
SKL_VMIXER_EVENT ,
SKL_PGA_EVENT
} ;
2015-08-01 19:40:41 +05:30
/**
* enum skl_ch_cfg - channel configuration
*
* @ SKL_CH_CFG_MONO : One channel only
* @ SKL_CH_CFG_STEREO : L & R
* @ SKL_CH_CFG_2_1 : L , R & LFE
* @ SKL_CH_CFG_3_0 : L , C & R
* @ SKL_CH_CFG_3_1 : L , C , R & LFE
* @ SKL_CH_CFG_QUATRO : L , R , Ls & Rs
* @ SKL_CH_CFG_4_0 : L , C , R & Cs
* @ SKL_CH_CFG_5_0 : L , C , R , Ls & Rs
* @ SKL_CH_CFG_5_1 : L , C , R , Ls , Rs & LFE
* @ SKL_CH_CFG_DUAL_MONO : One channel replicated in two
* @ SKL_CH_CFG_I2S_DUAL_STEREO_0 : Stereo ( L , R ) in 4 slots , 1 st stream : [ L , R , - , - ]
* @ SKL_CH_CFG_I2S_DUAL_STEREO_1 : Stereo ( L , R ) in 4 slots , 2 nd stream : [ - , - , L , R ]
* @ SKL_CH_CFG_INVALID : Invalid
*/
enum skl_ch_cfg {
SKL_CH_CFG_MONO = 0 ,
SKL_CH_CFG_STEREO = 1 ,
SKL_CH_CFG_2_1 = 2 ,
SKL_CH_CFG_3_0 = 3 ,
SKL_CH_CFG_3_1 = 4 ,
SKL_CH_CFG_QUATRO = 5 ,
SKL_CH_CFG_4_0 = 6 ,
SKL_CH_CFG_5_0 = 7 ,
SKL_CH_CFG_5_1 = 8 ,
SKL_CH_CFG_DUAL_MONO = 9 ,
SKL_CH_CFG_I2S_DUAL_STEREO_0 = 10 ,
SKL_CH_CFG_I2S_DUAL_STEREO_1 = 11 ,
2015-10-27 09:22:56 +09:00
SKL_CH_CFG_4_CHANNEL = 12 ,
2015-08-01 19:40:41 +05:30
SKL_CH_CFG_INVALID
} ;
enum skl_module_type {
SKL_MODULE_TYPE_MIXER = 0 ,
SKL_MODULE_TYPE_COPIER ,
SKL_MODULE_TYPE_UPDWMIX ,
2015-11-28 15:01:48 +05:30
SKL_MODULE_TYPE_SRCINT ,
2015-12-03 23:29:52 +05:30
SKL_MODULE_TYPE_ALGO ,
2016-09-22 14:00:40 +05:30
SKL_MODULE_TYPE_BASE_OUTFMT ,
SKL_MODULE_TYPE_KPB ,
2015-08-01 19:40:41 +05:30
} ;
enum skl_core_affinity {
SKL_AFFINITY_CORE_0 = 0 ,
SKL_AFFINITY_CORE_1 ,
SKL_AFFINITY_CORE_MAX
} ;
enum skl_pipe_conn_type {
SKL_PIPE_CONN_TYPE_NONE = 0 ,
SKL_PIPE_CONN_TYPE_FE ,
SKL_PIPE_CONN_TYPE_BE
} ;
enum skl_hw_conn_type {
SKL_CONN_NONE = 0 ,
SKL_CONN_SOURCE = 1 ,
SKL_CONN_SINK = 2
} ;
enum skl_dev_type {
SKL_DEVICE_BT = 0x0 ,
SKL_DEVICE_DMIC = 0x1 ,
SKL_DEVICE_I2S = 0x2 ,
SKL_DEVICE_SLIMBUS = 0x3 ,
SKL_DEVICE_HDALINK = 0x4 ,
2015-10-22 23:22:41 +05:30
SKL_DEVICE_HDAHOST = 0x5 ,
2015-08-01 19:40:41 +05:30
SKL_DEVICE_NONE
} ;
2015-10-07 11:31:56 +01:00
2015-10-27 09:22:56 +09:00
/**
* enum skl_interleaving - interleaving style
*
* @ SKL_INTERLEAVING_PER_CHANNEL : [ s1_ch1 . . . s1_chN , . . . , sM_ch1 . . . sM_chN ]
* @ SKL_INTERLEAVING_PER_SAMPLE : [ s1_ch1 . . . sM_ch1 , . . . , s1_chN . . . sM_chN ]
*/
enum skl_interleaving {
SKL_INTERLEAVING_PER_CHANNEL = 0 ,
SKL_INTERLEAVING_PER_SAMPLE = 1 ,
} ;
enum skl_sample_type {
SKL_SAMPLE_TYPE_INT_MSB = 0 ,
SKL_SAMPLE_TYPE_INT_LSB = 1 ,
SKL_SAMPLE_TYPE_INT_SIGNED = 2 ,
SKL_SAMPLE_TYPE_INT_UNSIGNED = 3 ,
SKL_SAMPLE_TYPE_FLOAT = 4
} ;
2015-10-27 09:22:55 +09:00
enum module_pin_type {
/* All pins of the module takes same PCM inputs or outputs
* e . g . mixout
*/
SKL_PIN_TYPE_HOMOGENEOUS ,
/* All pins of the module takes different PCM inputs or outputs
* e . g mux
*/
SKL_PIN_TYPE_HETEROGENEOUS ,
} ;
2015-12-03 23:29:53 +05:30
enum skl_module_param_type {
SKL_PARAM_DEFAULT = 0 ,
SKL_PARAM_INIT ,
2016-02-05 12:19:08 +05:30
SKL_PARAM_SET ,
SKL_PARAM_BIND
2015-12-03 23:29:53 +05:30
} ;
2015-10-07 11:31:56 +01:00
struct skl_dfw_algo_data {
2015-12-03 23:29:53 +05:30
u32 set_params : 2 ;
u32 rsvd : 30 ;
2015-11-28 15:01:50 +05:30
u32 param_id ;
2015-12-03 23:29:53 +05:30
u32 max ;
2015-10-27 09:22:56 +09:00
char params [ 0 ] ;
2015-10-07 11:31:56 +01:00
} __packed ;
2016-07-26 18:06:43 +05:30
# define LIB_NAME_LENGTH 128
# define HDA_MAX_LIB 16
struct lib_info {
char name [ LIB_NAME_LENGTH ] ;
} __packed ;
struct skl_dfw_manifest {
u32 lib_count ;
struct lib_info lib [ HDA_MAX_LIB ] ;
} __packed ;
2016-08-12 12:29:51 +05:30
enum skl_tkn_dir {
SKL_DIR_IN ,
SKL_DIR_OUT
} ;
enum skl_tuple_type {
SKL_TYPE_TUPLE ,
SKL_TYPE_DATA
} ;
2015-08-01 19:40:41 +05:30
# endif