Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Add changes to support CDSP1 offloading #45

wants to merge 1 commit into from

Conversation

quic-lxu5
Copy link
Contributor

FastRPC library supports 4 domains. There are some products where a new domain, CDSP1, is supported. Add changes to support CDSP1 domain.

@@ -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"
Copy link
Contributor

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?

@@ -19,13 +19,21 @@

/* Number of subsystem supported by fastRPC*/
#ifndef NUM_DOMAINS
#ifdef MULTINSP_SUPPORT
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor

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.

@@ -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"};
Copy link
Contributor

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;
Copy link
Contributor

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

Copy link
Contributor Author

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;
Copy link
Contributor

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

Copy link
Contributor Author

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.

@quic-ekangupt quic-ekangupt linked an issue Aug 9, 2024 that may be closed by this pull request
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

Copy link
Contributor

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]>
@quic-lxu5 quic-lxu5 closed this by deleting the head repository Aug 26, 2024
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.

Add changes to support CDSP1 offloading
3 participants