10
10
11
11
#include <sof/audio/buffer.h>
12
12
#include <ipc4/base_fw.h>
13
+ #include <ipc4/gateway.h>
13
14
#include <ipc/dai.h>
14
15
#if SOF_USE_HIFI (3 , COPIER ) || SOF_USE_HIFI (4 , COPIER ) || SOF_USE_HIFI (5 , COPIER )
15
16
#include <xtensa/tie/xt_hifi3.h>
@@ -117,10 +118,13 @@ struct gain_dma_control_data {
117
118
* the given device and DAI data.
118
119
*
119
120
* @param dev The pointer to the component device structure.
120
- * @param dd The pointer to the DAI data structure.
121
+ * @param gain_params The pointer to gain params structure.
122
+ * @param fade_period The fade period in milliseconds.
123
+ * @param dai_type DAI type
121
124
* @return 0 on success, negative error code on failure.
122
125
*/
123
- int copier_gain_set_params (struct comp_dev * dev , struct dai_data * dd );
126
+ int copier_gain_set_params (struct comp_dev * dev , struct copier_gain_params * gain_params ,
127
+ uint32_t fade_period , enum sof_ipc_dai_type dai_type );
124
128
125
129
/**
126
130
* @brief Sets the basic gain parameters.
@@ -129,10 +133,10 @@ int copier_gain_set_params(struct comp_dev *dev, struct dai_data *dd);
129
133
* by the given device and DAI data.
130
134
*
131
135
* @param dev The pointer to the component device structure.
132
- * @param dd The pointer to the DAI data structure.
136
+ * @param gain_params The pointer to gain params structure.
133
137
* @param ipc4_cfg The pointer to the IPC4 base module config.
134
138
*/
135
- void copier_gain_set_basic_params (struct comp_dev * dev , struct dai_data * dd ,
139
+ void copier_gain_set_basic_params (struct comp_dev * dev , struct copier_gain_params * gain_params ,
136
140
struct ipc4_base_module_cfg * ipc4_cfg );
137
141
138
142
/**
@@ -142,13 +146,13 @@ void copier_gain_set_basic_params(struct comp_dev *dev, struct dai_data *dd,
142
146
* by the given device and DAI data.
143
147
*
144
148
* @param dev The pointer to the component device structure.
145
- * @param dd The pointer to the DAI data structure.
149
+ * @param gain_params The pointer to gain params structure.
146
150
* @param ipc4_cfg The pointer to the IPC4 base module config.
147
151
* @param fade_period The fade period in milliseconds.
148
152
* @param frames The number of frames to fade.
149
153
* @return 0 on success, negative error code on failure.
150
154
*/
151
- int copier_gain_set_fade_params (struct comp_dev * dev , struct dai_data * dd ,
155
+ int copier_gain_set_fade_params (struct comp_dev * dev , struct copier_gain_params * gain_params ,
152
156
struct ipc4_base_module_cfg * ipc4_cfg ,
153
157
uint32_t fade_period , uint32_t frames );
154
158
@@ -209,12 +213,13 @@ enum copier_gain_state copier_gain_eval_state(struct copier_gain_params *gain_pa
209
213
* Sets/modify gain for a copier module in runtime.
210
214
*
211
215
* @param dev The copier device structure.
212
- * @param dd The DAI data structure.
216
+ * @param gain_params The pointer to the copier_gain_params structure.
213
217
* @param gain_data The gain control data structure.
218
+ * @param channels Number of audio channels.
214
219
* @return 0 on success, otherwise a negative error code.
215
220
*/
216
- int copier_set_gain (struct comp_dev * dev , struct dai_data * dd ,
217
- struct gain_dma_control_data * gain_data );
221
+ int copier_set_gain (struct comp_dev * dev , struct copier_gain_params * gain_params ,
222
+ struct gain_dma_control_data * gain_data , int channels );
218
223
219
224
/**
220
225
* Checks for unity gain mode.
0 commit comments