Skip to content

Install fastrpc headers to installdir #163

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

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

quic-ekangupt
Copy link
Contributor

Few of the fastrpc header files are used by developers for their projects. Copy these headers from source directory to target directory to ensure that they are available for developers to include in their own projects.

Few of the fastrpc header files are used by developers for their
projects. Copy these headers from source directory to target
directory to ensure that they are available for developers to
include in their own projects.

Signed-off-by: Ekansh Gupta <[email protected]>
fastrpc_include_HEADERS += $(top_srcdir)/inc/HAP_pls.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/HAP_debug.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/dspqueue.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/adsp_default_listener1.h
Copy link
Contributor

Choose a reason for hiding this comment

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

Which of the headers actually define an API that is useable by the users of fastrpc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All these headers are maintained as shippable components and are utilized by various clients. Specifically, for QLI supporting platforms, some headers are not used. However, generally, all headers are provided for users of fastrpc.

Copy link
Contributor

Choose a reason for hiding this comment

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

I quickly went through the headers. Some of them are dsprpcd-internal headers. Some are bad wrappers which should have been dropped long ago. So, no, please don't randomly export those headers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All these headers are already provided in dspservices-headers_15.0.qcom_aarch64.tar.gz prebuilt (https://docs.qualcomm.com/bundle/publicresource/topics/RNO-250403001134/ReleaseNote.html?vproduct=1601111740013072&version=1.4)

I'm checking the impact on clients if I restrict exporting any headers.

otherinclude_HEADERS = $(top_srcdir)/inc/*.h
# Export fastrpc headers
fastrpc_includedir = $(includedir)
fastrpc_include_HEADERS = $(top_srcdir)/inc/AEEatomic.h
Copy link
Contributor

Choose a reason for hiding this comment

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

No. We don't need another atomic wrapper, users should use -latomic instead. Please don't export this one

# Export fastrpc headers
fastrpc_includedir = $(includedir)
fastrpc_include_HEADERS = $(top_srcdir)/inc/AEEatomic.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/AEEQList.h
Copy link
Contributor

Choose a reason for hiding this comment

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

Yet another list header. It is not a DSP interface, so please drop it from the exported headers. If necessary, people can use <sys/queue.h>

fastrpc_includedir = $(includedir)
fastrpc_include_HEADERS = $(top_srcdir)/inc/AEEatomic.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/AEEQList.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/AEEstd.h
Copy link
Contributor

Choose a reason for hiding this comment

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

A random collection of libc wrappers and some extra functions. Drop it and use libc directly. Don't encourage our users to use unnecessary libc wrappers.

fastrpc_include_HEADERS = $(top_srcdir)/inc/AEEatomic.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/AEEQList.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/AEEstd.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/AEEStdDef.h
Copy link
Contributor

Choose a reason for hiding this comment

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

This is for those that don't know about stddef.h / stdint.h. Please drop it completely.

fastrpc_include_HEADERS += $(top_srcdir)/inc/AEEstd.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/AEEStdDef.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/AEEStdErr.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/AEEVaList.h
Copy link
Contributor

Choose a reason for hiding this comment

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

Use stdarg.h instead, drop the header.

fastrpc_include_HEADERS += $(top_srcdir)/inc/remote.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/remote64.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/rpcmem.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/verify.h
Copy link
Contributor

Choose a reason for hiding this comment

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

This is an internal header, don't export it to outside users.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this header is used by sensors and audio daemons.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why? It's definitely an internal header, depending on the implementation details (like the use of liblog, FARF, syslog or just printf). If any app wants to use it, it should vendor in this header: it doesn't provide an API, it is not directly related to the fastrpc, etc. So, as the fastrpc wasn't installing any headers beforehand, it should be excluded.

fastrpc_include_HEADERS += $(top_srcdir)/inc/remote64.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/rpcmem.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/verify.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/HAP_farf.h
Copy link
Contributor

Choose a reason for hiding this comment

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

This one also looks like an internal header, rather than something that should be used by library users.

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 see this is included by multiple clients like sensors, CV etc.

fastrpc_include_HEADERS += $(top_srcdir)/inc/rpcmem.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/verify.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/HAP_farf.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/HAP_pls.h
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Warning, this API should only be called from within a thread started by FastRPC, and not from any user created threads via the qurt apis.

So, this is not the API for apps.

fastrpc_include_HEADERS += $(top_srcdir)/inc/verify.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/HAP_farf.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/HAP_pls.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/HAP_debug.h
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it a debug for adsprpcd or for user apps?

fastrpc_include_HEADERS += $(top_srcdir)/inc/HAP_pls.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/HAP_debug.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/dspqueue.h
fastrpc_include_HEADERS += $(top_srcdir)/inc/adsp_default_listener1.h
Copy link
Contributor

Choose a reason for hiding this comment

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

adsp_default_listener_register is not documented at all. What is it?

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'll add documentation for the header as a separate commit.

@quic-ekangupt quic-ekangupt deleted the test branch May 20, 2025 04:29
@quic-ekangupt quic-ekangupt restored the test branch May 20, 2025 05:57
@quic-ekangupt
Copy link
Contributor Author

accidently closed this PR

@quic-ekangupt quic-ekangupt reopened this May 20, 2025
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.

2 participants