-
Notifications
You must be signed in to change notification settings - Fork 56
Refactor: Generalize Code by Moving 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
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,
eb9d72f to
056c191
Compare
056c191 to
9d4d996
Compare
|
@lumag, could you please review this PR? |
inc/fastrpc_android.h
Outdated
| int property_get(const char *name, int *def, int *value); | ||
|
|
||
| /* Android-specific property getter functions */ | ||
| int android_get_property_int(fastrpc_properties UserPropKey, int defValue); |
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.
Drop android_foo() functions from the public header. Define platform-neutral API, which can be implemented for Android, LE, or some other OS.
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.
Ack, updated.
9d4d996 to
0dc0c36
Compare
Remove VENDOR_DSP_LOCATION and VENDOR_DOM_LOCATION macros from apps_std_internal.h and fastrpc_apps_user.c. Simplify open_shell() by removing fallback logic that attempted to open shell files from /vendor/dsp/ and /vendor/dsp/xdsp/. Shell files are now opened only from DSP_LIBS_LOCATION paths. Update comments in apps_std_imp.c to reflect generic fallback behavior without vendor path references. Signed-off-by: Vinayak Katoch <vkatoch@qti.qualcomm.com>
Change header guard macros from FASTRPC_ANDROID_USER_H to FASTRPC_APPS_USER_H to remove Android-specific naming and make the header more generic for cross-platform usage. Signed-off-by: Vinayak Katoch <vkatoch@qti.qualcomm.com>
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 <vkatoch@qti.qualcomm.com>
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 <vkatoch@qti.qualcomm.com>
Create fastrpc_android.h and fastrpc_android.c with Android-specific property handling. Move ANDROIDP_DEBUG_VAR_NAME array and implement platform_get_property_int() and platform_get_property_string(). Remove ANDROID_DEBUG_VAR_NAME array and SYSTEM_RPC_LIBRARY conditional compilation from fastrpc_apps_user.c. Simplify fastrpc_get_property_int() and fastrpc_get_property_string() to call platform functions. Update Makefiles to include fastrpc_android.h and conditionally compile fastrpc_android.c for Android builds. Signed-off-by: Vinayak Katoch <vkatoch@qti.qualcomm.com>
0dc0c36 to
e4aee33
Compare
Refactored the codebase by moving vendor-specific and Android-specific elements into dedicated files, making the project more generic.