forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/intel/skylake/skl-topology.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * skl_topology.h - Intel HDA Platform topology header file
34 *
....@@ -5,17 +6,7 @@
56 * Author: Jeeja KP <jeeja.kp@intel.com>
67 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
78 *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; version 2 of the License.
11
- *
12
- * This program is distributed in the hope that it will be useful, but
13
- * WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- * General Public License for more details.
16
- *
179 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
- *
1910 */
2011
2112 #ifndef __SKL_TOPOLOGY_H__
....@@ -106,11 +97,11 @@
10697 u8 number_of_channels;
10798 u8 valid_bit_depth;
10899 u8 sample_type;
109
- u8 reserved[1];
100
+ u8 reserved;
110101 } __packed;
111102
112103 struct skl_base_cfg {
113
- u32 cps;
104
+ u32 cpc;
114105 u32 ibs;
115106 u32 obs;
116107 u32 is_pages;
....@@ -128,7 +119,7 @@
128119 struct skl_dma_control {
129120 u32 node_id;
130121 u32 config_length;
131
- u32 config_data[0];
122
+ u32 config_data[];
132123 } __packed;
133124
134125 struct skl_cpr_cfg {
....@@ -149,11 +140,6 @@
149140 enum skl_s_freq src_cfg;
150141 } __packed;
151142
152
-struct notification_mask {
153
- u32 notify;
154
- u32 enable;
155
-} __packed;
156
-
157143 struct skl_up_down_mixer_cfg {
158144 struct skl_base_cfg base_cfg;
159145 enum skl_ch_cfg out_ch_cfg;
....@@ -166,7 +152,7 @@
166152
167153 struct skl_algo_cfg {
168154 struct skl_base_cfg base_cfg;
169
- char params[0];
155
+ char params[];
170156 } __packed;
171157
172158 struct skl_base_outfmt_cfg {
....@@ -224,7 +210,7 @@
224210 struct skl_uuid_inst_map {
225211 u16 inst_id;
226212 u16 reserved;
227
- uuid_le mod_uuid;
213
+ guid_t mod_uuid;
228214 } __packed;
229215
230216 struct skl_kpb_params {
....@@ -236,7 +222,7 @@
236222 };
237223
238224 struct skl_module_inst_id {
239
- uuid_le mod_uuid;
225
+ guid_t mod_uuid;
240226 int module_id;
241227 u32 instance_id;
242228 int pvt_id;
....@@ -320,6 +306,7 @@
320306 struct skl_path_config configs[SKL_MAX_PATH_CONFIGS];
321307 struct list_head w_list;
322308 bool passthru;
309
+ u32 pipe_config_idx;
323310 };
324311
325312 enum skl_module_state {
....@@ -357,7 +344,6 @@
357344 struct skl_module_res {
358345 u8 id;
359346 u32 is_pages;
360
- u32 cps;
361347 u32 ibs;
362348 u32 obs;
363349 u32 dma_buffer_size;
....@@ -369,7 +355,7 @@
369355 };
370356
371357 struct skl_module {
372
- uuid_le uuid;
358
+ guid_t uuid;
373359 u8 loadable;
374360 u8 input_pin_type;
375361 u8 output_pin_type;
....@@ -398,9 +384,6 @@
398384 u8 out_queue_mask;
399385 u8 in_queue;
400386 u8 out_queue;
401
- u32 mcps;
402
- u32 ibs;
403
- u32 obs;
404387 u8 is_loadable;
405388 u8 core_id;
406389 u8 dev_type;
....@@ -456,7 +439,7 @@
456439 SKL_CH_QUATRO = 4,
457440 };
458441
459
-static inline struct skl *get_skl_ctx(struct device *dev)
442
+static inline struct skl_dev *get_skl_ctx(struct device *dev)
460443 {
461444 struct hdac_bus *bus = dev_get_drvdata(dev);
462445
....@@ -465,43 +448,45 @@
465448
466449 int skl_tplg_be_update_params(struct snd_soc_dai *dai,
467450 struct skl_pipe_params *params);
468
-int skl_dsp_set_dma_control(struct skl_sst *ctx, u32 *caps,
451
+int skl_dsp_set_dma_control(struct skl_dev *skl, u32 *caps,
469452 u32 caps_size, u32 node_id);
470453 void skl_tplg_set_be_dmic_config(struct snd_soc_dai *dai,
471454 struct skl_pipe_params *params, int stream);
472455 int skl_tplg_init(struct snd_soc_component *component,
473
- struct hdac_bus *ebus);
456
+ struct hdac_bus *bus);
457
+void skl_tplg_exit(struct snd_soc_component *component,
458
+ struct hdac_bus *bus);
474459 struct skl_module_cfg *skl_tplg_fe_get_cpr_module(
475460 struct snd_soc_dai *dai, int stream);
476461 int skl_tplg_update_pipe_params(struct device *dev,
477462 struct skl_module_cfg *mconfig, struct skl_pipe_params *params);
478463
479
-void skl_tplg_d0i3_get(struct skl *skl, enum d0i3_capability caps);
480
-void skl_tplg_d0i3_put(struct skl *skl, enum d0i3_capability caps);
464
+void skl_tplg_d0i3_get(struct skl_dev *skl, enum d0i3_capability caps);
465
+void skl_tplg_d0i3_put(struct skl_dev *skl, enum d0i3_capability caps);
481466
482
-int skl_create_pipeline(struct skl_sst *ctx, struct skl_pipe *pipe);
467
+int skl_create_pipeline(struct skl_dev *skl, struct skl_pipe *pipe);
483468
484
-int skl_run_pipe(struct skl_sst *ctx, struct skl_pipe *pipe);
469
+int skl_run_pipe(struct skl_dev *skl, struct skl_pipe *pipe);
485470
486
-int skl_pause_pipe(struct skl_sst *ctx, struct skl_pipe *pipe);
471
+int skl_pause_pipe(struct skl_dev *skl, struct skl_pipe *pipe);
487472
488
-int skl_delete_pipe(struct skl_sst *ctx, struct skl_pipe *pipe);
473
+int skl_delete_pipe(struct skl_dev *skl, struct skl_pipe *pipe);
489474
490
-int skl_stop_pipe(struct skl_sst *ctx, struct skl_pipe *pipe);
475
+int skl_stop_pipe(struct skl_dev *skl, struct skl_pipe *pipe);
491476
492
-int skl_reset_pipe(struct skl_sst *ctx, struct skl_pipe *pipe);
477
+int skl_reset_pipe(struct skl_dev *skl, struct skl_pipe *pipe);
493478
494
-int skl_init_module(struct skl_sst *ctx, struct skl_module_cfg *module_config);
479
+int skl_init_module(struct skl_dev *skl, struct skl_module_cfg *mconfig);
495480
496
-int skl_bind_modules(struct skl_sst *ctx, struct skl_module_cfg
497
- *src_module, struct skl_module_cfg *dst_module);
481
+int skl_bind_modules(struct skl_dev *skl, struct skl_module_cfg
482
+ *src_mcfg, struct skl_module_cfg *dst_mcfg);
498483
499
-int skl_unbind_modules(struct skl_sst *ctx, struct skl_module_cfg
500
- *src_module, struct skl_module_cfg *dst_module);
484
+int skl_unbind_modules(struct skl_dev *skl, struct skl_module_cfg
485
+ *src_mcfg, struct skl_module_cfg *dst_mcfg);
501486
502
-int skl_set_module_params(struct skl_sst *ctx, u32 *params, int size,
487
+int skl_set_module_params(struct skl_dev *skl, u32 *params, int size,
503488 u32 param_id, struct skl_module_cfg *mcfg);
504
-int skl_get_module_params(struct skl_sst *ctx, u32 *params, int size,
489
+int skl_get_module_params(struct skl_dev *skl, u32 *params, int size,
505490 u32 param_id, struct skl_module_cfg *mcfg);
506491
507492 struct skl_module_cfg *skl_tplg_be_get_cpr_module(struct snd_soc_dai *dai,
....@@ -515,6 +500,6 @@
515500 int skl_dai_load(struct snd_soc_component *cmp, int index,
516501 struct snd_soc_dai_driver *dai_drv,
517502 struct snd_soc_tplg_pcm *pcm, struct snd_soc_dai *dai);
518
-void skl_tplg_add_moduleid_in_bind_params(struct skl *skl,
503
+void skl_tplg_add_moduleid_in_bind_params(struct skl_dev *skl,
519504 struct snd_soc_dapm_widget *w);
520505 #endif