@@ -76,8 +76,10 @@ static void dai_atomic_trigger(void *arg, enum notify_id type, void *data)
7676}
7777
7878/* Assign DAI to a group */
79- int dai_assign_group (struct dai_data * dd , struct comp_dev * dev , uint32_t group_id )
79+ __cold int dai_assign_group (struct dai_data * dd , struct comp_dev * dev , uint32_t group_id )
8080{
81+ assert_can_be_cold ();
82+
8183 if (dd -> group ) {
8284 if (dd -> group -> group_id != group_id ) {
8385 comp_err (dev , "DAI already in group %d, requested %d" ,
@@ -135,15 +137,17 @@ static int dai_trigger_op(struct dai *dai, int cmd, int direction)
135137}
136138
137139/* called from src/ipc/ipc3/handler.c and src/ipc/ipc4/dai.c */
138- int dai_set_config (struct dai * dai , struct ipc_config_dai * common_config ,
139- const void * spec_config )
140+ __cold int dai_set_config (struct dai * dai , struct ipc_config_dai * common_config ,
141+ const void * spec_config )
140142{
141143 const struct device * dev = dai -> dev ;
142144 const struct sof_ipc_dai_config * sof_cfg = spec_config ;
143145 struct dai_config cfg ;
144146 const void * cfg_params ;
145147 bool is_blob ;
146148
149+ assert_can_be_cold ();
150+
147151 cfg .dai_index = common_config -> dai_index ;
148152 is_blob = common_config -> is_config_blob ;
149153 cfg .format = sof_cfg -> format ;
@@ -467,11 +471,13 @@ dai_dma_multi_endpoint_cb(struct dai_data *dd, struct comp_dev *dev, uint32_t fr
467471 return dma_status ;
468472}
469473
470- int dai_common_new (struct dai_data * dd , struct comp_dev * dev ,
471- const struct ipc_config_dai * dai_cfg )
474+ __cold int dai_common_new (struct dai_data * dd , struct comp_dev * dev ,
475+ const struct ipc_config_dai * dai_cfg )
472476{
473477 uint32_t dir ;
474478
479+ assert_can_be_cold ();
480+
475481 dd -> dai = dai_get (dai_cfg -> type , dai_cfg -> dai_index , DAI_CREAT );
476482 if (!dd -> dai ) {
477483 comp_err (dev , "dai_get() failed to create DAI." );
@@ -542,15 +548,17 @@ int dai_common_new(struct dai_data *dd, struct comp_dev *dev,
542548 return 0 ;
543549}
544550
545- static struct comp_dev * dai_new (const struct comp_driver * drv ,
546- const struct comp_ipc_config * config ,
547- const void * spec )
551+ __cold static struct comp_dev * dai_new (const struct comp_driver * drv ,
552+ const struct comp_ipc_config * config ,
553+ const void * spec )
548554{
549555 struct comp_dev * dev ;
550556 const struct ipc_config_dai * dai_cfg = spec ;
551557 struct dai_data * dd ;
552558 int ret ;
553559
560+ assert_can_be_cold ();
561+
554562 comp_cl_dbg (& comp_dai , "dai_new()" );
555563
556564 dev = comp_alloc (drv , sizeof (* dev ));
@@ -582,8 +590,10 @@ static struct comp_dev *dai_new(const struct comp_driver *drv,
582590 return NULL ;
583591}
584592
585- void dai_common_free (struct dai_data * dd )
593+ __cold void dai_common_free (struct dai_data * dd )
586594{
595+ assert_can_be_cold ();
596+
587597#ifdef CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS
588598 io_perf_monitor_release_slot (dd -> io_perf_bytes_count );
589599#endif
@@ -605,10 +615,12 @@ void dai_common_free(struct dai_data *dd)
605615 rfree (dd -> dai_spec_config );
606616}
607617
608- static void dai_free (struct comp_dev * dev )
618+ __cold static void dai_free (struct comp_dev * dev )
609619{
610620 struct dai_data * dd = comp_get_drvdata (dev );
611621
622+ assert_can_be_cold ();
623+
612624 if (dd -> group )
613625 notifier_unregister (dev , dd -> group , NOTIFIER_ID_DAI_TRIGGER );
614626
@@ -619,7 +631,7 @@ static void dai_free(struct comp_dev *dev)
619631}
620632
621633int dai_common_get_hw_params (struct dai_data * dd , struct comp_dev * dev ,
622- struct sof_ipc_stream_params * params , int dir )
634+ struct sof_ipc_stream_params * params , int dir )
623635{
624636 struct dai_config cfg ;
625637 int ret ;
@@ -645,12 +657,14 @@ int dai_common_get_hw_params(struct dai_data *dd, struct comp_dev *dev,
645657 return ret ;
646658}
647659
648- static int dai_comp_get_hw_params (struct comp_dev * dev ,
649- struct sof_ipc_stream_params * params ,
650- int dir )
660+ __cold static int dai_comp_get_hw_params (struct comp_dev * dev ,
661+ struct sof_ipc_stream_params * params ,
662+ int dir )
651663{
652664 struct dai_data * dd = comp_get_drvdata (dev );
653665
666+ assert_can_be_cold ();
667+
654668 return dai_common_get_hw_params (dd , dev , params , dir );
655669}
656670
@@ -1901,11 +1915,13 @@ static uint64_t dai_get_processed_data(struct comp_dev *dev, uint32_t stream_no,
19011915}
19021916
19031917#ifdef CONFIG_IPC_MAJOR_4
1904- int dai_zephyr_unbind (struct dai_data * dd , struct comp_dev * dev , void * data )
1918+ __cold int dai_zephyr_unbind (struct dai_data * dd , struct comp_dev * dev , void * data )
19051919{
19061920 struct ipc4_module_bind_unbind * bu ;
19071921 int buf_id ;
19081922
1923+ assert_can_be_cold ();
1924+
19091925 bu = (struct ipc4_module_bind_unbind * )data ;
19101926 buf_id = IPC4_COMP_ID (bu -> extension .r .src_queue , bu -> extension .r .dst_queue );
19111927
0 commit comments