@@ -131,13 +131,10 @@ static void mic_privacy_free(struct copier_data *cd)
131131__cold static int copier_init (struct processing_module * mod )
132132{
133133 union ipc4_connector_node_id node_id ;
134- struct ipc_comp_dev * ipc_pipe ;
135- struct ipc * ipc = ipc_get ();
136134 struct copier_data * cd ;
137135 struct comp_dev * dev = mod -> dev ;
138136 struct module_data * md = & mod -> priv ;
139137 struct ipc4_copier_module_cfg * copier = (struct ipc4_copier_module_cfg * )md -> cfg .init_data ;
140- struct comp_ipc_config * config = & dev -> ipc_config ;
141138 void * gtw_cfg = NULL ;
142139 size_t gtw_cfg_size ;
143140 int i , ret = 0 ;
@@ -186,17 +183,6 @@ __cold static int copier_init(struct processing_module *mod)
186183 for (i = 0 ; i < IPC4_COPIER_MODULE_OUTPUT_PINS_COUNT ; i ++ )
187184 cd -> out_fmt [i ] = cd -> config .out_fmt ;
188185
189- ipc_pipe = ipc_get_comp_by_ppl_id (ipc , COMP_TYPE_PIPELINE ,
190- config -> pipeline_id ,
191- IPC_COMP_IGNORE_REMOTE );
192- if (!ipc_pipe ) {
193- comp_err (dev , "pipeline %d is not existed" , config -> pipeline_id );
194- ret = - EPIPE ;
195- goto error ;
196- }
197-
198- dev -> pipeline = ipc_pipe -> pipeline ;
199-
200186 node_id = copier -> gtw_cfg .node_id ;
201187 /* copier is linked to gateway */
202188 if (node_id .dw != IPC4_INVALID_NODE_ID ) {
@@ -205,7 +191,7 @@ __cold static int copier_init(struct processing_module *mod)
205191 switch (node_id .f .dma_type ) {
206192 case ipc4_hda_host_output_class :
207193 case ipc4_hda_host_input_class :
208- ret = copier_host_create (dev , cd , copier , ipc_pipe -> pipeline );
194+ ret = copier_host_create (dev , cd , copier , dev -> pipeline );
209195 if (ret < 0 ) {
210196 comp_err (dev , "unable to create host" );
211197 goto error ;
@@ -228,7 +214,7 @@ __cold static int copier_init(struct processing_module *mod)
228214 case ipc4_i2s_link_input_class :
229215 case ipc4_alh_link_output_class :
230216 case ipc4_alh_link_input_class :
231- ret = copier_dai_create (dev , cd , copier , ipc_pipe -> pipeline );
217+ ret = copier_dai_create (dev , cd , copier , dev -> pipeline );
232218 if (ret < 0 ) {
233219 comp_err (dev , "unable to create dai" );
234220 goto error ;
@@ -246,7 +232,7 @@ __cold static int copier_init(struct processing_module *mod)
246232#if CONFIG_IPC4_GATEWAY
247233 case ipc4_ipc_output_class :
248234 case ipc4_ipc_input_class :
249- ret = copier_ipcgtw_create (dev , cd , copier , ipc_pipe -> pipeline );
235+ ret = copier_ipcgtw_create (dev , cd , copier , dev -> pipeline );
250236 if (ret < 0 ) {
251237 comp_err (dev , "unable to create IPC gateway" );
252238 goto error ;
0 commit comments