Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions inc/AEEStdErr.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,6 @@

#define AEE_DEFAULT_PROCESS (AEE_EOFFSET + 0x180) ///< Default process in Guest OS is not present
#define AEE_ENULLCONTEXT (AEE_EOFFSET + 0x181) ///< User NULL context vote
#define AEE_EINVALIDJOB (AEE_EOFFSET + 0x182) ///< AsyncRPC Invalid job
#define AEE_EBUSY (AEE_EOFFSET + 0x183) ///< AsyncRPC Pending job

/** @defgroup heaperror Heap error codes
* @{
Expand Down
1 change: 0 additions & 1 deletion inc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ noinst_HEADERS = \
dspqueue_shared.h \
dspsignal.h \
fastrpc_apps_user.h \
fastrpc_async.h \
fastrpc_cap.h \
fastrpc_common.h \
fastrpc_config.h \
Expand Down
73 changes: 0 additions & 73 deletions inc/fastrpc_async.h

This file was deleted.

15 changes: 1 addition & 14 deletions inc/fastrpc_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
* Update these values for any additions to
* the corresponding enums.
**/
/* Max value of fastrpc_async_notify_type, used to validate the user input */
#define FASTRPC_ASYNC_TYPE_MAX FASTRPC_ASYNC_POLL + 1

/* Max value of remote_dsp_attributes, used to validate the attribute ID*/
#define FASTRPC_MAX_DSP_ATTRIBUTES MCID_MULTICAST + 1
Expand Down Expand Up @@ -190,7 +188,6 @@ enum fastrpc_control_type {
FASTRPC_CONTROL_WAKELOCK = 4,
FASTRPC_CONTROL_PM = 5,
FASTRPC_CONTROL_RPC_POLL = 7,
FASTRPC_CONTROL_ASYNC_WAKE = 8,
FASTRPC_CONTROL_NOTIF_WAKE = 9,
};

Expand Down Expand Up @@ -316,11 +313,8 @@ struct handle_list {
int disable_exit_logs;
struct fastrpc_dsp_capabilities cap_info;
int trace_marker_fd;
uint64_t jobid;
/* Capability flag to check if mapping DMA handle through reverse RPC is supported */
int dma_handle_reverse_rpc_map_capability;
/* Mutex to synchronize ASync init and deinit */
pthread_mutex_t async_init_deinit_mut;
uint32_t pd_initmem_size; /** Initial memory allocated for remote userPD */
uint32_t refs; // Number of multi-domain handles + contexts on session
bool is_session_reserved; /** Set if session is reserved or used */
Expand Down Expand Up @@ -377,11 +371,6 @@ int check_rpc_error(int err);
**/
void fastrpc_qos_activity(int domain);

/**
* @brief Make IOCTL call to exit async thread
*/
int fastrpc_exit_async_thread(int domain);

/**
* @brief Make IOCTL call to exit notif thread
*/
Expand Down Expand Up @@ -502,8 +491,7 @@ int fastrpc_update_module_list(uint32_t req, int domain, remote_handle64 handle,
* @brief functions to wrap ioctl syscalls for downstream and upstream kernel
**/
int ioctl_init(int dev, uint32_t flags, int attr, unsigned char* shell, int shelllen, int shellfd, char* initmem, int initmemlen, int initmemfd, int tessiglen);
int ioctl_invoke(int dev, int req, remote_handle handle, uint32_t sc, void* pra, int* fds, unsigned int* attrs, void *job, unsigned int* crc, uint64_t* perf_kernel, uint64_t* perf_dsp);
int ioctl_invoke2_response(int dev, fastrpc_async_jobid *jobid, remote_handle *handle, uint32_t *sc, int* result, uint64_t *perf_kernel, uint64_t *perf_dsp);
int ioctl_invoke(int dev, int req, remote_handle handle, uint32_t sc, void* pra, int* fds, unsigned int* attrs, unsigned int* crc, uint64_t* perf_kernel, uint64_t* perf_dsp);
int ioctl_invoke2_notif(int dev, int *domain, int *session, int *status);
int ioctl_mmap(int dev, int req, uint32_t flags, int attr, int fd, int offset, size_t len, uintptr_t vaddrin, uint64_t* vaddr_out);
int ioctl_munmap(int dev, int req, int attr, void* buf, int fd, int len, uint64_t vaddr);
Expand Down Expand Up @@ -539,7 +527,6 @@ int ioctl_mdctx_manage(int dev, int req, void *user_ctx,
unsigned int *domain_ids, unsigned int num_domain_ids, uint64_t *ctx);

const char* get_secure_domain_name(int domain_id);
int is_async_fastrpc_supported(void);

#include "fastrpc_ioctl.h"

Expand Down
129 changes: 0 additions & 129 deletions inc/remote.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,40 +196,6 @@ typedef union {
remote_dma_handle dma; /** 32-bit remote dma handle */
} remote_arg;

/** 64-bit Remote Arg structure for RPC calls */
typedef union {
remote_buf64 buf; /** 64-bit remote buffer */
remote_handle h; /** non-domains remote handle */
remote_handle64 h64; /** multi-domains remote handle */
remote_dma_handle64 dma; /** 64-bit remote dma handle */
} remote_arg64;

/** Async response type */
enum fastrpc_async_notify_type {
FASTRPC_ASYNC_NO_SYNC, /** No notification required */
FASTRPC_ASYNC_CALLBACK, /** Callback notification using fastrpc_async_callback */
FASTRPC_ASYNC_POLL, /** User will poll for the notification */
/** Update FASTRPC_ASYNC_TYPE_MAX when adding new value to this enum */
};

/** Job id of Async job queued to DSP */
typedef uint64_t fastrpc_async_jobid;

/** Async call back response type, input structure */
typedef struct fastrpc_async_callback {
/** Callback function for async notification */
void (*fn)(fastrpc_async_jobid jobid, void* context, int result);
/** Current context to identify the callback */
void *context;
}fastrpc_async_callback_t;

/** Async descriptor to submit async job */
typedef struct fastrpc_async_descriptor {
enum fastrpc_async_notify_type type; /** Async response type */
fastrpc_async_jobid jobid; /** Job id of Async job queued to DSP */
fastrpc_async_callback_t cb; /** Async call back response type */
}fastrpc_async_descriptor_t;


/**
* Flags used in struct remote_rpc_control_latency
Expand Down Expand Up @@ -937,101 +903,6 @@ __QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE(remote_handle64_control)(__
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE(remote_session_control)(__QAIC_IN uint32_t req, __QAIC_IN_LEN(datalen) void *data, __QAIC_IN uint32_t datalen) __QAIC_REMOTE_ATTRIBUTE;


/**
* Invokes a remote handle asynchronously
*
* This function allows asynchronous invocation of remote methods, providing non-blocking
* execution and callback mechanisms.
*
* @param h [in] Remote handle obtained from remote_handle_open()
*
* @param desc [in] Async descriptor containing:
* - type: Type of async job (FASTRPC_ASYNC_NO_SYNC, FASTRPC_ASYNC_CALLBACK)
* - context: User context passed to callback
* - cb: Callback function and arguments (for FASTRPC_ASYNC_CALLBACK type)
* See fastrpc_async_descriptor_t for details
*
* @param dwScalars [in] Method invocation parameters encoded as scalar value:
* - Number of input/output buffers
* - Number of input/output handles
* Use REMOTE_SCALARS_* macros to decode
*
* @param pra [in] Array of remote_arg structures containing:
* 1. Input buffers
* 2. Output buffers
* 3. Input handles
* 4. Output handles
* Output buffers must be allocated via rpcmem_alloc() or
* registered as ION buffers using register_buf()
*
* @return 0 on success, otherwise error code:
* - AEE_EBADPARM: Invalid parameters
* - AEE_EUNSUPPORTED: Async operations not supported
* - AEE_ENOSUCH: Invalid handle
* - Other error codes from FastRPC framework
*
* @note The async job status can be queried using fastrpc_async_get_status()
* @note Resources must be released using fastrpc_release_async_job() after completion
*/
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE(remote_handle_invoke_async)(__QAIC_IN remote_handle h, __QAIC_IN fastrpc_async_descriptor_t *desc, __QAIC_IN uint32_t dwScalars, __QAIC_IN remote_arg *pra) __QAIC_REMOTE_ATTRIBUTE;
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE(remote_handle64_invoke_async)(__QAIC_IN remote_handle64 h, __QAIC_IN fastrpc_async_descriptor_t *desc, __QAIC_IN uint32_t dwScalars, __QAIC_IN remote_arg *pra) __QAIC_REMOTE_ATTRIBUTE;


/**
* Gets the status and result of an asynchronous FastRPC job
*
* This function allows checking the completion status of an asynchronous FastRPC job
* and retrieving its result. It can be configured to wait for job completion with
* different timeout behaviors.
*
* @param jobid [in] Job ID returned by remote_handle_invoke_async() when submitting
* the asynchronous job
*
* @param timeout_us [in] Timeout value in microseconds:
* - 0: Returns immediately with current status/result
* - Positive value: Waits up to specified microseconds for completion
* - Negative value: Waits indefinitely until job completes
*
* @param result [out] Pointer to store the job result:
* - 0 if job completed successfully
* - Error code if job failed
* Only valid when function returns 0 (job completed)
*
* @return 0 on success (job completed), otherwise error code:
* - AEE_EBUSY: Job is still pending and not completed within timeout
* - AEE_EBADPARM: Invalid job ID provided
* - AEE_EFAILED: Internal FastRPC framework error
*
* @note After job completion, resources must be released using fastrpc_release_async_job()
* @note This function is thread-safe and can be called concurrently from multiple threads
*/
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE(fastrpc_async_get_status)(__QAIC_IN fastrpc_async_jobid jobid,__QAIC_IN int timeout_us,__QAIC_OUT int *result);


/**
* Releases resources associated with an asynchronous FastRPC job
*
* This function must be called after an asynchronous job completes to free associated
* resources and cleanup internal state. It should only be called after receiving job
* completion status either through:
* - Callback notification (for FASTRPC_ASYNC_CALLBACK jobs)
* - Polling via fastrpc_async_get_status() (for FASTRPC_ASYNC_POLL jobs)
*
* @param jobid [in] Job ID returned by remote_handle_invoke_async() when submitting
* the asynchronous job
*
* @return 0 on success, otherwise error code:
* - AEE_EBUSY: Job is still pending and has not completed yet
* - AEE_EBADPARM: Invalid job ID provided
* - AEE_EFAILED: Internal FastRPC framework error
*
* @note This function is thread-safe and can be called concurrently from multiple threads
* @note Calling this function before job completion will return AEE_EBUSY
* @note Resources must be released exactly once per async job to avoid memory leaks
*/
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE(fastrpc_release_async_job)(__QAIC_IN fastrpc_async_jobid jobid);


/**
* DEPRECATED: Use fastrpc_mmap() instead.
*
Expand Down
1 change: 0 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ LIBDSPRPC_SOURCES = \
fastrpc_perf.c \
fastrpc_pm.c \
fastrpc_config.c \
fastrpc_async.c \
fastrpc_mem.c \
fastrpc_notif.c \
fastrpc_latency.c \
Expand Down
Loading
Loading