AAX SDK  2.1.1
Avid Audio Extensions Development Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AAX_IDma.h
Go to the documentation of this file.
1 /*================================================================================================*/
2 /*
3  *
4  * Copyright (c) 2008 Avid Technology, Inc.
5  * All rights reserved.
6  *
7  * CONFIDENTIAL: This document contains confidential information. Do not
8  * read or examine this document unless you are an Avid Technology employee
9  * or have signed a non-disclosure agreement with Avid Technology which protects
10  * the confidentiality of this document. DO NOT DISCLOSE ANY INFORMATION
11  * CONTAINED IN THIS DOCUMENT TO ANY THIRD-PARTY WITHOUT THE PRIOR WRITTEN CONSENT
12  * OF Avid Technolgy, INC.
13  *
14  */
15 
22 /*================================================================================================*/
23 
24 
25 #pragma once
26 
27 #ifndef AAX_IDMA_H
28 #define AAX_IDMA_H
29 
30 #include "AAX.h"
31 
32 
33 #ifndef AAX_DMA_API
34 # ifdef _MSC_VER
35 # define AAX_DMA_API __cdecl
36 # else
37 # define AAX_DMA_API
38 # endif
39 #endif // AAX_DMA_API
40 
51 class AAX_IDma
52 {
53 public:
54  enum EState
55  {
61  };
62 
63  // WARNING! These need to be kept in sync with the TI dMAX microcode EventType IDs!
69  enum EMode
70  {
72 
74  eMode_Gather = 10,
76 
78  eMode_Version = 1,
79  eMode_SpiSlave = 2,
80  eMode_GP = 3,
81  eMode_FifoWrite = 4,
82  eMode_FifoRead = 5,
83  /*eMode_Burst = 6,*/
84  eMode_Interrupt = 7,
85  eMode_SkipRead = 8,
86  eMode_SkipWrite = 9
87  /*eMode_Gather = 10,*/
88  /*eMode_Scatter = 11*/
90  };
91 
92 
93 public:
94  virtual ~AAX_IDma() {}
95 
97 
112  virtual AAX_Result AAX_DMA_API PostRequest() = 0;
127  virtual int32_t AAX_DMA_API IsTransferComplete() = 0;
134  virtual AAX_Result AAX_DMA_API SetDmaState( EState iState ) = 0;
137  virtual EState AAX_DMA_API GetDmaState() const = 0;
142  virtual EMode AAX_DMA_API GetDmaMode() const = 0;
144 
145 
147 
160  virtual AAX_Result AAX_DMA_API SetSrc( int8_t * iSrc ) = 0;
163  virtual int8_t * AAX_DMA_API GetSrc() = 0;
172  virtual AAX_Result AAX_DMA_API SetDst( int8_t * iDst ) = 0;
175  virtual int8_t * AAX_DMA_API GetDst() = 0;
176 
184  virtual AAX_Result AAX_DMA_API SetBurstLength( int32_t iBurstLengthBytes ) = 0;
187  virtual int32_t AAX_DMA_API GetBurstLength() = 0;
200  virtual AAX_Result AAX_DMA_API SetNumBursts( int32_t iNumBursts ) = 0;
203  virtual int32_t AAX_DMA_API GetNumBursts() = 0;
211  virtual AAX_Result AAX_DMA_API SetTransferSize( int32_t iTransferSizeBytes ) = 0;
214  virtual int32_t AAX_DMA_API GetTransferSize() = 0;
216 
217 
219 
229  virtual AAX_Result AAX_DMA_API SetFifoBuffer( int8_t * iFifoBase ) = 0;
232  virtual int8_t * AAX_DMA_API GetFifoBuffer() = 0;
237  virtual AAX_Result AAX_DMA_API SetLinearBuffer( int8_t * iLinearBase ) = 0;
240  virtual int8_t * AAX_DMA_API GetLinearBuffer() = 0;
253  virtual AAX_Result AAX_DMA_API SetOffsetTable( const int32_t * iOffsetTable ) = 0;
256  virtual const int32_t * AAX_DMA_API GetOffsetTable() = 0;
263  virtual AAX_Result AAX_DMA_API SetNumOffsets( int32_t iNumOffsets ) = 0;
266  virtual int32_t AAX_DMA_API GetNumOffsets() = 0;
276  virtual AAX_Result AAX_DMA_API SetBaseOffset( int32_t iBaseOffsetBytes ) = 0;
279  virtual int32_t AAX_DMA_API GetBaseOffset() = 0;
287  virtual AAX_Result AAX_DMA_API SetFifoSize( int32_t iSizeBytes ) = 0;
290  virtual int32_t AAX_DMA_API GetFifoSize() = 0;
292 };
293 
294 
295 
296 #endif // AAX_IDMA_H
virtual AAX_Result AAX_DMA_API SetSrc(int8_t *iSrc)=0
Sets the address of the source buffer.
virtual const int32_t *AAX_DMA_API GetOffsetTable()=0
Gets the offset table for the DMA transfer.
Various utility definitions for AAX.
Definition: AAX_IDma.h:57
Definition: AAX_IDma.h:56
virtual int32_t AAX_DMA_API GetBaseOffset()=0
Gets the relative base offset into the FIFO where transfers will begin.
virtual AAX_Result AAX_DMA_API SetDmaState(EState iState)=0
Sets the DMA State.
Definition: AAX_IDma.h:59
virtual int32_t AAX_DMA_API GetNumOffsets()=0
Gets the number of offets in the offset table.
virtual int8_t *AAX_DMA_API GetLinearBuffer()=0
Gets the address of the linear buffer for the DMA transfer.
virtual AAX_Result AAX_DMA_API SetTransferSize(int32_t iTransferSizeBytes)=0
Sets the size of the whole transfer.
Scatter mode.
Definition: AAX_IDma.h:75
virtual AAX_Result AAX_DMA_API SetFifoSize(int32_t iSizeBytes)=0
Sets the size of the FIFO buffer, in bytes.
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) ...
virtual int32_t AAX_DMA_API GetBurstLength()=0
Gets the length of each burst.
virtual AAX_Result AAX_DMA_API SetDst(int8_t *iDst)=0
Sets the address of the destination buffer.
EState
Definition: AAX_IDma.h:54
Cross-platform interface for access to the host's direct memory access (DMA) facilities.
Definition: AAX_IDma.h:51
virtual int32_t AAX_DMA_API IsTransferComplete()=0
Query whether a transfer has completed.
virtual int8_t *AAX_DMA_API GetFifoBuffer()=0
Gets the address of the FIFO buffer for the DMA transfer.
Gather mode.
Definition: AAX_IDma.h:74
virtual AAX_Result AAX_DMA_API PostRequest()=0
Posts the transfer request to the DMA server.
virtual int32_t AAX_DMA_API GetTransferSize()=0
Gets the size of the whole transfer, in Bytes.
virtual EMode AAX_DMA_API GetDmaMode() const =0
Inquire to find the mode of the DMA instance.
virtual AAX_Result AAX_DMA_API SetBaseOffset(int32_t iBaseOffsetBytes)=0
Sets the relative base offset into the FIFO where transfers will begin.
Definition: AAX_IDma.h:58
int32_t AAX_Result
Definition: AAX.h:118
virtual int32_t AAX_DMA_API GetFifoSize()=0
Gets the size of the FIFO buffer, in bytes.
virtual int8_t *AAX_DMA_API GetSrc()=0
Gets the address of the source buffer.
virtual int32_t AAX_DMA_API GetNumBursts()=0
Gets the number of bursts to perform before giving up priority to other DMA transfers.
Definition: AAX_IDma.h:60
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.
virtual AAX_Result AAX_DMA_API SetBurstLength(int32_t iBurstLengthBytes)=0
Sets the length of each burst.
#define AAX_DMA_API
Definition: AAX_IDma.h:37
virtual int8_t *AAX_DMA_API GetDst()=0
Gets the address of the destination buffer.
virtual AAX_Result AAX_DMA_API SetNumOffsets(int32_t iNumOffsets)=0
Sets the number of offets in the offset table.
Burst mode (uncommon)
Definition: AAX_IDma.h:73
Definition: AAX_IDma.h:71
virtual AAX_Result AAX_DMA_API SetOffsetTable(const int32_t *iOffsetTable)=0
Sets the offset table for the DMA transfer.
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) ...
EMode
DMA mode IDs.
Definition: AAX_IDma.h:69
virtual EState AAX_DMA_API GetDmaState() const =0
Inquire to find the state of the DMA instance.
virtual ~AAX_IDma()
Definition: AAX_IDma.h:94