AAX SDK  2.4.1
Avid Audio Extensions Development Kit
List of all members | Public Types | Public Member Functions
AAX_IDma Class Referenceabstract

#include <AAX_IDma.h>

Description

Cross-platform interface for access to the host's direct memory access (DMA) facilities.

:Implemented by the AAX Host:

This interface is provided via a DMA port in the plug-in's algorithm context.

See also
AAX_IComponentDescriptor::AddDmaInstance()
Direct Memory Access

Public Types

enum  EState {
  eState_Error = -1 ,
  eState_Init = 0 ,
  eState_Running = 1 ,
  eState_Complete = 2 ,
  eState_Pending = 3
}
 
enum  EMode {
  eMode_Error = -1 ,
  eMode_Burst = 6 ,
  eMode_Gather = 10 ,
  eMode_Scatter = 11
}
 DMA mode IDs. More...
 

Public Member Functions

virtual ~AAX_IDma ()
 
Basic DMA operation
virtual AAX_Result AAX_DMA_API PostRequest ()=0
 Posts the transfer request to the DMA server. More...
 
virtual int32_t AAX_DMA_API IsTransferComplete ()=0
 Query whether a transfer has completed. More...
 
virtual AAX_Result AAX_DMA_API SetDmaState (EState iState)=0
 Sets the DMA State. More...
 
virtual EState AAX_DMA_API GetDmaState () const =0
 Inquire to find the state of the DMA instance. More...
 
virtual EMode AAX_DMA_API GetDmaMode () const =0
 Inquire to find the mode of the DMA instance. More...
 
Methods for Burst operation

Use these methods in conjunction with AAX_IDma::eMode_Burst

virtual AAX_Result AAX_DMA_API SetSrc (int8_t *iSrc)=0
 Sets the address of the source buffer. More...
 
virtual int8_t *AAX_DMA_API GetSrc ()=0
 Gets the address of the source buffer. More...
 
virtual AAX_Result AAX_DMA_API SetDst (int8_t *iDst)=0
 Sets the address of the destination buffer. More...
 
virtual int8_t *AAX_DMA_API GetDst ()=0
 Gets the address of the destination buffer. More...
 
virtual AAX_Result AAX_DMA_API SetBurstLength (int32_t iBurstLengthBytes)=0
 Sets the length of each burst. More...
 
virtual int32_t AAX_DMA_API GetBurstLength ()=0
 Gets the length of each burst. More...
 
virtual AAX_Result AAX_DMA_API SetNumBursts (int32_t iNumBursts)=0
 Sets the number of bursts to perform before giving up priority to other DMA transfers. More...
 
virtual int32_t AAX_DMA_API GetNumBursts ()=0
 Gets the number of bursts to perform before giving up priority to other DMA transfers. More...
 
virtual AAX_Result AAX_DMA_API SetTransferSize (int32_t iTransferSizeBytes)=0
 Sets the size of the whole transfer. More...
 
virtual int32_t AAX_DMA_API GetTransferSize ()=0
 Gets the size of the whole transfer, in Bytes. More...
 
Methods for Scatter and Gather operation

Use these methods in conjunction with AAX_IDma::eMode_Scatter and AAX_IDma::eMode_Gather

virtual AAX_Result AAX_DMA_API SetFifoBuffer (int8_t *iFifoBase)=0
 Sets the address of the FIFO buffer for the DMA transfer (usually the external memory block) More...
 
virtual int8_t *AAX_DMA_API GetFifoBuffer ()=0
 Gets the address of the FIFO buffer for the DMA transfer. More...
 
virtual AAX_Result AAX_DMA_API SetLinearBuffer (int8_t *iLinearBase)=0
 Sets the address of the linear buffer for the DMA transfer (usually the internal memory block) More...
 
virtual int8_t *AAX_DMA_API GetLinearBuffer ()=0
 Gets the address of the linear buffer for the DMA transfer. More...
 
virtual AAX_Result AAX_DMA_API SetOffsetTable (const int32_t *iOffsetTable)=0
 Sets the offset table for the DMA transfer. More...
 
virtual const int32_t *AAX_DMA_API GetOffsetTable ()=0
 Gets the offset table for the DMA transfer. More...
 
virtual AAX_Result AAX_DMA_API SetNumOffsets (int32_t iNumOffsets)=0
 Sets the number of offets in the offset table. More...
 
virtual int32_t AAX_DMA_API GetNumOffsets ()=0
 Gets the number of offets in the offset table. More...
 
virtual AAX_Result AAX_DMA_API SetBaseOffset (int32_t iBaseOffsetBytes)=0
 Sets the relative base offset into the FIFO where transfers will begin. More...
 
virtual int32_t AAX_DMA_API GetBaseOffset ()=0
 Gets the relative base offset into the FIFO where transfers will begin. More...
 
virtual AAX_Result AAX_DMA_API SetFifoSize (int32_t iSizeBytes)=0
 Sets the size of the FIFO buffer, in bytes. More...
 
virtual int32_t AAX_DMA_API GetFifoSize ()=0
 Gets the size of the FIFO buffer, in bytes. More...
 

Member Enumeration Documentation

◆ EState

Enumerator
eState_Error 
eState_Init 
eState_Running 
eState_Complete 
eState_Pending 

◆ EMode

DMA mode IDs.

These IDs are used to bind DMA context fields to a particular DMA mode when describing the fields with AAX_IComponentDescriptor::AddDmaInstance()

Enumerator
eMode_Error 
eMode_Burst 

Burst mode (uncommon)

eMode_Gather 

Gather mode.

eMode_Scatter 

Scatter mode.

Constructor & Destructor Documentation

◆ ~AAX_IDma()

virtual AAX_IDma::~AAX_IDma ( )
inlinevirtual

Member Function Documentation

◆ PostRequest()

virtual AAX_Result AAX_DMA_API AAX_IDma::PostRequest ( )
pure virtual

Posts the transfer request to the DMA server.

Note
Whichever mode this method is called on first will be the first mode to start transferring. Most plug-ins should therefore call this method for their Scatter DMA fields before their Gather DMA fields so that the scattered data is available as quickly as possible for future gathers.
Returns
AAX_SUCCESS on success

◆ IsTransferComplete()

virtual int32_t AAX_DMA_API AAX_IDma::IsTransferComplete ( )
pure virtual

Query whether a transfer has completed.

A return value of false indicates an error, and that the DMA missed its cycle count deadline

Note
This function should not be used for polling within a Process loop! Instead, it can be used as a test for DMA failure. This test is usually performed via a Debug-only assert.
Todo:
Clarify return value meaning – ambiguity in documentation
Returns
true if all pending transfers are complete
false if pending transfers are not complete

◆ SetDmaState()

virtual AAX_Result AAX_DMA_API AAX_IDma::SetDmaState ( EState  iState)
pure virtual

Sets the DMA State.

Note
This method is part of the host interface and should not be used by plug-ins
Returns
AAX_SUCCESS on success

◆ GetDmaState()

virtual EState AAX_DMA_API AAX_IDma::GetDmaState ( ) const
pure virtual

Inquire to find the state of the DMA instance.

◆ GetDmaMode()

virtual EMode AAX_DMA_API AAX_IDma::GetDmaMode ( ) const
pure virtual

Inquire to find the mode of the DMA instance.

This value does not change, so there is no setter.

◆ SetSrc()

virtual AAX_Result AAX_DMA_API AAX_IDma::SetSrc ( int8_t *  iSrc)
pure virtual

Sets the address of the source buffer.

Parameters
[in]iSrcAddress of the location in the source buffer where the read transfer should begin
Returns
AAX_SUCCESS on success

◆ GetSrc()

virtual int8_t* AAX_DMA_API AAX_IDma::GetSrc ( )
pure virtual

Gets the address of the source buffer.

◆ SetDst()

virtual AAX_Result AAX_DMA_API AAX_IDma::SetDst ( int8_t *  iDst)
pure virtual

Sets the address of the destination buffer.

Parameters
[in]iDstAddress of the location in the destination buffer where the write transfer should begin
Returns
AAX_SUCCESS on success

◆ GetDst()

virtual int8_t* AAX_DMA_API AAX_IDma::GetDst ( )
pure virtual

Gets the address of the destination buffer.

◆ SetBurstLength()

virtual AAX_Result AAX_DMA_API AAX_IDma::SetBurstLength ( int32_t  iBurstLengthBytes)
pure virtual

Sets the length of each burst.

Note
Burst length must be between 1 and 64 Bytes, inclusive
64-Byte transfers are recommended for the fastest overall transfer speed
Returns
AAX_SUCCESS on success

◆ GetBurstLength()

virtual int32_t AAX_DMA_API AAX_IDma::GetBurstLength ( )
pure virtual

Gets the length of each burst.

◆ SetNumBursts()

virtual AAX_Result AAX_DMA_API AAX_IDma::SetNumBursts ( int32_t  iNumBursts)
pure virtual

Sets the number of bursts to perform before giving up priority to other DMA transfers.

Valid values are 1, 2, 4, or 16.

The full transmission may be broken up into several series of bursts, and thus the total size of the data being transferred is not bounded by the number of bursts times the burst length.

Parameters
[in]iNumBurstsThe number of bursts
Returns
AAX_SUCCESS on success

◆ GetNumBursts()

virtual int32_t AAX_DMA_API AAX_IDma::GetNumBursts ( )
pure virtual

Gets the number of bursts to perform before giving up priority to other DMA transfers.

◆ SetTransferSize()

virtual AAX_Result AAX_DMA_API AAX_IDma::SetTransferSize ( int32_t  iTransferSizeBytes)
pure virtual

Sets the size of the whole transfer.

Parameters
[in]iTransferSizeBytesThe transfer size, in Bytes
Returns
AAX_SUCCESS on success

◆ GetTransferSize()

virtual int32_t AAX_DMA_API AAX_IDma::GetTransferSize ( )
pure virtual

Gets the size of the whole transfer, in Bytes.

◆ SetFifoBuffer()

virtual AAX_Result AAX_DMA_API AAX_IDma::SetFifoBuffer ( int8_t *  iFifoBase)
pure virtual

Sets the address of the FIFO buffer for the DMA transfer (usually the external memory block)

Returns
AAX_SUCCESS on success

◆ GetFifoBuffer()

virtual int8_t* AAX_DMA_API AAX_IDma::GetFifoBuffer ( )
pure virtual

Gets the address of the FIFO buffer for the DMA transfer.

◆ SetLinearBuffer()

virtual AAX_Result AAX_DMA_API AAX_IDma::SetLinearBuffer ( int8_t *  iLinearBase)
pure virtual

Sets the address of the linear buffer for the DMA transfer (usually the internal memory block)

Returns
AAX_SUCCESS on success

◆ GetLinearBuffer()

virtual int8_t* AAX_DMA_API AAX_IDma::GetLinearBuffer ( )
pure virtual

Gets the address of the linear buffer for the DMA transfer.

◆ SetOffsetTable()

virtual AAX_Result AAX_DMA_API AAX_IDma::SetOffsetTable ( const int32_t *  iOffsetTable)
pure virtual

Sets the offset table for the DMA transfer.

The offset table provides a list of Byte-aligned memory offsets into the FIFO buffer. The transfer will be broken into a series of individual bursts, each beginning at the specified offset locations within the FIFO buffer. The size of each burst is set by SetBurstLength().

See also
AAX_IDma::SetNumOffsets()
AAX_IDma::SetBaseOffset()
Returns
AAX_SUCCESS on success

◆ GetOffsetTable()

virtual const int32_t* AAX_DMA_API AAX_IDma::GetOffsetTable ( )
pure virtual

Gets the offset table for the DMA transfer.

◆ SetNumOffsets()

virtual AAX_Result AAX_DMA_API AAX_IDma::SetNumOffsets ( int32_t  iNumOffsets)
pure virtual

Sets the number of offets in the offset table.

See also
AAX_IDma::SetOffsetTable()
Returns
AAX_SUCCESS on success

◆ GetNumOffsets()

virtual int32_t AAX_DMA_API AAX_IDma::GetNumOffsets ( )
pure virtual

Gets the number of offets in the offset table.

◆ SetBaseOffset()

virtual AAX_Result AAX_DMA_API AAX_IDma::SetBaseOffset ( int32_t  iBaseOffsetBytes)
pure virtual

Sets the relative base offset into the FIFO where transfers will begin.

The base offset will be added to each value in the offset table in order to determine the starting offset within the FIFO buffer for each burst.

See also
AAX_IDma::SetOffsetTable()
Returns
AAX_SUCCESS on success

◆ GetBaseOffset()

virtual int32_t AAX_DMA_API AAX_IDma::GetBaseOffset ( )
pure virtual

Gets the relative base offset into the FIFO where transfers will begin.

◆ SetFifoSize()

virtual AAX_Result AAX_DMA_API AAX_IDma::SetFifoSize ( int32_t  iSizeBytes)
pure virtual

Sets the size of the FIFO buffer, in bytes.

Note
The FIFO buffer must be padded with at least enough memory to accommodate one burst, as defined by SetBurstLength().
Returns
AAX_SUCCESS on success

◆ GetFifoSize()

virtual int32_t AAX_DMA_API AAX_IDma::GetFifoSize ( )
pure virtual

Gets the size of the FIFO buffer, in bytes.


The documentation for this class was generated from the following file: