Sound Open Firmware
Loading...
Searching...
No Matches
tlv.h File Reference
Include dependency graph for tlv.h:

Go to the source code of this file.

Data Structures

struct  sof_tlv
 Type–length–value struct. More...
 
struct  sof_tl
 

Functions

static struct sof_tlv * tlv_next (const struct sof_tlv *tlv)
 Allows to step through successive values in a sequence of TLV structures.
 
static void tlv_value_uint32_set (struct sof_tlv *tlv, uint32_t type, uint32_t value)
 Fills the TLV Structure (version for 32-bit values).
 
static void tlv_value_set (struct sof_tlv *tlv, uint32_t type, uint32_t length, void *value)
 Fills the TLV Structure (general purpose version).
 
static void tlv_value_get (const void *data, uint32_t size, uint32_t type, void **value, uint32_t *length)
 Searches a sequence of TLV structures for values of the specified type.
 
static void * tlv_value_ptr_get (struct sof_tlv *tlv, uint32_t type)
 Retrieves pointer to the TLV Structure value of the specified type.
 

Function Documentation

◆ tlv_next()

static struct sof_tlv * tlv_next ( const struct sof_tlv *  tlv)
inlinestatic

Allows to step through successive values in a sequence of TLV structures.

Parameters
tlvPointer to the base TLV.
Returns
struct sof_tlv* Pointer to the next TLV.

◆ tlv_value_get()

static void tlv_value_get ( const void *  data,
uint32_t  size,
uint32_t  type,
void **  value,
uint32_t *  length 
)
inlinestatic

Searches a sequence of TLV structures for values of the specified type.

Parameters
dataPointer to the beginning of the TLV sequence.
sizeThe size of the data block containing the TLV structure sequences.
typeThe type of the searched value.
valueA pointer that will point to the found value.
lengthThe size of the found value.

◆ tlv_value_ptr_get()

static void * tlv_value_ptr_get ( struct sof_tlv *  tlv,
uint32_t  type 
)
inlinestatic

Retrieves pointer to the TLV Structure value of the specified type.

Parameters
tlvTLV struct pointer.
typeValue type.
Returns
Value pointer

◆ tlv_value_set()

static void tlv_value_set ( struct sof_tlv *  tlv,
uint32_t  type,
uint32_t  length,
void *  value 
)
inlinestatic

Fills the TLV Structure (general purpose version).

Parameters
tlvTLV struct pointer.
typeValue type.
lengthValue size.
valuePointer to the value.

◆ tlv_value_uint32_set()

static void tlv_value_uint32_set ( struct sof_tlv *  tlv,
uint32_t  type,
uint32_t  value 
)
inlinestatic

Fills the TLV Structure (version for 32-bit values).

Parameters
tlvTLV struct pointer.
typeValue type.
valueThe value.