Skip to content

Preparation for 3rd party module API - #5166

Merged
dbaluta merged 22 commits into
thesofproject:mainfrom
ranj063:fix/codec_adapter_2
Jan 10, 2022
Merged

dbaluta merged 22 commits into
thesofproject:mainfrom
ranj063:fix/codec_adapter_2

Conversation

@ranj063

@ranj063 ranj063 commented Jan 8, 2022

Copy link
Copy Markdown
Collaborator

Rename all codec_* structures and functions with the module prefix. There is no functional change in any of the patches.

The interface will be common for all processing modules not just the
codecs. So rename struct codec_interface to struct module_interface.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@ranj063 ranj063 changed the title Preparation for #rd party module API Preparation for 3rd party module API Jan 8, 2022
ranj063 added 20 commits January 7, 2022 19:27
Make checkpatch happy

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename struct comp_data to processing_module. No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename struct codec_data to struct module_data. No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename the enum codec_state to module_state. No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename struct codec_config to struct module_config. No functional
change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
It's struct codec_param not codec_config.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename struct codec_memory to module_memory. No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename struct codec_processing_data to module_processing_data. No
functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename enum codec_cfg_type to module_cfg_type. No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename codec_param to module_params. No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename the codec_init() function to module_init(). No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename the codec_free() function to module_free() and remove an
unnecessary pair of braces from the function. No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename codec_reset() to module_reset. No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename codec_prepare() to module_prepare(). No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename it to module_apply_runtime_config(). No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
to module_load_config(). No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
to module_allocate/free_memory(). No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
to module_free_all_memory(). No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
to module_id. No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
to comp_get_module_data(). No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@dbaluta

dbaluta commented Jan 8, 2022

Copy link
Copy Markdown
Collaborator

@ranj063 looks good to me. There is a small doxygen warning. I might want to check that.

Can you remind me, again, the final goal of 3rd party module feature.

So, we want to provide a generic API for external 3rd party processing libraries right? I wonder how much can this fit any external modules. This was mostly shaped for Cadence processing libraries.

@ranj063
ranj063 force-pushed the fix/codec_adapter_2 branch from c4c092e to 4be75d3 Compare January 8, 2022 16:05
@ranj063

ranj063 commented Jan 8, 2022 •

Copy link
Copy Markdown
Collaborator Author

@ranj063 looks good to me. There is a small doxygen warning. I might want to check that.

fixed now @dbaluta

@ranj063

ranj063 commented Jan 8, 2022 •

Copy link
Copy Markdown
Collaborator Author

Can you remind me, again, the final goal of 3rd party module feature.

So, we want to provide a generic API for external 3rd party processing libraries right? I wonder how much can this fit any external modules. This was mostly shaped for Cadence processing libraries.

Right, that is the intention and yes, it is not an exact fit at the moment and I plan to submit follow-up PR's that will change the current API and add extensions to serve this purpose. The final goal is to have an architecture that splits the API's into high-level module API and low-level comp API. The high-level API will be the modified and renamed codec-adapter interface to deal mainly with processing. The low-level comp API will deal with pipeline, cache, route and state management

@dbaluta
dbaluta merged commit 90e6925 into thesofproject:main Jan 10, 2022
@ranj063
ranj063 deleted the fix/codec_adapter_2 branch January 10, 2022 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants