Skip to content

Conversation

@quic-vkatoch
Copy link
Contributor

Refactored the codebase to remove vendor-specific and Android-specific elements, making the project more general and platform-independent.

@ekanshibu
Copy link
Contributor

Please check if you can break the change into multiple commits instead of a single commit.

@github-actions
Copy link

This pull request has been marked as stale due to 60 days of inactivity. To prevent automatic closure in 10 days, remove the stale label or add a comment. You can reopen a closed pull request at any time.

@github-actions github-actions bot added the Stale label Jul 15, 2025
@ekanshibu
Copy link
Contributor

@quic-vkatoch, can you please rebase this PR?

@quic-vkatoch quic-vkatoch force-pushed the code-cleanup branch 3 times, most recently from 0ffa6c4 to f7d23d7 Compare August 12, 2025 10:48
@ekanshibu ekanshibu removed the Stale label Aug 12, 2025
@quic-vkatoch
Copy link
Contributor Author

@quic-vkatoch, can you please rebase this PR?

Done

ekanshibu
ekanshibu previously approved these changes Sep 1, 2025
@ekanshibu ekanshibu enabled auto-merge September 1, 2025 04:27
auto-merge was automatically disabled October 13, 2025 16:56

Head branch was pushed to by a user without write access

@quic-vkatoch quic-vkatoch force-pushed the code-cleanup branch 2 times, most recently from ef69f29 to 040ef4c Compare October 13, 2025 17:14
#endif
#endif /* ENABLE_UPSTREAM_DRIVER_INTERFACE */

#ifndef VENDOR_DSP_LOCATION
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are these two changes related to each other?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are unrelated; I will update the PR.

#ifndef FASTRPC_TRACE_H
#define FASTRPC_TRACE_H

#if ((defined _ANDROID) || (defined ANDROID)) || (defined DISABLE_ATRACE) && !defined(LE_ENABLE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, totally unrelated changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are unrelated; I will update the PR.


PL_DEP(gpls)
PL_DEP(listener_android)
PL_DEP(listener)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sould this be a part of the previous commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I'll do that.

dspqueue/dspqueue_cpu.c \
dspqueue/dspqueue_rpc_stub.c \
listener_android.c \
listener.c \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sould this be a part of the previous commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I'll do that.

#include "fastrpc_pm.h"
#include "fastrpc_procbuf.h"
#include "listener_android.h"
#include "listener.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh. Make sure that each commit works on its own. The code was broken up to now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll do that.

pthread_mutex_destroy(&hlist[i].async_init_deinit_mut);
}
listener_android_deinit();
listener_deinit();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yuck

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update the PR.

const char *format, ...) {
int len = 0;
va_list argp;
char *buf = NULL, *log = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, feels like several unrelated changed squashed toggether.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I removed debug_build_type (ro.debuggable) under fastrpc_log_init, it caused issues due to incorrectness in the HAP_debug_runtime function, so I had to update it. I'll remove this change from the current PR and submit a separate PR to address the fix.

Remove VENDOR_DSP_LOCATION and VENDOR_DOM_LOCATION macro
definitions and update DSP_SEARCH_PATH to exclude
vendor-specific paths. Remove vendor path fallback logic
from open_shell() function and update related comments in
apps_std_imp.c to reflect simplified path handling.

Signed-off-by: Vinayak Katoch <[email protected]>
Change header guard macros from FASTRPC_ANDROID_USER_H to
FASTRPC_USER_H to remove Android-specific naming and make
the header more generic for cross-platform usage.

Signed-off-by: Vinayak Katoch <[email protected]>
Rename listener_android.h to listener.h and listener_android.c
to listener.c to remove Android-specific naming. Update all
function names from listener_android_* to listener_* pattern.
Update header guards, includes, Makefile entries, platform
library dependencies, and all function calls throughout the
codebase to maintain compilation compatibility.

Signed-off-by: Vinayak Katoch <[email protected]>
Remove unused convert_level_to_android_priority() function,
TODO comments referencing Android-specific code, and Android
include statements. Update AEE_EINVHANDLE comment to remove
vendor-specific reference and clean up conditional compilation
blocks for Android platforms.

Signed-off-by: Vinayak Katoch <[email protected]>
Remove Android-specific property arrays (ANDROIDP_DEBUG_VAR_NAME
and ANDROID_DEBUG_VAR_NAME) and simplify property handling
functions to use only environment variables. Remove
FASTRPC_BUILD_TYPE enum value and "ro.debuggable" property
reference. Eliminate Android conditional compilation blocks
and build type checks in logging initialization.

Signed-off-by: Vinayak Katoch <[email protected]>
@quic-vkatoch
Copy link
Contributor Author

This PR depends on PR #252 being merged first.

@quic-vkatoch quic-vkatoch requested a review from lumag October 23, 2025 05:32

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are removing the support for /vendor/dsp, where is shell expected to be pushed for android targets ? if it is /usr/lib/dsp/ like other LE targets, is /usr partition available on android targets ?

how is this change tested on android targets ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to check where the shell should be placed if /vendor/dsp support is removed, or if we actually need to remove it in the first place.

Regarding testing: earlier, the daemons were already running (opened the shell) and the tests passed. After killing and updating with new daemons, the tests are now failing. I will check this further and update.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shell is loaded from the same folder as all other DSP libraries. What's the question?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are removing the support for /vendor/dsp, where is shell expected to be pushed for android targets ? if it is /usr/lib/dsp/ like other LE targets, is /usr partition available on android targets ?

All DSP binaries are located in the subdirs of /usr/share/qcom, one subdir per device.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Android systems you can reuse the same approach, changing /usr/share/qcom/ to /vendor or its subdir. All config files should be relative to that path,

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.

4 participants