-
Notifications
You must be signed in to change notification settings - Fork 369
IADK: fix module configuration sizing and error handling #11118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
b7070e0
3075cd7
4f9340a
fd009d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,10 +87,13 @@ int SystemAgent::CheckIn(ProcessingModuleFactoryInterface& module_factory, | |
| void *obfuscated_parent_ppl, | ||
| void **obfuscated_modinst_p) | ||
| { | ||
| ErrorCode::Type error; | ||
| IoPinsInfo pins_info; | ||
| const dsp_fw::DwordArray& cfg_ipc_msg = | ||
| *reinterpret_cast<const dsp_fw::DwordArray*>(obfuscated_mod_cfg); | ||
| ModuleInitialSettingsConcrete settings(cfg_ipc_msg); | ||
| if (!settings.IsParsable()) | ||
| return -EINVAL; | ||
|
|
||
| ProcessingModulePrerequisites prerequisites; | ||
| module_factory.GetPrerequisites(prerequisites); | ||
|
|
@@ -104,13 +107,17 @@ int SystemAgent::CheckIn(ProcessingModuleFactoryInterface& module_factory, | |
| (prerequisites.input_pins_count > INPUT_PIN_COUNT) || | ||
| (prerequisites.output_pins_count < 1) || | ||
| (prerequisites.output_pins_count > OUTPUT_PIN_COUNT)) | ||
| return -1; | ||
| return -EINVAL; | ||
|
|
||
| /* Deduce BaseModuleCfgExt if it was not part of the INIT_INSTANCE IPC message */ | ||
| settings.DeduceBaseModuleCfgExt(prerequisites.input_pins_count, | ||
| prerequisites.output_pins_count); | ||
|
|
||
| module_factory.Create(*this, module_placeholder, ModuleInitialSettings(settings), pins_info); | ||
| error = module_factory.Create(*this, module_placeholder, ModuleInitialSettings(settings), | ||
| pins_info); | ||
| if (error != ErrorCode::NO_ERROR) | ||
| return -EINVAL; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we return the actual error or an IPC4 error code here if its called via IPC i.e. on module new ?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @abonislawski in fact line 110 above seems wrong - it returns -1 while lines 96 and this one return errno codes, so line 110 happens to return
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lgirdwood we should return a regular errno here, not an IPC4 status because CheckIn() is below the IPC boundary and it will be not propagated to the host. |
||
|
|
||
| IadkModuleAdapter& module_adapter = *reinterpret_cast<IadkModuleAdapter*>(module_handle_); | ||
| *obfuscated_modinst_p = &module_adapter; | ||
| reinterpret_cast<intel_adsp::ProcessingModuleInterface*>(module_placeholder)->Init(); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.