summaryrefslogtreecommitdiff
path: root/kernel/wctdm24xxp/gpakErrs.h
blob: 2f5083bb76f0b4c039bbd48db590c4ae7d3cf76d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/*
 * Copyright (c) 2002 - 2004, Adaptive Digital Technologies, Inc.
 *
 * File Name: GpakErrs.h
 *
 * Description:
 *   This file contains DSP reply status codes used by G.PAK API functions to
 *   indicate specific errors.
 *
 * Version: 1.0
 *
 * Revision History:
 *   10/17/01 - Initial release.
 *   07/03/02 - Updates for conferencing.
 *   06/15/04 - Tone type updates.
 *
 * This program has been released under the terms of the GPL version 2 by
 * permission of Adaptive Digital Technologies, Inc.
 *
 */

/*
 * See http://www.asterisk.org for more information about
 * the Asterisk project. Please do not directly contact
 * any of the maintainers of this project for assistance;
 * the project provides a web site, mailing lists and IRC
 * channels for your use.
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License Version 2 as published by the
 * Free Software Foundation. See the LICENSE file included with
 * this program for more details.
 */

#ifndef _GPAKERRS_H  /* prevent multiple inclusion */
#define _GPAKERRS_H

/* Configure Serial Ports reply status codes. */
typedef enum
{
    Pc_Success = 0,             /* serial ports configured successfully */
    Pc_ChannelsActive = 1,      /* unable to configure while channels active  */
    Pc_TooManySlots1 = 2,       /* too many slots selected for port 1 */
    Pc_InvalidBlockCombo1 = 3,  /* invalid combination of blocks for port 1 */
    Pc_NoSlots1 = 4,            /* no slots selected for port 1 */
    Pc_InvalidSlots1 = 5,       /* invalid slot (> max) selected for port 1 */
    Pc_TooManySlots2 = 6,       /* too many slots selected for port 2 */
    Pc_InvalidBlockCombo2 = 7,  /* invalid combination of blocks for port 2 */
    Pc_NoSlots2 = 8,            /* no slots selected for port 2 */
    Pc_InvalidSlots2 = 9,       /* invalid slot (> max) selected for port 2 */
    Pc_TooManySlots3 = 10,      /* too many slots selected for port 3 */
    Pc_InvalidBlockCombo3 = 11, /* invalid combination of blocks for port 3 */
    Pc_NoSlots3 = 12,           /* no slots selected for port 3 */
    Pc_InvalidSlots3 = 13       /* invalid slot (> max) selected for port 3 */
} GPAK_PortConfigStat_t;

/* Configure Channel reply status codes. */
typedef enum
{
    Cc_Success = 0,                 /* channel configured successfully */
    Cc_InvalidChannelType = 1,      /* invalid Channel Type */
    Cc_InvalidChannel  = 2,         /* invalid Channel A Id */
    Cc_ChannelActiveA = 3,          /* Channel A is currently active */
    Cc_InvalidInputPortA = 4,       /* invalid Input A Port */
    Cc_InvalidInputSlotA = 5,       /* invalid Input A Slot */
    Cc_BusyInputSlotA = 6,          /* busy Input A Slot */
    Cc_InvalidOutputPortA = 7,      /* invalid Output A Port */
    Cc_InvalidOutputSlotA = 8,      /* invalid Output A Slot */
    Cc_BusyOutputSlotA = 9,         /* busy Output A Slot */
    Cc_InvalidInputPortB = 10,      /* invalid Input B Port */
    Cc_InvalidInputSlotB = 11,      /* invalid Input B Slot */
    Cc_BusyInputSlotB = 12,         /* busy Input B Slot */
    Cc_InvalidPktInCodingA = 13,    /* invalid Packet In A Coding */
    Cc_InvalidPktOutCodingA = 14,   /* invalid Packet Out A Coding */
    Cc_InvalidPktInSizeA = 15,      /* invalid Packet In A Frame Size */
    Cc_InvalidPktOutSizeA = 16,     /* invalid Packet Out A Frame Size */

    Cc_ChanTypeNotConfigured = 21,  /* channel type was not configured */
    Cc_InsuffECResources = 22,      /* insufficient ecan resources avail. */
    Cc_InsuffTDMResources = 23,     /* insufficient tdm block resources avail. */

    Cc_InsuffPktBufResources = 25,  /* insufficient pkt buffer resources avail. */
    Cc_InsuffPcmBufResources = 26,  /* insufficient pcm buffer resources avail. */

    Cc_BadPcmEcNlpType = 30,        /* invalid EC Nlp type */
    Cc_BadPcmEcTapLength = 31,      /* invalid EC tap length */
    Cc_BadPcmEcDblTalkThresh = 32,  /* invalid EC double-talk threshold */
    Cc_BadPcmEcNlpThreshold = 33,   /* invalid EC Nlp threshold */
    Cc_BadPcmEcCngThreshold = 34,   /* invalid EC Cng threshold */
    Cc_BadPcmEcAdaptLimit = 35,     /* invalid EC Adapt Limit */
    Cc_BadPcmEcCrossCorrLim = 36,   /* invalid EC Cross Correlation Limit */
    Cc_BadPcmEcNumFirSegs = 37,     /* invalid EC Number of FirSegments */
    Cc_BadPcmEcFirSegLen = 38,      /* invalid EC Fir Segment Length */

    /*Cc_InvalidNumEcsEnabled = 48, */   /* more than 1 Ec enabled on channel */
    Cc_InvalidFrameRate = 49,        /* invalid gpak frame rate */
    Cc_InvalidSoftCompand = 50,      /* invalid softCompanding type */

	Cc_InvalidMuteToneA = 51,        /* invalid MuteToneA set, no detector */
	Cc_InvalidMuteToneB = 52,         /* invalid MuteToneB set, no detector */
    Cc_InsuffFaxCngDetResources = 53     /* insufficient tdm block resources avail. */

} GPAK_ChannelConfigStat_t;

/* Tear Down Channel reply status codes. */
typedef enum
{
    Td_Success = 0,                 /* channel torn down successfully */
    Td_InvalidChannel = 1,          /* invalid Channel Id */
    Td_ChannelNotActive = 2         /* channel is not active */
} GPAK_TearDownChanStat_t;


typedef enum
{
    Ac_Success = 0,           /* algorithm control is successfull */
    Ac_InvalidChannel = 1,    /* invalid channel identifier */
    Ac_InvalidCode = 2,       /* invalid algorithm control code */
    Ac_ECNotEnabled = 3,      /* echo canceller was not allocated */ 
    Ac_InvalidSoftComp = 4,   /* invalid softcompanding, 'cause serial port not in companding mode */
	Ac_InvalidDTMFMuteA = 5,  /* A side invalid Mute, since no dtmf detector */
	Ac_InvalidDTMFMuteB = 6,  /* B side invalid Mute, since no dtmf detector */
	Ac_InvalidFaxCngA = 7,    /* A side FAXCNG detector not available */
	Ac_InvalidFaxCngB = 8,     /* B side FAXCNG detector not available */
	Ac_InvalidSysConfig = 9    /* No new system parameters (DTMF config) wrriten yet */
} GPAK_AlgControlStat_t;

/* Write System Parameters reply status codes. */
typedef enum
{
    Sp_Success = 0,             /* System Parameters written successfully */
    Sp_BadTwistThresh = 29        /* invalid twist threshold */

} GPAK_SysParmsStat_t;

#endif  /* prevent multiple inclusion */