Skip to content

Commit 6100a53

Browse files
committed
audio: add Doxygen comments for cold / hot module methods
Document methods from struct module_interface to specify which methods can be attributed with __cold and which ones should stay "hot." Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 9ded527 commit 6100a53

1 file changed

Lines changed: 22 additions & 9 deletions

File tree

src/include/module/module/interface.h

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,13 @@ struct sof_sink;
7373
struct module_interface {
7474
/**
7575
* Module specific initialization procedure, called as part of
76-
* module_adapter component creation in .new()
76+
* module_adapter component creation in .new(). Usually can be __cold
7777
*/
7878
int (*init)(struct processing_module *mod);
79+
7980
/**
8081
* (optional) Module specific prepare procedure, called as part of module_adapter
81-
* component preparation in .prepare()
82+
* component preparation in .prepare(). Usually can be __cold
8283
*/
8384
int (*prepare)(struct processing_module *mod,
8485
struct sof_source **sources, int num_of_sources,
@@ -97,7 +98,7 @@ struct module_interface {
9798
* at least IBS bytes of data on first source and at least OBS free space on first sink
9899
*
99100
* In case more sophisticated check is needed the method should be implemented in
100-
* the module
101+
* the module. Usually can be __cold
101102
*/
102103
bool (*is_ready_to_process)(struct processing_module *mod,
103104
struct sof_source **sources, int num_of_sources,
@@ -121,6 +122,8 @@ struct module_interface {
121122
* process
122123
* - sources are handlers to source API struct source*[]
123124
* - sinks are handlers to sink API struct sink*[]
125+
*
126+
* Usually shouldn't be __cold
124127
*/
125128
int (*process)(struct processing_module *mod,
126129
struct sof_source **sources, int num_of_sources,
@@ -134,6 +137,8 @@ struct module_interface {
134137
* - sinks[].data is a pointer to audio_stream structure
135138
*
136139
* It can be used by modules that support 1:1, 1:N, N:1 sources:sinks configuration.
140+
*
141+
* Usually shouldn't be __cold
137142
*/
138143
int (*process_audio_stream)(struct processing_module *mod,
139144
struct input_stream_buffer *input_buffers,
@@ -147,6 +152,8 @@ struct module_interface {
147152
* - sources[].data is a pointer to raw audio data
148153
* - sinks are output_stream_buffer[]
149154
* - sinks[].data is a pointer to raw audio data
155+
*
156+
* Usually shouldn't be __cold
150157
*/
151158
int (*process_raw_data)(struct processing_module *mod,
152159
struct input_stream_buffer *input_buffers,
@@ -162,7 +169,7 @@ struct module_interface {
162169
* In this case the ADSP System will perform multiple calls to SetConfiguration() until
163170
* completion of the configuration message sending.
164171
* \note config_id indicates ID of the configuration message only on the first fragment
165-
* sending, otherwise it is set to 0.
172+
* sending, otherwise it is set to 0. Usually can be __cold
166173
*/
167174
int (*set_configuration)(struct processing_module *mod,
168175
uint32_t config_id,
@@ -178,7 +185,7 @@ struct module_interface {
178185
* In this case the ADSP System will perform multiple calls to GetConfiguration() until
179186
* completion of the configuration message retrieval.
180187
* \note config_id indicates ID of the configuration message only on the first fragment
181-
* retrieval, otherwise it is set to 0.
188+
* retrieval, otherwise it is set to 0. Usually can be __cold
182189
*/
183190
int (*get_configuration)(struct processing_module *mod,
184191
uint32_t config_id, uint32_t *data_offset_size,
@@ -198,26 +205,32 @@ struct module_interface {
198205
/**
199206
* (optional) Module specific reset procedure, called as part of module_adapter component
200207
* reset in .reset(). This should reset all parameters to their initial stage
201-
* and free all memory allocated during prepare().
208+
* and free all memory allocated during prepare(). Usually can be __cold
202209
*/
203210
int (*reset)(struct processing_module *mod);
211+
204212
/**
205213
* (optional) Module specific free procedure, called as part of module_adapter component
206214
* free in .free(). This should free all memory allocated during module initialization.
215+
* Usually can be __cold
207216
*/
208217
int (*free)(struct processing_module *mod);
218+
209219
/**
210-
* (optional) Module specific bind procedure, called when modules are bound with each other
220+
* (optional) Module specific bind procedure, called when modules are bound with each other.
221+
* Usually can be __cold
211222
*/
212223
int (*bind)(struct processing_module *mod, void *data);
224+
213225
/**
214226
* (optional) Module specific unbind procedure, called when modules are disconnected from
215-
* one another
227+
* one another. Usually can be __cold
216228
*/
217229
int (*unbind)(struct processing_module *mod, void *data);
218230

219231
/**
220-
* (optional) Module specific trigger procedure, called when modules are triggered
232+
* (optional) Module specific trigger procedure, called when modules are triggered. Usually
233+
* can be __cold
221234
*/
222235
int (*trigger)(struct processing_module *mod, int cmd);
223236

0 commit comments

Comments
 (0)