-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add changes to support CDSP1 offloading #45
Conversation
src/fastrpc_apps_user.c
Outdated
@@ -83,7 +83,7 @@ | |||
#define DSP_DOM_LOCATION "/dsp/xdsp" | |||
#else | |||
#define DSP_MOUNT_LOCATION "/usr/lib/dsp/" | |||
#define DSP_DOM_LOCATION "/usr/lib/dsp/xdsp" | |||
#define DSP_DOM_LOCATION "/usr/lib/dsp/xdspn" |
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.
I see this definition is already there in inc/apps_std_internal.h, can you please clean this up?
inc/fastrpc_common.h
Outdated
@@ -19,13 +19,21 @@ | |||
|
|||
/* Number of subsystem supported by fastRPC*/ | |||
#ifndef NUM_DOMAINS | |||
#ifdef MULTINSP_SUPPORT |
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.
@quic-bkumar I think the featurization can be removed in github project, what do you suggest?
src/Makefile.am
Outdated
@@ -91,6 +91,19 @@ libcdsp_default_listener_la_DEPENDENCIES = libcdsprpc.la | |||
libcdsp_default_listener_la_LDFLAGS = libcdsprpc.la -shared -module -avoid-version $(USE_LOG) | |||
libcdsp_default_listener_la_CFLAGS = $(CDSP_CFLAGS) -DUSE_SYSLOG | |||
|
|||
CDSP1_CFLAGS = $(LIBDSPRPC_CFLAGS) -DDEFAULT_DOMAIN_ID=4 | |||
|
|||
lib_LTLIBRARIES += libcdsp1rpc.la |
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.
can't you re-use libcdsprpc.so and cdsprpcd for CDSP1
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.
Agree, we should use libcdsprpc.so.
src/fastrpc_apps_user.c
Outdated
@@ -133,7 +133,7 @@ static void check_multilib_util(void); | |||
|
|||
/* Array to store fastrpc library names. */ | |||
static const char *fastrpc_library[NUM_DOMAINS] = { | |||
"libadsprpc.so", "libmdsprpc.so", "libsdsprpc.so", "libcdsprpc.so"}; | |||
"libadsprpc.so", "libmdsprpc.so", "libsdsprpc.so", "libcdsprpc.so", "libcdsp1rpc.so"}; |
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.
why is libcdsp1rpc.so needed? Why not re-use libcdsprpc.so?
@@ -2971,6 +2977,9 @@ int get_domain_from_name(const char *uri, uint32_t type) { | |||
} else if (!std_strncmp(uri, SDSP_DOMAIN_NAME, | |||
std_strlen(SDSP_DOMAIN_NAME))) { | |||
domain = SDSP_DOMAIN_ID; | |||
} else if (!std_strncmp(uri, CDSP1_DOMAIN_NAME, | |||
std_strlen(CDSP1_DOMAIN_NAME))) { | |||
domain = CDSP1_DOMAIN_ID; |
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.
move this after CDSP_DOMAIN condition
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.
move this after CDSP_DOMAIN condition
Here we use std_strncmp, if we move CDSP before CDSP1, it will always match "cdsp" when we use "cdsp1" , as we only compare first four characters.
@@ -2987,6 +2996,8 @@ int get_domain_from_name(const char *uri, uint32_t type) { | |||
domain = MDSP_DOMAIN_ID; | |||
} else if (std_strstr(uri, SDSP_DOMAIN)) { | |||
domain = SDSP_DOMAIN_ID; | |||
} else if (std_strstr(uri, CDSP1_DOMAIN)) { | |||
domain = CDSP1_DOMAIN_ID; |
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.
move this after CDSP_DOMAIN condition
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.
same reason as above.
cdsp is sub-string of cdsp1, if we move cdsp above, it will always match cdsp even we need cdsp1.
src/Makefile.am
Outdated
libcdsp1_default_listener_la_DEPENDENCIES = libcdsp1rpc.la | ||
libcdsp1_default_listener_la_LDFLAGS = libcdsp1rpc.la -shared -module -avoid-version $(USE_LOG) | ||
libcdsp1_default_listener_la_CFLAGS = $(CDSP1_CFLAGS) -DUSE_SYSLOG | ||
|
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.
Same applies here. Better to use the cdsp default listener.
FastRPC library supports 4 domains. There are some products where a new domain, CDSP1, is supported. Add changes to support CDSP1 domain. Signed-off-by: Ling Xu <[email protected]>
FastRPC library supports 4 domains. There are some products where a new domain, CDSP1, is supported. Add changes to support CDSP1 domain.