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

struct sof_tlv __aligned (4)
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.

Variables

uint32_t type
uint32_t length
char value []
uint32_t max_length

Function Documentation

◆ __aligned()

struct sof_tlv __aligned ( 4 )

◆ tlv_next()

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()

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()

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()

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()

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.

Variable Documentation

◆ length

uint32_t length

◆ max_length

uint32_t max_length

◆ type

uint32_t type

◆ value

char value[]