Sound Open Firmware
Loading...
Searching...
No Matches
dma-legacy.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dma_ops

Macros

#define DMA_ATTR_BUFFER_ALIGNMENT   0
#define DMA_ATTR_COPY_ALIGNMENT   1
#define DMA_ATTR_BUFFER_ADDRESS_ALIGNMENT   2
#define DMA_ATTR_BUFFER_PERIOD_COUNT   3
#define DMA_DIR_MEM_TO_MEM   SOF_DMA_DIR_MEM_TO_MEM
#define DMA_DIR_HMEM_TO_LMEM   SOF_DMA_DIR_HMEM_TO_LMEM
#define DMA_DIR_LMEM_TO_HMEM   SOF_DMA_DIR_LMEM_TO_HMEM
#define DMA_DIR_MEM_TO_DEV   SOF_DMA_DIR_MEM_TO_DEV
#define DMA_DIR_DEV_TO_MEM   SOF_DMA_DIR_DEV_TO_MEM
#define DMA_DIR_DEV_TO_DEV   SOF_DMA_DIR_DEV_TO_DEV
#define DMA_COPY_BLOCKING   SOF_DMA_COPY_BLOCKING
#define DMA_COPY_ONE_SHOT   SOF_DMA_COPY_ONE_SHOT
#define DMA_DEV_HOST   SOF_DMA_DEV_HOST
#define DMA_ACCESS_EXCLUSIVE   SOF_DMA_ACCESS_EXCLUSIVE
#define DMA_ACCESS_SHARED   SOF_DMA_ACCESS_SHARED
#define DMA_CHAN_INVALID   SOF_DMA_CHAN_INVALID
#define DMA_CORE_INVALID   SOF_DMA_CORE_INVALID
#define dma_set_drvdata(dma, data)
#define dma_get_drvdata(dma)
#define dma_base(dma)
#define dma_irq(dma)
#define dma_irq_name(dma)
#define dma_chan_size(dma)
#define dma_chan_base(dma, chan)
#define dma_chan_get_data(chan)
#define dma_chan_set_data(chan, data)

Enumerations

enum  dma_cb_status { DMA_CB_STATUS_RELOAD = 0 , DMA_CB_STATUS_END }
enum  dma_irq_cmd { DMA_IRQ_STATUS_GET = 0 , DMA_IRQ_CLEAR , DMA_IRQ_MASK , DMA_IRQ_UNMASK }

Functions

struct dma * dma_get (uint32_t dir, uint32_t caps, uint32_t dev, uint32_t flags)
void dma_put (struct dma *dma)
static struct dma_chan_data * dma_channel_get_legacy (struct dma *dma, int req_channel)
static void dma_channel_put_legacy (struct dma_chan_data *channel)
static int dma_start_legacy (struct dma_chan_data *channel)
static int dma_stop_legacy (struct dma_chan_data *channel)
static int dma_stop_delayed_legacy (struct dma_chan_data *channel)
static int dma_copy_legacy (struct dma_chan_data *channel, int bytes, uint32_t flags)
static int dma_pause_legacy (struct dma_chan_data *channel)
static int dma_release_legacy (struct dma_chan_data *channel)
static int dma_status_legacy (struct dma_chan_data *channel, struct dma_chan_status *status, uint8_t direction)
static int dma_set_config_legacy (struct dma_chan_data *channel, struct dma_sg_config *config)
static int dma_probe_legacy (struct dma *dma)
static int dma_remove_legacy (struct dma *dma)
static int dma_get_data_size_legacy (struct dma_chan_data *channel, uint32_t *avail, uint32_t *free)
static int dma_get_attribute_legacy (struct dma *dma, uint32_t type, uint32_t *value)
static int dma_interrupt_legacy (struct dma_chan_data *channel, enum dma_irq_cmd cmd)
static uint32_t dma_reg_read (struct dma *dma, uint32_t reg)
static uint16_t dma_reg_read16 (struct dma *dma, uint32_t reg)
static void dma_reg_write (struct dma *dma, uint32_t reg, uint32_t value)
static void dma_reg_write16 (struct dma *dma, uint32_t reg, uint16_t value)
static void dma_reg_update_bits (struct dma *dma, uint32_t reg, uint32_t mask, uint32_t value)
static uint32_t dma_chan_reg_read (struct dma_chan_data *channel, uint32_t reg)
static uint16_t dma_chan_reg_read16 (struct dma_chan_data *channel, uint32_t reg)
static void dma_chan_reg_write (struct dma_chan_data *channel, uint32_t reg, uint32_t value)
static void dma_chan_reg_write16 (struct dma_chan_data *channel, uint32_t reg, uint16_t value)
static void dma_chan_reg_update_bits (struct dma_chan_data *channel, uint32_t reg, uint32_t mask, uint32_t value)
static void dma_chan_reg_update_bits16 (struct dma_chan_data *channel, uint32_t reg, uint16_t mask, uint16_t value)
int dma_copy_new (struct dma_copy *dc)
static void dma_copy_free (struct dma_copy *dc)
int dma_copy_from_host (struct dma_copy *dc, struct dma_sg_config *host_sg, int32_t host_offset, void *local_ptr, int32_t size)
int dma_copy_from_host_nowait (struct dma_copy *dc, struct dma_sg_config *host_sg, int32_t host_offset, void *local_ptr, int32_t size)
int dma_copy_to_host (struct dma_copy *dc, struct dma_sg_config *host_sg, int32_t host_offset, void *local_ptr, int32_t size)
int dma_copy_to_host_nowait (struct dma_copy *dc, struct dma_sg_config *host_sg, int32_t host_offset, void *local_ptr, int32_t size)
int dma_copy_set_stream_tag (struct dma_copy *dc, uint32_t stream_tag)

Macro Definition Documentation

◆ DMA_ACCESS_EXCLUSIVE

#define DMA_ACCESS_EXCLUSIVE   SOF_DMA_ACCESS_EXCLUSIVE

◆ DMA_ACCESS_SHARED

#define DMA_ACCESS_SHARED   SOF_DMA_ACCESS_SHARED

◆ DMA_ATTR_BUFFER_ADDRESS_ALIGNMENT

#define DMA_ATTR_BUFFER_ADDRESS_ALIGNMENT   2

◆ DMA_ATTR_BUFFER_ALIGNMENT

#define DMA_ATTR_BUFFER_ALIGNMENT   0

◆ DMA_ATTR_BUFFER_PERIOD_COUNT

#define DMA_ATTR_BUFFER_PERIOD_COUNT   3

◆ DMA_ATTR_COPY_ALIGNMENT

#define DMA_ATTR_COPY_ALIGNMENT   1

◆ dma_base

#define dma_base ( dma)
Value:
uint32_t base
Definition dma.h:195
Definition dma.h:209
struct dma_plat_data plat_data
Definition dma.h:211

◆ dma_chan_base

#define dma_chan_base ( dma,
chan )
Value:
uint32_t chan_size
Definition dma.h:199

◆ dma_chan_get_data

#define dma_chan_get_data ( chan)
Value:
((chan)->priv_data)

◆ DMA_CHAN_INVALID

#define DMA_CHAN_INVALID   SOF_DMA_CHAN_INVALID

◆ dma_chan_set_data

#define dma_chan_set_data ( chan,
data )
Value:
((chan)->priv_data = data)
uint32_t data[]
Definition debug_stream_slot.h:2

◆ dma_chan_size

#define dma_chan_size ( dma)

◆ DMA_COPY_BLOCKING

#define DMA_COPY_BLOCKING   SOF_DMA_COPY_BLOCKING

◆ DMA_COPY_ONE_SHOT

#define DMA_COPY_ONE_SHOT   SOF_DMA_COPY_ONE_SHOT

◆ DMA_CORE_INVALID

#define DMA_CORE_INVALID   SOF_DMA_CORE_INVALID

◆ DMA_DEV_HOST

#define DMA_DEV_HOST   SOF_DMA_DEV_HOST

◆ DMA_DIR_DEV_TO_DEV

#define DMA_DIR_DEV_TO_DEV   SOF_DMA_DIR_DEV_TO_DEV

◆ DMA_DIR_DEV_TO_MEM

#define DMA_DIR_DEV_TO_MEM   SOF_DMA_DIR_DEV_TO_MEM

◆ DMA_DIR_HMEM_TO_LMEM

#define DMA_DIR_HMEM_TO_LMEM   SOF_DMA_DIR_HMEM_TO_LMEM

◆ DMA_DIR_LMEM_TO_HMEM

#define DMA_DIR_LMEM_TO_HMEM   SOF_DMA_DIR_LMEM_TO_HMEM

◆ DMA_DIR_MEM_TO_DEV

#define DMA_DIR_MEM_TO_DEV   SOF_DMA_DIR_MEM_TO_DEV

◆ DMA_DIR_MEM_TO_MEM

#define DMA_DIR_MEM_TO_MEM   SOF_DMA_DIR_MEM_TO_MEM

◆ dma_get_drvdata

#define dma_get_drvdata ( dma)
Value:
void * priv_data
Definition dma.h:218

◆ dma_irq

#define dma_irq ( dma)
Value:
int irq
Definition dma.h:197

◆ dma_irq_name

#define dma_irq_name ( dma)
Value:
const char * irq_name
Definition dma.h:198

◆ dma_set_drvdata

#define dma_set_drvdata ( dma,
data )
Value:

Enumeration Type Documentation

◆ dma_cb_status

Enumerator
DMA_CB_STATUS_RELOAD 
DMA_CB_STATUS_END 

◆ dma_irq_cmd

Enumerator
DMA_IRQ_STATUS_GET 
DMA_IRQ_CLEAR 
DMA_IRQ_MASK 
DMA_IRQ_UNMASK 

Function Documentation

◆ dma_chan_reg_read()

uint32_t dma_chan_reg_read ( struct dma_chan_data * channel,
uint32_t reg )
inlinestatic

◆ dma_chan_reg_read16()

uint16_t dma_chan_reg_read16 ( struct dma_chan_data * channel,
uint32_t reg )
inlinestatic

◆ dma_chan_reg_update_bits()

void dma_chan_reg_update_bits ( struct dma_chan_data * channel,
uint32_t reg,
uint32_t mask,
uint32_t value )
inlinestatic

◆ dma_chan_reg_update_bits16()

void dma_chan_reg_update_bits16 ( struct dma_chan_data * channel,
uint32_t reg,
uint16_t mask,
uint16_t value )
inlinestatic

◆ dma_chan_reg_write()

void dma_chan_reg_write ( struct dma_chan_data * channel,
uint32_t reg,
uint32_t value )
inlinestatic

◆ dma_chan_reg_write16()

void dma_chan_reg_write16 ( struct dma_chan_data * channel,
uint32_t reg,
uint16_t value )
inlinestatic

◆ dma_channel_get_legacy()

struct dma_chan_data * dma_channel_get_legacy ( struct dma * dma,
int req_channel )
inlinestatic

◆ dma_channel_put_legacy()

void dma_channel_put_legacy ( struct dma_chan_data * channel)
inlinestatic

◆ dma_copy_free()

void dma_copy_free ( struct dma_copy * dc)
inlinestatic

◆ dma_copy_from_host()

int dma_copy_from_host ( struct dma_copy * dc,
struct dma_sg_config * host_sg,
int32_t host_offset,
void * local_ptr,
int32_t size )

◆ dma_copy_from_host_nowait()

int dma_copy_from_host_nowait ( struct dma_copy * dc,
struct dma_sg_config * host_sg,
int32_t host_offset,
void * local_ptr,
int32_t size )

◆ dma_copy_new()

int dma_copy_new ( struct dma_copy * dc)

◆ dma_copy_set_stream_tag()

int dma_copy_set_stream_tag ( struct dma_copy * dc,
uint32_t stream_tag )

◆ dma_copy_to_host()

int dma_copy_to_host ( struct dma_copy * dc,
struct dma_sg_config * host_sg,
int32_t host_offset,
void * local_ptr,
int32_t size )

◆ dma_copy_to_host_nowait()

int dma_copy_to_host_nowait ( struct dma_copy * dc,
struct dma_sg_config * host_sg,
int32_t host_offset,
void * local_ptr,
int32_t size )

◆ dma_get()

struct dma * dma_get ( uint32_t dir,
uint32_t caps,
uint32_t dev,
uint32_t flags )

◆ dma_get_attribute_legacy()

int dma_get_attribute_legacy ( struct dma * dma,
uint32_t type,
uint32_t * value )
inlinestatic

◆ dma_get_data_size_legacy()

int dma_get_data_size_legacy ( struct dma_chan_data * channel,
uint32_t * avail,
uint32_t * free )
inlinestatic

◆ dma_interrupt_legacy()

int dma_interrupt_legacy ( struct dma_chan_data * channel,
enum dma_irq_cmd cmd )
inlinestatic

◆ dma_pause_legacy()

int dma_pause_legacy ( struct dma_chan_data * channel)
inlinestatic

◆ dma_probe_legacy()

int dma_probe_legacy ( struct dma * dma)
inlinestatic

◆ dma_put()

void dma_put ( struct dma * dma)

◆ dma_reg_read()

uint32_t dma_reg_read ( struct dma * dma,
uint32_t reg )
inlinestatic

◆ dma_reg_read16()

uint16_t dma_reg_read16 ( struct dma * dma,
uint32_t reg )
inlinestatic

◆ dma_reg_update_bits()

void dma_reg_update_bits ( struct dma * dma,
uint32_t reg,
uint32_t mask,
uint32_t value )
inlinestatic

◆ dma_reg_write()

void dma_reg_write ( struct dma * dma,
uint32_t reg,
uint32_t value )
inlinestatic

◆ dma_reg_write16()

void dma_reg_write16 ( struct dma * dma,
uint32_t reg,
uint16_t value )
inlinestatic

◆ dma_release_legacy()

int dma_release_legacy ( struct dma_chan_data * channel)
inlinestatic

◆ dma_remove_legacy()

int dma_remove_legacy ( struct dma * dma)
inlinestatic

◆ dma_set_config_legacy()

int dma_set_config_legacy ( struct dma_chan_data * channel,
struct dma_sg_config * config )
inlinestatic

◆ dma_start_legacy()

int dma_start_legacy ( struct dma_chan_data * channel)
inlinestatic

◆ dma_status_legacy()

int dma_status_legacy ( struct dma_chan_data * channel,
struct dma_chan_status * status,
uint8_t direction )
inlinestatic

◆ dma_stop_delayed_legacy()

int dma_stop_delayed_legacy ( struct dma_chan_data * channel)
inlinestatic

◆ dma_stop_legacy()

int dma_stop_legacy ( struct dma_chan_data * channel)
inlinestatic