2019-05-29 22:17:59 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2015-08-01 22:10:41 +08:00
|
|
|
/*
|
|
|
|
* skl_topology.h - Intel HDA Platform topology header file
|
|
|
|
*
|
|
|
|
* Copyright (C) 2014-15 Intel Corp
|
|
|
|
* Author: Jeeja KP <jeeja.kp@intel.com>
|
|
|
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
*
|
|
|
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SKL_TOPOLOGY_H__
|
|
|
|
#define __SKL_TOPOLOGY_H__
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
|
|
#include <sound/hdaudio_ext.h>
|
|
|
|
#include <sound/soc.h>
|
2018-05-25 03:49:23 +08:00
|
|
|
#include <uapi/sound/skl-tplg-interface.h>
|
2015-08-01 22:10:41 +08:00
|
|
|
#include "skl.h"
|
|
|
|
|
|
|
|
#define BITS_PER_BYTE 8
|
|
|
|
#define MAX_TS_GROUPS 8
|
|
|
|
#define MAX_DMIC_TS_GROUPS 4
|
|
|
|
#define MAX_FIXED_DMIC_PARAMS_SIZE 727
|
|
|
|
|
|
|
|
/* Maximum number of coefficients up down mixer module */
|
2017-11-07 18:46:16 +08:00
|
|
|
#define UP_DOWN_MIXER_MAX_COEFF 8
|
2015-08-01 22:10:41 +08:00
|
|
|
|
2015-10-27 08:22:55 +08:00
|
|
|
#define MODULE_MAX_IN_PINS 8
|
|
|
|
#define MODULE_MAX_OUT_PINS 8
|
|
|
|
|
2017-05-31 13:00:25 +08:00
|
|
|
#define SKL_MIC_CH_SUPPORT 4
|
|
|
|
#define SKL_MIC_MAX_CH_SUPPORT 8
|
|
|
|
#define SKL_DEFAULT_MIC_SEL_GAIN 0x3FF
|
|
|
|
#define SKL_MIC_SEL_SWITCH 0x3
|
|
|
|
|
2017-08-23 22:03:51 +08:00
|
|
|
#define SKL_OUTPUT_PIN 0
|
|
|
|
#define SKL_INPUT_PIN 1
|
|
|
|
#define SKL_MAX_PATH_CONFIGS 8
|
|
|
|
#define SKL_MAX_MODULES_IN_PIPE 8
|
|
|
|
#define SKL_MAX_MODULE_FORMATS 32
|
|
|
|
#define SKL_MAX_MODULE_RESOURCES 32
|
|
|
|
|
2015-08-01 22:10:41 +08:00
|
|
|
enum skl_channel_index {
|
|
|
|
SKL_CHANNEL_LEFT = 0,
|
|
|
|
SKL_CHANNEL_RIGHT = 1,
|
|
|
|
SKL_CHANNEL_CENTER = 2,
|
|
|
|
SKL_CHANNEL_LEFT_SURROUND = 3,
|
|
|
|
SKL_CHANNEL_CENTER_SURROUND = 3,
|
|
|
|
SKL_CHANNEL_RIGHT_SURROUND = 4,
|
|
|
|
SKL_CHANNEL_LFE = 7,
|
|
|
|
SKL_CHANNEL_INVALID = 0xF,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum skl_bitdepth {
|
|
|
|
SKL_DEPTH_8BIT = 8,
|
|
|
|
SKL_DEPTH_16BIT = 16,
|
|
|
|
SKL_DEPTH_24BIT = 24,
|
|
|
|
SKL_DEPTH_32BIT = 32,
|
|
|
|
SKL_DEPTH_INVALID
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
enum skl_s_freq {
|
|
|
|
SKL_FS_8000 = 8000,
|
|
|
|
SKL_FS_11025 = 11025,
|
|
|
|
SKL_FS_12000 = 12000,
|
|
|
|
SKL_FS_16000 = 16000,
|
|
|
|
SKL_FS_22050 = 22050,
|
|
|
|
SKL_FS_24000 = 24000,
|
|
|
|
SKL_FS_32000 = 32000,
|
|
|
|
SKL_FS_44100 = 44100,
|
|
|
|
SKL_FS_48000 = 48000,
|
|
|
|
SKL_FS_64000 = 64000,
|
|
|
|
SKL_FS_88200 = 88200,
|
|
|
|
SKL_FS_96000 = 96000,
|
|
|
|
SKL_FS_128000 = 128000,
|
|
|
|
SKL_FS_176400 = 176400,
|
|
|
|
SKL_FS_192000 = 192000,
|
|
|
|
SKL_FS_INVALID
|
|
|
|
};
|
|
|
|
|
|
|
|
enum skl_widget_type {
|
|
|
|
SKL_WIDGET_VMIXER = 1,
|
|
|
|
SKL_WIDGET_MIXER = 2,
|
|
|
|
SKL_WIDGET_PGA = 3,
|
|
|
|
SKL_WIDGET_MUX = 4
|
|
|
|
};
|
|
|
|
|
|
|
|
struct skl_audio_data_format {
|
|
|
|
enum skl_s_freq s_freq;
|
|
|
|
enum skl_bitdepth bit_depth;
|
|
|
|
u32 channel_map;
|
|
|
|
enum skl_ch_cfg ch_cfg;
|
|
|
|
enum skl_interleaving interleaving;
|
|
|
|
u8 number_of_channels;
|
|
|
|
u8 valid_bit_depth;
|
|
|
|
u8 sample_type;
|
|
|
|
u8 reserved[1];
|
|
|
|
} __packed;
|
|
|
|
|
|
|
|
struct skl_base_cfg {
|
2019-07-23 22:58:53 +08:00
|
|
|
u32 cpc;
|
2015-08-01 22:10:41 +08:00
|
|
|
u32 ibs;
|
|
|
|
u32 obs;
|
|
|
|
u32 is_pages;
|
|
|
|
struct skl_audio_data_format audio_fmt;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct skl_cpr_gtw_cfg {
|
|
|
|
u32 node_id;
|
|
|
|
u32 dma_buffer_size;
|
|
|
|
u32 config_length;
|
|
|
|
/* not mandatory; required only for DMIC/I2S */
|
|
|
|
u32 config_data[1];
|
|
|
|
} __packed;
|
|
|
|
|
2016-02-05 14:49:07 +08:00
|
|
|
struct skl_dma_control {
|
|
|
|
u32 node_id;
|
|
|
|
u32 config_length;
|
2016-08-24 20:33:15 +08:00
|
|
|
u32 config_data[0];
|
2016-02-05 14:49:07 +08:00
|
|
|
} __packed;
|
|
|
|
|
2015-08-01 22:10:41 +08:00
|
|
|
struct skl_cpr_cfg {
|
|
|
|
struct skl_base_cfg base_cfg;
|
|
|
|
struct skl_audio_data_format out_fmt;
|
|
|
|
u32 cpr_feature_mask;
|
|
|
|
struct skl_cpr_gtw_cfg gtw_cfg;
|
|
|
|
} __packed;
|
|
|
|
|
2017-09-01 16:06:13 +08:00
|
|
|
struct skl_cpr_pin_fmt {
|
|
|
|
u32 sink_id;
|
|
|
|
struct skl_audio_data_format src_fmt;
|
|
|
|
struct skl_audio_data_format dst_fmt;
|
|
|
|
} __packed;
|
2015-08-01 22:10:42 +08:00
|
|
|
|
|
|
|
struct skl_src_module_cfg {
|
|
|
|
struct skl_base_cfg base_cfg;
|
|
|
|
enum skl_s_freq src_cfg;
|
|
|
|
} __packed;
|
|
|
|
|
|
|
|
struct skl_up_down_mixer_cfg {
|
|
|
|
struct skl_base_cfg base_cfg;
|
|
|
|
enum skl_ch_cfg out_ch_cfg;
|
|
|
|
/* This should be set to 1 if user coefficients are required */
|
|
|
|
u32 coeff_sel;
|
|
|
|
/* Pass the user coeff in this array */
|
|
|
|
s32 coeff[UP_DOWN_MIXER_MAX_COEFF];
|
2017-11-07 18:46:17 +08:00
|
|
|
u32 ch_map;
|
2015-08-01 22:10:42 +08:00
|
|
|
} __packed;
|
|
|
|
|
2015-11-28 17:31:48 +08:00
|
|
|
struct skl_algo_cfg {
|
|
|
|
struct skl_base_cfg base_cfg;
|
|
|
|
char params[0];
|
|
|
|
} __packed;
|
|
|
|
|
2015-12-04 01:59:52 +08:00
|
|
|
struct skl_base_outfmt_cfg {
|
|
|
|
struct skl_base_cfg base_cfg;
|
|
|
|
struct skl_audio_data_format out_fmt;
|
|
|
|
} __packed;
|
|
|
|
|
2015-08-01 22:10:41 +08:00
|
|
|
enum skl_dma_type {
|
|
|
|
SKL_DMA_HDA_HOST_OUTPUT_CLASS = 0,
|
|
|
|
SKL_DMA_HDA_HOST_INPUT_CLASS = 1,
|
|
|
|
SKL_DMA_HDA_HOST_INOUT_CLASS = 2,
|
|
|
|
SKL_DMA_HDA_LINK_OUTPUT_CLASS = 8,
|
|
|
|
SKL_DMA_HDA_LINK_INPUT_CLASS = 9,
|
|
|
|
SKL_DMA_HDA_LINK_INOUT_CLASS = 0xA,
|
|
|
|
SKL_DMA_DMIC_LINK_INPUT_CLASS = 0xB,
|
|
|
|
SKL_DMA_I2S_LINK_OUTPUT_CLASS = 0xC,
|
|
|
|
SKL_DMA_I2S_LINK_INPUT_CLASS = 0xD,
|
|
|
|
};
|
|
|
|
|
|
|
|
union skl_ssp_dma_node {
|
|
|
|
u8 val;
|
|
|
|
struct {
|
2015-10-23 01:52:38 +08:00
|
|
|
u8 time_slot_index:4;
|
2015-08-01 22:10:41 +08:00
|
|
|
u8 i2s_instance:4;
|
|
|
|
} dma_node;
|
|
|
|
};
|
|
|
|
|
|
|
|
union skl_connector_node_id {
|
|
|
|
u32 val;
|
|
|
|
struct {
|
|
|
|
u32 vindex:8;
|
|
|
|
u32 dma_type:4;
|
|
|
|
u32 rsvd:20;
|
|
|
|
} node;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct skl_module_fmt {
|
|
|
|
u32 channels;
|
|
|
|
u32 s_freq;
|
|
|
|
u32 bit_depth;
|
|
|
|
u32 valid_bit_depth;
|
|
|
|
u32 ch_cfg;
|
2015-10-27 08:22:55 +08:00
|
|
|
u32 interleaving_style;
|
|
|
|
u32 sample_type;
|
|
|
|
u32 ch_map;
|
2015-08-01 22:10:41 +08:00
|
|
|
};
|
|
|
|
|
2015-10-27 08:22:49 +08:00
|
|
|
struct skl_module_cfg;
|
|
|
|
|
2016-09-22 16:30:40 +08:00
|
|
|
struct skl_mod_inst_map {
|
|
|
|
u16 mod_id;
|
|
|
|
u16 inst_id;
|
|
|
|
};
|
|
|
|
|
2018-04-18 22:40:41 +08:00
|
|
|
struct skl_uuid_inst_map {
|
|
|
|
u16 inst_id;
|
|
|
|
u16 reserved;
|
2019-06-19 23:02:13 +08:00
|
|
|
guid_t mod_uuid;
|
2018-04-18 22:40:41 +08:00
|
|
|
} __packed;
|
|
|
|
|
2016-09-22 16:30:40 +08:00
|
|
|
struct skl_kpb_params {
|
|
|
|
u32 num_modules;
|
2018-04-18 22:40:41 +08:00
|
|
|
union {
|
|
|
|
struct skl_mod_inst_map map[0];
|
|
|
|
struct skl_uuid_inst_map map_uuid[0];
|
|
|
|
} u;
|
2016-09-22 16:30:40 +08:00
|
|
|
};
|
|
|
|
|
2015-08-01 22:10:41 +08:00
|
|
|
struct skl_module_inst_id {
|
2019-06-19 23:02:13 +08:00
|
|
|
guid_t mod_uuid;
|
2016-07-26 20:36:40 +08:00
|
|
|
int module_id;
|
2015-08-01 22:10:41 +08:00
|
|
|
u32 instance_id;
|
2016-09-22 16:30:37 +08:00
|
|
|
int pvt_id;
|
2015-08-01 22:10:41 +08:00
|
|
|
};
|
|
|
|
|
2015-10-27 08:22:49 +08:00
|
|
|
enum skl_module_pin_state {
|
|
|
|
SKL_PIN_UNBIND = 0,
|
|
|
|
SKL_PIN_BIND_DONE = 1,
|
|
|
|
};
|
|
|
|
|
2015-08-01 22:10:41 +08:00
|
|
|
struct skl_module_pin {
|
|
|
|
struct skl_module_inst_id id;
|
|
|
|
bool is_dynamic;
|
|
|
|
bool in_use;
|
2015-10-27 08:22:49 +08:00
|
|
|
enum skl_module_pin_state pin_state;
|
|
|
|
struct skl_module_cfg *tgt_mcfg;
|
2015-08-01 22:10:41 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct skl_specific_cfg {
|
2015-12-04 01:59:53 +08:00
|
|
|
u32 set_params;
|
2015-11-28 17:31:49 +08:00
|
|
|
u32 param_id;
|
2015-08-01 22:10:41 +08:00
|
|
|
u32 caps_size;
|
|
|
|
u32 *caps;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum skl_pipe_state {
|
|
|
|
SKL_PIPE_INVALID = 0,
|
|
|
|
SKL_PIPE_CREATED = 1,
|
|
|
|
SKL_PIPE_PAUSED = 2,
|
2016-06-03 20:59:34 +08:00
|
|
|
SKL_PIPE_STARTED = 3,
|
|
|
|
SKL_PIPE_RESET = 4
|
2015-08-01 22:10:41 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct skl_pipe_module {
|
|
|
|
struct snd_soc_dapm_widget *w;
|
|
|
|
struct list_head node;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct skl_pipe_params {
|
|
|
|
u8 host_dma_id;
|
|
|
|
u8 link_dma_id;
|
|
|
|
u32 ch;
|
|
|
|
u32 s_freq;
|
|
|
|
u32 s_fmt;
|
|
|
|
u8 linktype;
|
2016-12-08 16:11:12 +08:00
|
|
|
snd_pcm_format_t format;
|
|
|
|
int link_index;
|
2015-08-01 22:10:41 +08:00
|
|
|
int stream;
|
2017-03-25 01:40:25 +08:00
|
|
|
unsigned int host_bps;
|
|
|
|
unsigned int link_bps;
|
2015-08-01 22:10:41 +08:00
|
|
|
};
|
|
|
|
|
2017-08-23 22:03:53 +08:00
|
|
|
struct skl_pipe_fmt {
|
|
|
|
u32 freq;
|
|
|
|
u8 channels;
|
|
|
|
u8 bps;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct skl_pipe_mcfg {
|
|
|
|
u8 res_idx;
|
|
|
|
u8 fmt_idx;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct skl_path_config {
|
|
|
|
u8 mem_pages;
|
|
|
|
struct skl_pipe_fmt in_fmt;
|
|
|
|
struct skl_pipe_fmt out_fmt;
|
|
|
|
};
|
|
|
|
|
2015-08-01 22:10:41 +08:00
|
|
|
struct skl_pipe {
|
|
|
|
u8 ppl_id;
|
|
|
|
u8 pipe_priority;
|
|
|
|
u16 conn_type;
|
|
|
|
u32 memory_pages;
|
2016-11-03 19:37:18 +08:00
|
|
|
u8 lp_mode;
|
2015-08-01 22:10:41 +08:00
|
|
|
struct skl_pipe_params *p_params;
|
|
|
|
enum skl_pipe_state state;
|
2017-08-23 22:03:53 +08:00
|
|
|
u8 direction;
|
|
|
|
u8 cur_config_idx;
|
|
|
|
u8 nr_cfgs;
|
|
|
|
struct skl_path_config configs[SKL_MAX_PATH_CONFIGS];
|
2015-08-01 22:10:41 +08:00
|
|
|
struct list_head w_list;
|
2016-06-03 20:59:41 +08:00
|
|
|
bool passthru;
|
2024-06-11 20:26:44 +08:00
|
|
|
u32 pipe_config_idx;
|
2015-08-01 22:10:41 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum skl_module_state {
|
|
|
|
SKL_MODULE_UNINIT = 0,
|
2016-03-29 00:41:30 +08:00
|
|
|
SKL_MODULE_LOADED = 1,
|
|
|
|
SKL_MODULE_INIT_DONE = 2,
|
|
|
|
SKL_MODULE_BIND_DONE = 3,
|
|
|
|
SKL_MODULE_UNLOADED = 4,
|
2015-08-01 22:10:41 +08:00
|
|
|
};
|
|
|
|
|
2016-11-03 19:37:19 +08:00
|
|
|
enum d0i3_capability {
|
|
|
|
SKL_D0I3_NONE = 0,
|
|
|
|
SKL_D0I3_STREAMING = 1,
|
|
|
|
SKL_D0I3_NON_STREAMING = 2,
|
|
|
|
};
|
|
|
|
|
2017-08-23 22:03:51 +08:00
|
|
|
struct skl_module_pin_fmt {
|
|
|
|
u8 id;
|
|
|
|
struct skl_module_fmt fmt;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct skl_module_iface {
|
|
|
|
u8 fmt_idx;
|
|
|
|
u8 nr_in_fmt;
|
|
|
|
u8 nr_out_fmt;
|
|
|
|
struct skl_module_pin_fmt inputs[MAX_IN_QUEUE];
|
|
|
|
struct skl_module_pin_fmt outputs[MAX_OUT_QUEUE];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct skl_module_pin_resources {
|
|
|
|
u8 pin_index;
|
|
|
|
u32 buf_size;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct skl_module_res {
|
|
|
|
u8 id;
|
|
|
|
u32 is_pages;
|
|
|
|
u32 ibs;
|
|
|
|
u32 obs;
|
|
|
|
u32 dma_buffer_size;
|
|
|
|
u32 cpc;
|
|
|
|
u8 nr_input_pins;
|
|
|
|
u8 nr_output_pins;
|
|
|
|
struct skl_module_pin_resources input[MAX_IN_QUEUE];
|
|
|
|
struct skl_module_pin_resources output[MAX_OUT_QUEUE];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct skl_module {
|
2019-06-19 23:02:13 +08:00
|
|
|
guid_t uuid;
|
2017-08-23 22:03:51 +08:00
|
|
|
u8 loadable;
|
|
|
|
u8 input_pin_type;
|
|
|
|
u8 output_pin_type;
|
|
|
|
u8 max_input_pins;
|
|
|
|
u8 max_output_pins;
|
|
|
|
u8 nr_resources;
|
|
|
|
u8 nr_interfaces;
|
|
|
|
struct skl_module_res resources[SKL_MAX_MODULE_RESOURCES];
|
|
|
|
struct skl_module_iface formats[SKL_MAX_MODULE_FORMATS];
|
|
|
|
};
|
|
|
|
|
2015-08-01 22:10:41 +08:00
|
|
|
struct skl_module_cfg {
|
2016-04-21 14:15:22 +08:00
|
|
|
u8 guid[16];
|
2015-08-01 22:10:41 +08:00
|
|
|
struct skl_module_inst_id id;
|
2017-08-23 22:03:53 +08:00
|
|
|
struct skl_module *module;
|
|
|
|
int res_idx;
|
|
|
|
int fmt_idx;
|
2015-10-27 08:22:56 +08:00
|
|
|
u8 domain;
|
2015-10-27 08:22:55 +08:00
|
|
|
bool homogenous_inputs;
|
|
|
|
bool homogenous_outputs;
|
|
|
|
struct skl_module_fmt in_fmt[MODULE_MAX_IN_PINS];
|
|
|
|
struct skl_module_fmt out_fmt[MODULE_MAX_OUT_PINS];
|
2015-08-01 22:10:41 +08:00
|
|
|
u8 max_in_queue;
|
|
|
|
u8 max_out_queue;
|
|
|
|
u8 in_queue_mask;
|
|
|
|
u8 out_queue_mask;
|
|
|
|
u8 in_queue;
|
|
|
|
u8 out_queue;
|
|
|
|
u8 is_loadable;
|
|
|
|
u8 core_id;
|
|
|
|
u8 dev_type;
|
|
|
|
u8 dma_id;
|
|
|
|
u8 time_slot;
|
2017-05-31 13:00:25 +08:00
|
|
|
u8 dmic_ch_combo_index;
|
|
|
|
u32 dmic_ch_type;
|
2015-08-01 22:10:41 +08:00
|
|
|
u32 params_fixup;
|
|
|
|
u32 converter;
|
|
|
|
u32 vbus_id;
|
2015-12-04 01:59:51 +08:00
|
|
|
u32 mem_pages;
|
2016-11-03 19:37:19 +08:00
|
|
|
enum d0i3_capability d0i3_caps;
|
2017-06-19 14:29:19 +08:00
|
|
|
u32 dma_buffer_size; /* in milli seconds */
|
2015-08-01 22:10:41 +08:00
|
|
|
struct skl_module_pin *m_in_pin;
|
|
|
|
struct skl_module_pin *m_out_pin;
|
|
|
|
enum skl_module_type m_type;
|
|
|
|
enum skl_hw_conn_type hw_conn_type;
|
|
|
|
enum skl_module_state m_state;
|
|
|
|
struct skl_pipe *pipe;
|
|
|
|
struct skl_specific_cfg formats_config;
|
2017-08-23 22:03:53 +08:00
|
|
|
struct skl_pipe_mcfg mod_cfg[SKL_MAX_MODULES_IN_PIPE];
|
2015-08-01 22:10:41 +08:00
|
|
|
};
|
2015-08-01 22:10:42 +08:00
|
|
|
|
2015-11-28 17:31:49 +08:00
|
|
|
struct skl_algo_data {
|
|
|
|
u32 param_id;
|
2015-12-04 01:59:53 +08:00
|
|
|
u32 set_params;
|
2015-11-28 17:31:49 +08:00
|
|
|
u32 max;
|
2016-07-08 20:45:03 +08:00
|
|
|
u32 size;
|
2015-11-28 17:31:49 +08:00
|
|
|
char *params;
|
|
|
|
};
|
|
|
|
|
2015-10-07 18:31:52 +08:00
|
|
|
struct skl_pipeline {
|
|
|
|
struct skl_pipe *pipe;
|
|
|
|
struct list_head node;
|
|
|
|
};
|
|
|
|
|
2017-03-25 01:40:34 +08:00
|
|
|
struct skl_module_deferred_bind {
|
|
|
|
struct skl_module_cfg *src;
|
|
|
|
struct skl_module_cfg *dst;
|
|
|
|
struct list_head node;
|
|
|
|
};
|
|
|
|
|
2017-05-31 13:00:25 +08:00
|
|
|
struct skl_mic_sel_config {
|
|
|
|
u16 mic_switch;
|
|
|
|
u16 flags;
|
|
|
|
u16 blob[SKL_MIC_MAX_CH_SUPPORT][SKL_MIC_MAX_CH_SUPPORT];
|
|
|
|
} __packed;
|
|
|
|
|
|
|
|
enum skl_channel {
|
|
|
|
SKL_CH_MONO = 1,
|
|
|
|
SKL_CH_STEREO = 2,
|
|
|
|
SKL_CH_TRIO = 3,
|
|
|
|
SKL_CH_QUATRO = 4,
|
|
|
|
};
|
|
|
|
|
2019-07-23 22:58:48 +08:00
|
|
|
static inline struct skl_dev *get_skl_ctx(struct device *dev)
|
2015-10-07 18:31:54 +08:00
|
|
|
{
|
2018-06-02 11:53:50 +08:00
|
|
|
struct hdac_bus *bus = dev_get_drvdata(dev);
|
2015-10-07 18:31:54 +08:00
|
|
|
|
2018-06-02 11:53:50 +08:00
|
|
|
return bus_to_skl(bus);
|
2015-10-07 18:31:54 +08:00
|
|
|
}
|
|
|
|
|
2015-10-07 18:31:55 +08:00
|
|
|
int skl_tplg_be_update_params(struct snd_soc_dai *dai,
|
|
|
|
struct skl_pipe_params *params);
|
2019-07-23 22:58:48 +08:00
|
|
|
int skl_dsp_set_dma_control(struct skl_dev *skl, u32 *caps,
|
2017-09-18 12:56:44 +08:00
|
|
|
u32 caps_size, u32 node_id);
|
2015-10-07 18:31:55 +08:00
|
|
|
void skl_tplg_set_be_dmic_config(struct snd_soc_dai *dai,
|
|
|
|
struct skl_pipe_params *params, int stream);
|
2018-04-18 22:40:41 +08:00
|
|
|
int skl_tplg_init(struct snd_soc_component *component,
|
2018-06-02 11:53:50 +08:00
|
|
|
struct hdac_bus *ebus);
|
2019-06-17 19:36:40 +08:00
|
|
|
void skl_tplg_exit(struct snd_soc_component *component,
|
|
|
|
struct hdac_bus *bus);
|
2015-10-07 18:31:55 +08:00
|
|
|
struct skl_module_cfg *skl_tplg_fe_get_cpr_module(
|
|
|
|
struct snd_soc_dai *dai, int stream);
|
|
|
|
int skl_tplg_update_pipe_params(struct device *dev,
|
|
|
|
struct skl_module_cfg *mconfig, struct skl_pipe_params *params);
|
|
|
|
|
2019-07-23 22:58:48 +08:00
|
|
|
void skl_tplg_d0i3_get(struct skl_dev *skl, enum d0i3_capability caps);
|
|
|
|
void skl_tplg_d0i3_put(struct skl_dev *skl, enum d0i3_capability caps);
|
2016-11-03 19:37:20 +08:00
|
|
|
|
2019-07-23 22:58:48 +08:00
|
|
|
int skl_create_pipeline(struct skl_dev *skl, struct skl_pipe *pipe);
|
2015-08-01 22:10:44 +08:00
|
|
|
|
2019-07-23 22:58:48 +08:00
|
|
|
int skl_run_pipe(struct skl_dev *skl, struct skl_pipe *pipe);
|
2015-08-01 22:10:44 +08:00
|
|
|
|
2019-07-23 22:58:48 +08:00
|
|
|
int skl_pause_pipe(struct skl_dev *skl, struct skl_pipe *pipe);
|
2015-08-01 22:10:44 +08:00
|
|
|
|
2019-07-23 22:58:48 +08:00
|
|
|
int skl_delete_pipe(struct skl_dev *skl, struct skl_pipe *pipe);
|
2015-08-01 22:10:44 +08:00
|
|
|
|
2019-07-23 22:58:48 +08:00
|
|
|
int skl_stop_pipe(struct skl_dev *skl, struct skl_pipe *pipe);
|
2015-08-01 22:10:44 +08:00
|
|
|
|
2019-07-23 22:58:48 +08:00
|
|
|
int skl_reset_pipe(struct skl_dev *skl, struct skl_pipe *pipe);
|
2016-06-03 20:59:34 +08:00
|
|
|
|
2019-07-23 22:58:48 +08:00
|
|
|
int skl_init_module(struct skl_dev *skl, struct skl_module_cfg *module_config);
|
2015-08-01 22:10:43 +08:00
|
|
|
|
2019-07-23 22:58:48 +08:00
|
|
|
int skl_bind_modules(struct skl_dev *skl, struct skl_module_cfg
|
2015-08-01 22:10:43 +08:00
|
|
|
*src_module, struct skl_module_cfg *dst_module);
|
|
|
|
|
2019-07-23 22:58:48 +08:00
|
|
|
int skl_unbind_modules(struct skl_dev *skl, struct skl_module_cfg
|
2015-08-01 22:10:43 +08:00
|
|
|
*src_module, struct skl_module_cfg *dst_module);
|
|
|
|
|
2019-07-23 22:58:48 +08:00
|
|
|
int skl_set_module_params(struct skl_dev *skl, u32 *params, int size,
|
2015-11-28 17:31:47 +08:00
|
|
|
u32 param_id, struct skl_module_cfg *mcfg);
|
2019-07-23 22:58:48 +08:00
|
|
|
int skl_get_module_params(struct skl_dev *skl, u32 *params, int size,
|
2015-12-04 01:59:56 +08:00
|
|
|
u32 param_id, struct skl_module_cfg *mcfg);
|
2015-11-28 17:31:47 +08:00
|
|
|
|
2016-02-05 14:49:06 +08:00
|
|
|
struct skl_module_cfg *skl_tplg_be_get_cpr_module(struct snd_soc_dai *dai,
|
|
|
|
int stream);
|
2015-08-01 22:10:41 +08:00
|
|
|
enum skl_bitdepth skl_get_bit_depth(int params);
|
2016-12-08 16:11:13 +08:00
|
|
|
int skl_pcm_host_dma_prepare(struct device *dev,
|
|
|
|
struct skl_pipe_params *params);
|
|
|
|
int skl_pcm_link_dma_prepare(struct device *dev,
|
|
|
|
struct skl_pipe_params *params);
|
2017-10-09 13:50:31 +08:00
|
|
|
|
2018-06-15 03:50:37 +08:00
|
|
|
int skl_dai_load(struct snd_soc_component *cmp, int index,
|
|
|
|
struct snd_soc_dai_driver *dai_drv,
|
|
|
|
struct snd_soc_tplg_pcm *pcm, struct snd_soc_dai *dai);
|
2019-07-23 22:58:48 +08:00
|
|
|
void skl_tplg_add_moduleid_in_bind_params(struct skl_dev *skl,
|
2018-04-18 22:40:41 +08:00
|
|
|
struct snd_soc_dapm_widget *w);
|
2015-08-01 22:10:41 +08:00
|
|
|
#endif
|