![]() |
AAX SDK
2.4.1
Avid Audio Extensions Development Kit
|
#include <AAX_IDma.h>
Cross-platform interface for access to the host's direct memory access (DMA) facilities.
This interface is provided via a DMA port in the plug-in's algorithm context.
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... | |
enum AAX_IDma::EState |
enum AAX_IDma::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. |
|
inlinevirtual |
|
pure virtual |
Posts the transfer request to the DMA server.
AAX_SUCCESS
on success
|
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
|
pure virtual |
Sets the DMA State.
AAX_SUCCESS
on success
|
pure virtual |
Inquire to find the state of the DMA instance.
|
pure virtual |
Inquire to find the mode of the DMA instance.
This value does not change, so there is no setter.
|
pure virtual |
Sets the address of the source buffer.
[in] | iSrc | Address of the location in the source buffer where the read transfer should begin |
AAX_SUCCESS
on success
|
pure virtual |
Gets the address of the source buffer.
|
pure virtual |
Sets the address of the destination buffer.
[in] | iDst | Address of the location in the destination buffer where the write transfer should begin |
AAX_SUCCESS
on success
|
pure virtual |
Gets the address of the destination buffer.
|
pure virtual |
Sets the length of each burst.
AAX_SUCCESS
on success
|
pure virtual |
Gets the length of each burst.
|
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.
[in] | iNumBursts | The number of bursts |
AAX_SUCCESS
on success
|
pure virtual |
Gets the number of bursts to perform before giving up priority to other DMA transfers.
|
pure virtual |
Sets the size of the whole transfer.
[in] | iTransferSizeBytes | The transfer size, in Bytes |
AAX_SUCCESS
on success
|
pure virtual |
Gets the size of the whole transfer, in Bytes.
|
pure virtual |
Sets the address of the FIFO buffer for the DMA transfer (usually the external memory block)
AAX_SUCCESS
on success
|
pure virtual |
Gets the address of the FIFO buffer for the DMA transfer.
|
pure virtual |
Sets the address of the linear buffer for the DMA transfer (usually the internal memory block)
AAX_SUCCESS
on success
|
pure virtual |
Gets the address of the linear buffer for the DMA transfer.
|
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().
AAX_SUCCESS
on success
|
pure virtual |
Gets the offset table for the DMA transfer.
|
pure virtual |
Sets the number of offets in the offset table.
AAX_SUCCESS
on success
|
pure virtual |
Gets the number of offets in the offset table.
|
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.
AAX_SUCCESS
on success
|
pure virtual |
Gets the relative base offset into the FIFO where transfers will begin.
|
pure virtual |
Sets the size of the FIFO buffer, in bytes.
AAX_SUCCESS
on success
|
pure virtual |
Gets the size of the FIFO buffer, in bytes.