#include <stdint.h>
#include <sys/types.h>
Go to the source code of this file.
Classes | |
struct | domain_t |
struct | remote_buf |
struct | remote_buf64 |
struct | remote_dma_handle |
struct | remote_dma_handle64 |
union | remote_arg |
union | remote_arg64 |
struct | fastrpc_async_callback |
struct | fastrpc_async_descriptor |
struct | remote_rpc_control_latency |
struct | remote_dsp_capability |
struct | remote_rpc_control_wakelock |
struct | remote_rpc_get_domain |
struct | remote_control_custom_path |
struct | remote_rpc_thread_params |
struct | remote_rpc_control_unsigned_module |
struct | remote_rpc_relative_thread_priority |
struct | remote_rpc_process_clean_params |
struct | remote_rpc_session_close |
struct | remote_rpc_control_pd_dump |
struct | remote_process_type |
struct | remote_rpc_notif_register |
struct | remote_rpc_pd_initmem_size |
struct | remote_rpc_reserve_new_session |
struct | remote_rpc_effective_domain_id |
struct | remote_rpc_get_uri |
Macros | |
#define | __QAIC_REMOTE(ff) ff |
#define | __QAIC_REMOTE_EXPORT |
__QAIC_REMOTE More... | |
#define | __QAIC_RETURN |
#define | __QAIC_IN |
#define | __QAIC_IN_CHAR |
#define | __QAIC_IN_LEN(len) |
#define | __QAIC_OUT |
#define | __QAIC_INT64PTR uint64_t |
#define | __QAIC_REMOTE_ATTRIBUTE |
#define | REMOTE_SCALARS_METHOD_ATTR(dwScalars) (((dwScalars) >> 29) & 0x7) |
__QAIC_REMOTE_ATTRIBUTE More... | |
#define | REMOTE_SCALARS_METHOD(dwScalars) (((dwScalars) >> 24) & 0x1f) |
#define | REMOTE_SCALARS_INBUFS(dwScalars) (((dwScalars) >> 16) & 0x0ff) |
#define | REMOTE_SCALARS_OUTBUFS(dwScalars) (((dwScalars) >> 8) & 0x0ff) |
#define | REMOTE_SCALARS_INHANDLES(dwScalars) (((dwScalars) >> 4) & 0x0f) |
#define | REMOTE_SCALARS_OUTHANDLES(dwScalars) ((dwScalars) & 0x0f) |
#define | REMOTE_SCALARS_MAKEX(nAttr, nMethod, nIn, nOut, noIn, noOut) |
#define | REMOTE_SCALARS_MAKE(nMethod, nIn, nOut) REMOTE_SCALARS_MAKEX(0,nMethod,nIn,nOut,0,0) |
#define | REMOTE_SCALARS_LENGTH(sc) |
#define | ADSP_DOMAIN_ID 0 |
#define | MDSP_DOMAIN_ID 1 |
#define | SDSP_DOMAIN_ID 2 |
#define | CDSP_DOMAIN_ID 3 |
#define | ADSP_DOMAIN_NAME "adsp" |
#define | MDSP_DOMAIN_NAME "mdsp" |
#define | SDSP_DOMAIN_NAME "sdsp" |
#define | CDSP_DOMAIN_NAME "cdsp" |
#define | ADSP_DOMAIN "&_dom=adsp" |
#define | MDSP_DOMAIN "&_dom=mdsp" |
#define | SDSP_DOMAIN "&_dom=sdsp" |
#define | CDSP_DOMAIN "&_dom=cdsp" |
#define | ITRANSPORT_PREFIX "'\":;./\\" |
#define | MAX_DOMAIN_URI_SIZE 12 |
#define | FASTRPC_WAKELOCK_CONTROL_SUPPORTED 1 |
#define | FASTRPC_ATTR_NONE 0 /** No attribute to set.*/ |
#define | FASTRPC_ATTR_NON_COHERENT |
#define | FASTRPC_ATTR_COHERENT |
#define | FASTRPC_ATTR_KEEP_MAP |
#define | FASTRPC_ATTR_NOMAP |
#define | FASTRPC_ATTR_FORCE_NOFLUSH |
#define | FASTRPC_ATTR_FORCE_NOINVALIDATE |
#define | FASTRPC_ATTR_TRY_MAP_STATIC |
#define | REMOTE_MODE_PARALLEL 0 |
#define | REMOTE_MODE_SERIAL 1 |
Typedefs | |
typedef struct domain_t | domain |
typedef uint32_t | remote_handle |
typedef uint64_t | remote_handle64 |
typedef uint64_t | fastrpc_async_jobid |
typedef struct fastrpc_async_callback | fastrpc_async_callback_t |
typedef struct fastrpc_async_descriptor | fastrpc_async_descriptor_t |
typedef struct remote_dsp_capability | fastrpc_capability |
typedef struct remote_rpc_get_domain | remote_rpc_get_domain_t |
typedef struct remote_rpc_process_clean_params | remote_rpc_process_exception |
typedef enum remote_rpc_status_flags | remote_rpc_status_flags_t |
typedef int(* | fastrpc_notif_fn_t) (void *context, int domain, int session, remote_rpc_status_flags_t status) |
typedef struct remote_rpc_notif_register | remote_rpc_notif_register_t |
typedef struct remote_rpc_reserve_new_session | remote_rpc_reserve_new_session_t |
typedef struct remote_rpc_effective_domain_id | remote_rpc_effective_domain_id_t |
typedef struct remote_rpc_get_uri | remote_rpc_get_uri_t |
#define __QAIC_IN |
_WIN32 __QAIC_RETURN
#define __QAIC_IN_CHAR |
_WIN32 __QAIC_IN
#define __QAIC_IN_LEN | ( | len | ) |
_WIN32 __QAIC_IN_CHAR
#define __QAIC_INT64PTR uint64_t |
_WIN32 __QAIC_OUT
#define __QAIC_OUT |
_WIN32 __QAIC_IN_LEN
#define __QAIC_REMOTE | ( | ff | ) | ff |
#define __QAIC_REMOTE_ATTRIBUTE |
_WIN32 __QAIC_INT64PTR
#define __QAIC_REMOTE_EXPORT |
__QAIC_REMOTE
#define __QAIC_RETURN |
_WIN32 __QAIC_REMOTE_EXPORT
#define ADSP_DOMAIN "&_dom=adsp" |
Defines to prepare URI for multi-domain calls
#define ADSP_DOMAIN_ID 0 |
Defines the domain IDs for supported DSPs
#define ADSP_DOMAIN_NAME "adsp" |
Defines the domain names for supported DSPs
#define CDSP_DOMAIN "&_dom=cdsp" |
#define CDSP_DOMAIN_ID 3 |
#define CDSP_DOMAIN_NAME "cdsp" |
#define FASTRPC_ATTR_COHERENT |
#define FASTRPC_ATTR_FORCE_NOFLUSH |
#define FASTRPC_ATTR_FORCE_NOINVALIDATE |
#define FASTRPC_ATTR_KEEP_MAP |
#define FASTRPC_ATTR_NOMAP |
#define FASTRPC_ATTR_NON_COHERENT |
#define FASTRPC_ATTR_NONE 0 /** No attribute to set.*/ |
Attributes for remote_register_buf_attr/remote_register_buf_attr2
#define FASTRPC_ATTR_TRY_MAP_STATIC |
#define FASTRPC_WAKELOCK_CONTROL_SUPPORTED 1 |
Macro for backward compatibility. Clients can compile wakelock request code in their app only when this is defined
#define ITRANSPORT_PREFIX "'\":;./\\" |
Internal transport prefix
#define MAX_DOMAIN_URI_SIZE 12 |
Maximum length of URI for remote_handle_open() calls
#define MDSP_DOMAIN "&_dom=mdsp" |
#define MDSP_DOMAIN_ID 1 |
#define MDSP_DOMAIN_NAME "mdsp" |
#define REMOTE_MODE_PARALLEL 0 |
REMOTE_MODE_PARALLEL used with remote_set_mode This is the default mode for the driver. While the driver is in parallel mode it will try to invalidate output buffers after it transfers control to the dsp. This allows the invalidate operations to overlap with the dsp processing the call. This mode should be used when output buffers are only read on the application processor and only written on the aDSP.
#define REMOTE_MODE_SERIAL 1 |
REMOTE_MODE_SERIAL used with remote_set_mode When operating in SERIAL mode the driver will invalidate output buffers before calling into the dsp. This mode should be used when output buffers have been written to somewhere besides the aDSP.
#define REMOTE_SCALARS_INBUFS | ( | dwScalars | ) | (((dwScalars) >> 16) & 0x0ff) |
Retrieves number of input buffers from the scalars parameter
#define REMOTE_SCALARS_INHANDLES | ( | dwScalars | ) | (((dwScalars) >> 4) & 0x0f) |
Retrieves number of input handles from the scalars parameter
#define REMOTE_SCALARS_LENGTH | ( | sc | ) |
Retrieves number of io buffers and handles
#define REMOTE_SCALARS_MAKE | ( | nMethod, | |
nIn, | |||
nOut | |||
) | REMOTE_SCALARS_MAKEX(0,nMethod,nIn,nOut,0,0) |
#define REMOTE_SCALARS_MAKEX | ( | nAttr, | |
nMethod, | |||
nIn, | |||
nOut, | |||
noIn, | |||
noOut | |||
) |
Makes the scalar using the method attr, index and number of io buffers and handles
#define REMOTE_SCALARS_METHOD | ( | dwScalars | ) | (((dwScalars) >> 24) & 0x1f) |
Retrieves method index from the scalars parameter
#define REMOTE_SCALARS_METHOD_ATTR | ( | dwScalars | ) | (((dwScalars) >> 29) & 0x7) |
__QAIC_REMOTE_ATTRIBUTE
Retrieves method attribute from the scalars parameter
#define REMOTE_SCALARS_OUTBUFS | ( | dwScalars | ) | (((dwScalars) >> 8) & 0x0ff) |
Retrieves number of output buffers from the scalars parameter
#define REMOTE_SCALARS_OUTHANDLES | ( | dwScalars | ) | ((dwScalars) & 0x0f) |
Retrieves number of output handles from the scalars parameter
#define SDSP_DOMAIN "&_dom=sdsp" |
#define SDSP_DOMAIN_ID 2 |
#define SDSP_DOMAIN_NAME "sdsp" |
typedef struct fastrpc_async_callback fastrpc_async_callback_t |
Async call back response type, input structure
typedef struct fastrpc_async_descriptor fastrpc_async_descriptor_t |
Async descriptor to submit async job
typedef uint64_t fastrpc_async_jobid |
Job id of Async job queued to DSP
typedef struct remote_dsp_capability fastrpc_capability |
typedef int(* fastrpc_notif_fn_t) (void *context, int domain, int session, remote_rpc_status_flags_t status) |
fastrpc_notif_fn_t Notification call back function
context,context | used in the registration |
domain,domain | of the user process |
session,session | id of user process |
status,status | of user process |
typedef uint32_t remote_handle |
Remote handle parameter for RPC calls
typedef uint64_t remote_handle64 |
Remote handle parameter for multi-domain RPC calls
typedef struct remote_rpc_effective_domain_id remote_rpc_effective_domain_id_t |
Structure for remote_session_control, used with FASTRPC_GET_EFFECTIVE_DOMAIN_ID request ID to get effective domain id of fastrpc session on the user PD of the DSP
typedef struct remote_rpc_get_domain remote_rpc_get_domain_t |
Structure used for request ID DSPRPC_GET_DOMAIN
in remote handle control interface. Get domain ID associated with an opened handle to remote interface of type remote_handle64. remote_handle64_control() returns domain for a given handle remote_handle_control() API returns default domain ID
typedef struct remote_rpc_get_uri remote_rpc_get_uri_t |
Structure for remote_session_control, used with FASTRPC_GET_URI request ID to get the URI needed to load the module in the fastrpc user PD on the DSP
typedef struct remote_rpc_notif_register remote_rpc_notif_register_t |
Structure for remote_session_control, used with FASTRPC_REGISTER_STATUS_NOTIFICATIONS request ID to receive status notifications of the user PD on the DSP
typedef struct remote_rpc_process_clean_params remote_rpc_process_exception |
Structure used for request ID FASTRPC_REMOTE_PROCESS_EXCEPTION
in remote session control interface This is used to trigger exception in the userPDs running on the DSP
typedef struct remote_rpc_reserve_new_session remote_rpc_reserve_new_session_t |
Structure for remote_session_control, used with FASTRPC_RESERVE_SESSION request ID to reserve new fastrpc session of the user PD on the DSP. Default sesion is always 0 and remains available for any module opened without Session ID. New session reservation starts with session ID 1.
typedef enum remote_rpc_status_flags remote_rpc_status_flags_t |
DSP user PD status notification flags Status flags for the user PD on the DSP returned by the status notification function
Async response type
Enumerator | |
---|---|
FASTRPC_ASYNC_NO_SYNC | |
FASTRPC_ASYNC_CALLBACK | No notification required |
FASTRPC_ASYNC_POLL | Callback notification using fastrpc_async_callback |
enum fastrpc_map_flags |
Types of maps with cache maintenance.
for fastrpc_mmap and fastrpc_munmap
enum fastrpc_process_type |
Request IDs for remote handle control interface
Different types of DSP capabilities queried via remote_handle_control using DSPRPC_GET_DSP_INFO request id. DSPRPC_GET_DSP_INFO should only be used with remote_handle_control() as a handle is not needed to query DSP capabilities. To query DSP capabilities fill out 'domain' and 'attribute_ID' from structure remote_dsp_capability. DSP capability will be returned on variable 'capability'.
enum remote_mem_map_flags |
Memory map control flags for using with remote_mem_map() and remote_mem_unmap()
Flags used in struct remote_rpc_control_latency for request ID DSPRPC_CONTROL_LATENCY in remote handle control interface
DSP user PD status notification flags Status flags for the user PD on the DSP returned by the status notification function
Request IDs for remote session control interface
Enumerator | |
---|---|
FASTRPC_RESERVED_1 | |
FASTRPC_THREAD_PARAMS | Reserved |
DSPRPC_CONTROL_UNSIGNED_MODULE | Set thread parameters like priority and stack size |
FASTRPC_RESERVED_2 | Handle the unsigned module offload request, to be called before remote_handle_open() |
FASTRPC_RELATIVE_THREAD_PRIORITY | Reserved |
FASTRPC_RESERVED_3 | To increase/decrease default thread priority |
FASTRPC_REMOTE_PROCESS_KILL | Reserved |
FASTRPC_SESSION_CLOSE | Kill remote process |
FASTRPC_CONTROL_PD_DUMP | Close all open handles of requested domain |
FASTRPC_REMOTE_PROCESS_EXCEPTION | Enable PD dump feature |
FASTRPC_REMOTE_PROCESS_TYPE | Trigger Exception in the remote process |
FASTRPC_REGISTER_STATUS_NOTIFICATIONS | Query type of process defined by enum fastrpc_process_type |
FASTRPC_PD_INITMEM_SIZE | Enable DSP User process status notifications |
FASTRPC_RESERVE_NEW_SESSION | Set signed userpd initial memory size |
FASTRPC_GET_EFFECTIVE_DOMAIN_ID | Reserve new FastRPC session |
FASTRPC_GET_URI | Get effective domain ID of a FastRPC session Creates the URI needed to load a module in the DSP User PD |
__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 | ||
) |
fastrpc_async_get_status Get status of Async job. This can be used to query the status of a Async job
jobid,jobid | returned during Async job submission. |
timeout_us,timeout | in micro seconds timeout = 0, returns immediately with status/result timeout > 0, waits for specified time and then returns with status/result timeout < 0. waits indefinetely until job completes |
result,integer | pointer for the result of the job 0 on success error code on failure |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() fastrpc_mmap | ( | __QAIC_IN int | domain, |
__QAIC_IN int | fd, | ||
__QAIC_IN void * | addr, | ||
__QAIC_IN int | offset, | ||
__QAIC_IN size_t | length, | ||
__QAIC_IN enum fastrpc_map_flags | flags | ||
) |
fastrpc_mmap Creates a mapping on remote process for an ION buffer with file descriptor. New fastrpc session will be opened if not already opened for the domain.
domain,DSP | domain ID of a fastrpc session |
fd,ION | memory file descriptor |
addr,buffer | virtual address on cpu |
offset,offset | from the beginning of the buffer |
length,size | of buffer in bytes |
flags,controls | mapping functionality on DSP. Refer fastrpc_map_flags enum definition for more information. |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() fastrpc_munmap | ( | __QAIC_IN int | domain, |
__QAIC_IN int | fd, | ||
__QAIC_IN void * | addr, | ||
__QAIC_IN size_t | length | ||
) |
fastrpc_munmap Removes a mapping associated with file descriptor.
domain,DSP | domain ID of a fastrpc session |
fd,file | descriptor |
addr,buffer | virtual address used for mapping creation |
length,buffer | length |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() fastrpc_release_async_job | ( | __QAIC_IN fastrpc_async_jobid | jobid | ) |
fastrpc_release_async_job Release Async job after receiving status either through callback/poll
jobid,jobid | returned during Async job submission. |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_handle64_close | ( | __QAIC_IN remote_handle64 | h | ) |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_handle64_control | ( | __QAIC_IN remote_handle64 | h, |
__QAIC_IN uint32_t | req, | ||
__QAIC_IN_LEN(datalen) void * | data, | ||
__QAIC_IN uint32_t | datalen | ||
) |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_handle64_invoke | ( | __QAIC_IN remote_handle64 | h, |
__QAIC_IN uint32_t | dwScalars, | ||
__QAIC_IN remote_arg * | pra | ||
) |
__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_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_handle64_open | ( | __QAIC_IN_CHAR const char * | name, |
__QAIC_OUT remote_handle64 * | ph | ||
) |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_handle_close | ( | __QAIC_IN remote_handle | h | ) |
remote_handle()_close closes the remote handle
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_handle_control | ( | __QAIC_IN uint32_t | req, |
__QAIC_IN_LEN(datalen) void * | data, | ||
__QAIC_IN uint32_t | datalen | ||
) |
remote_handle_control Set remote handle control parameters
req,request | ID defined by handle_control_req_id |
data,address | of structure with parameters |
datalen,length | of data |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_handle_invoke | ( | __QAIC_IN remote_handle | h, |
__QAIC_IN uint32_t | dwScalars, | ||
__QAIC_IN remote_arg * | pra | ||
) |
invokes the remote handle see retrive macro's on dwScalars format pra, contains the arguments in the following order, inbufs, outbufs, inhandles, outhandles. implementors should ignore and pass values asis that the transport doesn't understand.
__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 | ||
) |
remote_handle()_invoke_async invokes the remote handle asynchronously
desc, descriptor contains type of asyncjob. context and call back function(if any) see retrive macro's on dwScalars format pra, contains the arguments in the following order, inbufs, outbufs, inhandles, outhandles. all outbufs need to be either allocated using rpcmem_alloc or registered ION buffers using register_buf implementors should ignore and pass values as is that the transport doesn't understand.
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_handle_open | ( | __QAIC_IN_CHAR const char * | name, |
__QAIC_OUT remote_handle * | ph | ||
) |
remote_handle()_open Opens a remote_handle "name" returns 0 on success
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_mem_map | ( | __QAIC_IN int | domain, |
__QAIC_IN int | fd, | ||
__QAIC_IN int | flags, | ||
__QAIC_IN uint64_t | virtAddr, | ||
__QAIC_IN size_t | size, | ||
__QAIC_OUT uint64_t * | remoteVirtAddr | ||
) |
remote_mem_map Map memory to the remote process on a selected DSP domain
: DSP domain ID. Use -1 for using default domain. Default domain is selected based on library lib(a/m/s/c)dsprpc.so library linked to application. : file descriptor of memory : enum remote_mem_map_flags type of flag : virtual address of buffer : buffer length [out]: remote process virtual address
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_mem_unmap | ( | __QAIC_IN int | domain, |
__QAIC_IN uint64_t | remoteVirtAddr, | ||
__QAIC_IN size_t | size | ||
) |
remote_mem_unmap Unmap memory to the remote process on a selected DSP domain
: DSP domain ID. Use -1 for using default domain. Get domain from multi-domain handle if required. : remote process virtual address received from remote_mem_map : buffer length
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_mmap | ( | __QAIC_IN int | fd, |
__QAIC_IN uint32_t | flags, | ||
__QAIC_IN uint32_t | vaddrin, | ||
__QAIC_IN int | size, | ||
__QAIC_OUT uint32_t * | vaddrout | ||
) |
remote_mmap map memory to the remote domain
fd,fd | assosciated with this memory |
flags,flags | to be used for the mapping |
vaddrin,input | address |
size,size | of buffer |
vaddrout,output | address |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_mmap64 | ( | __QAIC_IN int | fd, |
__QAIC_IN uint32_t | flags, | ||
__QAIC_IN __QAIC_INT64PTR | vaddrin, | ||
__QAIC_IN int64_t | size, | ||
__QAIC_OUT __QAIC_INT64PTR * | vaddrout | ||
) |
remote_mmap64 map memory to the remote domain
fd,fd | associated with this memory |
flags,flags | to be used for the mapping |
vaddrin,input | address |
size,size | of buffer |
vaddrout,output | address |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_munmap | ( | __QAIC_IN uint32_t | vaddrout, |
__QAIC_IN int | size | ||
) |
remote_munmap unmap memory from the remote domain
vaddrout,remote | address mapped |
size,size | to unmap. Unmapping a range partially may not be supported. |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_munmap64 | ( | __QAIC_IN __QAIC_INT64PTR | vaddrout, |
__QAIC_IN int64_t | size | ||
) |
remote_munmap64 unmap memory from the remote domain
vaddrout,remote | address mapped |
size,size | to unmap. Unmapping a range partially may not be supported. |
__QAIC_REMOTE_EXPORT __QAIC_RETURN void __QAIC_REMOTE() remote_register_buf | ( | __QAIC_IN_LEN(size) void * | buf, |
__QAIC_IN int | size, | ||
__QAIC_IN int | fd | ||
) |
remote_register_buf/remote_register_buf_attr Register a file descriptor for a buffer. Users of fastrpc should register zero-copy buffer to enable sharing that buffer to the dsp via the SMMU. The API is limited to register buffer less than 2 GB only. Recommendation is to use remote_register_buf_attr2 instead. API remote_register_buf_attr2 can now accept size up to 2 power(8*sizeof(size_t)).
Some versions of libcdsprpc.so lack this function, so users should set this symbol as weak.
#pragma weak remote_register_buf #pragma weak remote_register_buf_attr
buf,virtual | address of the buffer |
size,size | of the buffer , the file descriptor, callers can use -1 to deregister. , map buffer as coherent or non-coherent |
__QAIC_REMOTE_EXPORT __QAIC_RETURN void __QAIC_REMOTE() remote_register_buf_attr | ( | __QAIC_IN_LEN(size) void * | buf, |
__QAIC_IN int | size, | ||
__QAIC_IN int | fd, | ||
__QAIC_IN int | attr | ||
) |
__QAIC_REMOTE_EXPORT __QAIC_RETURN void __QAIC_REMOTE() remote_register_buf_attr2 | ( | __QAIC_IN_LEN(size) void * | buf, |
__QAIC_IN size_t | size, | ||
__QAIC_IN int | fd, | ||
__QAIC_IN int | attr | ||
) |
remote_register_buf_attr2 Register a file descriptor for a buffer. Users of fastrpc should register zero-copy buffer to enable sharing that buffer to the dsp via the SMMU.
Some versions of libcdsprpc.so lack this function, so users should set this symbol as weak.
#pragma weak remote_register_buf_attr2
buf,virtual | address of the buffer |
size,size | of the buffer , the file descriptor, callers can use -1 to deregister. , setting attribute for the mapped buffer refer to "Attributes for remote_register_buf_attr/remote_register_buf_attr2" to set the required attribute value. |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_register_dma_handle | ( | __QAIC_IN int | fd, |
__QAIC_IN uint32_t | len | ||
) |
remote_register_dma_handle/remote_register_dma_handle_attr Register a dma handle with fastrpc. This is only valid on Android with ION allocated memory. Users of fastrpc should register a file descriptor allocated with ION to enable sharing that memory to the dsp via the SMMU.
Some versions of libadsprpc.so lack this function, so users should set this symbol as weak.
#pragma weak remote_register_dma_handle #pragma weak remote_register_dma_handle_attr
, the file descriptor, callers can use -1 to deregister.
len,size | of the buffer , map buffer as coherent or non-coherent or no-map |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_register_dma_handle_attr | ( | __QAIC_IN int | fd, |
__QAIC_IN uint32_t | len, | ||
__QAIC_IN uint32_t | attr | ||
) |
__QAIC_REMOTE_EXPORT __QAIC_RETURN void* __QAIC_REMOTE() remote_register_fd | ( | __QAIC_IN int | fd, |
__QAIC_IN int | size | ||
) |
remote_register_fd Register a file descriptor. This can be used when users do not have a mapping to pass to the RPC layer. The generated address is a mapping with PROT_NONE, any access to this memory will fail, so it should only be used as an ID to identify this file descriptor to the RPC layer. This API is limited to buffer size less then 2 GB. Recommendation is to use remote_register_fd2 for buffer of size > 2 power(8*sizeof(size_t)).
To deregister use remote_register_buf(addr, size, -1).
#pragma weak remote_register_fd
fd,the | file descriptor. |
size,size | to of the buffer |
__QAIC_REMOTE_EXPORT __QAIC_RETURN void* __QAIC_REMOTE() remote_register_fd2 | ( | __QAIC_IN int | fd, |
__QAIC_IN size_t | size | ||
) |
remote_register_fd2 Register a file descriptor. This can be used when users do not have a mapping to pass to the RPC layer. The generated address is a mapping with PROT_NONE, any access to this memory will fail, so it should only be used as an ID to identify this file descriptor to the RPC layer.
To deregister use remote_register_buf(addr, size, -1).
#pragma weak remote_register_fd2
fd,the | file descriptor. |
size,size | to of the buffer |
__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 | ||
) |
remote_session_control Set remote session parameters
req,request | ID |
data,address | of structure with parameters |
datalen,length | of data |
__QAIC_REMOTE_EXPORT __QAIC_RETURN int __QAIC_REMOTE() remote_set_mode | ( | __QAIC_IN uint32_t | mode | ) |
remote_set_mode Set the mode of operation.
Some versions of libadsprpc.so lack this function, so users should set this symbol as weak.
#pragma weak remote_set_mode
mode,the | mode |