gsl/api/gsl_intf.h
Structures
gsl_key_value_pair
a single entry in a key vector
Members
gsl_key_vector
a complete key vector
Members
gsl_key_vector_array
a key vector with a zero sized array.
Members
gsl_key_vector_list
a key vector list
Members
gsl_tag_key_vector
a tag key vector with a zero sized array
Members
gsl_tag_key_vector_list
a tag key vector list
Members
gsl_cmd_properties
Command payload for GSL_CMD_STOP ioctl.
Members
gsl_cmd_configure_read_write_params
Cmd payload for GSL_CMD_CONFIGURE_WRITE_PARAMS and GSL_CMD_CONFIGURE_READ_PARAMS.
Members
In case of write, wait till number of bytes received from client goes ABOVE this value before issuing START to SPF In case of read, wait till client has read this many bytes before issuing START to SPF Set to 0 for immediate start.
Bitfield used to indicate attributes for data transfers, below are the defined fields: data_mode(Bits 0,1,2): One of GSL_DATA_MODE_SHMEM, GSL_DATA_MODE_BLOCKING, GSL_DATA_MODE_NON_BLOCKING, GSL_DATA_MODE_PUSH_PULL, GSL_DATA_MODE_EXTERN_MEM datapath_setup(Bits 3,4): one of GSL_DATAPATH_SETUP_DEFAULT, GSL_DATAPATH_SETUP_ALLOC_SHMEM_ONLY, GSL_DATAPATH_SETUP_SPF_PROVISION_ONLY.
Optional tag used to queue read buffers before first gsl_graph_read When set to 0, buffers are not queued until first gsl_graph_read call.
Optional field for passing platform specific data to GSL, this can be used for example to communicate some heap properties to osal layer.
gsl_cmd_graph_select
Cmd payload for GSL_CMD_ADD_GRAPH and GSL_CMD_CHANGE_GRAPH.
Members
gsl_cmd_remove_graph
Cmd payload for GSL_CMD_REMOVE_GRAPH.
Members
gsl_shmem_buf
Cmd payload for GSL_CMD_GET_WRITE_BUFF_INFO and GSL_CMD_GET_READ_BUFF_INFO.
Members
gsl_cmd_get_shmem_buf_info
Members
gsl_cmd_register_custom_event
Cmd payload for GSL_CMD_REGISTER_CUSTOM_EVENT.
Members
gsl_acdb_file
Holds the path of single acdb file, this struct should be bitwise matching against what ACDB APIs expect.
Members
Array that holds the ACDB file path and name, which cannot exceed 256 characters, including the NULL-termiated character.
gsl_acdb_data_files
Holds list of ACDB files, this struct should be bitwise matching against what ACDB APIs expect.
Members
gsl_init_data
Argument for gsl_init.
Members
acdb files to pass to acdb, setting this NULL means acdb_addr will be used to acces the data
indicates number of times GSL should check that spf is ready, gsl_init call is blocked until spf is ready.
gsl_extern_alloc_buff_info
Members
gsl_buff
Struct for passing buffer info to gsl_read and gsl_write, also used as a return payload for GSL_EVENT_ID_READ_DONE and GSL_EVENT_ID_WRITE_DONE.
Members
gsl_module_id_info_entry
Maps the modules instance id to module id for a single module.
Members
gsl_module_id_info
Used to return the module info data to client.
Members
gsl_tag_module_info_entry
Structure mapping the tag_id to module info (mid and miid)
Members
gsl_tag_module_info
Used to return tags and module info data to client given a graph key vector.
Members
gsl_event_read_write_done_payload
Event payload passed to client with GSL_EVENT_ID_READ_DONE and GSL_EVENT_ID_WRITE_DONE events.
Members
gsl_event_eos_payload
Event payload passed to client with GSL_EVENT_ID_EOS.
Members
gsl_global_event_svc_dn_payload
Event payload passed to client with GSL_GLOBAL_EVENT_AUDIO_SVC_DN.
Members
List of graph handles impacted by the audio svc going down, client is responsible to close these and re-open them once it receives the audio svc up notification.
gsl_event_cb_params
data that will be passed to client in the event callback
Members
identifies the event, in case of GSL internal events it will hold a value from enum gsl_event_id
gsl_cshm_info
Members
Functions
gsl_get_version
Returns the GSL version.
the major version is incremented whenever the current version is NOT backwards compatible with previous version
the minor version is incremented whenever the current version has additional features to the previous version but is backwards compatible with it
gsl_init
Initialize GSL, must be called before any other GSL calls.
gsl_cshm_init
Initialize GSL cshm, must be called before any other cshm calls.
number of clients to be intialized with. If 0, then default value of CSHM_DEFAULT_INIT_CLIENT_NUM will be used.
gsl_cshm_deinit
De-Initialize GSL cshm, must be called after gsl_deinit()
gsl_deinit
De-initialize GSL, no GSL APIs should be called after this.
gsl_register_global_event_cb
Register a global callback function for GSL.
gsl_open
Load a graph that is specified using graph_key_vector to the DSP.
Does not reload graphs which are already loaded.
OPTIONAL used to identify calibration data to be sent to the graph, setting to NULL means dont send any calibration
gsl_close
Close a graph that was specified using the graph_handle.
gsl_set_cal
Push calibration data for a given graph to DSP, Must be called before a graph is started.
This API need not be called in the case of GSL_CMD_CHANGE_GRAPH as the calibration will be set during the graph change operation itself
OPTIONAL identifies the portion of the graph to which this calibration needs to be applied to. For SSMD scenarios, graph_handle can contain more than one graph key vector. In such cases, clients can provide specific graph key vector to which this calibration needs to be set. The graph_key_vector input should match to one of the GKVs that the graph_handle has. If this parameter is NULL, then GSL sets the prior_ckv to the one that was given during gsl_open().
gsl_set_config
Set a configuration payload on a specified graph, the payload is stored in acdb.
OPTIONAL identifies the portion of the graph to which this config needs to be applied. For SSMD scenarios, graph_handle can contain more than one graph key vector. In such cases, clients can provide specific graph key vector to which this calibration needs to be set. The graph_key_vector input should match to one of the GKVs that the graph_handle has.
gsl_set_custom_config
Set a custom configuration parameter on a specified graph, the payload is provided from the caller.
custom caller defined payload that will get sent to the module, payload structure shall be always according to OOB sturcutre format defined by SPF
gsl_set_tagged_custom_config
Set a custom configuration parameter on a specified graph, the payload is provided from the caller.
Caller also provides tag ID so gsl can look up ACDB for the module IID to which this payload needs to be sent to.
custom caller defined payload that gets sent to the module, payload structure shall be always according to format defined by SPF
gsl_set_tagged_custom_config_persist
Persistent set a custom configuration parameter on a specified graph, the payload is provided from the caller.
Caller also provides tag ID so gsl can look up ACDB for the module IID to which this payload needs to be sent to. LIMITATION: The payload can contain only a single PID that is destined to a single MID.
custom caller defined payload that gets sent to the module, payload structure shall be always according to format defined by SPF
gsl_get_custom_config
Get the configuration parameter for a specified graph, caller provides a payload.
Buffer that contains the module ids and param ids along with empty areas that will be filled with parameter data
holds the size of the client buffer passed in for payload. On return will hold actual bytes written.
gsl_get_tagged_custom_config
Get the configuration parameter for a specified graph from the module that is specified by a tag, caller provides a payload with the PIDs populated.
GSL will populate the MIDS into the payload. LIMITATION: Only a single parameter on a single module can be looked up at a time
Buffer that contains param ids along with empty areas that will be filled with parameter data
holds the size of the client buffer passed in for payload. On return will hold actual bytes written.
gsl_ioctl
Send commands to GSL for controlling Graphs in Spf.
gsl_read
Receive data buffers from Spf.
gsl_write
Write data buffers to Spf.
gsl_register_event_cb
Register an event callback function with Spf.
gsl_get_tagged_data
Query database for data associated with a given tag and tkv.
This API is used to get spf module data in the form
holds the size of the client buffer passed in for payload and on return will hold the size of the actual data written to the buffer.
gsl_get_tagged_module_info
Query database for module_iid to module_id mapping data.
module info will be copied here. GSL dynamically allocates memory to hold module_info for the num_modules matching the tag. Client is responsible to free the memory after use.
gsl_get_tags_with_module_info
Query database for all tags and corresponding module_iid and module_id mapping given a graph key vector.
tag module info will be copied here. GSL clients would call this API twice, first call tag_module_info is set to NULL and GSL fills only the size - *tag_module_info_size. GSL clients then allocate memory set it to tag_module_info and call the API again for the second time and the tag module info gets copied into that memory. The payload is in the format “struct gsl_tag_module_info”
used to provide the size (in bytes) of tag_module_info from client and output the expected size from gsl in-case size passed from client was too small
gsl_enable_acdb_persistence
enable persistence for cals set to ACDB
gsl_set_cal_data_to_acdb
Store custom calibration to ACDB.
gsl_get_cal_data_from_acdb
Retrieve custom calibration from ACDB.
holds the size of the client buffer passed in for payload. Client will call this API twice, once to fill this payload size and the second time to fill payload, with memory of returned payload_size allocated for payload
gsl_set_tag_data_to_acdb
Store custom tag to ACDB.
gsl_get_tag_data_from_acdb
Retrieve custom tag from ACDB.
holds the size of the client buffer passed in for payload. Client will call this API twice, once to fill this payload size and the second time to fill payload, with memory of returned payload_size allocated for payload
gsl_set_temp_path_to_acdb
Updates the read/write temporary path that AML uses for the reinit/delta persistence functionality.
- AR_EOK Command executed successfully. AR_EBADPARAM Invalid input parameters were provided. AR_EFAILED Command execution failed.
gsl_get_processed_buff_cnt
Get an ever increasing count of data buffers processed by GSL.
For playback case returns the number of buffers acked by Spf. For capture case returns the number of buffers received from Spf.
An ever increasing count of buffers, the number wraps back to zero once it reaches SIZE_MAX
gsl_get_avail_buffer_size
Get the size of available buffer (in bytes) ready to be written (playback) / read (capture)
For playback case, returns the size of empty buffer (in bytes) for GSL clients to write. For capture case, returns the size of buffer (in bytes) that GSL clients can queue to SPF for read.
gsl_get_driver_data
Get driver data.
This API is to be called by GSL clients for querying any driver specific data that they stored in ACDB
buffer where data will be returned, client is responsible to allocate memory for this buffer. If this is set to NULL the size of the output data will be returned in data_payload_size
on input it containes the size of data_payload, on output will have the size actually written
gsl_get_graph_tkvs
Get all tag/TKV variations.
Retrieves all tag and tag key vector variations which are defined for a given graph key vector in ACDB
buffer where data will be returned, client is responsible to allocate memory for this buffer. If data_payload->key_vector_list is set to NULL, the size of the output data will be returned in data_payload->list_size.
gsl_get_graph_ckvs
Get all CKVs for given GKV.
Queries for all SPF module calibration key vectors under a given graph key vector.
buffer where data will be returned, client is responsible to allocate memory for this buffer. If data_payload->key_vector_list is set to NULL, the size of the output data will be returned in data_payload->list_size.
gsl_get_driver_module_kvs
Get KVs used by driver module.
Queries ACDB for all driver key vectors used by a particular driver module
buffer where data will be returned, client is responsible to allocate memory for this buffer. If data_payload->key_vector_list is set to NULL, the size of the output data will be returned in data_payload->list_size.
gsl_get_supported_gkvs
Get all GKVs that contain the provided key IDs as a subset.
Queries ACDB for all graph key vectors that contain the provided key ids as a subset. A graph key vector supports certain capabiliies if it matches the key id subset. If the subset contains zero keys, this api will return all the graph key vectors defined in ACDB.
buffer where data will be returned, client is responsible to allocate memory for this buffer. If data_payload->key_vector_list is set to NULL, the size of the output data will be returned in data_payload->list_size.
gsl_get_graph_alias
get human-readable alias for a GKV
Retrieves an alias of the graph key vector for readability. The alias includes the the usecase ID followed by a human readable graph key vector with names for keys and values. The string length is limited to 255 bytes.
API is to be called twice: once to get the size, and once to get the string.
string containing the alias. Client is responsible to allocate memory for this buffer. If this is set to NULL the size of the output data will be returned in alias_len.
The length of the string including the null terminating character. on input it containes the allocated size of alias, on output will have the size actually written
gsl_add_database
add acdb database
Extends the database by adding database files (*.acdb and *.qwsp) at runtime.
gsl_remove_database
remove acdb database
Shrinks the database by removing all data associated with the given database handle at runtime. This includes database files (*.qwsp and .acdb) and heap data
gsl_cshm_alloc
Allocates shared memory for external clients.
Send APM_CMD_GLOBAL_SHARED_MEM_MAP_REGIONS commands to SPF to map allocated memory.
gsl_cshm_dealloc
Deallocates shared memory for external clients.
Send APM_CMD_GLOBAL_SHARED_MEM_UNMAP_REGIONS commands to SPF to unmap memory to be deallocated.
gsl_cshm_msg
Send notification to module running in SPF w.r.t particular operation on shared memory block.
Operation is opaque to gsl. AR_SPF_MSG_GLOBAL_SH_MEM commands to SPF to forwards it to custom module.
Offset (in bytes) from where the chunk of memory starts. This is relative to the beginning of the total shared memory allocated
Module Instance ID of the module to which this call is intended for. In case of invalid/inactive miid, error is returned.
Flags to provide additional information for this call Bit 0 – Release memory Bit used to convey if client wants the module to release/stop using a chunk of previously informed memory. 0 – Default. Not a release message. 1 – Here, if length is zero, module is asked to release entire memory mapped to it with mem_id. If length is non-zero, the module is asked to release this chunck only.

