~ubuntu-branches/ubuntu/quantal/zaptel/quantal

« back to all changes in this revision

Viewing changes to include/oct6100api/oct6100_defines.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2006-08-23 07:30:22 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20060823073022-nx352q7c5ih5hsdm
Tags: 1:1.2.8.dfsg-1
New Upstream Release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
 
2
 
 
3
File:  oct6100_defines.h
 
4
 
 
5
    Copyright (c) 2001-2006 Octasic Inc.
 
6
    
 
7
Description: 
 
8
 
 
9
        Header file containing all defines used throughout the API.
 
10
 
 
11
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API  is 
 
12
free software; you can redistribute it and/or modify it under the terms of 
 
13
the GNU General Public License as published by the Free Software Foundation; 
 
14
either version 2 of the License, or (at your option) any later version.
 
15
 
 
16
The OCT6100 GPL API is distributed in the hope that it will be useful, but 
 
17
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 
18
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 
19
for more details. 
 
20
 
 
21
You should have received a copy of the GNU General Public License 
 
22
along with the OCT6100 GPL API; if not, write to the Free Software 
 
23
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.7
 
24
 
 
25
$Octasic_Release: OCT612xAPI-01.00-PR43 $
 
26
 
 
27
$Octasic_Revision: 166 $
 
28
 
 
29
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
 
30
 
 
31
#ifndef __OCT6100_DEFINES_H__
 
32
#define __OCT6100_DEFINES_H__
 
33
 
 
34
/*****************************  INCLUDE FILES  *******************************/
 
35
 
 
36
#include "octdef.h"
 
37
 
 
38
/*****************************  DEFINES  *************************************/
 
39
 
 
40
/* 32-bits values. */
 
41
#define cOCT6100_FFFFFFFF       0xFFFFFFFF
 
42
#define cOCT6100_FFFFFFFE       0xFFFFFFFE
 
43
#define cOCT6100_7FFFFFFF       0x7FFFFFFF
 
44
 
 
45
/* 16-bits values. */
 
46
#define cOCT6100_FFFD           0xFFFD
 
47
#define cOCT6100_FFFE           0xFFFE
 
48
#define cOCT6100_FFFF           0xFFFF
 
49
#define cOCT6100_7FFF           0x7FFF
 
50
 
 
51
/* 8-bits values. */
 
52
#define cOCT6100_FF                     0xFF
 
53
 
 
54
#define cOCT6100_CURRENT_VALUE                          cOCT6100_FFFFFFFF
 
55
#define cOCT6100_INVALID_CHIP_ID                        cOCT6100_FFFFFFFF
 
56
#define cOCT6100_INVALID_HANDLE                         cOCT6100_FFFFFFFF
 
57
#define cOCT6100_INVALID_TIMESLOT                       cOCT6100_FFFFFFFF
 
58
#define cOCT6100_INVALID_STREAM                         cOCT6100_FFFFFFFF
 
59
#define cOCT6100_INVALID_VALUE                          cOCT6100_FFFFFFFF
 
60
#define cOCT6100_INVALID_STAT                           cOCT6100_FFFFFFFF
 
61
#define cOCT6100_INVALID_STAT_W                         cOCT6100_FFFF
 
62
#define cOCT6100_INVALID_PCM_LAW                        cOCT6100_FF
 
63
#define cOCT6100_INVALID_EVENT                          cOCT6100_FFFF
 
64
#define cOCT6100_INVALID_INDEX                          cOCT6100_FFFF
 
65
#define cOCT6100_INVALID_TONE                           cOCT6100_FFFFFFFF
 
66
#define cOCT6100_INVALID_PORT                           cOCT6100_FF
 
67
 
 
68
#define cOCT6100_AUTO_SELECT                            cOCT6100_FFFFFFFE
 
69
#define cOCT6100_AUTO_SELECT_TAIL                       cOCT6100_FFFE
 
70
 
 
71
#define cOCT6100_INVALID_BOOL                           2
 
72
 
 
73
#define cOCT6100_KEEP_PREVIOUS_SETTING          0x70100000
 
74
 
 
75
#define cOCT6100_INVALID_SIGNED_STAT            cOCT6100_7FFFFFFF
 
76
#define cOCT6100_INVALID_SIGNED_STAT_W          cOCT6100_7FFF
 
77
#define cOCT6100_INVALID_ECHO_DELAY                     0x400
 
78
 
 
79
 
 
80
 
 
81
#define cOCT6100_SIZE_128       128
 
82
#define cOCT6100_SIZE_256       256
 
83
#define cOCT6100_SIZE_512       512
 
84
#define cOCT6100_SIZE_1K        1024
 
85
#define cOCT6100_SIZE_2K        2048
 
86
#define cOCT6100_SIZE_4K        4096
 
87
#define cOCT6100_SIZE_8K        8192
 
88
#define cOCT6100_SIZE_16K       16384
 
89
#define cOCT6100_SIZE_32K       32768
 
90
#define cOCT6100_SIZE_64K       65536
 
91
#define cOCT6100_SIZE_128K      131072
 
92
#define cOCT6100_SIZE_256K      262144
 
93
#define cOCT6100_SIZE_512K      524288
 
94
#define cOCT6100_SIZE_1M        1048576
 
95
#define cOCT6100_SIZE_2M        2097152
 
96
#define cOCT6100_SIZE_4M        4194304
 
97
#define cOCT6100_SIZE_8M        8388608
 
98
#define cOCT6100_SIZE_16M       16777216
 
99
#define cOCT6100_SIZE_32M       33554432
 
100
#define cOCT6100_SIZE_64M       67108864
 
101
#define cOCT6100_SIZE_128M      134217728
 
102
#define cOCT6100_SIZE_256M      268435456
 
103
#define cOCT6100_SIZE_512M      536870912
 
104
#define cOCT6100_SIZE_1G        1073741824 
 
105
#define cOCT6100_SIZE_2G        2147483648
 
106
 
 
107
#define cOCT6100_HNDL_TAG_MASK                                  0xFF000000
 
108
#define cOCT6100_HNDL_INDEX_MASK                                0x0000FFFF
 
109
#define cOCT6100_ENTRY_OPEN_CNT_MASK                    0x000000FF
 
110
#define cOCT6100_ENTRY_OPEN_CNT_SHIFT                   16
 
111
 
 
112
#define cOCT6100_HNDL_TAG_INVALID                               0xFF000000
 
113
 
 
114
#define cOCT6100_HNDL_TAG_CHANNEL                               0x01000000
 
115
#define cOCT6100_HNDL_TAG_TSI_CNCT                              0x02000000
 
116
#define cOCT6100_HNDL_TAG_CONF_BRIDGE                   0x03000000
 
117
#define cOCT6100_HNDL_TAG_PHASING_TSST                  0x04000000
 
118
#define cOCT6100_HNDL_TAG_BIDIR_CHANNEL                 0x05000000
 
119
#define cOCT6100_HNDL_TAG_COPY_EVENT                    0x06000000
 
120
#define cOCT6100_HNDL_TAG_ADPCM_CHANNEL                 0x07000000
 
121
 
 
122
#define cOCT6100_INVALID_HANDLE_TYPE    cOCT6100_INVALID_VALUE
 
123
 
 
124
#define cOCT6100_MEMORY_ROUND_SIZE 16
 
125
 
 
126
#define mOCT6100_ROUND_MEMORY_SIZE( ulMemorySize, ulTempVar )                   \
 
127
        if ((ulTempVar = ulMemorySize % cOCT6100_MEMORY_ROUND_SIZE) != 0)       \
 
128
                ulMemorySize += cOCT6100_MEMORY_ROUND_SIZE - ulTempVar;
 
129
 
 
130
#define mOCT6100_ROUND_ADDRESS( ulAddress, ulBoundary, ulTempVar )              \
 
131
        if ((ulTempVar = ulAddress % ulBoundary) != 0)                                          \
 
132
                ulAddress += ulBoundary - ulTempVar;
 
133
 
 
134
#define cOCT6100_INTERNAL_CLOCK_SOURCE  0
 
135
#define cOCT6100_EXTERNAL_CLOCK_SOURCE  1
 
136
 
 
137
#define cOCT6100_ACTIVE_HIGH_POLARITY   0
 
138
#define cOCT6100_ACTIVE_LOW_POLARITY    1
 
139
 
 
140
#define cOCT6100_TDM_SAMPLE_AT_3_QUARTERS               0
 
141
#define cOCT6100_TDM_SAMPLE_AT_RISING_EDGE              1
 
142
#define cOCT6100_TDM_SAMPLE_AT_FALLING_EDGE             2
 
143
 
 
144
#define cOCT6100_TDM_STREAM_FREQ_2MHZ   0
 
145
#define cOCT6100_TDM_STREAM_FREQ_4MHZ   1
 
146
#define cOCT6100_TDM_STREAM_FREQ_8MHZ   2
 
147
#define cOCT6100_TDM_STREAM_FREQ_16MHZ  3
 
148
 
 
149
#define cOCT6100_TDM_STREAM_MAX_GROUPS  8
 
150
 
 
151
#define cOCT6100_PCM_U_LAW              0
 
152
#define cOCT6100_PCM_A_LAW              1
 
153
#define cOCT6100_PCM_UNCHANGED  2
 
154
#define cOCT6100_ADPCM_ENCODED  3
 
155
 
 
156
#define cOCT6100_INTERRUPT_DISABLE              0
 
157
#define cOCT6100_INTERRUPT_NO_TIMEOUT   1
 
158
#define cOCT6100_INTERRUPT_TIMEOUT              2
 
159
 
 
160
#define cOCT6100_NUMBER_TSSTS_1         1
 
161
#define cOCT6100_NUMBER_TSSTS_2         2
 
162
 
 
163
#define cOCT6100_G711_64KBPS                            1
 
164
#define cOCT6100_G726_40KBPS                            2
 
165
#define cOCT6100_G726_32KBPS                            3
 
166
#define cOCT6100_G726_24KBPS                            4
 
167
#define cOCT6100_G726_16KBPS                            5
 
168
#define cOCT6100_G727_40KBPS_4_1                        6
 
169
#define cOCT6100_G727_40KBPS_3_2                        7
 
170
#define cOCT6100_G727_40KBPS_2_3                        8
 
171
#define cOCT6100_G727_32KBPS_4_0                        9
 
172
#define cOCT6100_G727_32KBPS_3_1                        10
 
173
#define cOCT6100_G727_32KBPS_2_2                        11
 
174
#define cOCT6100_G727_24KBPS_3_0                        12
 
175
#define cOCT6100_G727_24KBPS_2_1                        13
 
176
#define cOCT6100_G727_16KBPS_2_0                        14
 
177
#define cOCT6100_G726_ENCODED                           15
 
178
#define cOCT6100_G711_G726_ENCODED                      16
 
179
#define cOCT6100_G711_G727_2C_ENCODED           17
 
180
#define cOCT6100_G711_G727_3C_ENCODED           18
 
181
#define cOCT6100_G711_G727_4C_ENCODED           19
 
182
#define cOCT6100_G727_2C_ENCODED                        20
 
183
#define cOCT6100_G727_3C_ENCODED                        21
 
184
#define cOCT6100_G727_4C_ENCODED                        22
 
185
 
 
186
#define cOCT6100_ADPCM_IN_HIGH_BITS                     0
 
187
#define cOCT6100_ADPCM_IN_LOW_BITS                      1
 
188
 
 
189
/* The values of these defines must not change. */
 
190
#define cOCT6100_H100_TRACKA                    0
 
191
#define cOCT6100_H100_TRACKB                    1
 
192
#define cOCT6100_H100_TRACKA_FALLBACKB  2
 
193
#define cOCT6100_H100_TRACKB_FALLBACKA  3
 
194
#define cOCT6100_H100_DISABLED                  4
 
195
#define cOCT6100_H100_MASTERA                   5
 
196
#define cOCT6100_H100_BACKUPA                   6
 
197
#define cOCT6100_H100_MASTERB                   7
 
198
#define cOCT6100_H100_BACKUPB                   8
 
199
 
 
200
#define cOCT6100_FREE_TSST      0
 
201
#define cOCT6100_RX_TSST        16
 
202
#define cOCT6100_TX_TSST        32
 
203
 
 
204
#define cOCT6100_INTRPT_ACTIVE                  0
 
205
#define cOCT6100_INTRPT_WILL_TIMEOUT    1
 
206
#define cOCT6100_INTRPT_IN_TIMEOUT              2
 
207
#define cOCT6100_INTRPT_DISABLED                3
 
208
 
 
209
#define cOCT6100_EXTERNAL_MEM_BIST_TIMEOUT      1000000
 
210
 
 
211
/* Clocks defines */
 
212
#define cOCT6100_UPCLK_FREQ_33_33_MHZ           33333333
 
213
 
 
214
#define cOCT6100_MCLK_FREQ_133_MHZ                      133000000
 
215
#define cOCT6100_MCLK_FREQ_125_MHZ                      125000000
 
216
#define cOCT6100_MCLK_FREQ_117_MHZ                      117000000
 
217
#define cOCT6100_MCLK_FREQ_108_MHZ                      108000000
 
218
#define cOCT6100_MCLK_FREQ_100_MHZ                      100000000
 
219
#define cOCT6100_MCLK_FREQ_92_MHZ                        92000000
 
220
#define cOCT6100_MCLK_FREQ_83_MHZ                        83000000
 
221
#define cOCT6100_MCLK_FREQ_75_MHZ                        75000000
 
222
 
 
223
/* Tone buffer defines.*/
 
224
#define cOCT6100_MAX_NUM_TONE_BUFFERS   1344
 
225
#define cOCT6100_MAX_TONES_PER_CALL             32
 
226
 
 
227
/* Memory defines.*/
 
228
#define cOCT6100_MEM_TYPE_SDR                           0
 
229
#define cOCT6100_MEM_TYPE_DDR                           1
 
230
#define cOCT6100_MEM_TYPE_SDR_PLL_BYPASS        2
 
231
 
 
232
#define cOCT6100_MEMORY_CHIP_SIZE_8MB           cOCT6100_SIZE_8M
 
233
#define cOCT6100_MEMORY_CHIP_SIZE_16MB          cOCT6100_SIZE_16M
 
234
#define cOCT6100_MEMORY_CHIP_SIZE_32MB          cOCT6100_SIZE_32M
 
235
#define cOCT6100_MEMORY_CHIP_SIZE_64MB          cOCT6100_SIZE_64M
 
236
#define cOCT6100_MEMORY_CHIP_SIZE_128MB         cOCT6100_SIZE_128M
 
237
 
 
238
#define cOCT6100_MAX_NUM_MEMORY_CHIP            2
 
239
 
 
240
#define cOCT6100_16MB_MEMORY_BANKS                      0
 
241
#define cOCT6100_32MB_MEMORY_BANKS                      1
 
242
#define cOCT6100_64MB_MEMORY_BANKS                      2
 
243
#define cOCT6100_128MB_MEMORY_BANKS                     3
 
244
 
 
245
#define cOCT6100_1_MEMORY_BANKS                         0
 
246
#define cOCT6100_2_MEMORY_BANKS                         1
 
247
#define cOCT6100_3_MEMORY_BANKS                         2
 
248
#define cOCT6100_4_MEMORY_BANKS                         3
 
249
 
 
250
/* Chip open defines.*/
 
251
#define cOCT6100_INTERNAL_TONE_ARRAY_SIZE       256             /* in words.*/
 
252
#define cOCT6100_INTERNAL_SUPER_ARRAY_SIZE      1024    /* in words.*/
 
253
 
 
254
/* Internal memory mapping.*/
 
255
 
 
256
/*=======================================================================*/
 
257
#define cOCT6100_TSST_CONTROL_MEM_BASE                  0x26000
 
258
 
 
259
#define cOCT6100_TSST_CONTROL_MEM_ENTRY_SIZE                    2       /* Each entries are 2 bytes.*/
 
260
#define cOCT6100_TSST_CONTROL_MEM_INPUT_TSST                    0x0800
 
261
#define cOCT6100_TSST_CONTROL_MEM_OUTPUT_TSST                   0x2000
 
262
 
 
263
#define cOCT6100_TSST_CONTROL_MEM_PCM_LAW_OFFSET                12
 
264
#define cOCT6100_TSST_CONTROL_MEM_NIBBLE_POS_OFFSET             11
 
265
#define cOCT6100_TSST_CONTROL_MEM_TSST_NUM_OFFSET               12
 
266
 
 
267
#define cOCT6100_TSST_CONTROL_MEM_TSI_MEM_MASK                  0x7FF
 
268
 
 
269
#define cOCT6100_TSST_CONTROL_PHASING_TSST_BASE_ENTRY   1344
 
270
#define cOCT6100_TSST_CONTROL_TIMESTAMP_BASE_ENTRY              1516
 
271
 
 
272
/*=======================================================================*/
 
273
#define cOCT6100_CONVERSION_CONTROL_MEM_BASE                            0x28000
 
274
 
 
275
/* Each entries are 8 bytes but an 8 bytes mixer entry is located inbetween each entry.*/
 
276
#define cOCT6100_CONVERSION_CONTROL_MEM_ENTRY_SIZE                      16      
 
277
#define cOCT6100_CONVERSION_CONTROL_MEM_ENCODER                         0x0000
 
278
#define cOCT6100_CONVERSION_CONTROL_MEM_DECODER                         0x8000
 
279
#define cOCT6100_CONVERSION_CONTROL_MEM_ACTIVATE_ENTRY          0x8000
 
280
#define cOCT6100_CONVERSION_CONTROL_MEM_RST_ON_NEXT_FR          0x8000
 
281
 
 
282
#define cOCT6100_CONVERSION_CONTROL_MEM_PHASE_OFFSET            12
 
283
#define cOCT6100_CONVERSION_CONTROL_MEM_NIBBLE_POS_OFFSET       9
 
284
#define cOCT6100_CONVERSION_CONTROL_MEM_COMP_OFFSET                     11
 
285
#define cOCT6100_CONVERSION_CONTROL_MEM_LAW_OFFSET                      8
 
286
#define cOCT6100_CONVERSION_CONTROL_MEM_SIL_SUP_OFFSET          8
 
287
 
 
288
#define cOCT6100_CONVERSION_CONTROL_PHASE_SIZE_BASE_ADD         0x5400
 
289
 
 
290
/*=======================================================================*/
 
291
#define cOCT6100_MIXER_CONTROL_MEM_BASE                 0x28008
 
292
 
 
293
/* Each entries are 8 bytes but an 8 bytes mixer entry is located inbetween each entry.*/
 
294
#define cOCT6100_MIXER_CONTROL_MEM_ENTRY_SIZE                   16      
 
295
#define cOCT6100_MIXER_CONTROL_MEM_SUB_STORE                    0xA000
 
296
#define cOCT6100_MIXER_CONTROL_MEM_STORE                                0x8000
 
297
#define cOCT6100_MIXER_CONTROL_MEM_LOAD                                 0x4000
 
298
#define cOCT6100_MIXER_CONTROL_MEM_ACCUMULATE                   0x6000
 
299
#define cOCT6100_MIXER_CONTROL_MEM_COPY                                 0x2000
 
300
#define cOCT6100_MIXER_CONTROL_MEM_NO_OP                                0x0000
 
301
 
 
302
#define cOCT6100_MIXER_CONTROL_MEM_LAW_OFFSET                   11
 
303
 
 
304
#define cOCT6100_MIXER_HEAD_NODE                                                0
 
305
#define cOCT6100_MIXER_TAIL_NODE                                                1
 
306
#define cOCT6100_MIXER_RECORD_COPY_NODE                                 2
 
307
 
 
308
/*=======================================================================*/
 
309
#define cOCT6100_ECHO_CONTROL_MEM_BASE                  0x14000
 
310
 
 
311
#define cOCT6100_ECHO_CONTROL_MEM_ENTRY_SIZE                    4       /* Each entries are 8 bytes.*/
 
312
#define cOCT6100_ECHO_CONTROL_MEM_ACTIVATE_ENTRY                0x8000
 
313
#define cOCT6100_ECHO_CONTROL_MEM_EXTERNAL_AF_CTRL              0x2000
 
314
 
 
315
#define cOCT6100_ECHO_CONTROL_MEM_DEBUG_OFFSET                  14
 
316
#define cOCT6100_ECHO_CONTROL_MEM_AF_CONTROL                    14
 
317
#define cOCT6100_ECHO_CONTROL_MEM_INPUT_LAW_OFFSET              12
 
318
#define cOCT6100_ECHO_CONTROL_MEM_OUTPUT_LAW_OFFSET             11
 
319
 
 
320
#define cOCT6100_ECHO_CONTROL_MEM_TSI_MEM_MASK                  0x7FF
 
321
 
 
322
/*=======================================================================*/
 
323
#define cOCT6100_ST_CONTROL_MEM_BASE                    0x2000000
 
324
 
 
325
#define cOCT6100_ST_CONTROL_MEM_ENTRY_SIZE                              16      /* Each entries are 8 bytes.*/
 
326
 
 
327
/*=======================================================================*/
 
328
#define cOCT6100_PART1_BASE                                             0x00080000
 
329
#define cOCT6100_PART1_CPU_LSU_CB_BASE                  cOCT6100_PART1_BASE+0x0000E3C0  /* 8 * 8    = 64 bytes */
 
330
#define cOCT6100_PART1_HW_LSU_CB_BASE                   cOCT6100_PART1_BASE+0x0000E400  /* 8 * 128  = 1K byte */
 
331
#define cOCT6100_PART1_END_STATICS_BASE                 cOCT6100_PART1_BASE+0x0000E9F0  /* 912 bytes available for your viewing pleasure. */
 
332
#define cOCT6100_PART1_API_SCRATCH_PAD                  cOCT6100_PART1_END_STATICS_BASE+4+(12*8)
 
333
#define cOCT6100_PART1_EGO_REG                  cOCT6100_PART1_BASE+0x0007FF00
 
334
 
 
335
/* External Memory mapping. */
 
336
#define cOCT6100_EXTERNAL_MEM_BLOCK_SIZE                1024
 
337
#define cOCT6100_EXTERNAL_MEM_BASE_ADDRESS              0x08000000
 
338
 
 
339
 
 
340
#define cOCT6100_TLV_BASE                                               ( 0x00016000 + cOCT6100_EXTERNAL_MEM_BASE_ADDRESS )
 
341
#define cOCT6100_CHANNEL_ROOT_BASE                              ( 0x00020000 + cOCT6100_EXTERNAL_MEM_BASE_ADDRESS )
 
342
#define cOCT6100_PGSP_EVENT_OUT_BASE                    ( 0x002C0000 + cOCT6100_EXTERNAL_MEM_BASE_ADDRESS )
 
343
#define cOCT6100_POUCH_BASE                                             ( 0x002E0000 + cOCT6100_EXTERNAL_MEM_BASE_ADDRESS )
 
344
#define cOCT6100_IMAGE_FILE_BASE                                ( 0x00300000 + cOCT6100_EXTERNAL_MEM_BASE_ADDRESS )
 
345
 
 
346
#define cOCT6100_CHANNEL_ROOT_SIZE                              4096
 
347
#define cOCT6100_CHANNEL_ROOT_TOTAL_SIZE                ( 672 * cOCT6100_CHANNEL_ROOT_SIZE )
 
348
#define cOCT6100_PGSP_EVENT_OUT_SIZE                    131072
 
349
#define cOCT6100_PGSP_TONE_EVENT_SIZE                   0x40
 
350
#define cOCT6100_IMAGE_FILE_SIZE                                0x100000
 
351
 
 
352
#define cOCT6100_MATRIX_TIMESTAMP_DWORD_ADD             cOCT6100_POUCH_BASE + 0x8
 
353
#define cOCT6100_MATRIX_CHAN_SELECT_DWORD_ADD   cOCT6100_POUCH_BASE + 0x14
 
354
#define cOCT6100_MATRIX_WRITE_PTR_DWORD_ADD             cOCT6100_POUCH_BASE + 0x4
 
355
#define cOCT6100_MATRIX_PLL_JITTER_COUNT_ADD    cOCT6100_POUCH_BASE + 0x1C
 
356
#define cOCT6100_MATRIX_DWORD_BASE                              cOCT6100_POUCH_BASE + 0xE0000
 
357
 
 
358
#define cOCT6100_CHANNEL_ROOT_GLOBAL_CONF_OFFSET        0x0000
 
359
 
 
360
#define cOCT6100_NUM_WORDS_PER_TONE_EVENT                       32
 
361
#define cOCT6100_NUM_PGSP_EVENT_OUT                                     2048
 
362
#define cOCT6100_VALID_TONE_EVENT                                       0x8000
 
363
#define cOCT6100_LOCAL_TIMESTAMP_INCREMENT                      32      /* 4 ms increment. */
 
364
#define cOCT6100_ABSOLUTE_MAX_NUM_PGSP_EVENT_OUT        65535
 
365
#define cOCT6100_MIN_TIMESLOT_FOR_TIMESTAMP                     5
 
366
 
 
367
 
 
368
/*=======================================================================*/
 
369
#define cOCT6100_GSC_PGSP_CONTEXT_BASE_ADD_OFFSET                       0x0C
 
370
#define cOCT6100_GSC_PGSP_INIT_CONTEXT_BASE_ADD_OFFSET          0x10
 
371
#define cOCT6100_GSC_RIN_CIRC_BUFFER_BASE_ADD_OFFSET            0x14
 
372
#define cOCT6100_GSC_SIN_CIRC_BUFFER_BASE_ADD_OFFSET            0x18
 
373
#define cOCT6100_GSC_SOUT_CIRC_BUFFER_BASE_ADD_OFFSET           0x1C
 
374
 
 
375
#define cOCT6100_GSC_BUFFER_LAW_OFFSET                                          27
 
376
 
 
377
/*=======================================================================*/
 
378
#define cOCT6100_CH_MAIN_PGSP_CONTEXT_OFFSET                    0x00000
 
379
#define cOCT6100_CH_MAIN_TONE_EVENT_OFFSET                              0x00488
 
380
 
 
381
/*=======================================================================*/
 
382
#define cOCT6100_PLAYOUT_EVENT_REPEAT_OFFSET                    31
 
383
#define cOCT6100_PLAYOUT_EVENT_LAW_OFFSET                               30
 
384
#define cOCT6100_PLAYOUT_EVENT_MIX_OFFSET                               28
 
385
#define cOCT6100_PLAYOUT_EVENT_LOOP_TIMES_OFFSET                27
 
386
#define cOCT6100_PLAYOUT_EVENT_GAIN_OFFSET                              24
 
387
 
 
388
#define cOCT6100_PLAYOUT_EVENT_MEM_SIZE                                 16
 
389
 
 
390
/* Image related defines.*/
 
391
#define cOCT6100_MIN_IMAGE_SIZE                                 0x001000
 
392
#define cOCT6100_MAX_IMAGE_SIZE                                 0x100000
 
393
#define cOCT6100_MAX_IMAGE_REGION                               60
 
394
#define cOCT6100_IMAGE_AF_CST_OFFSET                    0x1000;
 
395
 
 
396
/* Max defines.*/
 
397
#define cOCT6100_MAX_ECHO_CHANNELS                              672
 
398
#define cOCT6100_MAX_TSI_CNCTS                                  1530
 
399
#define cOCT6100_MAX_CALLER_ID_PLAYOUT_BUFFERS  ( 3328 + 6 )
 
400
#define cOCT6100_MAX_PLAYOUT_BUFFERS                    ( 1344 + cOCT6100_MAX_CALLER_ID_PLAYOUT_BUFFERS )
 
401
#define cOCT6100_MAX_CONF_BRIDGE                                672
 
402
#define cOCT6100_MAX_FLEX_CONF_PARTICIPANTS             cOCT6100_MAX_ECHO_CHANNELS
 
403
#define cOCT6100_MAX_PHASING_TSST                               16
 
404
#define cOCT6100_MAX_ADPCM_CHANNELS                             672
 
405
 
 
406
#define cOCT6100_NUM_TSI_B4_PHASING                             1344
 
407
#define cOCT6100_TOTAL_TSI_CONTROL_MEM_ENTRY    1534
 
408
#define cOCT6100_MAX_TSI_CONTROL_MEM_ENTRY              1344
 
409
#define cOCT6100_MAX_ECHO_CONTROL_MEM_ENTRY             672
 
410
#define cOCT6100_MAX_TSI_B4_TIMESTAMP                   172
 
411
#define cOCT6100_TSI_MEM_FOR_TIMESTAMP                  4
 
412
#define cOCT6100_API_EXT_TONE_EXTRA_TSI                 1533
 
413
 
 
414
/* Echo channel ports */
 
415
#define cOCT6100_CHANNEL_PORT_RIN                               0
 
416
#define cOCT6100_CHANNEL_PORT_ROUT                              1
 
417
#define cOCT6100_CHANNEL_PORT_SIN                               2
 
418
#define cOCT6100_CHANNEL_PORT_SOUT                              3
 
419
#define cOCT6100_CHANNEL_PORT_ROUT_SOUT                 4
 
420
 
 
421
#define cOCT6100_NO_ENCODING                                    10
 
422
#define cOCT6100_NO_DECODING                                    11
 
423
 
 
424
/* Buffer playout defines */
 
425
#define cOCT6100_NO_SKIP                                                        0
 
426
#define cOCT6100_BUFFER_PLAYOUT_MIN_SIZE                        1024
 
427
#define cOCT6100_DEFAULT_TIMESTAMP                                      0
 
428
#define cOCT6100_MIXING_0_DB                                            0
 
429
#define cOCT6100_MIXING_MINUS_6_DB                                      1
 
430
#define cOCT6100_MIXING_MINUS_12_DB                                     2
 
431
#define cOCT6100_MIXING_MUTE                                            3
 
432
#define cOCT6100_PLAYOUT_GAIN                                           0x41000000
 
433
#define cOCT6100_PLAYOUT_EVENT                                          1
 
434
#define cOCT6100_MINIMUM_BUFFER_SIZE                            64
 
435
#define cOCT6100_BUFFER_SIZE_GRANULARITY                        16
 
436
#define cOCT6100_REPEAT_INFINITELY                                      cOCT6100_INVALID_VALUE
 
437
#define cOCT6100_REPEAT_MAX                                                     32767
 
438
#define cOCT6100_SAMPLES_PER_MS                                         8
 
439
 
 
440
/* For the playout events. */
 
441
#define cOCT6100_MAX_BUFFER_PLAYOUT_EVENT_PER_CALL      32
 
442
#define cOCT6100_MIN_BUFFER_PLAYOUT_EVENT                       128
 
443
#define cOCT6100_MAX_BUFFER_PLAYOUT_EVENT                       65535
 
444
/* Event types */
 
445
#define  cOCT6100_BUFFER_PLAYOUT_EVENT_INVALID                          cOCT6100_INVALID_VALUE
 
446
#define  cOCT6100_BUFFER_PLAYOUT_EVENT_STOP                                     1
 
447
 
 
448
 
 
449
/* Phasing defines.*/
 
450
#define cOCT6100_SINGLE_PHASING                                 0
 
451
#define cOCT6100_DUAL_PHASING                                   1
 
452
#define cOCT6100_NO_PHASING                                             2
 
453
 
 
454
/* Echo canceller mode.*/
 
455
#define cOCT6100_ELECTRIC_EC                                    0
 
456
#define cOCT6100_ELECTRIC_EC_DISPLACEMENT               1
 
457
#define cOCT6100_ACCOUSTIC_ES                                   2
 
458
 
 
459
/* Echo control modes.*/
 
460
#define cOCT6100_ECHO_OP_MODE_NORMAL                            0
 
461
#define cOCT6100_ECHO_OP_MODE_HT_FREEZE                         1
 
462
#define cOCT6100_ECHO_OP_MODE_HT_RESET                          2
 
463
#define cOCT6100_ECHO_OP_MODE_POWER_DOWN                        3
 
464
#define cOCT6100_ECHO_OP_MODE_EXTERNAL                          4
 
465
#define cOCT6100_ECHO_OP_MODE_NO_ECHO                           5
 
466
#define cOCT6100_ECHO_OP_MODE_SPEECH_RECOGNITION        6
 
467
#define cOCT6100_ECHO_OP_MODE_G169_ALC                          cOCT6100_ECHO_OP_MODE_NO_ECHO
 
468
 
 
469
/* 2100 Hz disabling configuration. */
 
470
#define cOCT6100_NEVER_DISABLED                                 0
 
471
#define cOCT6100_G164_2100_HZ                                   1
 
472
#define cOCT6100_G165_2100_HZ_WITH_PHASE_REV    2
 
473
 
 
474
/* TSST defines.*/
 
475
#define cOCT6100_UNASSIGNED                                             cOCT6100_FFFD
 
476
 
 
477
#define cOCT6100_MAX_TSSTS                                              4096
 
478
#define cOCT6100_TWO_TSSTS_INDEX_MASK                   0x8000
 
479
#define cOCT6100_TSST_INDEX_MASK                                0x7FFF
 
480
#define cOCT6100_INPUT_TSST                                             0
 
481
#define cOCT6100_OUTPUT_TSST                                    1
 
482
 
 
483
/* Conference bridges defines.*/
 
484
#define cOCT6100_MAX_MIXER_EVENTS                                               1344
 
485
#define cOCT6100_MAX_FLEX_CONF_PARTICIPANTS_PER_BRIDGE  32
 
486
#define cOCT6100_CONF_DOMINANT_SPEAKER_UNASSIGNED               672
 
487
#define cOCT6100_CONF_NO_DOMINANT_SPEAKER_HNDL                  cOCT6100_FFFFFFFE
 
488
 
 
489
/* Conversion memory defines.*/
 
490
#define cOCT6100_MAX_CONVERSION_MEMORY_BLOCKS   1344
 
491
 
 
492
/* Tone detection defines.*/
 
493
#define cOCT6100_MAX_TONE_NUMBER                                55
 
494
 
 
495
/* Register definition and address. */
 
496
#define cOCT6100_TONE_EVENT_WRITE_PTR_REG               0x722
 
497
#define cOCT6100_TONE_EVENT_READ_PTR_REG                0x720
 
498
 
 
499
/* Special tone IDs. */
 
500
 
 
501
/* System 5/7 Section */
 
502
#define cOCT6100_TONE_SIN_SYSTEM7_2000                  0x20000023
 
503
#define cOCT6100_TONE_SIN_SYSTEM7_1780                  0x20000024
 
504
#define cOCT6100_CHIP_ID_REVISION_REG                   0x17E
 
505
 
 
506
/* BOOT type. */
 
507
#define cOCT6100_AF_BOOT_TYPE                                   0x5
 
508
#define cOCT6100_PRODUCTION_BOOT_TYPE                   0x7
 
509
 
 
510
/* Interrupt register masks.*/
 
511
#define cOCT6100_INTRPT_MASK_REG_102H                   0x0001
 
512
#define cOCT6100_INTRPT_MASK_REG_202H                   0x1C01
 
513
#define cOCT6100_INTRPT_MASK_REG_302H                   0xF100
 
514
#define cOCT6100_INTRPT_MASK_REG_502H                   0x0002
 
515
#define cOCT6100_INTRPT_MASK_REG_702H                   0x0002
 
516
 
 
517
#define cOCT6100_DECODER_MEMORY_OFFSET                  672
 
518
 
 
519
/* Debug defines.*/
 
520
#define cOCT6100_DEBUG_MAX_READ_LENGTH                          10240
 
521
#define cOCT6100_DEBUG_SOUT_MAX_READ_LENGTH                     2560
 
522
#define cOCT6100_DEBUG_CHAN_RECORD_INDEX                        64
 
523
#define cOCT6100_DEBUG_RECORD_BUFFER_BYTE_SIZE          0x20000
 
524
#define cOCT6100_DEBUG_RECORD_MATRIX_SIZE                       0x8000
 
525
#define cOCT6100_DEBUG_RECORD_READ_DATA_BYTE_SIZE       1024
 
526
#define cOCT6100_DEBUG_RECORD_BLOCK_BYTE_SIZE           0x1000
 
527
 
 
528
/* Tone event defines.*/
 
529
#define cOCT6100_MAX_TONE_EVENT                                 56
 
530
#define cOCT6100_TONE_PRESENT                                   0
 
531
#define cOCT6100_TONE_STOP                                              1
 
532
#define cOCT6100_TONE_REFRESH                                   2
 
533
 
 
534
/* TLV defines.*/
 
535
#define cOCT6100_TLV_MAX_ADDRESS                                                0x10000000
 
536
#define cOCT6100_TLV_MAX_TONE_NAME_SIZE                                 64
 
537
 
 
538
#define cOCT6100_VERSION_NUMBER_MAX_SIZE                                1016
 
539
 
 
540
/* Echo Tail defines.*/
 
541
#define cOCT6100_TAIL_LENGTH_32MS                               32
 
542
#define cOCT6100_TAIL_LENGTH_64MS                               64
 
543
#define cOCT6100_TAIL_LENGTH_128MS                              128
 
544
#define cOCT6100_MAX_ECHO_TAIL_DISPLACEMENT             5600    /* In milliseconds */
 
545
 
 
546
 
 
547
 
 
548
 
 
549
 
 
550
/* Generic loop counter.*/
 
551
#define cOCT6100_MAX_LOOP                                               0x2000
 
552
/* CPU boot timeout counter. */
 
553
#define cOCT6100_MAX_LOOP_CPU_TIMEOUT                   0x20000
 
554
 
 
555
/* Automatic level control */
 
556
#define cOCT6100_PASS_THROUGH_LEVEL_CONTROL             0x90
 
557
 
 
558
/* Channel stats debug info */
 
559
#define cOCT6100_DEBUG_CHAN_STATS_EVENT_BYTE_SIZE               1024
 
560
#define cOCT6100_DEBUG_CHAN_STATS_LITE_EVENT_BYTE_SIZE  720
 
561
 
 
562
/* Tone image info defines.*/
 
563
#define cOCT6100_TONE_INFO_START_STRING                 "[ToneDetectorInfo]"
 
564
#define cOCT6100_TONE_INFO_STOP_STRING                  "[~ToneDetectorInfo]"
 
565
#define cOCT6100_TONE_INFO_EVENT_STRING                 "TONEEVENT=0x"
 
566
 
 
567
#define cOCT6100_MAX_NLP_CONF_DWORD                             20
 
568
 
 
569
/* Tail displacement info.*/
 
570
#define cOCT6100_MAX_TAIL_DISPLACEMENT                  896
 
571
 
 
572
/* Comfort noise define */
 
573
#define cOCT6100_COMFORT_NOISE_NORMAL                   0x0
 
574
#define cOCT6100_COMFORT_NOISE_EXTENDED                 0x3
 
575
#define cOCT6100_COMFORT_NOISE_OFF                              0x2
 
576
#define cOCT6100_COMFORT_NOISE_FAST_LATCH               0x1
 
577
 
 
578
/* Mixer event type.*/
 
579
#define cOCT6100_EVENT_TYPE_SOUT_COPY                   0x0
 
580
#define cOCT6100_EVENT_TYPE_SIN_COPY                    0x1
 
581
 
 
582
/* Tone disabler status.*/
 
583
#define cOCT6100_TONE_DISABLER_EC_ENABLED               0
 
584
#define cOCT6100_TONE_DISABLER_EC_DISABLED              1
 
585
 
 
586
/* ADPCM Channel defines */
 
587
#define cOCT6100_ADPCM_ENCODING                                 0
 
588
#define cOCT6100_ADPCM_DECODING                                 1
 
589
 
 
590
/* Double talk behavior modes. */
 
591
#define cOCT6100_DOUBLE_TALK_BEH_NORMAL                         0x0
 
592
#define cOCT6100_DOUBLE_TALK_BEH_LESS_AGGRESSIVE        0x1
 
593
 
 
594
/* Api Version string length.*/
 
595
#define cOCT6100_API_VERSION_STRING_LENGTH              32
 
596
 
 
597
/* Extended tone detection information. */
 
598
#define cOCT6100_API_EXT_TONE_DISABLED                  0
 
599
#define cOCT6100_API_EXT_TONE_SIN_PORT_MODE             1
 
600
#define cOCT6100_API_EXT_TONE_RIN_PORT_MODE             2
 
601
 
 
602
 
 
603
 
 
604
/* Mute/UnMute defines. */
 
605
#define cOCT6100_CHANNEL_MUTE_PORT_NONE                                 0x00
 
606
#define cOCT6100_CHANNEL_MUTE_PORT_RIN                                  0x01
 
607
#define cOCT6100_CHANNEL_MUTE_PORT_ROUT                                 0x02
 
608
#define cOCT6100_CHANNEL_MUTE_PORT_SIN                                  0x04
 
609
#define cOCT6100_CHANNEL_MUTE_PORT_SOUT                                 0x08
 
610
#define cOCT6100_CHANNEL_MUTE_PORT_SIN_WITH_FEATURES    0x10
 
611
 
 
612
/* Debug get data dump modes. */
 
613
#define cOCT6100_DEBUG_GET_DATA_MODE_16S_LITE                   0x0
 
614
#define cOCT6100_DEBUG_GET_DATA_MODE_120S_LITE                  0x1
 
615
#define cOCT6100_DEBUG_GET_DATA_MODE_16S                                0x2
 
616
#define cOCT6100_DEBUG_GET_DATA_MODE_120S                               0x3
 
617
 
 
618
/* Debug get data dump content. */
 
619
#define cOCT6100_DEBUG_GET_DATA_CONTENT_COMPLETE                0x0             /* Full binary dump to be sent for support. */
 
620
#define cOCT6100_DEBUG_GET_DATA_CONTENT_RIN_PCM                 0x1             /* Only Rin PCM stream data. */
 
621
#define cOCT6100_DEBUG_GET_DATA_CONTENT_SIN_PCM                 0x2             /* Only Sin PCM stream data. */
 
622
#define cOCT6100_DEBUG_GET_DATA_CONTENT_SOUT_PCM                0x3             /* Only Sout PCM stream data. */
 
623
 
 
624
 
 
625
 
 
626
#define cOCT6100_BIST_IN_PROGRESS                               0x0
 
627
#define cOCT6100_BIST_CONFIGURATION_FAILED              0x1
 
628
#define cOCT6100_BIST_STATUS_CRC_FAILED                 0x2
 
629
#define cOCT6100_BIST_MEMORY_FAILED                             0x3
 
630
#define cOCT6100_BIST_SUCCESS                                   0x4
 
631
 
 
632
/* Image types. */
 
633
#define cOCT6100_IMAGE_TYPE_WIRELINE            0x0
 
634
#define cOCT6100_IMAGE_TYPE_COMBINED            0x1
 
635
 
 
636
/* Fatal general error types. */
 
637
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_1             0x0001
 
638
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_2             0x0002
 
639
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_3             0x0004
 
640
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_4             0x0008
 
641
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_5             0x0010
 
642
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_6             0x0020
 
643
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_7             0x0040
 
644
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_8             0x0080
 
645
 
 
646
#endif /* __OCT6100_DEFINES_H__ */
 
647