Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
uaol.h File Reference

Public APIs for USB Audio Offload Link (UAOL) drivers. More...

#include <stdint.h>
#include <zephyr/device.h>

Go to the source code of this file.

Data Structures

struct  uaol_capabilities
 UAOL hardware capabilities. More...
struct  uaol_config
 UAOL stream configuration data. More...
struct  uaol_ep_table_entry
 UAOL stream endpoint table entry. More...

Functions

static int uaol_config (const struct device *dev, int stream, struct uaol_config *cfg)
 Set UAOL individual stream configuration.
static int uaol_start (const struct device *dev, int stream)
 Start UAOL individual stream operation.
static int uaol_stop (const struct device *dev, int stream)
 Stop UAOL individual stream operation.
static int uaol_program_ep_table (const struct device *dev, int stream, struct uaol_ep_table_entry entry, bool valid)
 Program an endpoint table entry for UAOL individual stream.
static int uaol_get_capabilities (const struct device *dev, struct uaol_capabilities *caps)
 Query UAOL hardware capabilities.
int uaol_get_mapped_hda_link_stream_id (const struct device *dev, int uaol_stream_id)
 Get the HDA link stream ID mapped in HW to the UAOL stream ID.

Detailed Description

Public APIs for USB Audio Offload Link (UAOL) drivers.

Function Documentation

◆ uaol_config()

int uaol_config ( const struct device * dev,
int stream,
struct uaol_config * cfg )
inlinestatic

Set UAOL individual stream configuration.

Parameters
devUAOL device instance.
streamUAOL stream index.
cfgConfiguration to be applied.
Returns
0 on success, all other values should be treated as error.

◆ uaol_get_capabilities()

int uaol_get_capabilities ( const struct device * dev,
struct uaol_capabilities * caps )
inlinestatic

Query UAOL hardware capabilities.

Parameters
devUAOL device instance.
capsCapabilities data to be returned.
Returns
0 on success, all other values should be treated as error.

◆ uaol_get_mapped_hda_link_stream_id()

int uaol_get_mapped_hda_link_stream_id ( const struct device * dev,
int uaol_stream_id )

Get the HDA link stream ID mapped in HW to the UAOL stream ID.

Can be called anytime, e.g., before the device probe.

Parameters
devUAOL device instance.
uaol_stream_idUAOL stream ID.
Returns
the HDA link stream ID on success, otherwise -1.

◆ uaol_program_ep_table()

int uaol_program_ep_table ( const struct device * dev,
int stream,
struct uaol_ep_table_entry entry,
bool valid )
inlinestatic

Program an endpoint table entry for UAOL individual stream.

Parameters
devUAOL device instance.
streamUAOL stream index.
entryData to be stored in EP table.
validFlag marking an entry as valid or invalid.
Returns
0 on success, all other values should be treated as error.

◆ uaol_start()

int uaol_start ( const struct device * dev,
int stream )
inlinestatic

Start UAOL individual stream operation.

Parameters
devUAOL device instance.
streamUAOL stream index.
Returns
0 on success, all other values should be treated as error.

◆ uaol_stop()

int uaol_stop ( const struct device * dev,
int stream )
inlinestatic

Stop UAOL individual stream operation.

Parameters
devUAOL device instance.
streamUAOL stream index.
Returns
0 on success, all other values should be treated as error.