-
Notifications
You must be signed in to change notification settings - Fork 585
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
ai-soc/ndp120: implement packages loding to NDP120 in chunks #6561
base: master
Are you sure you want to change the base?
Conversation
to reduce the memory usage during loading of synpkgs, implement package loading in chunks Signed-off-by: Abhishek Akkabathula <[email protected]>
Incase we use recorder without Keyword detection, skip the start point correction we do for Keyword detection case. Signed-off-by: Abhishek Akkabathula <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the PR title as well.
@@ -78,6 +78,7 @@ struct ndp120_dev_s { | |||
uint32_t extract_size; | |||
bool extclk_inuse; | |||
volatile bool alive; | |||
bool keyword_correction; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on what basis the keyword_correction is enabled and disabled? Do we need to provide this control also to the application?
@@ -446,6 +446,7 @@ static int load_synpkg(struct syntiant_ndp_device_s *ndp, const char *p) | |||
int s = 0; | |||
int pfd; | |||
int rl; | |||
int chunk_size = 1024; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to provide this chunk size with config?
@@ -446,6 +446,7 @@ static int load_synpkg(struct syntiant_ndp_device_s *ndp, const char *p) | |||
int s = 0; | |||
int pfd; | |||
int rl; | |||
int chunk_size = 1024; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let us not hardcode this. Let us atleast use a #define instead.
s = syntiant_ndp_extract_data(dev->ndp, SYNTIANT_NDP_EXTRACT_TYPE_INPUT, | ||
if (dev->keyword_correction) { | ||
/* we need not do this if this is resume case, we only need to do it if its recorder start case after keyword detection */ | ||
s = syntiant_ndp_extract_data(dev->ndp, SYNTIANT_NDP_EXTRACT_TYPE_INPUT, | ||
SYNTIANT_NDP_EXTRACT_FROM_MATCH, NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too much indentation.
Please change the PR title from |
to reduce the memory usage during loading of synpkgs, implement package loading in chunks