Tools: Testbench: Convert file component to module adapter#8811
Tools: Testbench: Convert file component to module adapter#8811singalsu wants to merge 2 commits intothesofproject:mainfrom
Conversation
This is done as preparation for testbench IPC4 support. The update to IPC4 is simpler for a module adapter component. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The file module does not provide a dai_get_init_delay_ms() operation so it is skipped for CONFIG_LIBRARY build. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
bab3fa4 to
4d76ead
Compare
btian1
left a comment
There was a problem hiding this comment.
one question: will testbench support IPC3 and IPC4 both or after change, testbench only support IPC4?
| uint32_t type; /**< sof_ipc_process_type */ | ||
|
|
||
| /* reserved for future use */ | ||
| uint32_t reserved[7]; |
There was a problem hiding this comment.
I would suggest put reserved to the bottom of struct definition.
There was a problem hiding this comment.
I did it this way since currently module adapter defaults to process type IPC unless I add exception handling to module adapter. The extra IPC data for file component is passed in the end of this struct.
I think I will try to another approach with CONFIG_LIBRARY exceptions added for SOF_COMP_FILEREAD and SOF_COMP_FILEWRITE. Not sure which is better.
Also this will be bit different with IPC4. I'm keeping this draft until I know better.
| #include <rtos/wait.h> | ||
| #include <sof/audio/pipeline.h> | ||
| #include <sof/audio/component_ext.h> | ||
| #include <tplg_parser/topology.h> |
There was a problem hiding this comment.
- maybe it is a good time to check whether all the headers are all must to put it here.
- suggest a sequence for header include, from long to short.
There was a problem hiding this comment.
I'm following a rule for alphabetic sort for 4 levels, 3 levels, 2 levels, standard C headers last. I got such suggestion some time ago in review. Though these could go to other cosmetic changes patch.
| file_uuid->d[4] = 0x08; | ||
| file_uuid->d[5] = 0xa6; | ||
| file_uuid->d[6] = 0x98; | ||
| file_uuid->d[7] = 0xc2; |
There was a problem hiding this comment.
how about a strcpy to replace above?
There was a problem hiding this comment.
Yes, could be better, or at least better readable.
I think there need to be separate executable build for IPC versions. The SOF headers are constructed in such way that I can't have both in the same time. |
|
Closing, this change is part of #9025 |
This is done as preparation for testbench IPC4 support. The update to IPC4 is simpler for a module adapter component.