@@ -460,15 +460,14 @@ static int get_sdw_dailink_info(const struct snd_soc_acpi_link_adr *links,
460460 return 0 ;
461461}
462462
463- static void init_dai_link (struct snd_soc_dai_link * dai_links , int be_id ,
464- char * name , int playback , int capture ,
465- struct snd_soc_dai_link_component * cpus ,
466- int cpus_num ,
467- struct snd_soc_dai_link_component * codecs ,
468- int codecs_num ,
463+ static void init_dai_link (struct device * dev , struct snd_soc_dai_link * dai_links ,
464+ int be_id , char * name , int playback , int capture ,
465+ struct snd_soc_dai_link_component * cpus , int cpus_num ,
466+ struct snd_soc_dai_link_component * codecs , int codecs_num ,
469467 int (* init )(struct snd_soc_pcm_runtime * rtd ),
470468 const struct snd_soc_ops * ops )
471469{
470+ dev_dbg (dev , "create dai link %s, id %d\n" , name , be_id );
472471 dai_links -> id = be_id ;
473472 dai_links -> name = name ;
474473 dai_links -> platforms = platform_component ;
@@ -806,7 +805,7 @@ static int create_sdw_dailink(struct device *dev, int *be_index,
806805
807806 playback = (stream == SNDRV_PCM_STREAM_PLAYBACK );
808807 capture = (stream == SNDRV_PCM_STREAM_CAPTURE );
809- init_dai_link (dai_links + * be_index , * be_index , name ,
808+ init_dai_link (dev , dai_links + * be_index , * be_index , name ,
810809 playback , capture ,
811810 cpus + * cpu_id , cpu_dai_num ,
812811 codecs , codec_num ,
@@ -1045,7 +1044,7 @@ static int sof_card_dai_links_create(struct device *dev,
10451044
10461045 playback = info -> direction [SNDRV_PCM_STREAM_PLAYBACK ];
10471046 capture = info -> direction [SNDRV_PCM_STREAM_CAPTURE ];
1048- init_dai_link (links + link_id , be_id , name ,
1047+ init_dai_link (dev , links + link_id , be_id , name ,
10491048 playback , capture ,
10501049 cpus + cpu_id , 1 ,
10511050 ssp_components , 1 ,
@@ -1062,15 +1061,15 @@ static int sof_card_dai_links_create(struct device *dev,
10621061 /* dmic */
10631062 if (dmic_num > 0 ) {
10641063 cpus [cpu_id ].dai_name = "DMIC01 Pin" ;
1065- init_dai_link (links + link_id , be_id , "dmic01" ,
1064+ init_dai_link (dev , links + link_id , be_id , "dmic01" ,
10661065 0 , 1 , // DMIC only supports capture
10671066 cpus + cpu_id , 1 ,
10681067 dmic_component , 1 ,
10691068 sof_sdw_dmic_init , NULL );
10701069 INC_ID (be_id , cpu_id , link_id );
10711070
10721071 cpus [cpu_id ].dai_name = "DMIC16k Pin" ;
1073- init_dai_link (links + link_id , be_id , "dmic16k" ,
1072+ init_dai_link (dev , links + link_id , be_id , "dmic16k" ,
10741073 0 , 1 , // DMIC only supports capture
10751074 cpus + cpu_id , 1 ,
10761075 dmic_component , 1 ,
@@ -1113,7 +1112,7 @@ static int sof_card_dai_links_create(struct device *dev,
11131112 return - ENOMEM ;
11141113
11151114 cpus [cpu_id ].dai_name = cpu_name ;
1116- init_dai_link (links + link_id , be_id , name ,
1115+ init_dai_link (dev , links + link_id , be_id , name ,
11171116 1 , 0 , // HDMI only supports playback
11181117 cpus + cpu_id , 1 ,
11191118 idisp_components + i , 1 ,
0 commit comments