@@ -293,6 +293,7 @@ struct comp_ops {
293293 * comp_set_drvdata() and later retrieved by comp_get_drvdata().
294294 *
295295 * All parameters should be initialized to their default values.
296+ * Usually can be __cold.
296297 */
297298 struct comp_dev * (* create )(const struct comp_driver * drv ,
298299 const struct comp_ipc_config * ipc_config ,
@@ -304,6 +305,7 @@ struct comp_ops {
304305 *
305306 * All data structures previously allocated on the run-time heap
306307 * must be freed by the implementation of <code>free()</code>.
308+ * Usually can be __cold.
307309 */
308310 void (* free )(struct comp_dev * dev );
309311
@@ -315,6 +317,7 @@ struct comp_ops {
315317 * Infrastructure calls comp_verify_params() if this handler is not
316318 * defined, therefore it should be left NULL if no extra steps are
317319 * required.
320+ * Usually shouldn't be __cold.
318321 */
319322 int (* params )(struct comp_dev * dev ,
320323 struct sof_ipc_stream_params * params );
@@ -327,6 +330,7 @@ struct comp_ops {
327330 * @param dir Stream direction (see enum sof_ipc_stream_direction).
328331 *
329332 * Mandatory for components that allocate DAI.
333+ * Usually can be __cold.
330334 */
331335 int (* dai_get_hw_params )(struct comp_dev * dev ,
332336 struct sof_ipc_stream_params * params , int dir );
@@ -337,6 +341,7 @@ struct comp_ops {
337341 * @param dai_config DAI configuration.
338342 *
339343 * Mandatory for components that allocate DAI.
344+ * Usually can be __cold.
340345 */
341346 int (* dai_config )(struct dai_data * dd , struct comp_dev * dev ,
342347 struct ipc_config_dai * dai_config , const void * dai_spec_config );
@@ -358,6 +363,8 @@ struct comp_ops {
358363 * Trigger, atomic - used to start/stop/pause stream operations.
359364 * @param dev Component device.
360365 * @param cmd Command, one of COMP_TRIGGER_...
366+ *
367+ * Usually shouldn't be __cold.
361368 */
362369 int (* trigger )(struct comp_dev * dev , int cmd );
363370
@@ -367,6 +374,7 @@ struct comp_ops {
367374 *
368375 * Prepare should be used to get the component ready for starting
369376 * processing after it's hw_params are known or after an XRUN.
377+ * Usually shouldn't be __cold.
370378 */
371379 int (* prepare )(struct comp_dev * dev );
372380
@@ -376,20 +384,25 @@ struct comp_ops {
376384 *
377385 * Resets the component state and any hw_params to default component
378386 * state. Should also free any resources acquired during hw_params.
387+ * Usually shouldn't be __cold.
379388 */
380389 int (* reset )(struct comp_dev * dev );
381390
382391 /**
383392 * Copy and process stream data from source to sink buffers.
384393 * @param dev Component device.
385394 * @return Number of copied frames.
395+ *
396+ * Usually shouldn't be __cold.
386397 */
387398 int (* copy )(struct comp_dev * dev );
388399
389400 /**
390401 * Retrieves component rendering position.
391402 * @param dev Component device.
392403 * @param posn Receives reported position.
404+ *
405+ * Usually shouldn't be __cold.
393406 */
394407 int (* position )(struct comp_dev * dev ,
395408 struct sof_ipc_stream_posn * posn );
@@ -400,6 +413,8 @@ struct comp_ops {
400413 * @param type Attribute type.
401414 * @param value Attribute value.
402415 * @return 0 if succeeded, error code otherwise.
416+ *
417+ * Usually can be __cold.
403418 */
404419 int (* get_attribute )(struct comp_dev * dev , uint32_t type ,
405420 void * value );
@@ -410,6 +425,8 @@ struct comp_ops {
410425 * @param type Attribute type.
411426 * @param value Attribute value.
412427 * @return 0 if succeeded, error code otherwise.
428+ *
429+ * Usually can be __cold.
413430 */
414431 int (* set_attribute )(struct comp_dev * dev , uint32_t type ,
415432 void * value );
@@ -419,6 +436,7 @@ struct comp_ops {
419436 * @param dev Component device.
420437 *
421438 * Mandatory for components that allocate DAI.
439+ * Usually can be __cold.
422440 */
423441 int (* dai_ts_config )(struct comp_dev * dev );
424442
@@ -427,6 +445,7 @@ struct comp_ops {
427445 * @param dev Component device.
428446 *
429447 * Mandatory for components that allocate DAI.
448+ * Usually can be __cold.
430449 */
431450 int (* dai_ts_start )(struct comp_dev * dev );
432451
@@ -435,6 +454,7 @@ struct comp_ops {
435454 * @param dev Component device.
436455 *
437456 * Mandatory for components that allocate DAI.
457+ * Usually can be __cold.
438458 */
439459 int (* dai_ts_stop )(struct comp_dev * dev );
440460
@@ -444,6 +464,7 @@ struct comp_ops {
444464 * @param tsd Receives timestamp data.
445465 *
446466 * Mandatory for components that allocate DAI.
467+ * Usually shouldn't be __cold.
447468 */
448469#if CONFIG_ZEPHYR_NATIVE_DRIVERS
449470 int (* dai_ts_get )(struct comp_dev * dev , struct dai_ts_data * tsd );
@@ -456,13 +477,17 @@ struct comp_ops {
456477 * Bind, atomic - used to notify component of bind event.
457478 * @param dev Component device.
458479 * @param data Bind info
480+ *
481+ * Usually can be __cold.
459482 */
460483 int (* bind )(struct comp_dev * dev , void * data );
461484
462485 /**
463486 * Unbind, atomic - used to notify component of unbind event.
464487 * @param dev Component device.
465488 * @param data unBind info
489+ *
490+ * Usually can be __cold.
466491 */
467492 int (* unbind )(struct comp_dev * dev , void * data );
468493
@@ -478,6 +503,7 @@ struct comp_ops {
478503 *
479504 * Callee fills up *data with config data and save the config
480505 * size in *data_offset for host to reconstruct the config
506+ * Usually can be __cold.
481507 */
482508 int (* get_large_config )(struct comp_dev * dev , uint32_t param_id ,
483509 bool first_block ,
@@ -498,6 +524,7 @@ struct comp_ops {
498524 * Host divides large block into small blocks and sends them
499525 * to fw. The data_offset indicates the offset in the large
500526 * block data.
527+ * Usually can be __cold.
501528 */
502529 int (* set_large_config )(struct comp_dev * dev , uint32_t param_id ,
503530 bool first_block ,
@@ -511,6 +538,8 @@ struct comp_ops {
511538 * @param stream_no Index of input/output stream
512539 * @param input Selects between input (true) or output (false) stream direction
513540 * @return total data processed if succeeded, 0 otherwise.
541+ *
542+ * Usually shouldn't be __cold.
514543 */
515544 uint64_t (* get_total_data_processed )(struct comp_dev * dev , uint32_t stream_no , bool input );
516545};
0 commit comments