1010
1111#include <sof/audio/buffer.h>
1212#include <ipc4/base_fw.h>
13+ #include <ipc4/gateway.h>
1314#include <ipc/dai.h>
1415#if SOF_USE_HIFI (3 , COPIER ) || SOF_USE_HIFI (4 , COPIER ) || SOF_USE_HIFI (5 , COPIER )
1516#include <xtensa/tie/xt_hifi3.h>
@@ -117,10 +118,13 @@ struct gain_dma_control_data {
117118 * the given device and DAI data.
118119 *
119120 * @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
121124 * @return 0 on success, negative error code on failure.
122125 */
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 );
124128
125129/**
126130 * @brief Sets the basic gain parameters.
@@ -129,10 +133,10 @@ int copier_gain_set_params(struct comp_dev *dev, struct dai_data *dd);
129133 * by the given device and DAI data.
130134 *
131135 * @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.
133137 * @param ipc4_cfg The pointer to the IPC4 base module config.
134138 */
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 ,
136140 struct ipc4_base_module_cfg * ipc4_cfg );
137141
138142/**
@@ -142,13 +146,13 @@ void copier_gain_set_basic_params(struct comp_dev *dev, struct dai_data *dd,
142146 * by the given device and DAI data.
143147 *
144148 * @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.
146150 * @param ipc4_cfg The pointer to the IPC4 base module config.
147151 * @param fade_period The fade period in milliseconds.
148152 * @param frames The number of frames to fade.
149153 * @return 0 on success, negative error code on failure.
150154 */
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 ,
152156 struct ipc4_base_module_cfg * ipc4_cfg ,
153157 uint32_t fade_period , uint32_t frames );
154158
@@ -209,12 +213,13 @@ enum copier_gain_state copier_gain_eval_state(struct copier_gain_params *gain_pa
209213 * Sets/modify gain for a copier module in runtime.
210214 *
211215 * @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.
213217 * @param gain_data The gain control data structure.
218+ * @param channels Number of audio channels.
214219 * @return 0 on success, otherwise a negative error code.
215220 */
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 );
218223
219224/**
220225 * Checks for unity gain mode.
0 commit comments