Sound Open Firmware
Loading...
Searching...
No Matches
Platform & Hardware Drivers

Digital Audio Interfaces (DAI), Direct Memory Access (DMA), and Power Management (PM) runtime. More...

Data Structures

struct  dai
 
union  hdalink_cfg
 
struct  dai_group
 DAI group information. More...
 
struct  llp_slot_info
 llp slot info for memory window More...
 
struct  dai_data
 DAI runtime data. More...
 
struct  dma_sg_elem
 Element of SG list (as array item). More...
 
struct  dma_cb_data
 Data used in DMA callbacks. More...
 
struct  dma_sg_elem_array
 SG elem array. More...
 
struct  dma_sg_config
 
struct  dma_chan_status
 
struct  dma_plat_data
 
struct  dma
 
struct  dma_chan_data
 
struct  dma_info
 
struct  dma_copy
 

Macros

#define DAI_CREAT   BIT(0)
 If the device does not exist it will be created.
 
#define SOF_DMA_DIR_MEM_TO_MEM   BIT(0)
 local memory copy
 
#define SOF_DMA_DIR_HMEM_TO_LMEM   BIT(1)
 host memory to local mem copy
 
#define SOF_DMA_DIR_LMEM_TO_HMEM   BIT(2)
 local mem to host mem copy
 
#define SOF_DMA_DIR_MEM_TO_DEV   BIT(3)
 local mem to dev copy
 
#define SOF_DMA_DIR_DEV_TO_MEM   BIT(4)
 dev to local mem copy
 
#define SOF_DMA_DIR_DEV_TO_DEV   BIT(5)
 dev to dev copy
 
#define SOF_DMA_CAP_HDA   BIT(0)
 HDA DMA.
 
#define SOF_DMA_CAP_GP_LP   BIT(1)
 GP LP DMA.
 
#define SOF_DMA_CAP_GP_HP   BIT(2)
 GP HP DMA.
 
#define SOF_DMA_CAP_BT   BIT(3)
 BT DMA.
 
#define SOF_DMA_CAP_SP   BIT(4)
 SP DMA.
 
#define SOF_DMA_CAP_DMIC   BIT(5)
 ACP DMA DMIC >
 
#define SOF_DMA_CAP_SP_VIRTUAL   BIT(6)
 SP VIRTUAL DMA.
 
#define SOF_DMA_CAP_HS_VIRTUAL   BIT(7)
 HS VIRTUAL DMA.
 
#define SOF_DMA_CAP_HS   BIT(8)
 HS DMA.
 
#define SOF_DMA_CAP_SW   BIT(9)
 SW DMA.
 
#define SOF_DMA_CAP_TDM   BIT(10)
 connectable to ACP TDM I2S
 
#define SOF_DMA_DEV_HOST   BIT(0)
 connectable to host
 
#define SOF_DMA_DEV_HDA   BIT(1)
 connectable to HD/A link
 
#define SOF_DMA_DEV_SSP   BIT(2)
 connectable to SSP fifo
 
#define SOF_DMA_DEV_DMIC   BIT(3)
 connectable to DMIC fifo
 
#define SOF_DMA_DEV_SSI   BIT(4)
 connectable to SSI / SPI fifo
 
#define SOF_DMA_DEV_ALH   BIT(5)
 connectable to ALH link
 
#define SOF_DMA_DEV_SAI   BIT(6)
 connectable to SAI fifo
 
#define SOF_DMA_DEV_ESAI   BIT(7)
 connectable to ESAI fifo
 
#define SOF_DMA_DEV_BT   BIT(8)
 connectable to ACP BT I2S
 
#define SOF_DMA_DEV_SP   BIT(9)
 connectable to ACP SP I2S
 
#define SOF_DMA_DEV_AFE_MEMIF   BIT(10)
 connectable to AFE fifo
 
#define SOF_DMA_DEV_SP_VIRTUAL   BIT(11)
 connectable to ACP SP VIRTUAL I2S
 
#define SOF_DMA_DEV_HS_VIRTUAL   BIT(12)
 connectable to ACP HS VIRTUAL I2S
 
#define SOF_DMA_DEV_HS   BIT(13)
 connectable to ACP HS I2S
 
#define SOF_DMA_DEV_MICFIL   BIT(14)
 connectable to MICFIL fifo
 
#define SOF_DMA_DEV_SW   BIT(15)
 connectable to ACP SW
 
#define SOF_DMA_DEV_TDM   BIT(16)
 connectable to ACP TDM I2S
 
#define SOF_DMA_ACCESS_EXCLUSIVE   1
 
#define SOF_DMA_ACCESS_SHARED   0
 
#define SOF_DMA_COPY_BLOCKING   BIT(0)
 
#define SOF_DMA_COPY_ONE_SHOT   BIT(1)
 
#define SOF_DMA_CHAN_INVALID   0xFFFFFFFF
 
#define SOF_DMA_CORE_INVALID   0xFFFFFFFF
 

Typedefs

typedef int(* channel_copy_func) (const struct audio_stream *src, unsigned int src_channel, struct audio_stream *dst, unsigned int dst_channel, unsigned int frames)
 
typedef int(* dma_process_func) (const struct cir_buf_source *source, uint32_t src_channels, struct cir_buf_sink *sink, uint32_t sink_channels, size_t source_samples, uint32_t chmap)
 

Enumerations

enum  sof_dma_cb_status { SOF_DMA_CB_STATUS_RELOAD = 0 , SOF_DMA_CB_STATUS_END }
 
enum  pm_runtime_context { PM_RUNTIME_DSP }
 Runtime power management context. More...
 

Functions

static void dai_write (struct dai *dai, uint32_t reg, uint32_t value)
 Write a 32-bit register on the specified DAI controller.
 
static uint32_t dai_read (struct dai *dai, uint32_t reg)
 Read a 32-bit register from the specified DAI controller.
 
static void dai_update_bits (struct dai *dai, uint32_t reg, uint32_t mask, uint32_t value)
 Read-modify-write bit fields of a DAI register.
 
struct dai_group * dai_group_get (uint32_t group_id, uint32_t flags)
 API to request DAI group.
 
void dai_group_put (struct dai_group *group)
 API to release DAI group.
 
static int dai_init (struct sof *sof)
 API to initialize a platform DAI.
 
struct dai * dai_get (uint32_t type, uint32_t index, uint32_t flags)
 API to request a platform DAI.
 
void dai_put (struct dai *dai)
 API to release a platform DAI.
 
int dai_set_config (struct dai *dai, struct ipc_config_dai *config, const void *spec_config, size_t size)
 Digital Audio interface formatting.
 
int dai_get_handshake (struct dai *dai, int direction, int stream_id)
 Get Digital Audio interface DMA Handshake.
 
int dai_get_fifo_depth (struct dai *dai, int direction)
 Get Digital Audio interface fifo depth.
 
uint32_t dai_get_init_delay_ms (struct dai *dai)
 Get DAI initial delay in milliseconds.
 
int dai_get_stream_id (struct dai *dai, int direction)
 Get DAI stream id.
 
int dai_config_dma_channel (struct dai_data *dd, struct comp_dev *dev, const void *config)
 Configure DMA channel for DAI.
 
void dai_set_link_hda_config (uint16_t *link_config, struct ipc_config_dai *common_config, const void *spec_config)
 Configure HD Audio DMA params for DAI.
 
void dai_dma_release (struct dai_data *dd, struct comp_dev *dev)
 Reset DAI DMA config.
 
int dai_config (struct dai_data *dd, struct comp_dev *dev, struct ipc_config_dai *common_cfg, const void *spec_cfg)
 Configure DAI physical interface.
 
int dai_assign_group (struct dai_data *dd, struct comp_dev *dev, uint32_t group_id)
 Assign DAI to a group for simultaneous triggering.
 
int dai_position (struct comp_dev *dev, struct sof_ipc_stream_posn *posn)
 dai position for host driver.
 
void dai_dma_position_update (struct dai_data *dd, struct comp_dev *dev)
 update dai dma position for host driver.
 
void dai_release_llp_slot (struct dai_data *dd)
 release llp slot
 
const struct device * dai_get_device (enum sof_ipc_dai_type type, uint32_t index)
 Retrieve a pointer to the Zephyr device structure for a DAI of a given type and index.
 
const struct device ** dai_get_device_list (size_t *count)
 Retrieve the list of all DAI devices.
 
int platform_boot_complete (uint32_t boot_message)
 Platform specific implementation of the On Boot Complete handler.
 
int platform_init (struct sof *sof)
 Platform initialization entry, called during FW initialization.
 
int platform_context_save (struct sof *sof)
 Platform specific context saving routine, called during DSP suspending.
 
int dmac_init (struct sof *sof)
 API to initialize a platform DMA controllers.
 
static void dma_sg_init (struct dma_sg_elem_array *ea)
 
int dma_sg_alloc (struct k_heap *heap, struct dma_sg_elem_array *ea, uint32_t flags, uint32_t direction, uint32_t buffer_count, uint32_t buffer_bytes, uintptr_t dma_buffer_addr, uintptr_t external_addr)
 
void dma_sg_free (struct k_heap *heap, struct dma_sg_elem_array *ea)
 
static uint32_t dma_sg_get_size (struct dma_sg_elem_array *ea)
 Get the total size of SG buffer.
 
int dma_buffer_copy_from (struct comp_buffer *source, struct comp_buffer *sink, dma_process_func process, uint32_t source_bytes, uint32_t chmap)
 
int stream_copy_from_no_consume (struct comp_dev *dev, struct comp_buffer *source, struct comp_buffer *sink, dma_process_func process, uint32_t source_bytes, uint32_t chmap)
 
int dma_buffer_copy_to (struct comp_buffer *source, struct comp_buffer *sink, dma_process_func process, uint32_t sink_bytes, uint32_t chmap)
 
static const struct dma_info * dma_info_get (void)
 
static void pm_runtime_init (struct sof *sof)
 Initializes runtime power management.
 
void pm_runtime_get (enum pm_runtime_context context, uint32_t index)
 Retrieves power management resource (async).
 
static void pm_runtime_get_sync (enum pm_runtime_context context, uint32_t index)
 Retrieves power management resource.
 
void pm_runtime_put (enum pm_runtime_context context, uint32_t index)
 Releases power management resource (async).
 
static void pm_runtime_put_sync (enum pm_runtime_context context, uint32_t index)
 Releases power management resource.
 
void pm_runtime_enable (enum pm_runtime_context context, uint32_t index)
 Enables power management operations for the resource.
 
void pm_runtime_disable (enum pm_runtime_context context, uint32_t index)
 Disables power management operations for the resource.
 
bool pm_runtime_is_active (enum pm_runtime_context context, uint32_t index)
 Reports state of the power managed resource.
 
static void platform_pm_runtime_prepare_d0ix_en (uint32_t index)
 Prepare platform hardware and power gating for D0ix idle entry.
 

Detailed Description

Digital Audio Interfaces (DAI), Direct Memory Access (DMA), and Power Management (PM) runtime.

SOF PM runtime specification mapping for Zephyr builds.

SOF DMA Drivers API specification (deprecated interface, to be replaced by Zephyr zephyr/drivers/dma.h interface).

Platform API specification.

DAI Drivers API specification.

This interface is considered deprecated and native Zephyr interfaces should be used instead.

Macro Definition Documentation

◆ DAI_CREAT

#define DAI_CREAT   BIT(0)

If the device does not exist it will be created.

◆ SOF_DMA_ACCESS_EXCLUSIVE

#define SOF_DMA_ACCESS_EXCLUSIVE   1

◆ SOF_DMA_ACCESS_SHARED

#define SOF_DMA_ACCESS_SHARED   0

◆ SOF_DMA_CAP_BT

#define SOF_DMA_CAP_BT   BIT(3)

BT DMA.

◆ SOF_DMA_CAP_DMIC

#define SOF_DMA_CAP_DMIC   BIT(5)

ACP DMA DMIC >

◆ SOF_DMA_CAP_GP_HP

#define SOF_DMA_CAP_GP_HP   BIT(2)

GP HP DMA.

◆ SOF_DMA_CAP_GP_LP

#define SOF_DMA_CAP_GP_LP   BIT(1)

GP LP DMA.

◆ SOF_DMA_CAP_HDA

#define SOF_DMA_CAP_HDA   BIT(0)

HDA DMA.

◆ SOF_DMA_CAP_HS

#define SOF_DMA_CAP_HS   BIT(8)

HS DMA.

◆ SOF_DMA_CAP_HS_VIRTUAL

#define SOF_DMA_CAP_HS_VIRTUAL   BIT(7)

HS VIRTUAL DMA.

◆ SOF_DMA_CAP_SP

#define SOF_DMA_CAP_SP   BIT(4)

SP DMA.

◆ SOF_DMA_CAP_SP_VIRTUAL

#define SOF_DMA_CAP_SP_VIRTUAL   BIT(6)

SP VIRTUAL DMA.

◆ SOF_DMA_CAP_SW

#define SOF_DMA_CAP_SW   BIT(9)

SW DMA.

◆ SOF_DMA_CAP_TDM

#define SOF_DMA_CAP_TDM   BIT(10)

connectable to ACP TDM I2S

◆ SOF_DMA_CHAN_INVALID

#define SOF_DMA_CHAN_INVALID   0xFFFFFFFF

◆ SOF_DMA_COPY_BLOCKING

#define SOF_DMA_COPY_BLOCKING   BIT(0)

◆ SOF_DMA_COPY_ONE_SHOT

#define SOF_DMA_COPY_ONE_SHOT   BIT(1)

◆ SOF_DMA_CORE_INVALID

#define SOF_DMA_CORE_INVALID   0xFFFFFFFF

◆ SOF_DMA_DEV_AFE_MEMIF

#define SOF_DMA_DEV_AFE_MEMIF   BIT(10)

connectable to AFE fifo

◆ SOF_DMA_DEV_ALH

#define SOF_DMA_DEV_ALH   BIT(5)

connectable to ALH link

◆ SOF_DMA_DEV_BT

#define SOF_DMA_DEV_BT   BIT(8)

connectable to ACP BT I2S

◆ SOF_DMA_DEV_DMIC

#define SOF_DMA_DEV_DMIC   BIT(3)

connectable to DMIC fifo

◆ SOF_DMA_DEV_ESAI

#define SOF_DMA_DEV_ESAI   BIT(7)

connectable to ESAI fifo

◆ SOF_DMA_DEV_HDA

#define SOF_DMA_DEV_HDA   BIT(1)

connectable to HD/A link

◆ SOF_DMA_DEV_HOST

#define SOF_DMA_DEV_HOST   BIT(0)

connectable to host

◆ SOF_DMA_DEV_HS

#define SOF_DMA_DEV_HS   BIT(13)

connectable to ACP HS I2S

◆ SOF_DMA_DEV_HS_VIRTUAL

#define SOF_DMA_DEV_HS_VIRTUAL   BIT(12)

connectable to ACP HS VIRTUAL I2S

◆ SOF_DMA_DEV_MICFIL

#define SOF_DMA_DEV_MICFIL   BIT(14)

connectable to MICFIL fifo

◆ SOF_DMA_DEV_SAI

#define SOF_DMA_DEV_SAI   BIT(6)

connectable to SAI fifo

◆ SOF_DMA_DEV_SP

#define SOF_DMA_DEV_SP   BIT(9)

connectable to ACP SP I2S

◆ SOF_DMA_DEV_SP_VIRTUAL

#define SOF_DMA_DEV_SP_VIRTUAL   BIT(11)

connectable to ACP SP VIRTUAL I2S

◆ SOF_DMA_DEV_SSI

#define SOF_DMA_DEV_SSI   BIT(4)

connectable to SSI / SPI fifo

◆ SOF_DMA_DEV_SSP

#define SOF_DMA_DEV_SSP   BIT(2)

connectable to SSP fifo

◆ SOF_DMA_DEV_SW

#define SOF_DMA_DEV_SW   BIT(15)

connectable to ACP SW

◆ SOF_DMA_DEV_TDM

#define SOF_DMA_DEV_TDM   BIT(16)

connectable to ACP TDM I2S

◆ SOF_DMA_DIR_DEV_TO_DEV

#define SOF_DMA_DIR_DEV_TO_DEV   BIT(5)

dev to dev copy

◆ SOF_DMA_DIR_DEV_TO_MEM

#define SOF_DMA_DIR_DEV_TO_MEM   BIT(4)

dev to local mem copy

◆ SOF_DMA_DIR_HMEM_TO_LMEM

#define SOF_DMA_DIR_HMEM_TO_LMEM   BIT(1)

host memory to local mem copy

◆ SOF_DMA_DIR_LMEM_TO_HMEM

#define SOF_DMA_DIR_LMEM_TO_HMEM   BIT(2)

local mem to host mem copy

◆ SOF_DMA_DIR_MEM_TO_DEV

#define SOF_DMA_DIR_MEM_TO_DEV   BIT(3)

local mem to dev copy

◆ SOF_DMA_DIR_MEM_TO_MEM

#define SOF_DMA_DIR_MEM_TO_MEM   BIT(0)

local memory copy

Typedef Documentation

◆ channel_copy_func

typedef int(* channel_copy_func) (const struct audio_stream *src, unsigned int src_channel, struct audio_stream *dst, unsigned int dst_channel, unsigned int frames)

◆ dma_process_func

typedef int(* dma_process_func) (const struct cir_buf_source *source, uint32_t src_channels, struct cir_buf_sink *sink, uint32_t sink_channels, size_t source_samples, uint32_t chmap)

Enumeration Type Documentation

◆ pm_runtime_context

Runtime power management context.

Enumerator
PM_RUNTIME_DSP 

DSP.

◆ sof_dma_cb_status

Enumerator
SOF_DMA_CB_STATUS_RELOAD 
SOF_DMA_CB_STATUS_END 

Function Documentation

◆ dai_assign_group()

int dai_assign_group ( struct dai_data *  dd,
struct comp_dev *  dev,
uint32_t  group_id 
)

Assign DAI to a group for simultaneous triggering.

◆ dai_config()

int dai_config ( struct dai_data *  dd,
struct comp_dev *  dev,
struct ipc_config_dai *  common_cfg,
const void *  spec_cfg 
)

Configure DAI physical interface.

◆ dai_config_dma_channel()

int dai_config_dma_channel ( struct dai_data *  dd,
struct comp_dev *  dev,
const void *  config 
)

Configure DMA channel for DAI.

◆ dai_dma_position_update()

void dai_dma_position_update ( struct dai_data *  dd,
struct comp_dev *  dev 
)

update dai dma position for host driver.

◆ dai_dma_release()

void dai_dma_release ( struct dai_data *  dd,
struct comp_dev *  dev 
)

Reset DAI DMA config.

◆ dai_get()

struct dai * dai_get ( uint32_t  type,
uint32_t  index,
uint32_t  flags 
)

API to request a platform DAI.

Parameters
[in]typeType of requested DAI.
[in]indexIndex of requested DAI.
[in]flagsFlags (CREATE)

◆ dai_get_device()

const struct device * dai_get_device ( enum sof_ipc_dai_type  type,
uint32_t  index 
)

Retrieve a pointer to the Zephyr device structure for a DAI of a given type and index.

◆ dai_get_device_list()

const struct device ** dai_get_device_list ( size_t *  count)

Retrieve the list of all DAI devices.

Parameters
countPointer to store the number of devices in the list.
Returns
Pointer to the array of device pointers.

◆ dai_get_fifo_depth()

int dai_get_fifo_depth ( struct dai *  dai,
int  direction 
)

Get Digital Audio interface fifo depth.

◆ dai_get_handshake()

int dai_get_handshake ( struct dai *  dai,
int  direction,
int  stream_id 
)

Get Digital Audio interface DMA Handshake.

◆ dai_get_init_delay_ms()

uint32_t dai_get_init_delay_ms ( struct dai *  dai)

Get DAI initial delay in milliseconds.

◆ dai_get_stream_id()

int dai_get_stream_id ( struct dai *  dai,
int  direction 
)

Get DAI stream id.

◆ dai_group_get()

struct dai_group * dai_group_get ( uint32_t  group_id,
uint32_t  flags 
)

API to request DAI group.

Returns a DAI group for the given ID and increments the counter of DAIs in the group.

If a group for the given ID doesn't exist, it will either return NULL or allocate a new group structure if the CREATE flag is supplied.

Parameters
[in]group_idGroup ID
[in]flagsFlags (CREATE)

◆ dai_group_put()

void dai_group_put ( struct dai_group *  group)

API to release DAI group.

Decrements the DAI counter inside the group.

Parameters
[in]groupGroup

◆ dai_init()

static int dai_init ( struct sof *  sof)
inlinestatic

API to initialize a platform DAI.

Parameters
[in]sofPointer to firmware main context.

◆ dai_position()

int dai_position ( struct comp_dev *  dev,
struct sof_ipc_stream_posn *  posn 
)

dai position for host driver.

◆ dai_put()

void dai_put ( struct dai *  dai)

API to release a platform DAI.

Parameters
[in]daiDAI to relese.

◆ dai_read()

static uint32_t dai_read ( struct dai *  dai,
uint32_t  reg 
)
inlinestatic

Read a 32-bit register from the specified DAI controller.

Parameters
daiPointer to DAI device descriptor.
regRegister offset.
Returns
32-bit register value.

◆ dai_release_llp_slot()

void dai_release_llp_slot ( struct dai_data *  dd)

release llp slot

◆ dai_set_config()

int dai_set_config ( struct dai *  dai,
struct ipc_config_dai *  config,
const void *  spec_config,
size_t  size 
)

Digital Audio interface formatting.

◆ dai_set_link_hda_config()

void dai_set_link_hda_config ( uint16_t *  link_config,
struct ipc_config_dai *  common_config,
const void *  spec_config 
)

Configure HD Audio DMA params for DAI.

◆ dai_update_bits()

static void dai_update_bits ( struct dai *  dai,
uint32_t  reg,
uint32_t  mask,
uint32_t  value 
)
inlinestatic

Read-modify-write bit fields of a DAI register.

Parameters
daiPointer to DAI device descriptor.
regRegister offset.
maskBitmask of fields to modify.
valueNew bit values to set within mask.

◆ dai_write()

static void dai_write ( struct dai *  dai,
uint32_t  reg,
uint32_t  value 
)
inlinestatic

Write a 32-bit register on the specified DAI controller.

Parameters
daiPointer to DAI device descriptor.
regRegister offset.
value32-bit value to write.

◆ dma_buffer_copy_from()

int dma_buffer_copy_from ( struct comp_buffer *  source,
struct comp_buffer *  sink,
dma_process_func  process,
uint32_t  source_bytes,
uint32_t  chmap 
)

◆ dma_buffer_copy_to()

int dma_buffer_copy_to ( struct comp_buffer *  source,
struct comp_buffer *  sink,
dma_process_func  process,
uint32_t  sink_bytes,
uint32_t  chmap 
)

◆ dma_info_get()

static const struct dma_info * dma_info_get ( void  )
inlinestatic

◆ dma_sg_alloc()

int dma_sg_alloc ( struct k_heap *  heap,
struct dma_sg_elem_array *  ea,
uint32_t  flags,
uint32_t  direction,
uint32_t  buffer_count,
uint32_t  buffer_bytes,
uintptr_t  dma_buffer_addr,
uintptr_t  external_addr 
)

◆ dma_sg_free()

void dma_sg_free ( struct k_heap *  heap,
struct dma_sg_elem_array *  ea 
)

◆ dma_sg_get_size()

static uint32_t dma_sg_get_size ( struct dma_sg_elem_array *  ea)
inlinestatic

Get the total size of SG buffer.

Parameters
eaArray of SG elements.
Returns
Size of the buffer.

◆ dma_sg_init()

static void dma_sg_init ( struct dma_sg_elem_array *  ea)
inlinestatic

◆ dmac_init()

int dmac_init ( struct sof *  sof)

API to initialize a platform DMA controllers.

Parameters
[in]sofPointer to firmware main context.

◆ platform_boot_complete()

int platform_boot_complete ( uint32_t  boot_message)

Platform specific implementation of the On Boot Complete handler.

Parameters
[in]boot_messageBoot status code.
Returns
0 if successful, error code otherwise.

◆ platform_context_save()

int platform_context_save ( struct sof *  sof)

Platform specific context saving routine, called during DSP suspending.

Parameters
[in]sofContext.
Returns
0 if successful, error code otherwise.

◆ platform_init()

int platform_init ( struct sof *  sof)

Platform initialization entry, called during FW initialization.

Parameters
[in]sofContext.
Returns
0 if successful, error code otherwise.

◆ platform_pm_runtime_prepare_d0ix_en()

static void platform_pm_runtime_prepare_d0ix_en ( uint32_t  index)
inlinestatic

Prepare platform hardware and power gating for D0ix idle entry.

Parameters
indexIndex or context identifier for the target power-managed domain.

◆ pm_runtime_disable()

void pm_runtime_disable ( enum pm_runtime_context  context,
uint32_t  index 
)

Disables power management operations for the resource.

Parameters
[in]contextType of power management context.
[in]indexIndex of the device.

◆ pm_runtime_enable()

void pm_runtime_enable ( enum pm_runtime_context  context,
uint32_t  index 
)

Enables power management operations for the resource.

Parameters
[in]contextType of power management context.
[in]indexIndex of the device.

◆ pm_runtime_get()

void pm_runtime_get ( enum pm_runtime_context  context,
uint32_t  index 
)

Retrieves power management resource (async).

Parameters
[in]contextType of power management context.
[in]indexIndex of the device.

◆ pm_runtime_get_sync()

static void pm_runtime_get_sync ( enum pm_runtime_context  context,
uint32_t  index 
)
inlinestatic

Retrieves power management resource.

Parameters
[in]contextType of power management context.
[in]indexIndex of the device.

◆ pm_runtime_init()

static void pm_runtime_init ( struct sof *  sof)
inlinestatic

Initializes runtime power management.

◆ pm_runtime_is_active()

bool pm_runtime_is_active ( enum pm_runtime_context  context,
uint32_t  index 
)

Reports state of the power managed resource.

Parameters
contextType of power management context.
indexIndex of the resource.
Returns
true if the resource is active or pm disabled, false otherwise.

◆ pm_runtime_put()

void pm_runtime_put ( enum pm_runtime_context  context,
uint32_t  index 
)

Releases power management resource (async).

Parameters
[in]contextType of power management context.
[in]indexIndex of the device.

◆ pm_runtime_put_sync()

static void pm_runtime_put_sync ( enum pm_runtime_context  context,
uint32_t  index 
)
inlinestatic

Releases power management resource.

Parameters
[in]contextType of power management context.
[in]indexIndex of the device.

◆ stream_copy_from_no_consume()

int stream_copy_from_no_consume ( struct comp_dev *  dev,
struct comp_buffer *  source,
struct comp_buffer *  sink,
dma_process_func  process,
uint32_t  source_bytes,
uint32_t  chmap 
)