@@ -259,7 +259,7 @@ static int soc_tplg_vendor_load_(struct soc_tplg *tplg,
259259 int ret = 0 ;
260260
261261 if (tplg -> comp && tplg -> ops && tplg -> ops -> vendor_load )
262- ret = tplg -> ops -> vendor_load (tplg -> comp , hdr );
262+ ret = tplg -> ops -> vendor_load (tplg -> comp , tplg -> index , hdr );
263263 else {
264264 dev_err (tplg -> dev , "ASoC: no vendor load callback for ID %d\n" ,
265265 hdr -> vendor_type );
@@ -291,7 +291,8 @@ static int soc_tplg_widget_load(struct soc_tplg *tplg,
291291 struct snd_soc_dapm_widget * w , struct snd_soc_tplg_dapm_widget * tplg_w )
292292{
293293 if (tplg -> comp && tplg -> ops && tplg -> ops -> widget_load )
294- return tplg -> ops -> widget_load (tplg -> comp , w , tplg_w );
294+ return tplg -> ops -> widget_load (tplg -> comp , tplg -> index , w ,
295+ tplg_w );
295296
296297 return 0 ;
297298}
@@ -302,27 +303,30 @@ static int soc_tplg_widget_ready(struct soc_tplg *tplg,
302303 struct snd_soc_dapm_widget * w , struct snd_soc_tplg_dapm_widget * tplg_w )
303304{
304305 if (tplg -> comp && tplg -> ops && tplg -> ops -> widget_ready )
305- return tplg -> ops -> widget_ready (tplg -> comp , w , tplg_w );
306+ return tplg -> ops -> widget_ready (tplg -> comp , tplg -> index , w ,
307+ tplg_w );
306308
307309 return 0 ;
308310}
309311
310312/* pass DAI configurations to component driver for extra initialization */
311313static int soc_tplg_dai_load (struct soc_tplg * tplg ,
312- struct snd_soc_dai_driver * dai_drv )
314+ struct snd_soc_dai_driver * dai_drv ,
315+ struct snd_soc_tplg_pcm * pcm , struct snd_soc_dai * dai )
313316{
314317 if (tplg -> comp && tplg -> ops && tplg -> ops -> dai_load )
315- return tplg -> ops -> dai_load (tplg -> comp , dai_drv );
318+ return tplg -> ops -> dai_load (tplg -> comp , tplg -> index , dai_drv ,
319+ pcm , dai );
316320
317321 return 0 ;
318322}
319323
320324/* pass link configurations to component driver for extra initialization */
321325static int soc_tplg_dai_link_load (struct soc_tplg * tplg ,
322- struct snd_soc_dai_link * link )
326+ struct snd_soc_dai_link * link , struct snd_soc_tplg_link_config * cfg )
323327{
324328 if (tplg -> comp && tplg -> ops && tplg -> ops -> link_load )
325- return tplg -> ops -> link_load (tplg -> comp , link );
329+ return tplg -> ops -> link_load (tplg -> comp , tplg -> index , link , cfg );
326330
327331 return 0 ;
328332}
@@ -643,7 +647,8 @@ static int soc_tplg_init_kcontrol(struct soc_tplg *tplg,
643647 struct snd_kcontrol_new * k , struct snd_soc_tplg_ctl_hdr * hdr )
644648{
645649 if (tplg -> comp && tplg -> ops && tplg -> ops -> control_load )
646- return tplg -> ops -> control_load (tplg -> comp , k , hdr );
650+ return tplg -> ops -> control_load (tplg -> comp , tplg -> index , k ,
651+ hdr );
647652
648653 return 0 ;
649654}
@@ -1702,7 +1707,7 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg,
17021707 dai_drv -> compress_new = snd_soc_new_compress ;
17031708
17041709 /* pass control to component driver for optional further init */
1705- ret = soc_tplg_dai_load (tplg , dai_drv );
1710+ ret = soc_tplg_dai_load (tplg , dai_drv , pcm , NULL );
17061711 if (ret < 0 ) {
17071712 dev_err (tplg -> comp -> dev , "ASoC: DAI loading failed\n" );
17081713 kfree (dai_drv );
@@ -1772,7 +1777,7 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
17721777 set_link_flags (link , pcm -> flag_mask , pcm -> flags );
17731778
17741779 /* pass control to component driver for optional further init */
1775- ret = soc_tplg_dai_link_load (tplg , link );
1780+ ret = soc_tplg_dai_link_load (tplg , link , NULL );
17761781 if (ret < 0 ) {
17771782 dev_err (tplg -> comp -> dev , "ASoC: FE link loading failed\n" );
17781783 kfree (link );
@@ -2080,7 +2085,7 @@ static int soc_tplg_link_config(struct soc_tplg *tplg,
20802085 set_link_flags (link , cfg -> flag_mask , cfg -> flags );
20812086
20822087 /* pass control to component driver for optional further init */
2083- ret = soc_tplg_dai_link_load (tplg , link );
2088+ ret = soc_tplg_dai_link_load (tplg , link , cfg );
20842089 if (ret < 0 ) {
20852090 dev_err (tplg -> dev , "ASoC: physical link loading failed\n" );
20862091 return ret ;
@@ -2202,7 +2207,7 @@ static int soc_tplg_dai_config(struct soc_tplg *tplg,
22022207 set_dai_flags (dai_drv , d -> flag_mask , d -> flags );
22032208
22042209 /* pass control to component driver for optional further init */
2205- ret = soc_tplg_dai_load (tplg , dai_drv );
2210+ ret = soc_tplg_dai_load (tplg , dai_drv , NULL , dai );
22062211 if (ret < 0 ) {
22072212 dev_err (tplg -> comp -> dev , "ASoC: DAI loading failed\n" );
22082213 return ret ;
@@ -2311,7 +2316,7 @@ static int soc_tplg_manifest_load(struct soc_tplg *tplg,
23112316
23122317 /* pass control to component driver for optional further init */
23132318 if (tplg -> comp && tplg -> ops && tplg -> ops -> manifest )
2314- return tplg -> ops -> manifest (tplg -> comp , _manifest );
2319+ return tplg -> ops -> manifest (tplg -> comp , tplg -> index , _manifest );
23152320
23162321 if (!abi_match ) /* free the duplicated one */
23172322 kfree (_manifest );
0 commit comments