-
Notifications
You must be signed in to change notification settings - Fork 50
Refactor: Generalize Code by Removing Vendor and Android-Specific Elements #154
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: development
Are you sure you want to change the base?
Conversation
5ad182f to
e92d2c8
Compare
|
Please check if you can break the change into multiple commits instead of a single commit. |
e92d2c8 to
66cba44
Compare
|
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. |
|
@quic-vkatoch, can you please rebase this PR? |
0ffa6c4 to
f7d23d7
Compare
f7d23d7 to
4e34aac
Compare
Done |
4e34aac to
44fd420
Compare
Head branch was pushed to by a user without write access
ef69f29 to
040ef4c
Compare
| #endif | ||
| #endif /* ENABLE_UPSTREAM_DRIVER_INTERFACE */ | ||
|
|
||
| #ifndef VENDOR_DSP_LOCATION |
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.
How are these two changes related to each other?
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.
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) |
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.
Again, totally unrelated changes
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.
These changes are unrelated; I will update the PR.
|
|
||
| PL_DEP(gpls) | ||
| PL_DEP(listener_android) | ||
| PL_DEP(listener) |
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.
Sould this be a part of the previous commit?
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.
You're right, I'll do that.
| dspqueue/dspqueue_cpu.c \ | ||
| dspqueue/dspqueue_rpc_stub.c \ | ||
| listener_android.c \ | ||
| listener.c \ |
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.
Sould this be a part of the previous commit?
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.
You're right, I'll do that.
| #include "fastrpc_pm.h" | ||
| #include "fastrpc_procbuf.h" | ||
| #include "listener_android.h" | ||
| #include "listener.h" |
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.
Ugh. Make sure that each commit works on its own. The code was broken up to now.
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.
Sure, I'll do that.
| pthread_mutex_destroy(&hlist[i].async_init_deinit_mut); | ||
| } | ||
| listener_android_deinit(); | ||
| listener_deinit(); |
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.
Yuck
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 will update the PR.
| const char *format, ...) { | ||
| int len = 0; | ||
| va_list argp; | ||
| char *buf = NULL, *log = 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.
Again, feels like several unrelated changed squashed toggether.
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.
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]>
040ef4c to
e26a068
Compare
|
This PR depends on PR #252 being merged first. |
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.
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 ?
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 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.
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.
The shell is loaded from the same folder as all other DSP libraries. What's the question?
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.
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.
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 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,
Refactored the codebase to remove vendor-specific and Android-specific elements, making the project more general and platform-independent.