Compare commits
64 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b18877c4ab | ||
|
|
6d945a01c3 | ||
|
|
74a791799e | ||
|
|
dfa7a08ba3 | ||
|
|
32b715d373 | ||
|
|
03c0afef41 | ||
|
|
1b9a64e43b | ||
|
|
e6c2b1850d | ||
|
|
29280a548c | ||
|
|
b093554f54 | ||
|
|
bc6250fe1f | ||
|
|
ba070152fc | ||
|
|
541435eac7 | ||
|
|
2457399d92 | ||
|
|
a81a43c9b6 | ||
|
|
5efd590aef | ||
|
|
1e21cb1356 | ||
|
|
78584da122 | ||
|
|
cbb0252a6a | ||
|
|
250bc06238 | ||
|
|
db9b649e03 | ||
|
|
2d576dcea0 | ||
|
|
b487a96ada | ||
|
|
67cc13f100 | ||
|
|
3482a25b84 | ||
|
|
b23f3ca5a9 | ||
|
|
a5c6e58b6e | ||
|
|
12492f4e23 | ||
|
|
2061c6c359 | ||
|
|
bad2f86c11 | ||
|
|
13f0f2235d | ||
|
|
505621a31c | ||
|
|
f2152481e9 | ||
|
|
caa8c947b7 | ||
|
|
b4aa63049f | ||
|
|
ccd13cfd47 | ||
|
|
d3cadf5352 | ||
|
|
52b37fa5f1 | ||
|
|
9ae57618d3 | ||
|
|
f46df849da | ||
|
|
178ae27825 | ||
|
|
49a5fbfcd2 | ||
|
|
24015f717e | ||
|
|
29a06509ec | ||
|
|
4c177ef39c | ||
|
|
ad02c5b314 | ||
|
|
ed3da234d7 | ||
|
|
1c1fe1fd94 | ||
|
|
366eccb556 | ||
|
|
d765176efd | ||
|
|
fae45054b1 | ||
|
|
249baf1db3 | ||
|
|
d3d246b656 | ||
|
|
3f57781f6e | ||
|
|
88035ea78c | ||
|
|
e38b85fde9 | ||
|
|
55a9fd2da2 | ||
|
|
393aef02ef | ||
|
|
3140dfc482 | ||
|
|
a3ae25141a | ||
|
|
81205b90f7 | ||
|
|
e878bc06dc | ||
|
|
1462933a0d | ||
|
|
3122b143a3 |
10
Makefile
10
Makefile
@@ -176,6 +176,9 @@ $(LTZ_SO): $(LTZ_SO_OBJS)
|
||||
|
||||
dahdi_cfg: $(LTZ_A)
|
||||
dahdi_cfg: LIBS+=-lm
|
||||
dahdi_pcap:
|
||||
$(CC) $(CFLAGS) dahdi_pcap.c -lpcap -o $@ $<
|
||||
|
||||
|
||||
fxstest: $(LTZ_SO)
|
||||
fxstest: LIBS+=-lm
|
||||
@@ -270,6 +273,12 @@ install-utils-subdirs:
|
||||
$(MAKE) -C $$dir install; \
|
||||
done
|
||||
|
||||
install-tests: tests
|
||||
ifneq (,$(TEST_BINS))
|
||||
install -d $(DESTDIR)$(BIN_DIR)
|
||||
install $(TEST_BINS) $(DESTDIR)$(BIN_DIR)/
|
||||
endif
|
||||
|
||||
config:
|
||||
ifneq (,$(COPY_INITD))
|
||||
$(COPY_INITD)
|
||||
@@ -339,6 +348,7 @@ clean:
|
||||
rm -f core
|
||||
rm -f dahdi_cfg-shared fxstest
|
||||
rm -rf $(GENERATED_DOCS) *.asciidoc tonezones.txt
|
||||
rm -f dahdi_pcap
|
||||
|
||||
distclean: dist-clean
|
||||
|
||||
|
||||
34
README
34
README
@@ -4,7 +4,7 @@ Asterisk Development Team <asteriskteam@digium.com>
|
||||
$Revision$, $Date$
|
||||
|
||||
DAHDI stands for Digium Asterisk Hardware Device Interface. This
|
||||
package contains the userspace tools to configure the kernel modules
|
||||
package contains the user-space tools to configure the kernel modules
|
||||
included in the package dahdi-linux.
|
||||
|
||||
Build Requirements
|
||||
@@ -14,7 +14,7 @@ dahdi-linux before building dahdi-tools.
|
||||
|
||||
Build System
|
||||
~~~~~~~~~~~~
|
||||
gcc and friends. Generally you will need to install the package gcc.
|
||||
GCC and friends. Generally you will need to install the package gcc.
|
||||
There may be cases where you will need a specific version of gcc to build
|
||||
kernel modules.
|
||||
|
||||
@@ -51,7 +51,7 @@ There are some make targets that are provided to build or install just
|
||||
parts of DAHDI:
|
||||
|
||||
. Build targets:
|
||||
- make: Build DAHDI userspace programs. partial
|
||||
- make: Build DAHDI user-space programs. partial
|
||||
targets of it:
|
||||
* make 'utilname': builds 'utilname' alone (e.g: `make dahdi_diag`)
|
||||
* make utils: Build libtonezone.
|
||||
@@ -66,7 +66,7 @@ Installation to a Subtree
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
The following may be useful when testing the package or when preparing a
|
||||
package for a binary distribution (such as an rpm package) installing
|
||||
onto a subtree rather than on th real system.
|
||||
onto a subtree rather than on the real system.
|
||||
|
||||
make install DESTDIR=targetdir
|
||||
|
||||
@@ -89,7 +89,7 @@ run, use:
|
||||
To re-run ./configure with the same parameters it was run with last
|
||||
time, use:
|
||||
|
||||
./ocnfig.status --recheck
|
||||
./config.status --recheck
|
||||
|
||||
|
||||
Configuration
|
||||
@@ -106,7 +106,9 @@ channels, and send it to the kernel.
|
||||
A sample annotated system.conf is included in this directory and
|
||||
installed by default. Edit it to suit your configuration. Alternatively
|
||||
use the script dahdi_genconf to generate one that should work with your
|
||||
system.
|
||||
system. Note that while dahdi_genconf will generate a working configuration,
|
||||
it will not automatically detect hardware echo cancellation modules. These
|
||||
will have to be enabled manually in system.conf.
|
||||
|
||||
/etc/dahdi/init.conf
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -136,7 +138,7 @@ include::genconf_parameters.asciidoc[]
|
||||
Tonezones
|
||||
~~~~~~~~~
|
||||
The file zonedata.c contains the information about the tone zones used
|
||||
in libtonezone (and hence also in ztcfg). Here is a list of those zones:
|
||||
in libtonezone (and hence also in dahdi_cfg). Here is a list of those zones:
|
||||
|
||||
include::tonezones.txt[]
|
||||
|
||||
@@ -144,14 +146,14 @@ include::tonezones.txt[]
|
||||
DAHDI PERL modules
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
The directory xpp has, in addition to helper utilities for the
|
||||
Xorcom Astribank, a collection of perl modules to provide information
|
||||
related to DAHDI. The perl modules themselves are under xpp/perl_modules/ .
|
||||
Xorcom Astribank, a collection of PERL modules to provide information
|
||||
related to DAHDI. The PERL modules themselves are under xpp/perl_modules/ .
|
||||
In xpp/ there are several utilities that use those modules:
|
||||
- xpp-specific: dahdi_registration, xpp_sync, xpp_blink .
|
||||
- General: lsdahdi, dahdi_genconf, dahdi_hardware, dahdi_drivers
|
||||
|
||||
The DAHDI perl modules will currently only be automatically installed if you
|
||||
happen to install the xpp directory. Those utilities require the perl modules
|
||||
The DAHDI PERL modules will currently only be automatically installed if you
|
||||
happen to install the xpp directory. Those utilities require the PERL modules
|
||||
to be installed, however they will also look for them in the directory
|
||||
perl_modules, and thus can be run directly from the DAHDI source tree. For
|
||||
example:
|
||||
@@ -165,7 +167,7 @@ instance:
|
||||
perldoc ./xpp/lsdahdi
|
||||
|
||||
Some of them are specific for the Xorcom Astribank and described in its
|
||||
docuemntation. the others are:
|
||||
documentation. the others are:
|
||||
|
||||
lsdahdi::
|
||||
A somewhat glorified `cat /proc/dahdi/*`.
|
||||
@@ -174,9 +176,9 @@ dahdi_genconf::
|
||||
/etc/dahdi/genconf_parameters (replaces genzaptelconf as well).
|
||||
dahdi_drivers::
|
||||
A two-liner script (not installed by default) that simply returns the
|
||||
modules that should be modprobed on this system.
|
||||
modules that should be modprobe-d on this system.
|
||||
dahdi_hardware::
|
||||
Uses the information from sysfs and its own knowledge to show
|
||||
Uses the information from SysFS and its own knowledge to show
|
||||
what PCI/USB DAHDI hardware is connected and if it is currently used
|
||||
by a driver. Shows also some more information for Astribanks from
|
||||
/proc/xpp .
|
||||
@@ -184,8 +186,8 @@ dahdi_hardware::
|
||||
|
||||
PPP Support
|
||||
~~~~~~~~~~~
|
||||
DAHDI digital cards can provide data channels through ppp as
|
||||
point-to-point connections. This requires a plugin to the ppp daemon
|
||||
DAHDI digital cards can provide data channels through PPP as
|
||||
point-to-point connections. This requires a plug-in to the PPP daemon
|
||||
that is included in the ppp/ subdirectory. To install it:
|
||||
|
||||
1. Make sure you have the PPP source / headers installed. On Debian:
|
||||
|
||||
@@ -62,10 +62,9 @@ Any or all of these modules can be loaded at the same time, and the echo
|
||||
canceler to be used on the system's channels can be configured using
|
||||
the dahdi_cfg tool from the dahdi-tools package.
|
||||
|
||||
IMPORTANT: It is *mandatory* to configure an echo canceler for the
|
||||
system's channels using dahdi_cfg unless the interface cards in use
|
||||
have echo canceler modules available and enabled. There is *no*
|
||||
default software echo canceler with DAHDI. See
|
||||
IMPORTANT: It is *mandatory* to configure an echo canceler for the system's
|
||||
channels using dahdi_cfg. There is *no* default echo canceler with DAHDI, not
|
||||
even hardware echo cancellation modules. See
|
||||
<<_echo_cancellers,section on echo cancellers>> in sample system.conf.
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
/* Define if your system has the DAHDI headers. */
|
||||
#undef HAVE_DAHDI
|
||||
|
||||
/* Define if your system has the DAHDI23 headers. */
|
||||
#undef HAVE_DAHDI23
|
||||
|
||||
/* Define DAHDI23 headers version */
|
||||
#undef HAVE_DAHDI23_VERSION
|
||||
|
||||
/* Define DAHDI headers version */
|
||||
#undef HAVE_DAHDI_VERSION
|
||||
|
||||
@@ -21,6 +27,9 @@
|
||||
/* Define to indicate the ${NEWT_DESCRIP} library version */
|
||||
#undef HAVE_NEWT_VERSION
|
||||
|
||||
/* Define to 1 if you have the `semtimedop' function. */
|
||||
#undef HAVE_SEMTIMEDOP
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
@@ -63,6 +72,9 @@
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
|
||||
@@ -99,6 +99,8 @@ AST_C_DEFINE_CHECK([DAHDI23], [DAHDI_CONFIG_NTTE], [dahdi/user.h])
|
||||
AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
|
||||
AST_EXT_LIB_CHECK([USB], [usb], [usb_init], [usb.h])
|
||||
|
||||
AC_CHECK_FUNCS([semtimedop])
|
||||
|
||||
PBX_HDLC=0
|
||||
AC_MSG_CHECKING([for GENERIC_HDLC_VERSION version 4 in linux/hdlc.h])
|
||||
AC_COMPILE_IFELSE(
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# Should-Stop: $network $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: DAHDI kernel modules
|
||||
# Description: dahdi - load and configure DAHDI modules
|
||||
### END INIT INFO
|
||||
|
||||
@@ -258,11 +259,6 @@ case "$1" in
|
||||
|
||||
xpp_startup
|
||||
|
||||
if [ ! -e /proc/dahdi/1 ]; then
|
||||
echo "No hardware timing source found in /proc/dahdi, loading dahdi_dummy"
|
||||
modprobe dahdi_dummy 2> /dev/null
|
||||
fi
|
||||
|
||||
if [ $system = debian ]; then
|
||||
echo -n "Running dahdi_cfg: "
|
||||
$DAHDI_CFG_CMD 2> /dev/null && echo -n "done"
|
||||
|
||||
213
dahdi_cfg.c
213
dahdi_cfg.c
@@ -85,6 +85,13 @@ static struct dahdi_lineconfig lc[DAHDI_MAX_SPANS];
|
||||
|
||||
static struct dahdi_chanconfig cc[DAHDI_MAX_CHANNELS];
|
||||
|
||||
static int current_span = 0;
|
||||
static int only_span = 0;
|
||||
static int restrict_channels = 0;
|
||||
static int selected_channels[DAHDI_MAX_CHANNELS];
|
||||
static int chan2span[DAHDI_MAX_CHANNELS];
|
||||
static int declared_spans[DAHDI_MAX_SPANS];
|
||||
|
||||
static struct dahdi_attach_echocan ae[DAHDI_MAX_CHANNELS];
|
||||
|
||||
static struct dahdi_dynamic_span zds[NUM_DYNAMIC];
|
||||
@@ -176,16 +183,6 @@ static const char *sigtype_to_str(const int sig)
|
||||
}
|
||||
}
|
||||
|
||||
int ind_ioctl(int channo, int fd, int op, void *data)
|
||||
{
|
||||
struct dahdi_indirect_data ind;
|
||||
|
||||
ind.chan = channo;
|
||||
ind.op = op;
|
||||
ind.data = data;
|
||||
return ioctl(fd, DAHDI_INDIRECT, &ind);
|
||||
}
|
||||
|
||||
static void clear_fields()
|
||||
{
|
||||
|
||||
@@ -238,6 +235,35 @@ static char *trim(char *buf)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static int skip_channel(int x)
|
||||
{
|
||||
int spanno = chan2span[x];
|
||||
|
||||
if (restrict_channels) {
|
||||
if (!selected_channels[x])
|
||||
return 1;
|
||||
/* sanity check */
|
||||
if (only_span) {
|
||||
if (spanno != 0 && only_span != spanno) {
|
||||
fprintf(stderr,
|
||||
"Only span %d. Skip selected channel %d from span %d\n",
|
||||
only_span, x, spanno);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (only_span && !declared_spans[only_span]) {
|
||||
fprintf(stderr,
|
||||
"Error: analog span %d given to '-S', without '-C' restriction.\n",
|
||||
only_span);
|
||||
exit(1);
|
||||
}
|
||||
if (only_span && only_span != spanno)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int parseargs(char *input, char *output[], int maxargs, char sep)
|
||||
{
|
||||
char *c;
|
||||
@@ -268,11 +294,10 @@ static int parseargs(char *input, char *output[], int maxargs, char sep)
|
||||
int dspanconfig(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int chans;
|
||||
int timing;
|
||||
argc = res = parseargs(args, realargs, 4, ',');
|
||||
res = parseargs(args, realargs, 4, ',');
|
||||
if (res != 4) {
|
||||
error("Incorrect number of arguments to 'dynamic' (should be <driver>,<address>,<num channels>, <timing>)\n");
|
||||
return -1;
|
||||
@@ -321,6 +346,8 @@ int spanconfig(char *keyword, char *args)
|
||||
error("Span number should be a valid span number, not '%s'\n", realargs[0]);
|
||||
return -1;
|
||||
}
|
||||
current_span = span;
|
||||
declared_spans[span] = 1;
|
||||
res = sscanf(realargs[1], "%d", &timing);
|
||||
if ((res != 1) || (timing < 0) || (timing > MAX_TIMING)) {
|
||||
error("Timing should be a number from 0 to %d, not '%s'\n",
|
||||
@@ -492,6 +519,7 @@ static int chanconfig(char *keyword, char *args)
|
||||
int master=0;
|
||||
int dacschan = 0;
|
||||
char *idle;
|
||||
int is_digital;
|
||||
bzero(chans, sizeof(chans));
|
||||
strtok(args, ":");
|
||||
idle = strtok(NULL, ":");
|
||||
@@ -503,6 +531,7 @@ static int chanconfig(char *keyword, char *args)
|
||||
if (res <= 0)
|
||||
return -1;
|
||||
for (x=1;x<DAHDI_MAX_CHANNELS;x++) {
|
||||
is_digital = 0;
|
||||
if (chans[x]) {
|
||||
if (slineno[x]) {
|
||||
error("Channel %d already configured as '%s' at line %d\n", x, sig[x], slineno[x]);
|
||||
@@ -548,6 +577,7 @@ static int chanconfig(char *keyword, char *args)
|
||||
return -1;
|
||||
cc[x].sigtype = DAHDI_SIG_CAS;
|
||||
sig[x] = sigtype_to_str(cc[x].sigtype);
|
||||
is_digital = 1;
|
||||
} else if (!strcasecmp(keyword, "dacs")) {
|
||||
/* Setup channel for monitor */
|
||||
cc[x].idlebits = dacschan;
|
||||
@@ -558,6 +588,7 @@ static int chanconfig(char *keyword, char *args)
|
||||
cc[dacschan].sigtype = DAHDI_SIG_DACS;
|
||||
sig[x] = sigtype_to_str(cc[dacschan].sigtype);
|
||||
dacschan++;
|
||||
is_digital = 1;
|
||||
} else if (!strcasecmp(keyword, "dacsrbs")) {
|
||||
/* Setup channel for monitor */
|
||||
cc[x].idlebits = dacschan;
|
||||
@@ -567,6 +598,7 @@ static int chanconfig(char *keyword, char *args)
|
||||
cc[dacschan].idlebits = x;
|
||||
cc[dacschan].sigtype = DAHDI_SIG_DACS_RBS;
|
||||
sig[x] = sigtype_to_str(cc[dacschan].sigtype);
|
||||
is_digital = 1;
|
||||
dacschan++;
|
||||
} else if (!strcasecmp(keyword, "unused")) {
|
||||
cc[x].sigtype = 0;
|
||||
@@ -574,6 +606,7 @@ static int chanconfig(char *keyword, char *args)
|
||||
} else if (!strcasecmp(keyword, "indclear") || !strcasecmp(keyword, "bchan")) {
|
||||
cc[x].sigtype = DAHDI_SIG_CLEAR;
|
||||
sig[x] = sigtype_to_str(cc[x].sigtype);
|
||||
is_digital = 1;
|
||||
} else if (!strcasecmp(keyword, "clear")) {
|
||||
sig[x] = sigtype_to_str(DAHDI_SIG_CLEAR);
|
||||
if (master) {
|
||||
@@ -583,6 +616,7 @@ static int chanconfig(char *keyword, char *args)
|
||||
cc[x].sigtype = DAHDI_SIG_CLEAR;
|
||||
master = x;
|
||||
}
|
||||
is_digital = 1;
|
||||
} else if (!strcasecmp(keyword, "rawhdlc")) {
|
||||
sig[x] = sigtype_to_str(DAHDI_SIG_HDLCRAW);
|
||||
if (master) {
|
||||
@@ -592,6 +626,7 @@ static int chanconfig(char *keyword, char *args)
|
||||
cc[x].sigtype = DAHDI_SIG_HDLCRAW;
|
||||
master = x;
|
||||
}
|
||||
is_digital = 1;
|
||||
} else if (!strcasecmp(keyword, "nethdlc")) {
|
||||
sig[x] = sigtype_to_str(DAHDI_SIG_HDLCNET);
|
||||
memset(cc[x].netdev_name, 0, sizeof(cc[x].netdev_name));
|
||||
@@ -605,6 +640,7 @@ static int chanconfig(char *keyword, char *args)
|
||||
}
|
||||
master = x;
|
||||
}
|
||||
is_digital = 1;
|
||||
} else if (!strcasecmp(keyword, "fcshdlc")) {
|
||||
sig[x] = sigtype_to_str(DAHDI_SIG_HDLCFCS);
|
||||
if (master) {
|
||||
@@ -614,18 +650,26 @@ static int chanconfig(char *keyword, char *args)
|
||||
cc[x].sigtype = DAHDI_SIG_HDLCFCS;
|
||||
master = x;
|
||||
}
|
||||
is_digital = 1;
|
||||
} else if (!strcasecmp(keyword, "dchan")) {
|
||||
sig[x] = "D-channel";
|
||||
cc[x].sigtype = DAHDI_SIG_HDLCFCS;
|
||||
is_digital = 1;
|
||||
} else if (!strcasecmp(keyword, "hardhdlc")) {
|
||||
sig[x] = "Hardware assisted D-channel";
|
||||
cc[x].sigtype = DAHDI_SIG_HARDHDLC;
|
||||
is_digital = 1;
|
||||
} else if (!strcasecmp(keyword, "mtp2")) {
|
||||
sig[x] = "MTP2";
|
||||
cc[x].sigtype = DAHDI_SIG_MTP2;
|
||||
is_digital = 1;
|
||||
} else {
|
||||
fprintf(stderr, "Huh? (%s)\n", keyword);
|
||||
}
|
||||
if (is_digital)
|
||||
chan2span[x] = current_span;
|
||||
else
|
||||
current_span = 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -677,6 +721,8 @@ static void apply_fiftysix(void)
|
||||
int chanfd;
|
||||
|
||||
for (x = 1; x < DAHDI_MAX_CHANNELS; x++) {
|
||||
if (skip_channel(x))
|
||||
continue;
|
||||
chanfd = open("/dev/dahdi/channel", O_RDWR);
|
||||
if (chanfd == -1) {
|
||||
fprintf(stderr,
|
||||
@@ -765,13 +811,12 @@ static int unimplemented(char *keyword, char *args)
|
||||
int ctcss(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int rxtone;
|
||||
int rxtag;
|
||||
int txtone;
|
||||
int isdcs = 0;
|
||||
argc = res = parseargs(args, realargs, 3, ',');
|
||||
res = parseargs(args, realargs, 3, ',');
|
||||
if (res != 3) {
|
||||
error("Incorrect number of arguments to 'ctcss' (should be <rxtone>,<rxtag>,<txtone>)\n");
|
||||
return -1;
|
||||
@@ -818,10 +863,9 @@ int ctcss(char *keyword, char *args)
|
||||
int dcsrx(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int rxtone;
|
||||
argc = res = parseargs(args, realargs, 1, ',');
|
||||
res = parseargs(args, realargs, 1, ',');
|
||||
if (res != 1) {
|
||||
error("Incorrect number of arguments to 'dcsrx' (should be <rxtone>)\n");
|
||||
return -1;
|
||||
@@ -841,11 +885,10 @@ int dcsrx(char *keyword, char *args)
|
||||
int tx(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int txtone;
|
||||
int isdcs = 0;
|
||||
argc = res = parseargs(args, realargs, 1, ',');
|
||||
res = parseargs(args, realargs, 1, ',');
|
||||
if (res != 1) {
|
||||
error("Incorrect number of arguments to 'tx' (should be <txtone>)\n");
|
||||
return -1;
|
||||
@@ -870,10 +913,9 @@ int tx(char *keyword, char *args)
|
||||
int debounce_time(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int val;
|
||||
argc = res = parseargs(args, realargs, 1, ',');
|
||||
res = parseargs(args, realargs, 1, ',');
|
||||
if (res != 1) {
|
||||
error("Incorrect number of arguments to 'debouncetime' (should be <value>)\n");
|
||||
return -1;
|
||||
@@ -893,10 +935,9 @@ int debounce_time(char *keyword, char *args)
|
||||
int burst_time(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int val;
|
||||
argc = res = parseargs(args, realargs, 1, ',');
|
||||
res = parseargs(args, realargs, 1, ',');
|
||||
if (res != 1) {
|
||||
error("Incorrect number of arguments to 'bursttime' (should be <value>)\n");
|
||||
return -1;
|
||||
@@ -916,10 +957,9 @@ int burst_time(char *keyword, char *args)
|
||||
int tx_gain(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int val;
|
||||
argc = res = parseargs(args, realargs, 1, ',');
|
||||
res = parseargs(args, realargs, 1, ',');
|
||||
if (res != 1) {
|
||||
error("Incorrect number of arguments to 'txgain' (should be <value>)\n");
|
||||
return -1;
|
||||
@@ -937,10 +977,9 @@ int tx_gain(char *keyword, char *args)
|
||||
int rx_gain(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int val;
|
||||
argc = res = parseargs(args, realargs, 1, ',');
|
||||
res = parseargs(args, realargs, 1, ',');
|
||||
if (res != 1) {
|
||||
error("Incorrect number of arguments to 'rxgain' (should be <value>)\n");
|
||||
return -1;
|
||||
@@ -958,10 +997,9 @@ int rx_gain(char *keyword, char *args)
|
||||
int de_emp(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int val;
|
||||
argc = res = parseargs(args, realargs, 1, ',');
|
||||
res = parseargs(args, realargs, 1, ',');
|
||||
if (res != 1) {
|
||||
error("Incorrect number of arguments to 'de-emp' (should be <value>)\n");
|
||||
return -1;
|
||||
@@ -981,10 +1019,9 @@ int de_emp(char *keyword, char *args)
|
||||
int pre_emp(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int val;
|
||||
argc = res = parseargs(args, realargs, 1, ',');
|
||||
res = parseargs(args, realargs, 1, ',');
|
||||
if (res != 1) {
|
||||
error("Incorrect number of arguments to 'pre_emp' (should be <value>)\n");
|
||||
return -1;
|
||||
@@ -1004,10 +1041,9 @@ int pre_emp(char *keyword, char *args)
|
||||
int invert_cor(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int val;
|
||||
argc = res = parseargs(args, realargs, 1, ',');
|
||||
res = parseargs(args, realargs, 1, ',');
|
||||
if (res != 1) {
|
||||
error("Incorrect number of arguments to 'invertcor' (should be <value>)\n");
|
||||
return -1;
|
||||
@@ -1031,10 +1067,9 @@ int invert_cor(char *keyword, char *args)
|
||||
int ext_tone(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int val;
|
||||
argc = res = parseargs(args, realargs, 1, ',');
|
||||
res = parseargs(args, realargs, 1, ',');
|
||||
if (res != 1) {
|
||||
error("Incorrect number of arguments to 'exttone' (should be <value>)\n");
|
||||
return -1;
|
||||
@@ -1060,11 +1095,10 @@ int ext_tone(char *keyword, char *args)
|
||||
int cor_thresh(char *keyword, char *args)
|
||||
{
|
||||
static char *realargs[10];
|
||||
int argc;
|
||||
int res;
|
||||
int val;
|
||||
int x = 0;
|
||||
argc = res = parseargs(args, realargs, 1, ',');
|
||||
res = parseargs(args, realargs, 1, ',');
|
||||
if (res != 1) {
|
||||
error("Incorrect number of arguments to 'corthresh' (should be <value>)\n");
|
||||
return -1;
|
||||
@@ -1091,6 +1125,7 @@ static int rad_chanconfig(char *keyword, char *args)
|
||||
int res = 0;
|
||||
int x,i,n;
|
||||
struct dahdi_radio_param p;
|
||||
int chanfd;
|
||||
|
||||
toneindex = 1;
|
||||
bzero(chans, sizeof(chans));
|
||||
@@ -1099,8 +1134,21 @@ static int rad_chanconfig(char *keyword, char *args)
|
||||
return -1;
|
||||
for (x=1;x<DAHDI_MAX_CHANNELS;x++) {
|
||||
if (chans[x]) {
|
||||
const char *CHANNEL_FILENAME = "/dev/dahdi/channel";
|
||||
chanfd = open(CHANNEL_FILENAME, O_RDWR);
|
||||
if (-1 == chanfd) {
|
||||
error("Failed to open '%s'.\n", CHANNEL_FILENAME);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
res = ioctl(chanfd, DAHDI_SPECIFY, &x);
|
||||
if (res) {
|
||||
error("Failed to open channel %d.\n", x);
|
||||
close(chanfd);
|
||||
continue;
|
||||
}
|
||||
p.radpar = DAHDI_RADPAR_NUMTONES;
|
||||
if (ind_ioctl(x,fd,DAHDI_RADIO_GETPARAM,&p) == -1)
|
||||
if (ioctl(chanfd,DAHDI_RADIO_GETPARAM,&p) == -1)
|
||||
n = 0;
|
||||
else
|
||||
n = p.data;
|
||||
@@ -1108,7 +1156,7 @@ static int rad_chanconfig(char *keyword, char *args)
|
||||
if (n)
|
||||
{
|
||||
p.radpar = DAHDI_RADPAR_INITTONE;
|
||||
if (ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p) == -1) {
|
||||
if (ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p) == -1) {
|
||||
error("Cannot init tones for channel %d\n",x);
|
||||
}
|
||||
if (!rxtones[0]) for(i = 1; i <= n; i++)
|
||||
@@ -1118,7 +1166,7 @@ static int rad_chanconfig(char *keyword, char *args)
|
||||
p.radpar = DAHDI_RADPAR_RXTONE;
|
||||
p.index = i;
|
||||
p.data = rxtones[i];
|
||||
if (ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
if (ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
error("Cannot set rxtone on channel %d\n",x);
|
||||
}
|
||||
if (rxtags[i])
|
||||
@@ -1126,7 +1174,7 @@ static int rad_chanconfig(char *keyword, char *args)
|
||||
p.radpar = DAHDI_RADPAR_RXTONECLASS;
|
||||
p.index = i;
|
||||
p.data = rxtags[i];
|
||||
if (ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
if (ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
error("Cannot set rxtag on channel %d\n",x);
|
||||
}
|
||||
if (txtones[i])
|
||||
@@ -1134,7 +1182,7 @@ static int rad_chanconfig(char *keyword, char *args)
|
||||
p.radpar = DAHDI_RADPAR_TXTONE;
|
||||
p.index = i;
|
||||
p.data = txtones[i];
|
||||
if (ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
if (ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
error("Cannot set txtone on channel %d\n",x);
|
||||
}
|
||||
} else { /* if we may have DCS receive */
|
||||
@@ -1143,7 +1191,7 @@ static int rad_chanconfig(char *keyword, char *args)
|
||||
p.radpar = DAHDI_RADPAR_RXTONE;
|
||||
p.index = 0;
|
||||
p.data = rxtones[0];
|
||||
if (ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
if (ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
error("Cannot set DCS rxtone on channel %d\n",x);
|
||||
}
|
||||
}
|
||||
@@ -1152,7 +1200,7 @@ static int rad_chanconfig(char *keyword, char *args)
|
||||
p.radpar = DAHDI_RADPAR_TXTONE;
|
||||
p.index = 0;
|
||||
p.data = txtones[0];
|
||||
if (ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
if (ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
error("Cannot set default txtone on channel %d\n",x);
|
||||
}
|
||||
}
|
||||
@@ -1160,41 +1208,43 @@ static int rad_chanconfig(char *keyword, char *args)
|
||||
{
|
||||
p.radpar = DAHDI_RADPAR_DEBOUNCETIME;
|
||||
p.data = debouncetime;
|
||||
if (ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
if (ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
error("Cannot set debouncetime on channel %d\n",x);
|
||||
}
|
||||
if (bursttime)
|
||||
{
|
||||
p.radpar = DAHDI_RADPAR_BURSTTIME;
|
||||
p.data = bursttime;
|
||||
if (ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
if (ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
error("Cannot set bursttime on channel %d\n",x);
|
||||
}
|
||||
p.radpar = DAHDI_RADPAR_DEEMP;
|
||||
p.data = deemp;
|
||||
ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p);
|
||||
ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p);
|
||||
p.radpar = DAHDI_RADPAR_PREEMP;
|
||||
p.data = preemp;
|
||||
ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p);
|
||||
ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p);
|
||||
p.radpar = DAHDI_RADPAR_TXGAIN;
|
||||
p.data = txgain;
|
||||
ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p);
|
||||
ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p);
|
||||
p.radpar = DAHDI_RADPAR_RXGAIN;
|
||||
p.data = rxgain;
|
||||
ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p);
|
||||
ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p);
|
||||
p.radpar = DAHDI_RADPAR_INVERTCOR;
|
||||
p.data = invertcor;
|
||||
ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p);
|
||||
ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p);
|
||||
p.radpar = DAHDI_RADPAR_EXTRXTONE;
|
||||
p.data = exttone;
|
||||
ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p);
|
||||
ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p);
|
||||
if (corthresh)
|
||||
{
|
||||
p.radpar = DAHDI_RADPAR_CORTHRESH;
|
||||
p.data = corthresh - 1;
|
||||
if (ind_ioctl(x,fd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
if (ioctl(chanfd,DAHDI_RADIO_SETPARAM,&p) == -1)
|
||||
error("Cannot set corthresh on channel %d\n",x);
|
||||
}
|
||||
|
||||
close(chanfd);
|
||||
}
|
||||
}
|
||||
clear_fields();
|
||||
@@ -1221,6 +1271,8 @@ static void printconfig(int fd)
|
||||
"Configuration\n"
|
||||
"======================\n\n", vi.version, vi.echo_canceller);
|
||||
for (x = 0; x < spans; x++) {
|
||||
if (only_span && only_span != x)
|
||||
continue;
|
||||
printf("SPAN %d: %3s/%4s Build-out: %s\n",
|
||||
lc[x].span,
|
||||
(lc[x].lineconfig & DAHDI_CONFIG_D4 ? "D4" :
|
||||
@@ -1238,6 +1290,8 @@ static void printconfig(int fd)
|
||||
if (verbose > 1) {
|
||||
printf("\nChannel map:\n\n");
|
||||
for (x=1;x<DAHDI_MAX_CHANNELS;x++) {
|
||||
if (skip_channel(x))
|
||||
continue;
|
||||
if ((cc[x].sigtype != DAHDI_SIG_SLAVE) && (cc[x].sigtype)) {
|
||||
configs++;
|
||||
ps = 0;
|
||||
@@ -1261,6 +1315,8 @@ static void printconfig(int fd)
|
||||
}
|
||||
} else {
|
||||
for (x=1;x<DAHDI_MAX_CHANNELS;x++) {
|
||||
if (skip_channel(x))
|
||||
continue;
|
||||
if (cc[x].sigtype)
|
||||
configs++;
|
||||
}
|
||||
@@ -1355,11 +1411,39 @@ static void usage(char *argv0, int exitcode)
|
||||
" -h -- Generate this help statement\n"
|
||||
" -s -- Shutdown spans only\n"
|
||||
" -t -- Test mode only, do not apply\n"
|
||||
" -C <chan_list> -- Only configure specified channels\n"
|
||||
" -S <spanno> -- Only configure specified span\n"
|
||||
" -v -- Verbose (more -v's means more verbose)\n"
|
||||
,c);
|
||||
exit(exitcode);
|
||||
}
|
||||
|
||||
static int chan_restrict(char *str)
|
||||
{
|
||||
if (apply_channels(selected_channels, str) < 0)
|
||||
return 0;
|
||||
restrict_channels = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int span_restrict(char *str)
|
||||
{
|
||||
long spanno;
|
||||
char *endptr;
|
||||
|
||||
spanno = strtol(str, &endptr, 10);
|
||||
if (endptr == str) {
|
||||
fprintf(stderr, "Missing valid span number after '-S'\n");
|
||||
return 0;
|
||||
}
|
||||
if (*endptr != '\0') {
|
||||
fprintf(stderr, "Extra garbage after span number in '-S'\n");
|
||||
return 0;
|
||||
}
|
||||
only_span = spanno;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int c;
|
||||
@@ -1367,7 +1451,7 @@ int main(int argc, char *argv[])
|
||||
char *key, *value;
|
||||
int x,found;
|
||||
|
||||
while((c = getopt(argc, argv, "fthc:vsd::")) != -1) {
|
||||
while((c = getopt(argc, argv, "fthc:vsd::C:S:")) != -1) {
|
||||
switch(c) {
|
||||
case 'c':
|
||||
filename=optarg;
|
||||
@@ -1390,6 +1474,14 @@ int main(int argc, char *argv[])
|
||||
case 's':
|
||||
stopmode = 1;
|
||||
break;
|
||||
case 'C':
|
||||
if (!chan_restrict(optarg))
|
||||
usage(argv[0], 1);
|
||||
break;
|
||||
case 'S':
|
||||
if (!span_restrict(optarg))
|
||||
usage(argv[0], 1);
|
||||
break;
|
||||
case 'd':
|
||||
if (optarg)
|
||||
debug = atoi(optarg);
|
||||
@@ -1472,6 +1564,8 @@ finish:
|
||||
}
|
||||
if (stopmode) {
|
||||
for (x=0;x<spans;x++) {
|
||||
if (only_span && x != only_span)
|
||||
continue;
|
||||
if (ioctl(fd, DAHDI_SHUTDOWN, &lc[x].span)) {
|
||||
fprintf(stderr, "DAHDI shutdown failed: %s\n", strerror(errno));
|
||||
close(fd);
|
||||
@@ -1481,6 +1575,8 @@ finish:
|
||||
exit(1);
|
||||
}
|
||||
for (x=0;x<spans;x++) {
|
||||
if (only_span && x != only_span)
|
||||
continue;
|
||||
if (ioctl(fd, DAHDI_SPANCONFIG, lc + x)) {
|
||||
fprintf(stderr, "DAHDI_SPANCONFIG failed on span %d: %s (%d)\n", lc[x].span, strerror(errno), errno);
|
||||
close(fd);
|
||||
@@ -1498,7 +1594,14 @@ finish:
|
||||
struct dahdi_params current_state;
|
||||
int master;
|
||||
int needupdate = force;
|
||||
|
||||
|
||||
if (skip_channel(x)) {
|
||||
if (debug & DEBUG_APPLY) {
|
||||
printf("Skip device %d\n", x);
|
||||
fflush(stdout);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (debug & DEBUG_APPLY) {
|
||||
printf("Configuring device %d\n", x);
|
||||
fflush(stdout);
|
||||
@@ -1651,6 +1754,8 @@ finish:
|
||||
}
|
||||
}
|
||||
for (x=0;x<spans;x++) {
|
||||
if (only_span && x != only_span)
|
||||
continue;
|
||||
if (ioctl(fd, DAHDI_STARTUP, &lc[x].span)) {
|
||||
fprintf(stderr, "DAHDI startup failed: %s\n", strerror(errno));
|
||||
close(fd);
|
||||
|
||||
@@ -53,10 +53,14 @@ void display_help(char *argv0, int exitcode)
|
||||
fprintf(stderr, " -h, --help display help\n");
|
||||
fprintf(stderr, " -s, --span <span num> specify the span\n");
|
||||
fprintf(stderr, " -l, --loopback <localhost|networkline|"\
|
||||
"networkpayload|off>\n"\
|
||||
"networkpayload|loopup|"\
|
||||
"loopdown|off>\n"\
|
||||
"\t\tlocalhost - loop back towards host\n"\
|
||||
"\t\tnetworkline - network line loopback\n"\
|
||||
"\t\tnetworkpayload - network payload loopback\n");
|
||||
"\t\tnetworkpayload - network payload loopback\n"\
|
||||
"\t\tloopup - transmit loopup signal\n"\
|
||||
"\t\tloopdown - transmit loopdown signal\n"\
|
||||
"\t\toff - end loopback mode\n");
|
||||
fprintf(stderr, " -i, --insert <fas|multi|crc|cas|prbs|bipolar>"\
|
||||
"\n\t\tinsert an error of a specific type\n");
|
||||
fprintf(stderr, " -r, --reset "\
|
||||
@@ -77,7 +81,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
int doloopback = 0;
|
||||
char *larg = NULL;
|
||||
int sflag = 0;
|
||||
int span = 1;
|
||||
int iflag = 0;
|
||||
char *iarg = NULL;
|
||||
@@ -105,16 +108,15 @@ int main(int argc, char *argv[])
|
||||
while ((c = getopt_long(argc, argv, "hj:l:p:s:i:g:r",
|
||||
long_options, &option_index)) != -1) {
|
||||
switch (c) {
|
||||
case 'h': /* local host loopback */
|
||||
case 'h':
|
||||
display_help(argv[0], 0);
|
||||
break;
|
||||
case 'l': /* network line loopback */
|
||||
case 'l': /* loopback */
|
||||
larg = optarg;
|
||||
doloopback = 1;
|
||||
break;
|
||||
case 's': /* specify a span */
|
||||
span = atoi(optarg);
|
||||
sflag = 1;
|
||||
break;
|
||||
case 'i': /* insert an error */
|
||||
iarg = optarg;
|
||||
@@ -138,17 +140,15 @@ int main(int argc, char *argv[])
|
||||
if (!(doloopback || iflag || gflag || rflag)) {
|
||||
s.spanno = span;
|
||||
res = ioctl(ctl, DAHDI_SPANSTAT, &s);
|
||||
if (res)
|
||||
if (res || ((__u32)-1 == s.fecount))
|
||||
printf("Error counters not supported by the driver"\
|
||||
" for this span\n");
|
||||
printf("Span %d:\n", span);
|
||||
printf(">FEC : %d:\n", s.fecount);
|
||||
printf(">CEC : %d:\n", s.crc4count);
|
||||
printf(">CVC : %d:\n", s.cvcount);
|
||||
printf(">EBC : %d:\n", s.ebitcount);
|
||||
printf(">BEC : %d:\n", s.becount);
|
||||
printf(">PRBS: %d:\n", s.prbs);
|
||||
printf(">GES : %d:\n", s.errsec);
|
||||
printf(">Framing Errors : %d:\n", s.fecount);
|
||||
printf(">CRC Errors : %d:\n", s.crc4count);
|
||||
printf(">Code Violations : %d:\n", s.cvcount);
|
||||
printf(">E-bit Count : %d:\n", s.ebitcount);
|
||||
printf(">General Errored Seconds : %d:\n", s.errsec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -165,6 +165,12 @@ int main(int argc, char *argv[])
|
||||
} else if (!strcasecmp(larg, "networkpayload")) {
|
||||
printf("Span %d: network payload loopback ON\n", span);
|
||||
m.command = DAHDI_MAINT_NETWORKPAYLOADLOOP;
|
||||
} else if (!strcasecmp(larg, "loopup")) {
|
||||
printf("Span %d: transmitting loopup signal\n", span);
|
||||
m.command = DAHDI_MAINT_LOOPUP;
|
||||
} else if (!strcasecmp(larg, "loopdown")) {
|
||||
printf("Span %d: transmitting loopdown signal\n", span);
|
||||
m.command = DAHDI_MAINT_LOOPDOWN;
|
||||
} else if (!strcasecmp(larg, "off")) {
|
||||
printf("Span %d: loopback OFF\n", span);
|
||||
m.command = DAHDI_MAINT_NONE;
|
||||
@@ -173,9 +179,21 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
res = ioctl(ctl, DAHDI_MAINT, &m);
|
||||
if (res)
|
||||
if (res) {
|
||||
printf("This type of looping not supported by the"\
|
||||
" driver for this span\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Leave the loopup/loopdown signal on the line for
|
||||
* five seconds according to AT&T TR 54016
|
||||
*/
|
||||
if ((m.command == DAHDI_MAINT_LOOPUP) ||
|
||||
(m.command == DAHDI_MAINT_LOOPDOWN)) {
|
||||
sleep(5);
|
||||
m.command = DAHDI_MAINT_NONE;
|
||||
ioctl(ctl, DAHDI_MAINT, &m);
|
||||
}
|
||||
}
|
||||
|
||||
if (iflag) {
|
||||
|
||||
332
dahdi_pcap.c
Normal file
332
dahdi_pcap.c
Normal file
@@ -0,0 +1,332 @@
|
||||
/*
|
||||
* Capturing a pcap from the DAHDI interface
|
||||
*
|
||||
* Copyright (C) 2011 Torrey Searle
|
||||
*
|
||||
* ISDN support added by Horacio Peña
|
||||
* Command line cleanups by Sverker Abrahamsson
|
||||
*
|
||||
* Requirements:
|
||||
* - pcap development library
|
||||
* - DAHDI_MIRROR ioctl which isn't enabled by default in dahdi-linux
|
||||
* To enable this unsupported feature, #define CONFIG_DAHDI_MIRROR
|
||||
* in dahdi-linux
|
||||
* - To build this program call the 'make dahdi_pcap' target
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <dahdi/user.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <pcap.h>
|
||||
#include <sys/types.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <stdlib.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#define BLOCK_SIZE 512
|
||||
#define MAX_CHAN 16
|
||||
//char ETH_P_LAPD[2] = {0x00, 0x30};
|
||||
|
||||
struct mtp2_phdr {
|
||||
u_int8_t sent;
|
||||
u_int8_t annex_a_used;
|
||||
u_int16_t link_number;
|
||||
};
|
||||
|
||||
|
||||
struct lapd_sll_hdr {
|
||||
u_int16_t sll_pkttype; /* packet type */
|
||||
u_int16_t sll_hatype;
|
||||
u_int16_t sll_halen;
|
||||
u_int8_t sll_addr[8];
|
||||
u_int8_t sll_protocol[2]; /* protocol, should be ETH_P_LAPD */
|
||||
};
|
||||
|
||||
|
||||
struct chan_fds {
|
||||
int rfd;
|
||||
int tfd;
|
||||
int chan_id;
|
||||
int proto;
|
||||
char tx_buf[BLOCK_SIZE * 4];
|
||||
int tx_len;
|
||||
char rx_buf[BLOCK_SIZE * 4];
|
||||
int rx_len;
|
||||
};
|
||||
|
||||
int make_mirror(long type, int chan)
|
||||
{
|
||||
int res = 0;
|
||||
int fd = 0;
|
||||
struct dahdi_bufferinfo bi;
|
||||
fd = open("/dev/dahdi/pseudo", O_RDONLY);
|
||||
|
||||
memset(&bi, 0, sizeof(bi));
|
||||
bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE;
|
||||
bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE;
|
||||
bi.numbufs = 32;
|
||||
bi.bufsize = BLOCK_SIZE;
|
||||
|
||||
ioctl(fd, DAHDI_SET_BUFINFO, &bi);
|
||||
|
||||
res = ioctl(fd, type, &chan);
|
||||
|
||||
if(res)
|
||||
{
|
||||
printf("error setting channel err=%d!\n", res);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
int log_packet(struct chan_fds * fd, char is_read, pcap_dumper_t * dump)
|
||||
{
|
||||
unsigned char buf[BLOCK_SIZE * 4];
|
||||
int res = 0;
|
||||
|
||||
struct pcap_pkthdr hdr;
|
||||
struct mtp2_phdr * mtp2 = (struct mtp2_phdr *)buf;
|
||||
struct lapd_sll_hdr * lapd = (struct lapd_sll_hdr *)buf;
|
||||
|
||||
unsigned char *dataptr = buf;
|
||||
int datasize = sizeof(buf);
|
||||
|
||||
if(fd->proto == DLT_LINUX_LAPD)
|
||||
{
|
||||
dataptr += sizeof(struct lapd_sll_hdr);
|
||||
datasize -= sizeof(struct lapd_sll_hdr);
|
||||
}
|
||||
else
|
||||
{
|
||||
dataptr += sizeof(struct mtp2_phdr);
|
||||
datasize -= sizeof(struct mtp2_phdr);
|
||||
}
|
||||
|
||||
memset(buf, 0, sizeof(buf));
|
||||
if(is_read)
|
||||
{
|
||||
res = read(fd->rfd, dataptr, datasize);
|
||||
if(fd->rx_len > 0 && res == fd->rx_len && !memcmp(fd->rx_buf, dataptr, res) )
|
||||
{
|
||||
//skipping dup
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy(fd->rx_buf, dataptr, res);
|
||||
fd->rx_len = res;
|
||||
}
|
||||
else
|
||||
{
|
||||
res = read(fd->tfd, dataptr, datasize);
|
||||
if(fd->tx_len > 0 && res == fd->tx_len && !memcmp(fd->tx_buf, dataptr, res) )
|
||||
{
|
||||
//skipping dup
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy(fd->tx_buf, dataptr, res);
|
||||
fd->tx_len = res;
|
||||
}
|
||||
|
||||
gettimeofday(&hdr.ts, NULL);
|
||||
|
||||
|
||||
|
||||
|
||||
if(res > 0)
|
||||
{
|
||||
if(fd->proto == DLT_LINUX_LAPD)
|
||||
{
|
||||
hdr.caplen = res+sizeof(struct lapd_sll_hdr)-2;
|
||||
hdr.len = res+sizeof(struct lapd_sll_hdr)-2;
|
||||
|
||||
lapd->sll_pkttype = 3;
|
||||
lapd->sll_hatype = 0;
|
||||
lapd->sll_halen = res;
|
||||
// lapd->sll_addr = ???
|
||||
lapd->sll_protocol[0] = 0x00;
|
||||
lapd->sll_protocol[1] = 0x30;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
hdr.caplen = res+sizeof(struct mtp2_phdr);
|
||||
hdr.len = res+sizeof(struct mtp2_phdr);
|
||||
|
||||
if(is_read)
|
||||
{
|
||||
mtp2->sent = 0;
|
||||
mtp2->annex_a_used = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
mtp2->sent = 1;
|
||||
mtp2->annex_a_used = 0;
|
||||
}
|
||||
mtp2->link_number = htons(fd->chan_id);
|
||||
}
|
||||
pcap_dump((u_char*)dump, &hdr, buf);
|
||||
pcap_dump_flush(dump);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void usage()
|
||||
{
|
||||
printf("Usage: dahdi_pcap [OPTIONS]\n");
|
||||
printf("Capture packets from DAHDI channels to pcap file\n\n");
|
||||
printf("Options:\n");
|
||||
printf(" -p, --proto=[mtp2|lapd] The protocol to capture, default mtp2\n");
|
||||
printf(" -c, --chan=<channels> Comma separated list of channels to capture from, max %d. Mandatory\n", MAX_CHAN);
|
||||
printf(" -f, --file=<filename> The pcap file to capture to. Mandatory\n");
|
||||
printf(" -h, --help Display this text\n");
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct chan_fds chans[MAX_CHAN];
|
||||
char *filename = NULL;
|
||||
int num_chans = 0;
|
||||
int max_fd = 0;
|
||||
int proto = DLT_MTP2_WITH_PHDR;
|
||||
|
||||
int i;
|
||||
int packetcount;
|
||||
int c;
|
||||
|
||||
while (1) {
|
||||
int option_index = 0;
|
||||
static struct option long_options[] = {
|
||||
{"proto", required_argument, 0, 'p'},
|
||||
{"chan", required_argument, 0, 'c'},
|
||||
{"file", required_argument, 0, 'f'},
|
||||
{"help", 0, 0, 'h'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
c = getopt_long(argc, argv, "p:c:f:?",
|
||||
long_options, &option_index);
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
switch (c) {
|
||||
case 'p':
|
||||
// Protocol
|
||||
if(strcasecmp("LAPD", optarg)==0)
|
||||
{
|
||||
proto = DLT_LINUX_LAPD;
|
||||
}
|
||||
else if(argc > 0 && strcasecmp("MTP2", argv[1])==0)
|
||||
{
|
||||
proto = DLT_MTP2_WITH_PHDR;
|
||||
}
|
||||
break;
|
||||
case 'c':
|
||||
// TODO Should it be possible to override protocol per channel?
|
||||
// Channels, comma separated list
|
||||
while(optarg != NULL && num_chans < MAX_CHAN)
|
||||
{
|
||||
int chan = atoi(strsep(&optarg, ","));
|
||||
|
||||
|
||||
chans[num_chans].tfd = make_mirror(DAHDI_TXMIRROR, chan);
|
||||
chans[num_chans].rfd = make_mirror(DAHDI_RXMIRROR, chan);
|
||||
chans[num_chans].chan_id = chan;
|
||||
chans[num_chans].proto = proto;
|
||||
|
||||
if(chans[num_chans].tfd > max_fd)
|
||||
{
|
||||
max_fd = chans[num_chans].tfd;
|
||||
}
|
||||
if(chans[num_chans].rfd > max_fd)
|
||||
{
|
||||
max_fd = chans[num_chans].rfd;
|
||||
}
|
||||
|
||||
num_chans++;
|
||||
}
|
||||
max_fd++;
|
||||
break;
|
||||
case 'f':
|
||||
// File to capture to
|
||||
filename=optarg;
|
||||
break;
|
||||
case 'h':
|
||||
default:
|
||||
// Usage
|
||||
usage();
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
if((num_chans == 0) || (filename == NULL)) {
|
||||
usage();
|
||||
exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Capturing protocol %s on channels ", (proto == DLT_MTP2_WITH_PHDR ? "mtp2":"lapd"));
|
||||
for(i = 0; i < num_chans; i++)
|
||||
{
|
||||
printf("%d", chans[i].chan_id);
|
||||
if(i<num_chans-1)
|
||||
{
|
||||
printf(", ");
|
||||
}
|
||||
}
|
||||
printf(" to file %s\n", filename);
|
||||
}
|
||||
|
||||
pcap_t * pcap = pcap_open_dead(chans[0].proto, BLOCK_SIZE*4);
|
||||
pcap_dumper_t * dump = pcap_dump_open(pcap, filename);
|
||||
|
||||
packetcount=0;
|
||||
while(1)
|
||||
{
|
||||
fd_set rd_set;
|
||||
FD_ZERO(&rd_set);
|
||||
for(i = 0; i < num_chans; i++)
|
||||
{
|
||||
FD_SET(chans[i].tfd, &rd_set);
|
||||
FD_SET(chans[i].rfd, &rd_set);
|
||||
}
|
||||
|
||||
select(max_fd, &rd_set, NULL, NULL, NULL);
|
||||
|
||||
for(i = 0; i < num_chans; i++)
|
||||
{
|
||||
if(FD_ISSET(chans[i].rfd, &rd_set))
|
||||
{
|
||||
packetcount += log_packet(&chans[i], 1, dump);
|
||||
}
|
||||
if(FD_ISSET(chans[i].tfd, &rd_set))
|
||||
{
|
||||
packetcount += log_packet(&chans[i], 0, dump);
|
||||
}
|
||||
}
|
||||
printf("Packets captured: %d\r", packetcount);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
40
dahdi_scan.c
40
dahdi_scan.c
@@ -95,11 +95,13 @@ int main(int argc, char *argv[])
|
||||
strcat(alarms, "YEL/");
|
||||
if (s.alarms & DAHDI_ALARM_RED) {
|
||||
strcat(alarms, "RED/");
|
||||
|
||||
/* Extended alarm feature test. Allows compilation with
|
||||
* versions of dahdi-linux prior to 2.4
|
||||
*/
|
||||
#ifdef DAHDI_ALARM_LFA
|
||||
if (s.alarms & DAHDI_ALARM_LFA)
|
||||
strcat(alarms, "LFA/");
|
||||
if (s.alarms & DAHDI_ALARM_LMFA)
|
||||
strcat(alarms, "LMFA/");
|
||||
#endif /* ifdef DAHDI_ALARM_LFA */
|
||||
}
|
||||
if (s.alarms & DAHDI_ALARM_LOOPBACK)
|
||||
@@ -115,10 +117,35 @@ int main(int argc, char *argv[])
|
||||
alarms[strlen(alarms)-1]='\0';
|
||||
}
|
||||
} else {
|
||||
if (s.numchans)
|
||||
strcpy(alarms, "OK");
|
||||
else
|
||||
if (s.numchans) {
|
||||
#ifdef DAHDI_ALARM_LFA
|
||||
/* If we continuously receive framing errors
|
||||
* but our span is still in service, and we
|
||||
* are configured for E1 & crc4. We've lost
|
||||
* crc4-multiframe alignment
|
||||
*/
|
||||
if ((s.linecompat & DAHDI_CONFIG_CRC4) &&
|
||||
(s.fecount > 0)) {
|
||||
struct dahdi_spaninfo t;
|
||||
memset(&t, 0, sizeof(t));
|
||||
t.spanno = x;
|
||||
sleep(1);
|
||||
if (ioctl(ctl, DAHDI_SPANSTAT, &t))
|
||||
continue;
|
||||
|
||||
/* Test fecount at two separate time
|
||||
* intervals, if they differ, throw LMFA
|
||||
*/
|
||||
if ((t.fecount > s.fecount) &&
|
||||
!t.alarms) {
|
||||
strcat(alarms, "LMFA/");
|
||||
}
|
||||
}
|
||||
#endif /* ifdef DAHDI_ALARM_LFA */
|
||||
strcat(alarms, "OK");
|
||||
} else {
|
||||
strcpy(alarms, "UNCONFIGURED");
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stdout, "[%d]\n", x);
|
||||
@@ -169,7 +196,8 @@ int main(int argc, char *argv[])
|
||||
if (s.lineconfig & DAHDI_CONFIG_ESF) fprintf(stdout, "ESF");
|
||||
else if (s.lineconfig & DAHDI_CONFIG_D4) fprintf(stdout, "D4");
|
||||
else if (s.lineconfig & DAHDI_CONFIG_CCS) fprintf(stdout, "CCS");
|
||||
else if (s.lineconfig & DAHDI_CONFIG_CRC4) fprintf(stdout, "/CRC4");
|
||||
else fprintf(stdout, "CAS");
|
||||
if (s.lineconfig & DAHDI_CONFIG_CRC4) fprintf(stdout, "/CRC4");
|
||||
fprintf(stdout, "\n");
|
||||
} else {
|
||||
/* this is an analog span */
|
||||
|
||||
43
dahdi_test.c
43
dahdi_test.c
@@ -40,17 +40,32 @@
|
||||
|
||||
#define SIZE 8000
|
||||
|
||||
static int verbose;
|
||||
static int pass = 0;
|
||||
static float best = 0.0;
|
||||
static float worst = 100.0;
|
||||
static double total = 0.0;
|
||||
static double delay_total = 0.0;
|
||||
static double total_time = 0.0;
|
||||
static double total_count = 0.0;
|
||||
|
||||
static inline float _fmin(float a, float b)
|
||||
{
|
||||
return (a < b) ? a : b;
|
||||
}
|
||||
|
||||
static double calculate_accuracy(double count, double ms)
|
||||
{
|
||||
return ((count - _fmin(count, fabs(count - ms))) / count) * 100.0;
|
||||
}
|
||||
|
||||
void hup_handler(int sig)
|
||||
{
|
||||
double accuracy = calculate_accuracy(total_count, total_time);
|
||||
printf("\n--- Results after %d passes ---\n", pass);
|
||||
printf("Best: %.3f -- Worst: %.3f -- Average: %f, Difference: %f\n",
|
||||
best, worst, pass ? total/pass : 100.00, pass ? delay_total/pass : 100);
|
||||
printf("Best: %.3f%% -- Worst: %.3f%% -- Average: %f%%\n",
|
||||
best, worst, pass ? total/pass : 100.00);
|
||||
printf("Cummulative Accuracy (not per pass): %0.3f\n",
|
||||
pass ? accuracy : 0.0);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -79,9 +94,7 @@ int main(int argc, char *argv[])
|
||||
int count = 0;
|
||||
int seconds = 0;
|
||||
int curarg = 1;
|
||||
int verbose = 0;
|
||||
char buf[8192];
|
||||
float score;
|
||||
float ms;
|
||||
struct timeval start, now;
|
||||
fd = open("/dev/dahdi/pseudo", O_RDWR);
|
||||
@@ -140,23 +153,23 @@ int main(int argc, char *argv[])
|
||||
ms += (now.tv_sec - start.tv_sec) * 8000;
|
||||
ms += (now.tv_usec - start.tv_usec) / 125.0;
|
||||
if (count >= SIZE) {
|
||||
double percent = 100.0 * (count - ms) / count;
|
||||
const double percent = calculate_accuracy(count, ms);
|
||||
if (verbose) {
|
||||
printf("\n%d samples in %0.3f system clock sample intervals (%.3f%%)",
|
||||
count, ms, 100 - percent);
|
||||
count, ms, percent);
|
||||
} else if (pass > 0 && (pass % 8) == 0) {
|
||||
printf("\n");
|
||||
}
|
||||
score = 100.0 - fabs(percent);
|
||||
if (score > best)
|
||||
best = score;
|
||||
if (score < worst)
|
||||
worst = score;
|
||||
if (percent > best)
|
||||
best = percent;
|
||||
if (percent < worst)
|
||||
worst = percent;
|
||||
if (!verbose)
|
||||
printf("%.3f%% ", score);
|
||||
total += score;
|
||||
delay_total += 100 - percent;
|
||||
printf("%.3f%% ", percent);
|
||||
total += percent;
|
||||
fflush(stdout);
|
||||
total_count += count;
|
||||
total_time += ms;
|
||||
count = 0;
|
||||
pass++;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
dahdi_cfg \- configures DAHDI kernel modules from /etc/dahdi/system.conf
|
||||
.SH SYNOPSIS
|
||||
|
||||
.B dahdi_cfg [\-c \fICFG_FILE\fB] [\-s] [\-f] [\-t] [\-v [\-v ... ] ]
|
||||
.B dahdi_cfg [\-c \fICFG_FILE\fB] [\-S\fINUM\fB [-S\fICHANS\fB]] [\-s] [\-f] [\-t] [\-v [\-v ... ] ]
|
||||
|
||||
.B dahdi_cfg \-h
|
||||
|
||||
@@ -26,11 +26,25 @@ Use an alternative configuration file instead of
|
||||
.I /etc/dahdi/system.conf
|
||||
.RE
|
||||
|
||||
.B \-C \fICHANNELS
|
||||
.RS
|
||||
Only apply changes to channels in the specified range. Only
|
||||
applicable when \-S is in use.
|
||||
.RE
|
||||
|
||||
.B \-s
|
||||
.RS
|
||||
Only shutdown spans.
|
||||
.RE
|
||||
|
||||
.B \-S \fISPAN
|
||||
.RS
|
||||
Only apply changes to span no. \fISPAN\fR. For a digital span (with
|
||||
a 'span=' line in the configuration file) this will do. For an analog
|
||||
span you'll have to explicitly tell dahdi_cfg the range of channels,
|
||||
using \-C .
|
||||
.RE
|
||||
|
||||
.B \-f
|
||||
.RS
|
||||
Always configure every channel, even if it appears not to have changed.
|
||||
|
||||
62
doc/dahdi_maint.8
Normal file
62
doc/dahdi_maint.8
Normal file
@@ -0,0 +1,62 @@
|
||||
.TH "DAHDI_MAINT" "8" "9 Sep 2011" "" ""
|
||||
|
||||
.SH NAME
|
||||
dahdi_maint \- Sets Dahdi spans into maintenance mode, e.g.: loopback
|
||||
.SH SYNOPSIS
|
||||
|
||||
.B dahdi_maint \-s \fInum\fB [options]
|
||||
.B dahdi_maint <\-h|\-\-help>
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
dahdi_maint uses the DAHDI_MAINT interface to set a Dahdi span (port
|
||||
of a Dahdi adapter card) into loopback mode or similar maintenance mode.
|
||||
|
||||
.SH OPTIONS
|
||||
.B \-s \-\-span \fInum\fR
|
||||
.RS
|
||||
The span number. Required.
|
||||
.RE
|
||||
|
||||
.B \-l \-\-loopback <localhost|networkline|networkpayload|loopup|loopdown|off>
|
||||
.RS
|
||||
Loopback type. One of:
|
||||
.IP localhost 4
|
||||
loop back towards host
|
||||
.IP networkline 4
|
||||
network line loopback
|
||||
.IP networkpayload 4
|
||||
network payload loopback
|
||||
.IP loopup 4
|
||||
transmit loopup signal
|
||||
.IP loopdown 4
|
||||
transmit loopdown signal
|
||||
.IP off 4
|
||||
end loopback mode
|
||||
.RE
|
||||
|
||||
.B \-i \-\-insert <fas|multi|crc|cas|prbs|bipolar>
|
||||
.RS
|
||||
Insert an error of a specific type
|
||||
.RE
|
||||
|
||||
.SH EXAMPLES
|
||||
Enable network line loopback on span 1:
|
||||
|
||||
dahdi_maint -s 1 --loopback networkline
|
||||
|
||||
Disable network line loopback on span 1:
|
||||
|
||||
dahdi_maint -s 1 --loopback off
|
||||
|
||||
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
dahdi_tool(8), dahdi_cfg(8), asterisk(8).
|
||||
|
||||
.SH AUTHOR
|
||||
.PP
|
||||
This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU General Public License, Version 2 any later
|
||||
version published by the Free Software Foundation.
|
||||
@@ -1,37 +1,139 @@
|
||||
.TH "DAHDI_MONITOR" "8" "16 June 2008" "" ""
|
||||
.TH "DAHDI_MONITOR" "8" "9 Sep 2011" "" ""
|
||||
|
||||
.SH NAME
|
||||
dahdi_monitor \- checks the rx/tx levels of DAHDI channels
|
||||
dahdi_monitor \- checks the Rx/Tx levels of a DAHDI channels
|
||||
.SH SYNOPSIS
|
||||
|
||||
.B dahdi_monitor \fIchannel number\fB [\-v] [\-f \fIFILE\fB]
|
||||
.B dahdi_monitor \fInum\fB [\-v[v]]
|
||||
.B dahdi_monitor \fInum\fB [\-o] [<\-f|\-F> \fIFILE\fB]
|
||||
.B dahdi_monitor \fInum\fB [[<\-r|\-R> \fIFILE\fB]] [[<\-t|\-T> \fIFILE\fB]]
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
dahdi_monitor monitors a DAHDI channel. It gives you a visual
|
||||
representation of the sound strengths and makes it easy to see if
|
||||
the received or transmitted signals are too high or out of
|
||||
balance
|
||||
dahdi_monitor monitors a Dahdi channel. It can record the output to a
|
||||
file, play it to the speaker, or visualize the audio levels on the
|
||||
terminal.
|
||||
|
||||
Recorded audio files are by default raw signed linear PCM. If the file
|
||||
name ends with ".wav", the recorded file will be a WAV file.
|
||||
|
||||
The visual display shows the current audio level at both the Rx
|
||||
(audio Received by Asterisk) and
|
||||
Tx (audio Transmitted by Asterisk)
|
||||
|
||||
To exit the program, press Ctrl-C.
|
||||
|
||||
.SH OPTIONS
|
||||
The first (mandatory) parameter is the number of the channel
|
||||
to monitor.
|
||||
|
||||
.B \-m
|
||||
.RS
|
||||
Multiple channels. Don't multiplex both Rx and Tx in a single channel.
|
||||
Normally there's a different option that you need that implies it.
|
||||
.RE
|
||||
|
||||
.B \-o
|
||||
.RS
|
||||
Plays the output to OSS (/dev/dsp). Requires -m not to be used.
|
||||
.RE
|
||||
|
||||
.B \-v
|
||||
.RS
|
||||
Display visual audio levels.
|
||||
Display Visual audio levels. With two v-s, Verbose mode is enabled, that
|
||||
shows the actual levels as numbers. Note that this requires a terminal
|
||||
wider than 80 columns to be properly displayed.
|
||||
|
||||
Implies -m.
|
||||
.RE
|
||||
|
||||
.B \-f \fIFILE
|
||||
.RS
|
||||
Write output to FILE
|
||||
Record the content of the channel (Tx + Rx) to a file.
|
||||
.RE
|
||||
|
||||
Some extra, yet undocumented, options.
|
||||
.B \-F \fIFILE
|
||||
.RS
|
||||
Record the content of the channel (Tx + Rx) before the echo canceler
|
||||
to a file.
|
||||
.RE
|
||||
|
||||
.B \-r \fIFILE
|
||||
.RS
|
||||
Record the content of the Rx channel to a file.
|
||||
|
||||
Implies -m.
|
||||
.RE
|
||||
|
||||
.B \-R \fIFILE
|
||||
.RS
|
||||
Record the content of the R channel before the echo canceler to a file.
|
||||
|
||||
Implies -m.
|
||||
.RE
|
||||
|
||||
.B \-s \fIFILE
|
||||
.RS
|
||||
Record the content of the Tx and Rx of the channel to a file.
|
||||
.RE
|
||||
|
||||
.B \-S \fIFILE
|
||||
.RS
|
||||
Records a stereo of both Tx and Rx of the channel before the echo
|
||||
canceler to a file.
|
||||
.RE
|
||||
|
||||
.B \-t \fIFILE
|
||||
.RS
|
||||
Record the content of the Tx channel to a file.
|
||||
|
||||
Implies -m.
|
||||
.RE
|
||||
|
||||
.B \-T \fIFILE
|
||||
.RS
|
||||
Record the content of the Tx channel before the echo canceler to a file.
|
||||
|
||||
Implies -m.
|
||||
.RE
|
||||
|
||||
.SH EXAMPLES
|
||||
|
||||
Visualize audio levels on DAHDI channel 2:
|
||||
|
||||
dahdi_monitor 2 -v
|
||||
|
||||
|
||||
Record channel 3 to a file:
|
||||
|
||||
dahdi_monitor 3 -f output.raw
|
||||
|
||||
This will create a raw PCM file (signed-linear, 8kHz, mono, 16 bits per
|
||||
sample). Both the Tx and Rx will be multiplexed in a single channel.
|
||||
It can be converted to a WAV file using e.g.:
|
||||
|
||||
sox -s -c1 -2 -r8000 output.raw output.wav
|
||||
|
||||
|
||||
Record Tx and Rx of channel 5 to separate files. This time directly to
|
||||
WAV files:
|
||||
|
||||
dahdi_monitor 5 -r output_rx.wav -t output_tx.wav
|
||||
|
||||
|
||||
Record channel 8 to a stereo file (Tx and Rx on its two channels):
|
||||
|
||||
dahdi_monitor 8 -s output.raw
|
||||
|
||||
Converting it to a WAV file:
|
||||
|
||||
sox -s -c2 -2 -r8000 output.raw output.wav
|
||||
|
||||
|
||||
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
dahdi_tool(8), dahdi_cfg(8), asterisk(8).
|
||||
dahdi_tool(8), dahdi_cfg(8).
|
||||
|
||||
.SH AUTHOR
|
||||
.PP
|
||||
|
||||
49
patgen.c
49
patgen.c
@@ -33,6 +33,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/ppp_defs.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include "bittest.h"
|
||||
@@ -65,30 +66,40 @@ void print_packet(unsigned char *buf, int len)
|
||||
printf("}\n");
|
||||
}
|
||||
|
||||
int channel_open(char *name, int *bs)
|
||||
int channel_open(const char *name, int *bs)
|
||||
{
|
||||
int channo;
|
||||
int fd;
|
||||
struct dahdi_params tp;
|
||||
char *dev;
|
||||
int channo, fd;
|
||||
struct dahdi_params tp;
|
||||
struct stat filestat;
|
||||
|
||||
channo = atoi(name);
|
||||
/* channo==0: The user passed a file name to be opened. */
|
||||
dev = channo ? DEVICE : name;
|
||||
|
||||
fd = open(dev, O_RDWR, 0600);
|
||||
|
||||
if (fd < 0) {
|
||||
perror(DEVICE);
|
||||
/* stat file, if character device, open it */
|
||||
channo = strtoul(name, NULL, 10);
|
||||
fd = stat(name, &filestat);
|
||||
if (!fd && S_ISCHR(filestat.st_mode)) {
|
||||
fd = open(name, O_RDWR, 0600);
|
||||
if (fd < 0) {
|
||||
perror(name);
|
||||
return -1;
|
||||
}
|
||||
/* try out the dahdi_specify interface */
|
||||
} else if (channo > 0) {
|
||||
fd = open(DEVICE, O_RDWR, 0600);
|
||||
if (fd < 0) {
|
||||
perror(DEVICE);
|
||||
return -1;
|
||||
}
|
||||
if (ioctl(fd, DAHDI_SPECIFY, &channo) < 0) {
|
||||
perror("DAHDI_SPECIFY ioctl failed");
|
||||
return -1;
|
||||
}
|
||||
/* die */
|
||||
} else {
|
||||
fprintf(stderr, "Specified channel is not a valid character "
|
||||
"device or channel number");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* If we got a channel number, get it from /dev/dahdi/channel: */
|
||||
if(channo && ioctl(fd, DAHDI_SPECIFY, &channo) < 0) {
|
||||
perror("SPECIFY");
|
||||
return -1;
|
||||
}
|
||||
if(ioctl(fd, DAHDI_SET_BLOCKSIZE, bs) < 0) {
|
||||
if (ioctl(fd, DAHDI_SET_BLOCKSIZE, bs) < 0) {
|
||||
perror("SET_BLOCKSIZE");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
@@ -47,6 +48,7 @@
|
||||
#include "dahdi_tools_version.h"
|
||||
|
||||
#define BLOCK_SIZE 2039
|
||||
#define DEVICE "/dev/dahdi/channel"
|
||||
|
||||
#define CONTEXT_SIZE 7
|
||||
/* Prints a set of bytes in hex format */
|
||||
@@ -97,12 +99,57 @@ static void usage(const char * progname)
|
||||
printf("\n\t Also accepts old style usage:\n\t %s <device name> [<timeout in secs>]\n", progname);
|
||||
}
|
||||
|
||||
int channel_open(const char *name, int *bs)
|
||||
{
|
||||
int channo, fd;
|
||||
struct dahdi_params tp;
|
||||
struct stat filestat;
|
||||
|
||||
/* stat file, if character device, open it */
|
||||
channo = strtoul(name, NULL, 10);
|
||||
fd = stat(name, &filestat);
|
||||
if (!fd && S_ISCHR(filestat.st_mode)) {
|
||||
fd = open(name, O_RDWR, 0600);
|
||||
if (fd < 0) {
|
||||
perror(name);
|
||||
return -1;
|
||||
}
|
||||
/* try out the dahdi_specify interface */
|
||||
} else if (channo > 0) {
|
||||
fd = open(DEVICE, O_RDWR, 0600);
|
||||
if (fd < 0) {
|
||||
perror(DEVICE);
|
||||
return -1;
|
||||
}
|
||||
if (ioctl(fd, DAHDI_SPECIFY, &channo) < 0) {
|
||||
perror("DAHDI_SPECIFY ioctl failed");
|
||||
return -1;
|
||||
}
|
||||
/* die */
|
||||
} else {
|
||||
fprintf(stderr, "Specified channel is not a valid character "
|
||||
"device or channel number");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ioctl(fd, DAHDI_SET_BLOCKSIZE, bs) < 0) {
|
||||
perror("SET_BLOCKSIZE");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ioctl(fd, DAHDI_GET_PARAMS, &tp)) {
|
||||
fprintf(stderr, "Unable to get channel parameters\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int fd;
|
||||
int res, x;
|
||||
int i;
|
||||
struct dahdi_params tp;
|
||||
int bs = BLOCK_SIZE;
|
||||
int skipcount = 10;
|
||||
unsigned char c=0,c1=0;
|
||||
@@ -120,6 +167,7 @@ int main(int argc, char *argv[])
|
||||
char * device;
|
||||
int opt;
|
||||
int oldstyle_cmdline = 1;
|
||||
unsigned int event_count = 0;
|
||||
|
||||
/* Parse the command line arguments */
|
||||
while((opt = getopt(argc, argv, "b:s:t:r:v?h")) != -1) {
|
||||
@@ -173,19 +221,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
time_t start_time = 0;
|
||||
|
||||
fd = open(device, O_RDWR, 0600);
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "Unable to open %s: %s\n", device, strerror(errno));
|
||||
fd = channel_open(device, &bs);
|
||||
if (fd < 0)
|
||||
exit(1);
|
||||
}
|
||||
if (ioctl(fd, DAHDI_SET_BLOCKSIZE, &bs)) {
|
||||
fprintf(stderr, "Unable to set block size to %d: %s\n", bs, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
if (ioctl(fd, DAHDI_GET_PARAMS, &tp)) {
|
||||
fprintf(stderr, "Unable to get channel parameters\n");
|
||||
exit(1);
|
||||
}
|
||||
ioctl(fd, DAHDI_GETEVENT);
|
||||
|
||||
i = DAHDI_FLUSH_ALL;
|
||||
@@ -208,12 +246,18 @@ int main(int argc, char *argv[])
|
||||
outbuf[x] = c1++;
|
||||
}
|
||||
|
||||
write_again:
|
||||
res = write(fd,outbuf,bs);
|
||||
if (res != bs) {
|
||||
printf("Res is %d: %s\n", res, strerror(errno));
|
||||
ioctl(fd, DAHDI_GETEVENT, &x);
|
||||
printf("Event: %d\n", x);
|
||||
exit(1);
|
||||
if (ELAST == errno) {
|
||||
ioctl(fd, DAHDI_GETEVENT, &x);
|
||||
if (event_count > 0)
|
||||
printf("Event: %d\n", x);
|
||||
++event_count;
|
||||
} else {
|
||||
printf("W: Res is %d: %s\n", res, strerror(errno));
|
||||
}
|
||||
goto write_again;
|
||||
}
|
||||
|
||||
/* If this is the start of the test then skip a number of packets before test results */
|
||||
@@ -225,13 +269,18 @@ int main(int argc, char *argv[])
|
||||
if (!skipcount) {
|
||||
printf("Going for it...\n");
|
||||
}
|
||||
i = 1;
|
||||
ioctl(fd,DAHDI_BUFFER_EVENTS, &i);
|
||||
continue;
|
||||
}
|
||||
|
||||
read_again:
|
||||
res = read(fd, inbuf, bs);
|
||||
if (res < bs) {
|
||||
printf("read error: returned %d\n", res);
|
||||
exit(1);
|
||||
printf("R: Res is %d\n", res);
|
||||
ioctl(fd, DAHDI_GETEVENT, &x);
|
||||
printf("Event: %d\n", x);
|
||||
goto read_again;
|
||||
}
|
||||
/* If first time through, set byte that is used to test further bytes */
|
||||
if (!setup) {
|
||||
@@ -293,3 +342,4 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
49
pattest.c
49
pattest.c
@@ -33,6 +33,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/ppp_defs.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include "bittest.h"
|
||||
@@ -64,30 +65,40 @@ void print_packet(unsigned char *buf, int len)
|
||||
printf("}\n");
|
||||
}
|
||||
|
||||
int channel_open(char *name, int *bs)
|
||||
int channel_open(const char *name, int *bs)
|
||||
{
|
||||
int channo;
|
||||
int fd;
|
||||
struct dahdi_params tp;
|
||||
char *dev;
|
||||
int channo, fd;
|
||||
struct dahdi_params tp;
|
||||
struct stat filestat;
|
||||
|
||||
channo = atoi(name);
|
||||
/* channo==0: The user passed a file name to be opened. */
|
||||
dev = channo ? DEVICE : name;
|
||||
|
||||
fd = open(dev, O_RDWR, 0600);
|
||||
|
||||
if (fd < 0) {
|
||||
perror(DEVICE);
|
||||
/* stat file, if character device, open it */
|
||||
channo = strtoul(name, NULL, 10);
|
||||
fd = stat(name, &filestat);
|
||||
if (!fd && S_ISCHR(filestat.st_mode)) {
|
||||
fd = open(name, O_RDWR, 0600);
|
||||
if (fd < 0) {
|
||||
perror(name);
|
||||
return -1;
|
||||
}
|
||||
/* try out the dahdi_specify interface */
|
||||
} else if (channo > 0) {
|
||||
fd = open(DEVICE, O_RDWR, 0600);
|
||||
if (fd < 0) {
|
||||
perror(DEVICE);
|
||||
return -1;
|
||||
}
|
||||
if (ioctl(fd, DAHDI_SPECIFY, &channo) < 0) {
|
||||
perror("DAHDI_SPECIFY ioctl failed");
|
||||
return -1;
|
||||
}
|
||||
/* die */
|
||||
} else {
|
||||
fprintf(stderr, "Specified channel is not a valid character "
|
||||
"device or channel number");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* If we got a channel number, get it from /dev/dahdi/channel: */
|
||||
if(channo && ioctl(fd, DAHDI_SPECIFY, &channo) < 0) {
|
||||
perror("SPECIFY");
|
||||
return -1;
|
||||
}
|
||||
if(ioctl(fd, DAHDI_SET_BLOCKSIZE, bs) < 0) {
|
||||
if (ioctl(fd, DAHDI_SET_BLOCKSIZE, bs) < 0) {
|
||||
perror("SET_BLOCKSIZE");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
# Incorrect timing sync may cause clicks/noise in the audio, poor quality or failed
|
||||
# faxes, unreliable modem operation, and is a general all round bad thing.
|
||||
#
|
||||
# NOTE: The B410P card cannot reliably connect one of its four ports
|
||||
# configured in TE mode to another one configured in NT mode. It will not
|
||||
# reliably sync clock from itself. Please use another physical card and
|
||||
# configure one to provide clock and one to recover clock in any B410P test
|
||||
# environments.
|
||||
#
|
||||
# The line build-out (or LBO) is an integer, from the following table:
|
||||
#
|
||||
# 0: 0 db (CSU) / 0-133 feet (DSX-1)
|
||||
@@ -312,10 +318,11 @@ defaultzone=us
|
||||
# cancellers are compiled and installed as part of the dahdi-linux package.
|
||||
# You can specify in this file the echo canceller to be used for each
|
||||
# channel. The default behavior is for there to be NO echo canceller on any
|
||||
# channel, so it is very important that you specify one here if you do
|
||||
# not have hardware echo cancellers and need echo cancellation.
|
||||
# channel, so it is very important that you specify one here.
|
||||
#
|
||||
# Valid echo cancellers are: mg2, kb1, sec2, and sec.
|
||||
# Valid echo cancellers are: hwec, mg2, kb1, sec2, and sec.
|
||||
# 'hwec' is a special echo canceller that should be used if hardware echo
|
||||
# cancellation is desired on and available on the specified channels.
|
||||
# If compiled, 'hpec' is also a valid echo canceller.
|
||||
#
|
||||
# To configure the default echo cancellers, use the format:
|
||||
|
||||
52
xpp/Makefile
52
xpp/Makefile
@@ -37,8 +37,23 @@ PERL_MODS := $(shell cd perl_modules; echo $(PERL_MODS_PAT))
|
||||
# FIXME: Are those values really sane?
|
||||
HOSTCC ?= $(CC)
|
||||
|
||||
USE_OCTASIC := yes
|
||||
OCTASIC_DIR := oct612x
|
||||
|
||||
CFLAGS += -g -Wall $(USB_INCLUDE)
|
||||
ifneq (no,$(USE_OCTASIC))
|
||||
|
||||
OCT_OBJS = $(shell $(OCTASIC_DIR)/octasic-helper objects $(OCTASIC_DIR))
|
||||
OCT_SRCS = $(shell echo $(OCT_OBJS) | tr -s ' ' '\n' | sed 's/\.o$$/.c/g')
|
||||
OCT_HERE_OBJS = $(shell echo $(OCT_OBJS) | tr -s ' ' '\n' | sed 's,^.*/,,')
|
||||
OCT_CFLAGS = $(shell $(OCTASIC_DIR)/octasic-helper cflags $(OCTASIC_DIR))
|
||||
OCT_DEFINES = \
|
||||
-DPTR_TYPE=uint32_t \
|
||||
-DcOCT6100_INTERNAL_SUPER_ARRAY_SIZE=1024 \
|
||||
-DcOCT6100_MAX_ECHO_CHANNELS=672 \
|
||||
-DcOCT6100_MAX_MIXER_EVENTS=1344
|
||||
|
||||
ECHO_LOADER = echo_loader.o
|
||||
endif
|
||||
|
||||
%.8: %
|
||||
pod2man --section 8 $^ > $@ || $(RM) $@
|
||||
@@ -54,9 +69,12 @@ PERL_SCRIPTS = \
|
||||
|
||||
PERL_MANS = $(PERL_SCRIPTS:%=%.8)
|
||||
|
||||
ABHEXLOAD_OBJS = astribank_hexload.o hexfile.o pic_loader.o astribank_usb.o mpp_funcs.o debug.o
|
||||
ABTOOL_OBJS = astribank_tool.o astribank_usb.o mpp_funcs.o debug.o
|
||||
ABALLOW_OBJS = astribank_allow.o astribank_usb.o mpp_funcs.o debug.o
|
||||
XTALK_OBJS = xtalk/xtalk.o xtalk/xusb.o xtalk/xlist.o xtalk/debug.o
|
||||
ASTRIBANK_OBJS = astribank_usb.o mpptalk.o $(XTALK_OBJS)
|
||||
|
||||
ABHEXLOAD_OBJS = astribank_hexload.o hexfile.o pic_loader.o $(ECHO_LOADER) $(ASTRIBANK_OBJS) $(OCT_HERE_OBJS)
|
||||
ABTOOL_OBJS = astribank_tool.o $(ASTRIBANK_OBJS)
|
||||
ABALLOW_OBJS = astribank_allow.o $(ASTRIBANK_OBJS)
|
||||
|
||||
TARGETS = .perlcheck astribank_is_starting
|
||||
PROG_INSTALL = astribank_is_starting
|
||||
@@ -102,11 +120,14 @@ ifneq (,$(PERLLIBDIR))
|
||||
done
|
||||
endif
|
||||
|
||||
CFLAGS += -I. -Ixtalk
|
||||
|
||||
fpga_load: fpga_load.o hexfile.o
|
||||
fpga_load: LIBS+=$(EXTRA_LIBS) $(USB_LIB)
|
||||
|
||||
astribank_hexload: $(ABHEXLOAD_OBJS)
|
||||
astribank_hexload: LIBS+=$(EXTRA_LIBS) $(USB_LIB)
|
||||
astribank_hexload: CFLAGS+=$(OCT_CFLAGS)
|
||||
|
||||
astribank_tool: $(ABTOOL_OBJS)
|
||||
astribank_tool: LIBS+=$(EXTRA_LIBS) $(USB_LIB)
|
||||
@@ -119,9 +140,26 @@ astribank_is_starting: LIBS+=$(EXTRA_LIBS)
|
||||
|
||||
fpga_load.o: CFLAGS+=-D_GNU_SOURCE # We use memrchr()
|
||||
|
||||
hex2iic: hex2iic.o iic.o hexfile.o
|
||||
|
||||
test_parse: test_parse.o hexfile.o
|
||||
test_parse: LIBS+=$(EXTRA_LIBS) $(USB_LIB)
|
||||
|
||||
ifneq (no,$(USE_OCTASIC))
|
||||
.octasic.depend: $(OCTASIC_DIR)/octasic-helper Makefile ../config.status
|
||||
$(CC) -MM $(OCT_CFLAGS) \
|
||||
`$(OCTASIC_DIR)/octasic-helper objects | \
|
||||
tr -s ' ' '\n' | \
|
||||
sed -e 's,.*,$(OCTASIC_DIR)/&,' -e 's/\.o$$/.c/'` > $@
|
||||
|
||||
-include .octasic.depend
|
||||
|
||||
$(OCT_HERE_OBJS): Makefile
|
||||
$(CC) -c $(CFLAGS) $(OCT_CFLAGS) $(OCT_DEFINES) $(OCT_SRCS)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
%: %.o
|
||||
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
|
||||
|
||||
@@ -130,11 +168,11 @@ test_parse: LIBS+=$(EXTRA_LIBS) $(USB_LIB)
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
$(RM) .depend *.o $(TARGETS)
|
||||
$(RM) .depend .octasic.depend *.o xtalk/*.o $(OCT_HERE_OBJS) $(TARGETS)
|
||||
|
||||
.PHONY: depend
|
||||
depend: .depend
|
||||
.depend: *.c *.h
|
||||
@$(CC) -MM *.c > $@ || rm -f $@
|
||||
.depend: *.c *.h xtalk/*.c xtalk/*.h
|
||||
@$(CC) $(CFLAGS) -MM *.c xtalk/*.c > $@ || rm -f $@
|
||||
|
||||
include .depend
|
||||
|
||||
@@ -43,27 +43,42 @@ an FXO module of two ports.
|
||||
|
||||
Building and Installation
|
||||
-------------------------
|
||||
Apart from the standard DAHDI build requirements, you also need libusb
|
||||
development headers to build the fpga_load firmware loader. This is
|
||||
typically the package libusb-dev on Debian (and derivatives like Ubuntu)
|
||||
or libusb-devel on RedHat (and derivatives like CentOS/Trixbox).
|
||||
Apart from the standard DAHDI build requirements, you also need:
|
||||
|
||||
Patch for BRI
|
||||
~~~~~~~~~~~~~
|
||||
(As of DAHDI 2.2 this patch is no longer needed. Furthermore, it does
|
||||
not apply. The same directory has a newer patch that applies. This
|
||||
section is kept in the document for the time being for the benefit of
|
||||
those with older versions)
|
||||
* *libusb development headers* to build the fpga_load firmware loader.
|
||||
This is typically the package libusb-dev on Debian (and derivatives
|
||||
like Ubuntu) or libusb-devel on RedHat (and derivatives like
|
||||
CentOS/Trixbox).
|
||||
* *Echo Canceller Module firmware*: If you have an Astribank with an
|
||||
echo canceller module, see the following section.
|
||||
|
||||
In order for the BRI module (xpd_bri.ko) to build, you still need an
|
||||
external patch:
|
||||
Follow the build instructions of DAHDI-linux and DAHDI-tools. But
|
||||
Basically, in dahdi-linux run:
|
||||
|
||||
http://updates.xorcom.com/astribank/bristuff/dahdi_bri_dchan.diff[]
|
||||
make
|
||||
make install # as root
|
||||
|
||||
You need to apply it to the dahdi-linux tarball before building:
|
||||
And later in dahdi-tools:
|
||||
|
||||
wget http://updates.xorcom.com/astribank/bristuff/dahdi_bri_dchan.diff
|
||||
patch -p1 <dahdi_bri_dchan.diff
|
||||
./configure
|
||||
make
|
||||
make install # as root
|
||||
|
||||
|
||||
Echo Canceller Firmware
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
If you install from source, you should copy OCT6104E-256D.ima to the
|
||||
source tree (before running make install:
|
||||
|
||||
wget http://updates.xorcom.com/astribank/hwec/OCT6104E-256D.ima
|
||||
mv OCT6104E-256D.ima drivers/dahdi/xpp/firmwares/
|
||||
|
||||
Alternatively, if you have already installed DAHDI-linux (e.g. from a
|
||||
binary package that does not include the firmware) you can just copy
|
||||
it directly to the target directory, /usr/share/dahdi using:
|
||||
|
||||
cd /usr/share/dahdi
|
||||
wget http://updates.xorcom.com/astribank/hwec/OCT6104E-256D.ima
|
||||
|
||||
|
||||
Installation Scenarios
|
||||
@@ -955,6 +970,9 @@ following command in order to load the FPGA firmware manually:
|
||||
# pick the right name according to the device ID. FPGA_1161.hex is for
|
||||
# 116x Astribanks:
|
||||
astribank_hexload -D /dev/bus/usb/MMM/NNN -F /usr/share/dahdi/FPGA_1161.hex
|
||||
# If the device has an echo canceller unit (If the unit is BRI/E1, you
|
||||
# need to add an extra -A to the command-line after the -O)
|
||||
#astribank_hexload -D /dev/bus/usb/MMM/NNN -O /usr/share/dahdi/OCT6104E-256D.ima
|
||||
# Note the shell expantion in this line:
|
||||
astribank_hexload -D /dev/bus/usb/MMM/NNN -p /usr/share/dahdi/PIC_TYPE_[1-4].hex
|
||||
# reenumerate (disconnect and reconnect)
|
||||
@@ -1072,6 +1090,9 @@ xpd_bri::
|
||||
BRI ("ISDN") modules. Module type 3.
|
||||
xpd_pri::
|
||||
The module for controlling E1/T1 modules. Module type 4.
|
||||
xpd_echo::
|
||||
The module for controlling hardware echo canceller modules. Module type 5.
|
||||
Does not generate a span.
|
||||
xpp_usb::
|
||||
The functionality needed to connect to the USB bus.
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@ information used by Xorcom to generate/modify licensed capabilities.
|
||||
.B \-D
|
||||
.I device-path
|
||||
.RS
|
||||
Required. The device to read from/write to. On modern UDEV-based system
|
||||
this is usually /dev/bus/usb/\fIbus_num\fR/\fIdevice_num\fR,
|
||||
where \fIbus_num\fR and \fIdevice_num\fR are the first two numbers in the
|
||||
output of lsusb(8).
|
||||
On older systems that use usbfs, it is usually
|
||||
Required. The device to read from/write to. This is
|
||||
\fIbus_num\fR/\fIdevice_num\fR, where \fIbus_num\fR and \fIdevice_num\fR
|
||||
are the first two numbers in the output of lsusb(8) or dahdi_hardware(8).
|
||||
On older versions of this tool you needed a complete path to the device,
|
||||
which would be /dev/bus/usb/\fIbus_num\fR/\fIdevice_num\fR, or
|
||||
/proc/bus/usb/\fIbus_num\fR/\fIdevice_num\fR.
|
||||
.RE
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <ctype.h>
|
||||
#include "mpp.h"
|
||||
#include "mpp_funcs.h"
|
||||
#include "debug.h"
|
||||
#include "mpptalk.h"
|
||||
#include <debug.h>
|
||||
|
||||
static const char rcsid[] = "$Id$";
|
||||
|
||||
@@ -106,6 +106,7 @@ static int write_to_file(struct eeprom_table *eeprom_table, struct capabilities
|
||||
fprintf(f, "Capabilities.Port.FXO: %d\n", caps->ports_fxo);
|
||||
fprintf(f, "Capabilities.Port.BRI: %d\n", caps->ports_bri);
|
||||
fprintf(f, "Capabilities.Port.PRI: %d\n", caps->ports_pri);
|
||||
fprintf(f, "Capabilities.Port.ECHO: %d\n", caps->ports_echo);
|
||||
fprintf(f, "Capabilities.Twinstar: %d\n", CAP_EXTRA_TWINSTAR(caps));
|
||||
fprintf(f, "Data:\n");
|
||||
bin_to_file(eeprom_table, sizeof(*eeprom_table), f);
|
||||
@@ -327,7 +328,7 @@ int main(int argc, char *argv[])
|
||||
usage();
|
||||
}
|
||||
DBG("Startup %s\n", devpath);
|
||||
if((astribank = mpp_init(devpath)) == NULL) {
|
||||
if((astribank = mpp_init(devpath, 1)) == NULL) {
|
||||
ERR("Failed initializing MPP\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
.TH "ASTRIBANK_HEXLOAD" "8" "29 March 2009" "" ""
|
||||
.TH "ASTRIBANK_HEXLOAD" "8" "30 May 2011" "" ""
|
||||
|
||||
.SH NAME
|
||||
astribank_tool \- Xorcom Astribank (xpp) firmware loader
|
||||
.SH SYNOPSIS
|
||||
.B astribank_tool \-D \fIdevice-path\fR <\fB\-F|\-p\fR> [\fIoptions\fR] \fIhexfile\fR
|
||||
.B astribank_tool \-D \fIdevice-path\fR \-F [\fIoptions\fR] \fIhexfile\fR
|
||||
|
||||
.B astribank_tool [\-h]
|
||||
.B astribank_tool \-D \fIdevice-path\fR \-p [\fIoptions\fR] \fIhexfile1 .. hexfile4\fR
|
||||
|
||||
.B astribank_tool \-D \fIdevice-path\fR \-O [-A] [\fIoptions\fR] \fIimagefile\fR
|
||||
|
||||
.B astribank_tool \-D \fIdevice-path\fR \-o [\fIoptions\fR]
|
||||
|
||||
.B astribank_tool \-D \fIdevice-path\fR \-E [\fIoptions\fR] \fIhexfile\fR
|
||||
|
||||
.B astribank_tool \-h
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B astribank_hexload
|
||||
@@ -20,14 +28,16 @@ firmware. It is normally run by the script xpp_fxloader.
|
||||
.B \-D
|
||||
.I device-path
|
||||
.RS
|
||||
Required. The device to read from/write to. On modern UDEV-based system
|
||||
this is usually /dev/bus/usb/\fIbus_num\fR/\fIdevice_num\fR,
|
||||
where \fIbus_num\fR and \fIdevice_num\fR are the first two numbers in the
|
||||
output of lsusb(8).
|
||||
On older systems that use usbfs, it is usually
|
||||
Required. The device to read from/write to. This is
|
||||
\fIbus_num\fR/\fIdevice_num\fR, where \fIbus_num\fR and \fIdevice_num\fR
|
||||
are the first two numbers in the output of lsusb(8) or dahdi_hardware(8).
|
||||
On older versions of this tool you needed a complete path to the device,
|
||||
which would be /dev/bus/usb/\fIbus_num\fR/\fIdevice_num\fR, or
|
||||
/proc/bus/usb/\fIbus_num\fR/\fIdevice_num\fR.
|
||||
.RE
|
||||
|
||||
One of the following is required:
|
||||
|
||||
.B \-F
|
||||
.RS
|
||||
The firmware to load is a FPGA firmware.
|
||||
@@ -35,9 +45,29 @@ The firmware to load is a FPGA firmware.
|
||||
|
||||
.B \-p
|
||||
.RS
|
||||
The firmware to load is a PIC firmware.
|
||||
The firmwares to load is are PIC firmwares. All (typically 4) should be
|
||||
on the command-line.
|
||||
.RE
|
||||
|
||||
.B \-O
|
||||
.RS
|
||||
The firmware to load is an Octasic echo canceller firmware image file.
|
||||
.RE
|
||||
|
||||
.B \-o
|
||||
.RS
|
||||
Don't load firmware. Just print the version number of the currently-loaded
|
||||
Octasic echo canceller firmware.
|
||||
.RE
|
||||
|
||||
.B \-E
|
||||
.RS
|
||||
The firmware to load is a special EEPROM burning one.
|
||||
.RE
|
||||
|
||||
|
||||
Other options:
|
||||
|
||||
.B \-v
|
||||
.RS
|
||||
Increase verbosity. May be used multiple times.
|
||||
@@ -53,6 +83,14 @@ Set debug mask to \fImask\fR. Default is 0, 0xFF is "everything".
|
||||
Displays usage message.
|
||||
.RE
|
||||
|
||||
.B \-A
|
||||
.RS
|
||||
When loading a Octasic echo canceller firmware, set the channels of the
|
||||
first Astribank module to use aLaw (G.711a). This is what you'd normally
|
||||
use for BRI and E1. If not set, the default mu-Law (G.711u), which is
|
||||
what you'd normally use for FXS, FXO and T1.
|
||||
.RE
|
||||
|
||||
.SH SEE ALSO
|
||||
fxload(8), lsusb(8), astribank_tool(8), fpga_load(8)
|
||||
|
||||
|
||||
@@ -24,17 +24,21 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "debug.h"
|
||||
#include <debug.h>
|
||||
#include "hexfile.h"
|
||||
#include "mpp_funcs.h"
|
||||
#include "mpptalk.h"
|
||||
#include "pic_loader.h"
|
||||
#include "echo_loader.h"
|
||||
#include "astribank_usb.h"
|
||||
#include "../autoconfig.h"
|
||||
|
||||
#define DBG_MASK 0x80
|
||||
#define MAX_HEX_LINES 10000
|
||||
#define MAX_HEX_LINES 64000
|
||||
#define HAVE_OCTASIC 1
|
||||
|
||||
static char *progname;
|
||||
|
||||
@@ -43,9 +47,14 @@ static void usage()
|
||||
fprintf(stderr, "Usage: %s [options...] -D {/proc/bus/usb|/dev/bus/usb}/<bus>/<dev> hexfile...\n", progname);
|
||||
fprintf(stderr, "\tOptions: {-F|-p}\n");
|
||||
fprintf(stderr, "\t\t[-E] # Burn to EEPROM\n");
|
||||
#if HAVE_OCTASIC
|
||||
fprintf(stderr, "\t\t[-O] # Load Octasic firmware\n");
|
||||
fprintf(stderr, "\t\t[-o] # Show Octasic version\n");
|
||||
#endif
|
||||
fprintf(stderr, "\t\t[-F] # Load FPGA firmware\n");
|
||||
fprintf(stderr, "\t\t[-p] # Load PIC firmware\n");
|
||||
fprintf(stderr, "\t\t[-v] # Increase verbosity\n");
|
||||
fprintf(stderr, "\t\t[-A] # Set A-Law for 1st module\n");
|
||||
fprintf(stderr, "\t\t[-d mask] # Debug mask (0xFF for everything)\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -73,30 +82,39 @@ int handle_hexline(struct astribank_device *astribank, struct hexline *hexline)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void print_parse_errors(int level, const char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (verbose > level) {
|
||||
va_start (ap, msg);
|
||||
vfprintf (stderr, msg, ap);
|
||||
va_end (ap);
|
||||
}
|
||||
}
|
||||
|
||||
static int load_hexfile(struct astribank_device *astribank, const char *hexfile, enum dev_dest dest)
|
||||
{
|
||||
struct hexdata *hexdata = NULL;
|
||||
int finished = 0;
|
||||
int ret;
|
||||
int i;
|
||||
unsigned i;
|
||||
char star[] = "+\\+|+/+-";
|
||||
const char *devstr;
|
||||
|
||||
parse_hexfile_set_reporting(print_parse_errors);
|
||||
if((hexdata = parse_hexfile(hexfile, MAX_HEX_LINES)) == NULL) {
|
||||
perror(hexfile);
|
||||
return -errno;
|
||||
}
|
||||
INFO("Loading hexfile to %s: %s (version %s)\n",
|
||||
devstr = xusb_devpath(astribank->xusb);
|
||||
INFO("%s [%s]: Loading %s Firmware: %s (version %s)\n",
|
||||
devstr,
|
||||
xusb_serial(astribank->xusb),
|
||||
dev_dest2str(dest),
|
||||
hexdata->fname, hexdata->version_info);
|
||||
#if 0
|
||||
FILE *fp;
|
||||
if((fp = fopen("fpga_dump_new.txt", "w")) == NULL) {
|
||||
perror("dump");
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
if((ret = mpp_send_start(astribank, dest, hexdata->version_info)) < 0) {
|
||||
ERR("Failed hexfile send start: %d\n", ret);
|
||||
ERR("%s: Failed hexfile send start: %d\n", devstr, ret);
|
||||
return ret;
|
||||
}
|
||||
for(i = 0; i < hexdata->maxlines; i++) {
|
||||
@@ -109,7 +127,7 @@ static int load_hexfile(struct astribank_device *astribank, const char *hexfile,
|
||||
fflush(stdout);
|
||||
}
|
||||
if(finished) {
|
||||
ERR("Extra data after End Of Data Record (line %d)\n", i);
|
||||
ERR("%s: Extra data after End Of Data Record (line %d)\n", devstr, i);
|
||||
return 0;
|
||||
}
|
||||
if(hexline->d.content.header.tt == TT_EOF) {
|
||||
@@ -118,7 +136,7 @@ static int load_hexfile(struct astribank_device *astribank, const char *hexfile,
|
||||
continue;
|
||||
}
|
||||
if((ret = handle_hexline(astribank, hexline)) < 0) {
|
||||
ERR("Failed hexfile sending in lineno %d (ret=%d)\n", i, ret);;
|
||||
ERR("%s: Failed hexfile sending in lineno %d (ret=%d)\n", devstr, i, ret);;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@@ -127,7 +145,7 @@ static int load_hexfile(struct astribank_device *astribank, const char *hexfile,
|
||||
fflush(stdout);
|
||||
}
|
||||
if((ret = mpp_send_end(astribank)) < 0) {
|
||||
ERR("Failed hexfile send end: %d\n", ret);
|
||||
ERR("%s: Failed hexfile send end: %d\n", devstr, ret);
|
||||
return ret;
|
||||
}
|
||||
#if 0
|
||||
@@ -141,11 +159,16 @@ static int load_hexfile(struct astribank_device *astribank, const char *hexfile,
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *devpath = NULL;
|
||||
struct astribank_device *astribank;
|
||||
int opt_pic = 0;
|
||||
int opt_echo = 0;
|
||||
int opt_ecver = 0;
|
||||
#if HAVE_OCTASIC
|
||||
int opt_alaw = 0;
|
||||
#endif
|
||||
int opt_dest = 0;
|
||||
int opt_sum = 0;
|
||||
enum dev_dest dest = DEST_NONE;
|
||||
const char options[] = "vd:D:EFp";
|
||||
const char options[] = "vd:D:EFOopA";
|
||||
int iface_num;
|
||||
int ret;
|
||||
|
||||
@@ -166,7 +189,7 @@ int main(int argc, char *argv[])
|
||||
ERR("The -F and -E options are mutually exclusive.\n");
|
||||
usage();
|
||||
}
|
||||
opt_dest = 1;
|
||||
opt_dest++;
|
||||
dest = DEST_EEPROM;
|
||||
break;
|
||||
case 'F':
|
||||
@@ -174,9 +197,20 @@ int main(int argc, char *argv[])
|
||||
ERR("The -F and -E options are mutually exclusive.\n");
|
||||
usage();
|
||||
}
|
||||
opt_dest = 1;
|
||||
opt_dest++;
|
||||
dest = DEST_FPGA;
|
||||
break;
|
||||
#if HAVE_OCTASIC
|
||||
case 'O':
|
||||
opt_echo = 1;
|
||||
break;
|
||||
case 'o':
|
||||
opt_ecver = 1;
|
||||
break;
|
||||
case 'A':
|
||||
opt_alaw = 1;
|
||||
break;
|
||||
#endif
|
||||
case 'p':
|
||||
opt_pic = 1;
|
||||
break;
|
||||
@@ -192,12 +226,17 @@ int main(int argc, char *argv[])
|
||||
usage();
|
||||
}
|
||||
}
|
||||
if((opt_dest ^ opt_pic) == 0) {
|
||||
ERR("The -F, -E and -p options are mutually exclusive.\n");
|
||||
opt_sum = opt_dest + opt_pic + opt_echo;
|
||||
if(opt_sum > 1 || (opt_sum == 0 && opt_ecver == 0)) {
|
||||
ERR("The -F, -E"
|
||||
#if HAVE_OCTASIC
|
||||
", -O"
|
||||
#endif
|
||||
" and -p options are mutually exclusive, if neither is used then -o should present\n");
|
||||
usage();
|
||||
}
|
||||
iface_num = (opt_dest) ? 1 : 0;
|
||||
if(!opt_pic) {
|
||||
if(!opt_pic && !opt_ecver) {
|
||||
if(optind != argc - 1) {
|
||||
ERR("Got %d hexfile names (Need exactly one hexfile)\n",
|
||||
argc - 1 - optind);
|
||||
@@ -208,22 +247,56 @@ int main(int argc, char *argv[])
|
||||
ERR("Missing device path.\n");
|
||||
usage();
|
||||
}
|
||||
if((astribank = astribank_open(devpath, iface_num)) == NULL) {
|
||||
ERR("Opening astribank failed\n");
|
||||
return 1;
|
||||
}
|
||||
show_astribank_info(astribank);
|
||||
if(opt_dest) {
|
||||
/*
|
||||
* MPP Interface
|
||||
*/
|
||||
struct astribank_device *astribank;
|
||||
|
||||
if((astribank = mpp_init(devpath, iface_num)) == NULL) {
|
||||
ERR("%s: Opening astribank failed\n", devpath);
|
||||
return 1;
|
||||
}
|
||||
//show_astribank_info(astribank);
|
||||
if(load_hexfile(astribank, argv[optind], dest) < 0) {
|
||||
ERR("Loading firmware to %s failed\n", dev_dest2str(dest));
|
||||
ERR("%s: Loading firmware to %s failed\n", devpath, dev_dest2str(dest));
|
||||
return 1;
|
||||
}
|
||||
} else if(opt_pic) {
|
||||
if((ret = load_pic(astribank, argc - optind, argv + optind)) < 0) {
|
||||
ERR("Loading PIC's failed\n");
|
||||
astribank_close(astribank, 0);
|
||||
} else if(opt_pic || opt_echo || opt_ecver) {
|
||||
/*
|
||||
* XPP Interface
|
||||
*/
|
||||
struct astribank_device *astribank;
|
||||
|
||||
if((astribank = astribank_open(devpath, iface_num)) == NULL) {
|
||||
ERR("%s: Opening astribank failed\n", devpath);
|
||||
return 1;
|
||||
}
|
||||
//show_astribank_info(astribank);
|
||||
#if HAVE_OCTASIC
|
||||
if (opt_ecver) {
|
||||
if((ret = echo_ver(astribank)) < 0) {
|
||||
ERR("%s: Get Octasic version failed (Is Echo canceller card connected?)\n", devpath);
|
||||
return 1;
|
||||
} else
|
||||
INFO("Octasic version: 0x%0X\n", ret);
|
||||
}
|
||||
#endif
|
||||
if (opt_pic) {
|
||||
if ((ret = load_pic(astribank, argc - optind, argv + optind)) < 0) {
|
||||
ERR("%s: Loading PIC's failed\n", devpath);
|
||||
return 1;
|
||||
}
|
||||
#if HAVE_OCTASIC
|
||||
} else if (opt_echo) {
|
||||
if((ret = load_echo(astribank, argv[optind], opt_alaw)) < 0) {
|
||||
ERR("%s: Loading ECHO's failed\n", devpath);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
astribank_close(astribank, 0);
|
||||
}
|
||||
astribank_close(astribank, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,10 @@ else
|
||||
dahdi_conf="/etc/dahdi"
|
||||
fi
|
||||
|
||||
if [ "$XPP_HOTPLUG_DAHDI" != yes ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export XPPORDER_CONF="$dahdi_conf/xpp_order"
|
||||
if [ ! -r "$XPPORDER_CONF" ]; then
|
||||
(
|
||||
@@ -62,26 +66,24 @@ matched_devices() {
|
||||
|
||||
NUM_WANTED=`clean_lines | sed '/^$/d' | wc -l`
|
||||
NUM_GOOD=`matched_devices | wc -l`
|
||||
LOCK="/var/lock/twinstar_startup"
|
||||
|
||||
start_dahdi() {
|
||||
script=/etc/init.d/dahdi
|
||||
if [ "$XPP_HOTPLUG_DAHDI" = yes ]; then
|
||||
echo "Starting $script."
|
||||
"$script" start | logger -i -t "$script"
|
||||
status=$?
|
||||
echo "Status($script): $status"
|
||||
else
|
||||
echo "$0: Skip($script): No XPP_HOTPLUG_DAHDI=yes in /etc/dahdi/init.conf"
|
||||
exit 0
|
||||
fi
|
||||
echo "Starting $script."
|
||||
"$script" start | logger -i -t "$script"
|
||||
status=$?
|
||||
echo "Status($script): $status"
|
||||
if [ -x "$dir/twinstar_hook" ]; then
|
||||
"$dir/twinstar_hook"
|
||||
fi
|
||||
# Finished astribanks
|
||||
echo "Removing semaphore"
|
||||
astribank_is_starting -v -r
|
||||
rm -f "$LOCK"
|
||||
}
|
||||
|
||||
#echo "$0: $ACTION($XBUS_NAME)" | $LOGGER
|
||||
case "$ACTION" in
|
||||
add)
|
||||
;;
|
||||
@@ -90,9 +92,28 @@ remove)
|
||||
online)
|
||||
echo "$ACTION($XBUS_NAME): $NUM_GOOD/$NUM_WANTED from $XPPORDER_CONF" | $LOGGER
|
||||
if [ "$NUM_GOOD" -eq "$NUM_WANTED" ]; then
|
||||
echo "START-DAHDI: Total $NUM_GOOD online." | $LOGGER
|
||||
# Fork services
|
||||
start_dahdi < /dev/null 2>&1 | $LOGGER &
|
||||
(
|
||||
# Delay the initialization of the Astribank until the filesystem
|
||||
# is mounted read-write:
|
||||
test_file="/var/lock/astribank_test_file"
|
||||
for i in `seq 1 20`; do
|
||||
if touch $test_file 2> /dev/null; then
|
||||
rm -f $test_file
|
||||
break
|
||||
else
|
||||
echo "$0: [$i] - Failed writing '$test_file'...waiting" | $LOGGER
|
||||
sleep 1;
|
||||
fi
|
||||
done
|
||||
|
||||
if ln -s "$XBUS_NAME" "$LOCK"; then
|
||||
echo "START-DAHDI: Total $NUM_GOOD online." | $LOGGER
|
||||
# Fork services
|
||||
start_dahdi < /dev/null 2>&1 | $LOGGER
|
||||
else
|
||||
echo "$0: Was started: $(ls -l $LOCK)" | $LOGGER
|
||||
fi
|
||||
) < /dev/null 2>&1 | $LOGGER &
|
||||
fi
|
||||
;;
|
||||
offline)
|
||||
@@ -100,8 +121,9 @@ offline)
|
||||
if [ "$NUM_GOOD" -eq 0 ]; then
|
||||
echo "All Astribanks offline" | $LOGGER
|
||||
if [ -x "$dir/twinstar_hook" ]; then
|
||||
"$dir/twinstar_hook"
|
||||
"$dir/twinstar_hook" || :
|
||||
fi
|
||||
rm -f "$LOCK"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -15,6 +15,10 @@ static int debug;
|
||||
static int verbose;
|
||||
static int timeout_seconds = 60;
|
||||
|
||||
/* If libc provides no timeout variant: try to do without it: */
|
||||
#ifndef HAVE_SEMTIMEDOP
|
||||
#define semtimedop(sem, ops, n, timeout) semop(sem, ops, n)
|
||||
#endif
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
|
||||
@@ -17,11 +17,11 @@ to the \-D command line option).
|
||||
.B \-D
|
||||
.I device-path
|
||||
.RS
|
||||
Required. The device to read from/write to. On modern UDEV-based system
|
||||
this is usually /dev/bus/usb/\fIbus_num\fR/\fIdevice_num\fR,
|
||||
where \fIbus_num\fR and \fIdevice_num\fR are the first two numbers in the
|
||||
output of lsusb(8).
|
||||
On older systems that use usbfs, it is usually
|
||||
Required. The device to read from/write to. This is
|
||||
\fIbus_num\fR/\fIdevice_num\fR, where \fIbus_num\fR and \fIdevice_num\fR
|
||||
are the first two numbers in the output of lsusb(8) or dahdi_hardware(8).
|
||||
On older versions of this tool you needed a complete path to the device,
|
||||
which would be /dev/bus/usb/\fIbus_num\fR/\fIdevice_num\fR, or
|
||||
/proc/bus/usb/\fIbus_num\fR/\fIdevice_num\fR.
|
||||
.RE
|
||||
|
||||
|
||||
@@ -28,8 +28,10 @@
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "mpp_funcs.h"
|
||||
#include "debug.h"
|
||||
#include "astribank_usb.h"
|
||||
#include "mpptalk.h"
|
||||
#include <debug.h>
|
||||
#include <xusb.h>
|
||||
|
||||
#define DBG_MASK 0x80
|
||||
/* if enabled, adds support for resetting pre-MPP USB firmware - if we
|
||||
@@ -93,7 +95,7 @@ static int show_hardware(struct astribank_device *astribank)
|
||||
if(astribank->eeprom_type == EEPROM_TYPE_LARGE) {
|
||||
show_capabilities(&capabilities, stdout);
|
||||
if(STATUS_FPGA_LOADED(astribank->status)) {
|
||||
for(unit = 0; unit < 4; unit++) {
|
||||
for(unit = 0; unit < 5; unit++) {
|
||||
ret = mpps_card_info(astribank, unit, &card_type, &card_status);
|
||||
if(ret < 0)
|
||||
return ret;
|
||||
@@ -132,7 +134,7 @@ int old_reset(const char* devpath)
|
||||
DBG("Failed re-opening astribank device for old_reset\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
ret = send_usb(astribank, buf, 1, 5000);
|
||||
ret = xusb_send(astribank->xusb, buf, 1, 5000);
|
||||
|
||||
/* If we just had a reenumeration, we may get -ENODEV */
|
||||
if(ret < 0 && ret != -ENODEV)
|
||||
@@ -205,7 +207,7 @@ int main(int argc, char *argv[])
|
||||
usage();
|
||||
}
|
||||
DBG("Startup %s\n", devpath);
|
||||
if((astribank = mpp_init(devpath)) == NULL) {
|
||||
if((astribank = mpp_init(devpath, 1)) == NULL) {
|
||||
ERR("Failed initializing MPP\n");
|
||||
#ifdef SUPPORT_OLD_RESET
|
||||
DBG("opt_reset = %s\n", opt_reset);
|
||||
|
||||
@@ -30,39 +30,46 @@
|
||||
#include <stdarg.h>
|
||||
#include <syslog.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <xusb.h>
|
||||
#include "astribank_usb.h"
|
||||
#include "debug.h"
|
||||
#include <debug.h>
|
||||
|
||||
static const char rcsid[] = "$Id$";
|
||||
|
||||
#define DBG_MASK 0x01
|
||||
#define TIMEOUT 500
|
||||
|
||||
#define TYPE_ENTRY(t,ni,n,ne,out,in,...) \
|
||||
[t] = { \
|
||||
.type_code = (t), \
|
||||
#define TYPE_ENTRY(t,p,ni,n,ne,out,in,...) \
|
||||
{ \
|
||||
.my_vendor_id = 0xe4e4, \
|
||||
.my_product_id = (p), \
|
||||
.name = #t, \
|
||||
.num_interfaces = (ni), \
|
||||
.my_interface_num = (n), \
|
||||
.num_endpoints = (ne), \
|
||||
.my_ep_in = (in), \
|
||||
.my_ep_out = (out), \
|
||||
.name = #t, \
|
||||
.endpoints = { __VA_ARGS__ }, \
|
||||
}
|
||||
|
||||
static const struct interface_type interface_types[] = {
|
||||
TYPE_ENTRY(USB_11xx, 1, 0, 4, MP_EP_OUT, MP_EP_IN,
|
||||
XPP_EP_OUT,
|
||||
MP_EP_OUT,
|
||||
XPP_EP_IN,
|
||||
MP_EP_IN),
|
||||
TYPE_ENTRY(USB_FIRMWARE_II, 2, 1, 2, MP_EP_OUT, MP_EP_IN,
|
||||
MP_EP_OUT,
|
||||
MP_EP_IN),
|
||||
TYPE_ENTRY(USB_PIC, 2, 0, 2, XPP_EP_OUT, XPP_EP_IN,
|
||||
XPP_EP_OUT,
|
||||
XPP_EP_IN),
|
||||
|
||||
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
|
||||
|
||||
static const struct xusb_spec astribank_specs[] = {
|
||||
/* OLD Firmwares */
|
||||
TYPE_ENTRY("USB-OLDFXS", 0x1131, 2, 1, 2, MP_EP_OUT, MP_EP_IN),
|
||||
TYPE_ENTRY("FPGA-OLDFXS", 0x1132, 2, 1, 2, MP_EP_OUT, MP_EP_IN),
|
||||
TYPE_ENTRY("USB-BRI", 0x1141, 2, 1, 2, MP_EP_OUT, MP_EP_IN),
|
||||
TYPE_ENTRY("FPGA-BRI", 0x1142, 2, 1, 2, MP_EP_OUT, MP_EP_IN),
|
||||
TYPE_ENTRY("USB-OLD", 0x1151, 2, 1, 2, MP_EP_OUT, MP_EP_IN),
|
||||
TYPE_ENTRY("FPGA-OLD", 0x1152, 2, 1, 2, MP_EP_OUT, MP_EP_IN),
|
||||
|
||||
TYPE_ENTRY("USB-MULTI", 0x1161, 2, 1, 2, MP_EP_OUT, MP_EP_IN),
|
||||
TYPE_ENTRY("FPGA-MULTI", 0x1162, 2, 1, 2, MP_EP_OUT, MP_EP_IN),
|
||||
TYPE_ENTRY("BURNED-MULTI", 0x1164, 2, 1, 2, MP_EP_OUT, MP_EP_IN),
|
||||
TYPE_ENTRY("USB-BURN", 0x1112, 2, 1, 2, MP_EP_OUT, MP_EP_IN),
|
||||
};
|
||||
|
||||
static const struct xusb_spec astribank_pic_specs[] = {
|
||||
TYPE_ENTRY("USB_PIC", 0x1161, 2, 0, 2, XPP_EP_OUT, XPP_EP_IN),
|
||||
};
|
||||
#undef TYPE_ENTRY
|
||||
|
||||
@@ -71,262 +78,41 @@ static const struct interface_type interface_types[] = {
|
||||
/*
|
||||
* USB handling
|
||||
*/
|
||||
|
||||
/* return 1 if:
|
||||
* - str has a number
|
||||
* - It is larger than 0
|
||||
* - It equals num
|
||||
*/
|
||||
static int num_matches(int num, const char* str) {
|
||||
int str_val = atoi(str);
|
||||
if (str_val <= 0)
|
||||
return 0;
|
||||
return (str_val == num);
|
||||
}
|
||||
|
||||
struct usb_device *dev_of_path(const char *path)
|
||||
{
|
||||
struct usb_bus *bus;
|
||||
struct usb_device *dev;
|
||||
char dirname[PATH_MAX];
|
||||
char filename[PATH_MAX];
|
||||
const char *p;
|
||||
int bnum;
|
||||
int dnum;
|
||||
int ret;
|
||||
|
||||
assert(path != NULL);
|
||||
if(access(path, F_OK) < 0) {
|
||||
perror(path);
|
||||
return NULL;
|
||||
}
|
||||
/* Find last '/' */
|
||||
if((p = memrchr(path, '/', strlen(path))) == NULL) {
|
||||
ERR("Missing a '/' in %s\n", path);
|
||||
return NULL;
|
||||
}
|
||||
/* Get the device number */
|
||||
ret = sscanf(p + 1, "%d", &dnum);
|
||||
if(ret != 1) {
|
||||
ERR("Path tail is not a device number: '%s'\n", p);
|
||||
return NULL;
|
||||
}
|
||||
/* Search for a '/' before that */
|
||||
p = memrchr(path, '/', p - path);
|
||||
if(p == NULL)
|
||||
p = path; /* Relative path */
|
||||
else
|
||||
p++; /* skip '/' */
|
||||
/* Get the bus number */
|
||||
ret = sscanf(p, "%d", &bnum);
|
||||
if(ret != 1) {
|
||||
ERR("Path tail is not a bus number: '%s'\n", p);
|
||||
return NULL;
|
||||
}
|
||||
sprintf(dirname, "%03d", bnum);
|
||||
sprintf(filename, "%03d", dnum);
|
||||
for (bus = usb_busses; bus; bus = bus->next) {
|
||||
if (! num_matches(bnum, bus->dirname))
|
||||
//if(strcmp(bus->dirname, dirname) != 0)
|
||||
continue;
|
||||
for (dev = bus->devices; dev; dev = dev->next) {
|
||||
//if(strcmp(dev->filename, filename) == 0)
|
||||
if (num_matches(dnum, dev->filename))
|
||||
return dev;
|
||||
}
|
||||
}
|
||||
ERR("no usb device match '%s'\n", path);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int get_usb_string(struct astribank_device *astribank, uint8_t item, char *buf, unsigned int len)
|
||||
{
|
||||
char tmp[BUFSIZ];
|
||||
int ret;
|
||||
|
||||
assert(astribank->handle);
|
||||
if (!item)
|
||||
return 0;
|
||||
ret = usb_get_string_simple(astribank->handle, item, tmp, BUFSIZ);
|
||||
if (ret <= 0)
|
||||
return ret;
|
||||
return snprintf(buf, len, "%s", tmp);
|
||||
}
|
||||
|
||||
static int match_interface(const struct astribank_device *astribank,
|
||||
const struct interface_type *itype)
|
||||
{
|
||||
struct usb_interface *interface;
|
||||
struct usb_interface_descriptor *iface_desc;
|
||||
struct usb_config_descriptor *config_desc;
|
||||
int i = itype - interface_types;
|
||||
int inum;
|
||||
int num_altsetting;
|
||||
|
||||
DBG("Checking[%d]: interfaces=%d interface num=%d endpoints=%d: \"%s\"\n",
|
||||
i,
|
||||
itype->num_interfaces,
|
||||
itype->my_interface_num,
|
||||
itype->num_endpoints,
|
||||
itype->name);
|
||||
config_desc = astribank->dev->config;
|
||||
if (!config_desc) {
|
||||
ERR("No configuration descriptor: strange USB1 controller?\n");
|
||||
return 0;
|
||||
}
|
||||
if(config_desc->bNumInterfaces <= itype->my_interface_num) {
|
||||
DBG("Too little interfaces: have %d need %d\n",
|
||||
config_desc->bNumInterfaces, itype->my_interface_num + 1);
|
||||
return 0;
|
||||
}
|
||||
if(astribank->my_interface_num != itype->my_interface_num) {
|
||||
DBG("Wrong match -- not my interface num (wanted %d)\n", astribank->my_interface_num);
|
||||
return 0;
|
||||
}
|
||||
inum = itype->my_interface_num;
|
||||
interface = &config_desc->interface[inum];
|
||||
assert(interface != NULL);
|
||||
iface_desc = interface->altsetting;
|
||||
num_altsetting = interface->num_altsetting;
|
||||
assert(num_altsetting != 0);
|
||||
assert(iface_desc != NULL);
|
||||
if(iface_desc->bInterfaceClass != 0xFF) {
|
||||
DBG("Bad interface class 0x%X\n", iface_desc->bInterfaceClass);
|
||||
return 0;
|
||||
}
|
||||
if(iface_desc->bInterfaceNumber != itype->my_interface_num) {
|
||||
DBG("Bad interface number %d\n", iface_desc->bInterfaceNumber);
|
||||
return 0;
|
||||
}
|
||||
if(iface_desc->bNumEndpoints != itype->num_endpoints) {
|
||||
DBG("Different number of endpoints %d\n", iface_desc->bNumEndpoints);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int astribank_init(struct astribank_device *astribank)
|
||||
{
|
||||
struct usb_device_descriptor *dev_desc;
|
||||
struct usb_config_descriptor *config_desc;
|
||||
struct usb_interface *interface;
|
||||
struct usb_interface_descriptor *iface_desc;
|
||||
struct usb_endpoint_descriptor *endpoint;
|
||||
const struct interface_type *fwtype;
|
||||
int i;
|
||||
|
||||
assert(astribank);
|
||||
astribank->handle = usb_open(astribank->dev);
|
||||
if(!astribank->handle) {
|
||||
ERR("Failed to open usb device '%s/%s': %s\n",
|
||||
astribank->dev->bus->dirname, astribank->dev->filename, usb_strerror());
|
||||
return 0;
|
||||
}
|
||||
fwtype = astribank->fwtype;
|
||||
if(usb_claim_interface(astribank->handle, fwtype->my_interface_num) != 0) {
|
||||
ERR("usb_claim_interface: %s\n", usb_strerror());
|
||||
return 0;
|
||||
}
|
||||
dev_desc = &astribank->dev->descriptor;
|
||||
config_desc = astribank->dev->config;
|
||||
if (!config_desc) {
|
||||
ERR("usb interface without a configuration\n");
|
||||
return 0;
|
||||
}
|
||||
DBG("Got config_desc. Looking for interface %d\n", fwtype->my_interface_num);
|
||||
interface = &config_desc->interface[fwtype->my_interface_num];
|
||||
iface_desc = interface->altsetting;
|
||||
endpoint = iface_desc->endpoint;
|
||||
astribank->is_usb2 = (endpoint->wMaxPacketSize == 512);
|
||||
for(i = 0; i < iface_desc->bNumEndpoints; i++, endpoint++) {
|
||||
DBG("Validating endpoint @ %d (interface %d)\n", i, fwtype->my_interface_num);
|
||||
if(endpoint->bEndpointAddress != fwtype->endpoints[i]) {
|
||||
ERR("Wrong endpoint 0x%X != 0x%X (at index %d)\n",
|
||||
endpoint->bEndpointAddress,
|
||||
fwtype->endpoints[i],
|
||||
i);
|
||||
return 0;
|
||||
}
|
||||
if(endpoint->bEndpointAddress == MP_EP_OUT || endpoint->bEndpointAddress == MP_EP_IN) {
|
||||
if(endpoint->wMaxPacketSize > PACKET_SIZE) {
|
||||
ERR("Endpoint #%d wMaxPacketSize too large (%d)\n", i, endpoint->wMaxPacketSize);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
astribank->my_ep_in = fwtype->my_ep_in;
|
||||
astribank->my_ep_out = fwtype->my_ep_out;
|
||||
if(get_usb_string(astribank, dev_desc->iManufacturer, astribank->iManufacturer, BUFSIZ) < 0)
|
||||
return 0;
|
||||
if(get_usb_string(astribank, dev_desc->iProduct, astribank->iProduct, BUFSIZ) < 0)
|
||||
return 0;
|
||||
if(get_usb_string(astribank, dev_desc->iSerialNumber, astribank->iSerialNumber, BUFSIZ) < 0)
|
||||
return 0;
|
||||
if(get_usb_string(astribank, iface_desc->iInterface, astribank->iInterface, BUFSIZ) < 0)
|
||||
return 0;
|
||||
DBG("ID=%04X:%04X Manufacturer=[%s] Product=[%s] SerialNumber=[%s] Interface=[%s]\n",
|
||||
dev_desc->idVendor,
|
||||
dev_desc->idProduct,
|
||||
astribank->iManufacturer,
|
||||
astribank->iProduct,
|
||||
astribank->iSerialNumber,
|
||||
astribank->iInterface);
|
||||
if(usb_clear_halt(astribank->handle, astribank->my_ep_out) != 0) {
|
||||
ERR("Clearing output endpoint: %s\n", usb_strerror());
|
||||
return 0;
|
||||
}
|
||||
if(usb_clear_halt(astribank->handle, astribank->my_ep_in) != 0) {
|
||||
ERR("Clearing input endpoint: %s\n", usb_strerror());
|
||||
return 0;
|
||||
}
|
||||
if((i = flush_read(astribank)) < 0) {
|
||||
ERR("flush_read failed: %d\n", i);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct astribank_device *astribank_open(const char devpath[], int iface_num)
|
||||
{
|
||||
struct astribank_device *astribank;
|
||||
int i;
|
||||
struct astribank_device *astribank = NULL;
|
||||
struct xusb *xusb;
|
||||
|
||||
DBG("devpath='%s' iface_num=%d\n", devpath, iface_num);
|
||||
if((astribank = malloc(sizeof(*astribank))) == NULL) {
|
||||
ERR("Out of memory");
|
||||
return NULL;
|
||||
if((astribank = malloc(sizeof(struct astribank_device))) == NULL) {
|
||||
ERR("Out of memory\n");
|
||||
goto fail;
|
||||
}
|
||||
memset(astribank, 0, sizeof(*astribank));
|
||||
if (iface_num) {
|
||||
xusb = xusb_find_bypath(astribank_specs, ARRAY_SIZE(astribank_specs), devpath);
|
||||
} else {
|
||||
xusb = xusb_find_bypath(astribank_pic_specs, ARRAY_SIZE(astribank_pic_specs), devpath);
|
||||
}
|
||||
if (!xusb) {
|
||||
ERR("%s: No device found\n", __func__);
|
||||
goto fail;
|
||||
}
|
||||
astribank->xusb = xusb;
|
||||
astribank->is_usb2 = (xusb_packet_size(xusb) == 512);
|
||||
astribank->my_interface_num = iface_num;
|
||||
usb_init();
|
||||
usb_find_busses();
|
||||
usb_find_devices();
|
||||
astribank->dev = dev_of_path(devpath);
|
||||
if(!astribank->dev) {
|
||||
ERR("Bailing out\n");
|
||||
if (xusb_claim_interface(astribank->xusb) < 0) {
|
||||
ERR("xusb_claim_interface failed\n");
|
||||
goto fail;
|
||||
}
|
||||
DBG("Scan interface types (astribank has %d interfaces)\n", astribank->dev->config->bNumInterfaces);
|
||||
for(i = 0; i < sizeof(interface_types)/sizeof(interface_types[0]); i++) {
|
||||
if(match_interface(astribank, &interface_types[i])) {
|
||||
DBG("Identified[%d]: interfaces=%d endpoints=%d: \"%s\"\n",
|
||||
i,
|
||||
interface_types[i].num_interfaces,
|
||||
interface_types[i].num_endpoints,
|
||||
interface_types[i].name);
|
||||
astribank->fwtype = &interface_types[i];
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
ERR("Didn't find suitable device\n");
|
||||
fail:
|
||||
free(astribank);
|
||||
return NULL;
|
||||
found:
|
||||
if(!astribank_init(astribank))
|
||||
goto fail;
|
||||
astribank->tx_sequenceno = 1;
|
||||
return astribank;
|
||||
fail:
|
||||
if (astribank) {
|
||||
free(astribank);
|
||||
astribank = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -334,100 +120,36 @@ found:
|
||||
*/
|
||||
void show_astribank_info(const struct astribank_device *astribank)
|
||||
{
|
||||
struct usb_device_descriptor *dev_desc;
|
||||
struct usb_device *dev;
|
||||
struct xusb *xusb;
|
||||
|
||||
assert(astribank != NULL);
|
||||
dev = astribank->dev;
|
||||
dev_desc = &dev->descriptor;
|
||||
xusb = astribank->xusb;
|
||||
assert(xusb != NULL);
|
||||
if(verbose <= LOG_INFO) {
|
||||
INFO("usb:%s/%s: ID=%04X:%04X [%s / %s / %s]\n",
|
||||
dev->bus->dirname,
|
||||
dev->filename,
|
||||
dev_desc->idVendor,
|
||||
dev_desc->idProduct,
|
||||
astribank->iManufacturer,
|
||||
astribank->iProduct,
|
||||
astribank->iSerialNumber);
|
||||
xusb_showinfo(xusb);
|
||||
} else {
|
||||
printf("USB Bus/Device: [%s/%s]\n", dev->bus->dirname, dev->filename);
|
||||
printf("USB Firmware Type: [%s]\n", astribank->fwtype->name);
|
||||
printf("USB iManufacturer: [%s]\n", astribank->iManufacturer);
|
||||
printf("USB iProduct: [%s]\n", astribank->iProduct);
|
||||
printf("USB iSerialNumber: [%s]\n", astribank->iSerialNumber);
|
||||
const struct xusb_spec *spec;
|
||||
|
||||
spec = xusb_spec(xusb);
|
||||
printf("USB Bus/Device: [%s]\n", xusb_devpath(xusb));
|
||||
printf("USB Firmware Type: [%s]\n", spec->name);
|
||||
printf("USB iSerialNumber: [%s]\n", xusb_serial(xusb));
|
||||
printf("USB iManufacturer: [%s]\n", xusb_manufacturer(xusb));
|
||||
printf("USB iProduct: [%s]\n", xusb_product(xusb));
|
||||
}
|
||||
}
|
||||
|
||||
void astribank_close(struct astribank_device *astribank, int disconnected)
|
||||
{
|
||||
assert(astribank != NULL);
|
||||
if(!astribank->handle)
|
||||
return; /* Nothing to do */
|
||||
if(!disconnected) {
|
||||
if(usb_release_interface(astribank->handle, astribank->fwtype->my_interface_num) != 0) {
|
||||
ERR("Releasing interface: usb: %s\n", usb_strerror());
|
||||
}
|
||||
}
|
||||
if(usb_close(astribank->handle) != 0) {
|
||||
ERR("Closing device: usb: %s\n", usb_strerror());
|
||||
if (astribank->xusb) {
|
||||
xusb_close(astribank->xusb);
|
||||
astribank->xusb = NULL;
|
||||
}
|
||||
astribank->tx_sequenceno = 0;
|
||||
astribank->handle = NULL;
|
||||
}
|
||||
|
||||
int send_usb(struct astribank_device *astribank, char *buf, int len, int timeout)
|
||||
{
|
||||
int ret;
|
||||
|
||||
dump_packet(LOG_DEBUG, __FUNCTION__, buf, len);
|
||||
if(astribank->my_ep_out & USB_ENDPOINT_IN) {
|
||||
ERR("send_usb called with an input endpoint 0x%x\n", astribank->my_ep_out);
|
||||
return -EINVAL;
|
||||
}
|
||||
ret = usb_bulk_write(astribank->handle, astribank->my_ep_out, buf, len, timeout);
|
||||
if(ret < 0) {
|
||||
/*
|
||||
* If the device was gone, it may be the
|
||||
* result of renumeration. Ignore it.
|
||||
*/
|
||||
if(ret != -ENODEV) {
|
||||
ERR("bulk_write to endpoint 0x%x failed: (%d) %s\n",
|
||||
astribank->my_ep_out, ret, usb_strerror());
|
||||
dump_packet(LOG_ERR, "send_usb[ERR]", buf, len);
|
||||
exit(2);
|
||||
} else {
|
||||
DBG("bulk_write to endpoint 0x%x got ENODEV\n", astribank->my_ep_out);
|
||||
astribank_close(astribank, 1);
|
||||
}
|
||||
return ret;
|
||||
} else if(ret != len) {
|
||||
ERR("bulk_write to endpoint 0x%x short write: (%d) %s\n",
|
||||
astribank->my_ep_out, ret, usb_strerror());
|
||||
dump_packet(LOG_ERR, "send_usb[ERR]", buf, len);
|
||||
return -EFAULT;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int recv_usb(struct astribank_device *astribank, char *buf, size_t len, int timeout)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if(astribank->my_ep_in & USB_ENDPOINT_OUT) {
|
||||
ERR("recv_usb called with an output endpoint 0x%x\n", astribank->my_ep_in);
|
||||
return -EINVAL;
|
||||
}
|
||||
ret = usb_bulk_read(astribank->handle, astribank->my_ep_in, buf, len, timeout);
|
||||
if(ret < 0) {
|
||||
DBG("bulk_read from endpoint 0x%x failed: (%d) %s\n",
|
||||
astribank->my_ep_in, ret, usb_strerror());
|
||||
memset(buf, 0, len);
|
||||
return ret;
|
||||
}
|
||||
dump_packet(LOG_DEBUG, __FUNCTION__, buf, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if 0
|
||||
int flush_read(struct astribank_device *astribank)
|
||||
{
|
||||
char tmpbuf[BUFSIZ];
|
||||
@@ -441,10 +163,11 @@ int flush_read(struct astribank_device *astribank)
|
||||
return ret;
|
||||
} else if(ret > 0) {
|
||||
DBG("Got %d bytes:\n", ret);
|
||||
dump_packet(LOG_DEBUG, __FUNCTION__, tmpbuf, ret);
|
||||
dump_packet(LOG_DEBUG, DBG_MASK, __FUNCTION__, tmpbuf, ret);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int release_isvalid(uint16_t release)
|
||||
@@ -541,12 +264,10 @@ int eeprom_fill(struct eeprom_table *eprm,
|
||||
|
||||
int astribank_has_twinstar(struct astribank_device *astribank)
|
||||
{
|
||||
struct usb_device_descriptor *dev_desc;
|
||||
uint16_t product_series;
|
||||
|
||||
assert(astribank != NULL);
|
||||
dev_desc = &astribank->dev->descriptor;
|
||||
product_series = dev_desc->idProduct;
|
||||
product_series = xusb_product_id(astribank->xusb);
|
||||
product_series &= 0xFFF0;
|
||||
if(product_series == 0x1160) /* New boards */
|
||||
return 1;
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <usb.h>
|
||||
#include <xusb.h>
|
||||
#include <xtalk.h>
|
||||
#include "mpp.h"
|
||||
|
||||
/*
|
||||
@@ -63,14 +64,12 @@ enum eeprom_burn_state {
|
||||
};
|
||||
|
||||
struct astribank_device {
|
||||
struct usb_device *dev;
|
||||
struct xusb *xusb;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
usb_dev_handle *handle;
|
||||
int my_interface_num;
|
||||
int my_ep_out;
|
||||
int my_ep_in;
|
||||
char iManufacturer[BUFSIZ];
|
||||
char iProduct[BUFSIZ];
|
||||
char iSerialNumber[BUFSIZ];
|
||||
char iInterface[BUFSIZ];
|
||||
int is_usb2;
|
||||
enum eeprom_type eeprom_type;
|
||||
@@ -79,7 +78,6 @@ struct astribank_device {
|
||||
uint8_t mpp_proto_version;
|
||||
struct eeprom_table *eeprom;
|
||||
struct firmware_versions fw_versions;
|
||||
const struct interface_type *fwtype;
|
||||
uint16_t tx_sequenceno;
|
||||
};
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ sub spans_prep($@) {
|
||||
my $gconfig = shift || die;
|
||||
my @spans = @_;
|
||||
foreach my $span (@spans) {
|
||||
if($span->is_pri) {
|
||||
if($span->is_pri || $span->is_bri) {
|
||||
$span->pri_set_fromconfig($gconfig);
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ __END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
dahdi_genconf - Generate configuration for dahdi channels.
|
||||
dahdi_genconf - Generate configuration for Dahdi channels.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -126,7 +126,7 @@ It uses two information sources:
|
||||
|
||||
=item Hardware
|
||||
|
||||
The actual dahdi hardware is automatically detected on the host.
|
||||
The actual Dahdi hardware is automatically detected on the host.
|
||||
|
||||
=item /etc/dahdi/genconf_parameters
|
||||
|
||||
@@ -137,7 +137,7 @@ variable.
|
||||
=back
|
||||
|
||||
The dahdi_genconf script can generate various kinds of configuration files
|
||||
as specificed by the generator arguments. Each generator is a perl classes
|
||||
as specified by the generator arguments. Each generator is a perl class
|
||||
in Dahdi::Config::Gen namespace. The generator names on the command line
|
||||
are the class names in lowercase.
|
||||
|
||||
@@ -177,14 +177,14 @@ Currently, chandahdi is affected.
|
||||
=item *
|
||||
|
||||
F<genconf_parameters> parsing is done via C<Dahdi::Config::Params>.
|
||||
An object representing the parsed data is instanciated by:
|
||||
An object representing the parsed data is instantiated by:
|
||||
C<Dahdi::Config::Params-E<gt>new()>.
|
||||
The C<item()> method of this object contains all the hard coded
|
||||
defaults of the configuration directives.
|
||||
|
||||
=item *
|
||||
|
||||
A configuration object is instanciated by C<Dahdi::Config::Gen-E<gt>new($params)>.
|
||||
A configuration object is instantiated by C<Dahdi::Config::Gen-E<gt>new($params)>.
|
||||
The mapping of configuration directives into semantic configuration is
|
||||
done in the constructor.
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ sub show_disconnected(%) {
|
||||
|
||||
# FIXME: For verbose display we also need to see the XPP devices.
|
||||
# If no spans are registered, this won't happen. A brute-force
|
||||
# methood for making it happe:
|
||||
# method for making it happen:
|
||||
Dahdi::Xpp::xbuses if ($opts{'v'});
|
||||
|
||||
my @devices = Dahdi::Hardware->device_list;
|
||||
@@ -139,7 +139,7 @@ dahdi_hardware [-v][-x]
|
||||
|
||||
=item -v
|
||||
|
||||
Verbose ouput - show spans used by each device etc. Currently only
|
||||
Verbose output - show spans used by each device etc. Currently only
|
||||
implemented for the Xorcom Astribank.
|
||||
|
||||
=item -x
|
||||
@@ -150,7 +150,7 @@ Show disconnected Astribank unit, if any.
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Show all dahdi hardware devices. Devices are recognized according to
|
||||
Show all Dahdi hardware devices. Devices are recognized according to
|
||||
lists of PCI and USB IDs in Dahdi::Hardware::PCI.pm and
|
||||
Dahdi::Hardware::USB.pm . For PCI it is possible to detect by
|
||||
sub-vendor and sub-product ID as well.
|
||||
|
||||
@@ -15,6 +15,7 @@ use Dahdi;
|
||||
use Dahdi::Span;
|
||||
use Dahdi::Xpp;
|
||||
use Dahdi::Xpp::Xbus;
|
||||
use Dahdi::Xpp::Xpd;
|
||||
use Getopt::Std;
|
||||
|
||||
sub usage {
|
||||
@@ -64,7 +65,7 @@ foreach my $xbus (Dahdi::Xpp::xbuses($sorter)) {
|
||||
myprintf "%-10s\t%3s-%s\t%s\n",
|
||||
$xbus->name, $xbus->xpporder, $xbus->label, $xbus->connector;
|
||||
next unless $xbus->status eq 'CONNECTED';
|
||||
foreach my $xpd ($xbus->xpds()) {
|
||||
foreach my $xpd (Dahdi::Xpp::Xpd::telephony_devs($xbus->xpds())) {
|
||||
my $prev = $xpd->dahdi_registration($on);
|
||||
if(!defined($prev)) { # Failure
|
||||
printf "%s: Failed %s\n", $xpd->fqn, $!;
|
||||
|
||||
784
xpp/echo_loader.c
Normal file
784
xpp/echo_loader.c
Normal file
@@ -0,0 +1,784 @@
|
||||
/*
|
||||
* Written by Oron Peled <oron@actcom.co.il>
|
||||
* Copyright (C) 2008, Xorcom
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <regex.h>
|
||||
#include <sys/time.h>
|
||||
#include "echo_loader.h"
|
||||
#include "debug.h"
|
||||
#include <oct6100api/oct6100_api.h>
|
||||
|
||||
#define DBG_MASK 0x03
|
||||
#define TIMEOUT 1000
|
||||
#define ECHO_MAX_CHANS 128
|
||||
#define ECHO_RIN_STREAM 0
|
||||
#define ECHO_ROUT_STREAM 1
|
||||
#define ECHO_SIN_STREAM 2
|
||||
#define ECHO_SOUT_STREAM 3
|
||||
|
||||
#define ECHO_RIN_STREAM2 4
|
||||
#define ECHO_SIN_STREAM2 6
|
||||
#define ECHO_ROUT_STREAM2 5
|
||||
#define ECHO_SOUT_STREAM2 7
|
||||
|
||||
#define EC_VER_TEST 0xABCD
|
||||
#define EC_VER_INVALID 0xFFFF
|
||||
static float oct_fw_load_timeout = 2.0;
|
||||
|
||||
struct echo_mod {
|
||||
tPOCT6100_INSTANCE_API pApiInstance;
|
||||
UINT32 ulEchoChanHndl[256];
|
||||
struct astribank_device *astribank;
|
||||
int maxchans;
|
||||
};
|
||||
|
||||
enum xpp_packet_types {
|
||||
SPI_SND_XOP = 0x0F,
|
||||
SPI_RCV_XOP = 0x10,
|
||||
TST_SND_XOP = 0x35,
|
||||
TST_RCV_XOP = 0x36,
|
||||
};
|
||||
|
||||
struct xpp_packet_header {
|
||||
struct {
|
||||
uint16_t len;
|
||||
uint8_t op;
|
||||
uint8_t unit;
|
||||
} PACKED header;
|
||||
union {
|
||||
struct {
|
||||
uint8_t header;
|
||||
uint8_t flags;
|
||||
uint8_t addr_l;
|
||||
uint8_t addr_h;
|
||||
uint8_t data_l;
|
||||
uint8_t data_h;
|
||||
} PACKED spi_pack;
|
||||
struct {
|
||||
uint8_t tid;
|
||||
uint8_t tsid;
|
||||
} PACKED tst_pack;
|
||||
} alt;
|
||||
} PACKED;
|
||||
|
||||
static struct usb_buffer {
|
||||
char data[PACKET_SIZE];
|
||||
int max_len;
|
||||
int curr;
|
||||
/* statistics */
|
||||
int min_send;
|
||||
int max_send;
|
||||
int num_sends;
|
||||
long total_bytes;
|
||||
struct timeval start;
|
||||
struct timeval end;
|
||||
} usb_buffer;
|
||||
|
||||
|
||||
static void usb_buffer_init(struct astribank_device *astribank, struct usb_buffer *ub)
|
||||
{
|
||||
ub->max_len = xusb_packet_size(astribank->xusb);
|
||||
ub->curr = 0;
|
||||
ub->min_send = INT_MAX;
|
||||
ub->max_send = 0;
|
||||
ub->num_sends = 0;
|
||||
ub->total_bytes = 0;
|
||||
gettimeofday(&ub->start, NULL);
|
||||
}
|
||||
|
||||
static long usb_buffer_usec(struct usb_buffer *ub)
|
||||
{
|
||||
struct timeval now;
|
||||
|
||||
gettimeofday(&now, NULL);
|
||||
return (now.tv_sec - ub->start.tv_sec) * 1000000 +
|
||||
(now.tv_usec - ub->start.tv_usec);
|
||||
}
|
||||
|
||||
static void usb_buffer_showstatistics(struct astribank_device *astribank, struct usb_buffer *ub)
|
||||
{
|
||||
long usec;
|
||||
|
||||
usec = usb_buffer_usec(ub);
|
||||
INFO("%s [%s]: Octasic statistics: packet_size=[%d, %ld, %d] packets=%d, bytes=%ld msec=%ld usec/packet=%d\n",
|
||||
xusb_devpath(astribank->xusb),
|
||||
xusb_serial(astribank->xusb),
|
||||
ub->min_send,
|
||||
ub->total_bytes / ub->num_sends,
|
||||
ub->max_send,
|
||||
ub->num_sends, ub->total_bytes,
|
||||
usec / 1000, usec / ub->num_sends);
|
||||
}
|
||||
|
||||
static int usb_buffer_flush(struct astribank_device *astribank, struct usb_buffer *ub)
|
||||
{
|
||||
int ret;
|
||||
long t;
|
||||
long sec;
|
||||
static int last_sec;
|
||||
|
||||
if (ub->curr == 0)
|
||||
return 0;
|
||||
ret = xusb_send(astribank->xusb, ub->data, ub->curr, TIMEOUT);
|
||||
if(ret < 0) {
|
||||
ERR("xusb_send failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
DBG("%s: Written %d bytes\n", __func__, ret);
|
||||
if (ret > ub->max_send)
|
||||
ub->max_send = ret;
|
||||
if (ret < ub->min_send)
|
||||
ub->min_send = ret;
|
||||
ub->total_bytes += ret;
|
||||
ub->num_sends++;
|
||||
ub->curr = 0;
|
||||
|
||||
sec = usb_buffer_usec(ub) / (1000 * 1000);
|
||||
if (sec > last_sec) {
|
||||
DBG("bytes/sec=%ld average len=%ld\n",
|
||||
ub->total_bytes / sec,
|
||||
ub->total_bytes / ub->num_sends);
|
||||
last_sec = sec;
|
||||
}
|
||||
|
||||
/*
|
||||
* Best result with high frequency firmware: 21 seconds
|
||||
* Octasic statistics: packet_size=[10, 239, 510] packets=26806, bytes=6419640 usec=21127883 usec/packet=788
|
||||
* t = 0.3 * ret - 150;
|
||||
*/
|
||||
t = oct_fw_load_timeout * ret - 150;
|
||||
if (t > 0)
|
||||
usleep(t);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int usb_buffer_append(struct astribank_device *astribank, struct usb_buffer *ub,
|
||||
char *buf, int len)
|
||||
{
|
||||
if (ub->curr + len >= ub->max_len) {
|
||||
ERR("%s: buffer too small ub->curr=%d, len=%d, ub->max_len=%d\n",
|
||||
__func__, ub->curr, len, ub->max_len);
|
||||
return -ENOMEM;
|
||||
}
|
||||
memcpy(ub->data + ub->curr, buf, len);
|
||||
ub->curr += len;
|
||||
return len;
|
||||
}
|
||||
|
||||
static int usb_buffer_send(struct astribank_device *astribank, struct usb_buffer *ub,
|
||||
char *buf, int len, int timeout, int recv_answer)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (ub->curr + len >= ub->max_len) {
|
||||
ret = usb_buffer_flush(astribank, ub);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = usb_buffer_append(astribank, ub, buf, len)) < 0) {
|
||||
return ret;
|
||||
}
|
||||
DBG("%s: %d bytes %s\n", __func__, len, (recv_answer) ? "recv" : "send");
|
||||
if (recv_answer) {
|
||||
struct xpp_packet_header *phead;
|
||||
|
||||
ret = usb_buffer_flush(astribank, ub);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
ret = xusb_recv(astribank->xusb, buf, PACKET_SIZE, TIMEOUT);
|
||||
if(ret <= 0) {
|
||||
ERR("No USB packs to read: %s\n", strerror(-ret));
|
||||
return -EINVAL;
|
||||
}
|
||||
DBG("%s: %d bytes recv\n", __func__, ret);
|
||||
phead = (struct xpp_packet_header *)buf;
|
||||
if(phead->header.op != SPI_RCV_XOP && phead->header.op != TST_RCV_XOP) {
|
||||
ERR("Got unexpected reply OP=0x%02X\n", phead->header.op);
|
||||
dump_packet(LOG_ERR, DBG_MASK, "hexline[ERR]", buf, ret);
|
||||
return -EINVAL;
|
||||
}
|
||||
dump_packet(LOG_DEBUG, DBG_MASK, "dump:echoline[R]", (char *)phead, phead->header.len);
|
||||
switch(phead->header.op) {
|
||||
case SPI_RCV_XOP:
|
||||
ret = (phead->alt.spi_pack.data_h << 8) | phead->alt.spi_pack.data_l;
|
||||
break;
|
||||
case TST_RCV_XOP:
|
||||
ret = (phead->alt.tst_pack.tid << 8) | phead->alt.tst_pack.tsid;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int spi_send(struct astribank_device *astribank, uint16_t addr, uint16_t data, int recv_answer, int ver)
|
||||
{
|
||||
int ret;
|
||||
char buf[PACKET_SIZE];
|
||||
struct xpp_packet_header *phead = (struct xpp_packet_header *)buf;
|
||||
int pack_len;
|
||||
|
||||
assert(astribank != NULL);
|
||||
pack_len = sizeof(phead->header) + sizeof(phead->alt.spi_pack);
|
||||
phead->header.len = pack_len;
|
||||
phead->header.op = SPI_SND_XOP;
|
||||
phead->header.unit = 0x40; /* EC has always this unit num */
|
||||
phead->alt.spi_pack.header = 0x05;
|
||||
phead->alt.spi_pack.flags = 0x30 | (recv_answer ? 0x40: 0x00) | (ver ? 0x01: 0x00);
|
||||
phead->alt.spi_pack.addr_l = (addr >> 0) & 0xFF;
|
||||
phead->alt.spi_pack.addr_h = (addr >> 8) & 0xFF;
|
||||
phead->alt.spi_pack.data_l = (data >> 0) & 0xFF;
|
||||
phead->alt.spi_pack.data_h = (data >> 8) & 0xFF;
|
||||
|
||||
dump_packet(LOG_DEBUG, DBG_MASK, "dump:echoline[W]", (char *)phead, pack_len);
|
||||
|
||||
|
||||
ret = usb_buffer_send(astribank, &usb_buffer, buf, pack_len, TIMEOUT, recv_answer);
|
||||
if(ret < 0) {
|
||||
ERR("usb_buffer_send failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
DBG("%s: Written %d bytes\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int test_send(struct astribank_device *astribank)
|
||||
{
|
||||
int ret;
|
||||
char buf[PACKET_SIZE];
|
||||
struct xpp_packet_header *phead = (struct xpp_packet_header *)buf;
|
||||
int pack_len;
|
||||
|
||||
assert(astribank != NULL);
|
||||
pack_len = sizeof(phead->header) + sizeof(phead->alt.tst_pack);
|
||||
phead->header.len = 6;
|
||||
phead->header.op = 0x35;
|
||||
phead->header.unit = 0x00;
|
||||
phead->alt.tst_pack.tid = 0x28; // EC TestId
|
||||
phead->alt.tst_pack.tsid = 0x00; // EC SubId
|
||||
|
||||
dump_packet(LOG_DEBUG, DBG_MASK, "dump:echoline[W]", (char *)phead, pack_len);
|
||||
|
||||
|
||||
ret = usb_buffer_send(astribank, &usb_buffer, buf, pack_len, TIMEOUT, 1);
|
||||
if(ret < 0) {
|
||||
ERR("usb_buffer_send failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
DBG("%s: Written %d bytes\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void echo_send_data(struct astribank_device *astribank, const unsigned int addr, const unsigned int data)
|
||||
{
|
||||
/* DBG("SEND: %04X -> [%04X]\n", data, addr);
|
||||
DBG("\t\t[%04X] <- %04X\n", 0x0008, (addr >> 20));
|
||||
DBG("\t\t[%04X] <- %04X\n", 0x000A, (addr >> 4) & ((1 << 16) - 1));
|
||||
DBG("\t\t[%04X] <- %04X\n", 0x0004, data);
|
||||
DBG("\t\t[%04X] <- %04X\n", 0x0000, (((addr >> 1) & 0x7) << 9) | (1 << 8) | (3 << 12) | 1);
|
||||
*/
|
||||
|
||||
DBG("SND:\n");
|
||||
spi_send(astribank, 0x0008, (addr >> 20) , 0, 0);
|
||||
spi_send(astribank, 0x000A, (addr >> 4) & ((1 << 16) - 1) , 0, 0);
|
||||
spi_send(astribank, 0x0004, data , 0, 0);
|
||||
spi_send(astribank, 0x0000, (((addr >> 1) & 0x7) << 9) |
|
||||
(1 << 8) | (3 << 12) | 1 , 0, 0);
|
||||
}
|
||||
|
||||
unsigned int echo_recv_data(struct astribank_device *astribank, const unsigned int addr)
|
||||
{
|
||||
unsigned int data = 0x00;
|
||||
unsigned int ret;
|
||||
|
||||
DBG("RCV:\n");
|
||||
spi_send(astribank, 0x0008, (addr >> 20) , 0, 0);
|
||||
spi_send(astribank, 0x000A, (addr >> 4) & ((1 << 16) - 1) , 0, 0);
|
||||
spi_send(astribank, 0x0000, (((addr >> 1) & 0x7) << 9) |
|
||||
(1 << 8) | 1 , 0, 0);
|
||||
ret = spi_send(astribank, 0x0004, data , 1, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int load_file(char *filename, unsigned char **ppBuf, UINT32 *pLen)
|
||||
{
|
||||
unsigned char * pbyFileData = NULL;
|
||||
FILE* pFile;
|
||||
|
||||
DBG("Loading %s file...\n", filename);
|
||||
pFile = fopen( filename, "rb" );
|
||||
if (pFile == NULL) {
|
||||
ERR("fopen\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
fseek( pFile, 0L, SEEK_END );
|
||||
*pLen = ftell( pFile );
|
||||
fseek( pFile, 0L, SEEK_SET );
|
||||
|
||||
pbyFileData = (unsigned char *)malloc(*pLen);
|
||||
if (pbyFileData == NULL) {
|
||||
fclose( pFile );
|
||||
ERR("malloc\n" );
|
||||
return -ENODEV;
|
||||
} else {
|
||||
DBG("allocated mem for pbyFileData\n");
|
||||
}
|
||||
fread(pbyFileData, 1, *pLen, pFile);
|
||||
fclose(pFile);
|
||||
DBG("Successful loading %s file into memory (size = %d, DUMP: first = %02X %02X, last = %02X %02X)\n",
|
||||
filename, *pLen,
|
||||
pbyFileData[0], pbyFileData[1],
|
||||
pbyFileData[(*pLen)-2], pbyFileData[(*pLen)-1]);
|
||||
*ppBuf = pbyFileData;
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT32 Oct6100UserGetTime(tPOCT6100_GET_TIME f_pTime)
|
||||
{
|
||||
///* Why couldn't they just take a timeval like everyone else? */
|
||||
struct timeval tv;
|
||||
unsigned long long total_usecs;
|
||||
unsigned int mask = ~0;
|
||||
|
||||
gettimeofday(&tv, 0);
|
||||
total_usecs = (((unsigned long long)(tv.tv_sec)) * 1000000) +
|
||||
(((unsigned long long)(tv.tv_usec)));
|
||||
f_pTime->aulWallTimeUs[0] = (total_usecs & mask);
|
||||
f_pTime->aulWallTimeUs[1] = (total_usecs >> 32);
|
||||
//printf("Inside of Oct6100UserGetTime\n");
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
UINT32 Oct6100UserMemSet(PVOID f_pAddress, UINT32 f_ulPattern, UINT32 f_ulLength)
|
||||
{
|
||||
memset(f_pAddress, f_ulPattern, f_ulLength);
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
UINT32 Oct6100UserMemCopy(PVOID f_pDestination, const void *f_pSource, UINT32 f_ulLength)
|
||||
{
|
||||
memcpy(f_pDestination, f_pSource, f_ulLength);
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
UINT32 Oct6100UserCreateSerializeObject(tPOCT6100_CREATE_SERIALIZE_OBJECT f_pCreate)
|
||||
{
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
UINT32 Oct6100UserDestroySerializeObject(tPOCT6100_DESTROY_SERIALIZE_OBJECT f_pDestroy)
|
||||
{
|
||||
#ifdef OCTASIC_DEBUG
|
||||
ERR("I should never be called! (destroy serialize object)\n");
|
||||
#endif
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
UINT32 Oct6100UserSeizeSerializeObject(tPOCT6100_SEIZE_SERIALIZE_OBJECT f_pSeize)
|
||||
{
|
||||
/* Not needed */
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
UINT32 Oct6100UserReleaseSerializeObject(tPOCT6100_RELEASE_SERIALIZE_OBJECT f_pRelease)
|
||||
{
|
||||
/* Not needed */
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
UINT32 Oct6100UserDriverWriteApi(tPOCT6100_WRITE_PARAMS f_pWriteParams)
|
||||
{
|
||||
const unsigned int addr = f_pWriteParams->ulWriteAddress;
|
||||
const unsigned int data = f_pWriteParams->usWriteData;
|
||||
const struct echo_mod *echo_mod = (struct echo_mod *)(f_pWriteParams->pProcessContext);
|
||||
struct astribank_device *astribank = echo_mod->astribank;
|
||||
|
||||
echo_send_data(astribank, addr, data);
|
||||
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
UINT32 Oct6100UserDriverWriteSmearApi(tPOCT6100_WRITE_SMEAR_PARAMS f_pSmearParams)
|
||||
{
|
||||
unsigned int addr;
|
||||
unsigned int data;
|
||||
unsigned int len = f_pSmearParams->ulWriteLength;
|
||||
const struct echo_mod *echo_mod = (struct echo_mod *)f_pSmearParams->pProcessContext;
|
||||
struct astribank_device *astribank = echo_mod->astribank;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
addr = f_pSmearParams->ulWriteAddress + (i << 1);
|
||||
data = f_pSmearParams->usWriteData;
|
||||
echo_send_data(astribank, addr, data);
|
||||
}
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
UINT32 Oct6100UserDriverWriteBurstApi(tPOCT6100_WRITE_BURST_PARAMS f_pBurstParams)
|
||||
{
|
||||
unsigned int addr;
|
||||
unsigned int data;
|
||||
unsigned int len = f_pBurstParams->ulWriteLength;
|
||||
const struct echo_mod *echo_mod = (struct echo_mod *)f_pBurstParams->pProcessContext;
|
||||
struct astribank_device *astribank = echo_mod->astribank;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
addr = f_pBurstParams->ulWriteAddress + (i << 1);
|
||||
data = f_pBurstParams->pusWriteData[i];
|
||||
echo_send_data(astribank, addr, data);
|
||||
}
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
UINT32 Oct6100UserDriverReadApi(tPOCT6100_READ_PARAMS f_pReadParams)
|
||||
{
|
||||
const unsigned int addr = f_pReadParams->ulReadAddress;
|
||||
const struct echo_mod *echo_mod = (struct echo_mod *)f_pReadParams->pProcessContext;
|
||||
struct astribank_device *astribank = echo_mod->astribank;
|
||||
|
||||
*f_pReadParams->pusReadData = echo_recv_data(astribank, addr);
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
UINT32 Oct6100UserDriverReadBurstApi(tPOCT6100_READ_BURST_PARAMS f_pBurstParams)
|
||||
{
|
||||
unsigned int addr;
|
||||
unsigned int len = f_pBurstParams->ulReadLength;
|
||||
const struct echo_mod *echo_mod = (struct echo_mod *)f_pBurstParams->pProcessContext;
|
||||
struct astribank_device *astribank = echo_mod->astribank;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0;i < len; i++) {
|
||||
addr = f_pBurstParams->ulReadAddress + (i << 1);
|
||||
f_pBurstParams->pusReadData[i] = echo_recv_data(astribank, addr);
|
||||
}
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
inline int get_ver(struct astribank_device *astribank)
|
||||
{
|
||||
|
||||
return spi_send(astribank, 0, 0, 1, 1);
|
||||
}
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
UINT32 init_octasic(char *filename, struct astribank_device *astribank, int is_alaw)
|
||||
{
|
||||
int cpld_ver;
|
||||
struct echo_mod *echo_mod;
|
||||
UINT32 nChan;
|
||||
UINT32 nSlot;
|
||||
UINT32 pcmLaw;
|
||||
UINT32 ulResult;
|
||||
|
||||
tOCT6100_GET_INSTANCE_SIZE InstanceSize;
|
||||
tPOCT6100_INSTANCE_API pApiInstance;
|
||||
tOCT6100_CHIP_OPEN OpenChip;
|
||||
|
||||
UINT32 ulImageByteSize;
|
||||
PUINT8 pbyImageData = NULL;
|
||||
|
||||
/*=========================================================================*/
|
||||
/* Channel resources.*/
|
||||
tOCT6100_CHANNEL_OPEN ChannelOpen;
|
||||
UINT32 ulChanHndl;
|
||||
|
||||
test_send(astribank);
|
||||
cpld_ver = get_ver(astribank);
|
||||
INFO("%s [%s]: Check EC_CPLD version: %d\n",
|
||||
xusb_devpath(astribank->xusb),
|
||||
xusb_serial(astribank->xusb),
|
||||
cpld_ver);
|
||||
if (cpld_ver < 0)
|
||||
return cpld_ver;
|
||||
else if (cpld_ver == EC_VER_TEST) {
|
||||
INFO("+---------------------------------------------------------+\n");
|
||||
INFO("| WARNING: TEST HARDWARE IS ON THE BOARD INSTEAD OF EC!!! |\n");
|
||||
INFO("+---------------------------------------------------------+\n");
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/* 1) Configure and Open the OCT6100. */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
memset(&InstanceSize, 0, sizeof(tOCT6100_GET_INSTANCE_SIZE));
|
||||
memset(&OpenChip, 0, sizeof(tOCT6100_CHIP_OPEN));
|
||||
|
||||
if (!(echo_mod = malloc(sizeof(struct echo_mod)))) {
|
||||
ERR("cannot allocate memory for echo_mod\n");
|
||||
return 1;
|
||||
}
|
||||
DBG("allocated mem for echo_mod\n");
|
||||
|
||||
memset(echo_mod, 0, sizeof(struct echo_mod));
|
||||
|
||||
/* Fill the OCT6100 Chip Open configuration structure with default values */
|
||||
|
||||
ulResult = Oct6100ChipOpenDef( &OpenChip );
|
||||
if (ulResult != cOCT6100_ERR_OK) {
|
||||
ERR("Oct6100ChipOpenDef failed: result=%X\n", ulResult);
|
||||
return ulResult;
|
||||
}
|
||||
|
||||
OpenChip.pProcessContext = echo_mod;
|
||||
/* Configure clocks */
|
||||
|
||||
/* upclk oscillator is at 33.33 Mhz */
|
||||
OpenChip.ulUpclkFreq = cOCT6100_UPCLK_FREQ_33_33_MHZ;
|
||||
|
||||
/* mclk will be generated by internal PLL at 133 Mhz */
|
||||
OpenChip.fEnableMemClkOut = TRUE;
|
||||
OpenChip.ulMemClkFreq = cOCT6100_MCLK_FREQ_133_MHZ;
|
||||
|
||||
/* General parameters */
|
||||
OpenChip.fEnableChannelRecording = TRUE;
|
||||
|
||||
/* Chip ID.*/
|
||||
OpenChip.ulUserChipId = 1;
|
||||
|
||||
/* Set the max number of accesses to 1024 to speed things up */
|
||||
/* OpenChip.ulMaxRwAccesses = 1024; */
|
||||
|
||||
/* Set the maximums that the chip needs to support for this test */
|
||||
OpenChip.ulMaxChannels = 256;
|
||||
OpenChip.ulMaxPlayoutBuffers = 2;
|
||||
|
||||
OpenChip.ulMaxBiDirChannels = 0;
|
||||
OpenChip.ulMaxConfBridges = 0;
|
||||
OpenChip.ulMaxPhasingTssts = 0;
|
||||
OpenChip.ulMaxTdmStreams = 8;
|
||||
OpenChip.ulMaxTsiCncts = 0;
|
||||
|
||||
/* External Memory Settings: Use DDR memory*/
|
||||
OpenChip.ulMemoryType = cOCT6100_MEM_TYPE_DDR;
|
||||
|
||||
OpenChip.ulNumMemoryChips = 1;
|
||||
OpenChip.ulMemoryChipSize = cOCT6100_MEMORY_CHIP_SIZE_32MB;
|
||||
|
||||
|
||||
/* Load the image file */
|
||||
ulResult = load_file( filename,
|
||||
&pbyImageData,
|
||||
&ulImageByteSize );
|
||||
|
||||
if (pbyImageData == NULL || ulImageByteSize == 0){
|
||||
ERR("Bad pbyImageData or ulImageByteSize\n");
|
||||
return 1;
|
||||
}
|
||||
if ( ulResult != 0 ) {
|
||||
ERR("Failed load_file %s (%08X)\n", filename, ulResult);
|
||||
return ulResult;
|
||||
}
|
||||
|
||||
/* Assign the image file.*/
|
||||
OpenChip.pbyImageFile = pbyImageData;
|
||||
OpenChip.ulImageSize = ulImageByteSize;
|
||||
|
||||
/* Inserting default values into tOCT6100_GET_INSTANCE_SIZE structure parameters. */
|
||||
Oct6100GetInstanceSizeDef ( &InstanceSize );
|
||||
|
||||
/* Get the size of the OCT6100 instance structure. */
|
||||
ulResult = Oct6100GetInstanceSize(&OpenChip, &InstanceSize );
|
||||
if (ulResult != cOCT6100_ERR_OK)
|
||||
{
|
||||
ERR("Oct6100GetInstanceSize failed (%08X)\n", ulResult);
|
||||
return ulResult;
|
||||
}
|
||||
|
||||
pApiInstance = malloc(InstanceSize.ulApiInstanceSize);
|
||||
echo_mod->pApiInstance = pApiInstance;
|
||||
echo_mod->astribank = astribank;
|
||||
|
||||
if (!pApiInstance) {
|
||||
ERR("Out of memory (can't allocate %d bytes)!\n", InstanceSize.ulApiInstanceSize);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Perform actual open of chip */
|
||||
ulResult = Oct6100ChipOpen(pApiInstance, &OpenChip);
|
||||
if (ulResult != cOCT6100_ERR_OK) {
|
||||
ERR("Oct6100ChipOpen failed: result=%X\n", ulResult);
|
||||
return ulResult;
|
||||
}
|
||||
DBG("%s: OCT6100 is open\n", __func__);
|
||||
|
||||
/* Free the image file data */
|
||||
free( pbyImageData );
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/* 2) Open channels in echo cancellation mode. */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
for( nChan = 0; nChan < ECHO_MAX_CHANS; nChan++ ) {
|
||||
nSlot = nChan;
|
||||
/* open a channel.*/
|
||||
Oct6100ChannelOpenDef( &ChannelOpen );
|
||||
|
||||
/* Assign the handle memory.*/
|
||||
ChannelOpen.pulChannelHndl = &ulChanHndl;
|
||||
|
||||
/* Set the channel to work at the echo cancellation mode.*/
|
||||
ChannelOpen.ulEchoOperationMode = cOCT6100_ECHO_OP_MODE_NORMAL;
|
||||
|
||||
pcmLaw = (is_alaw ? cOCT6100_PCM_A_LAW: cOCT6100_PCM_U_LAW);
|
||||
|
||||
/* Configure the TDM interface.*/
|
||||
ChannelOpen.TdmConfig.ulRinPcmLaw = pcmLaw;
|
||||
ChannelOpen.TdmConfig.ulRinStream = ECHO_RIN_STREAM;
|
||||
ChannelOpen.TdmConfig.ulRinTimeslot = nSlot;
|
||||
|
||||
ChannelOpen.TdmConfig.ulSinPcmLaw = pcmLaw;
|
||||
ChannelOpen.TdmConfig.ulSinStream = ECHO_SIN_STREAM;
|
||||
ChannelOpen.TdmConfig.ulSinTimeslot = nSlot;
|
||||
|
||||
ChannelOpen.TdmConfig.ulRoutPcmLaw = pcmLaw;
|
||||
ChannelOpen.TdmConfig.ulRoutStream = ECHO_ROUT_STREAM;
|
||||
ChannelOpen.TdmConfig.ulRoutTimeslot = nSlot;
|
||||
|
||||
ChannelOpen.TdmConfig.ulSoutPcmLaw = pcmLaw;
|
||||
ChannelOpen.TdmConfig.ulSoutStream = ECHO_SOUT_STREAM;
|
||||
ChannelOpen.TdmConfig.ulSoutTimeslot = nSlot;
|
||||
|
||||
/* Set the desired VQE features.*/
|
||||
ChannelOpen.VqeConfig.fEnableNlp = TRUE;
|
||||
ChannelOpen.VqeConfig.fRinDcOffsetRemoval = TRUE;
|
||||
ChannelOpen.VqeConfig.fSinDcOffsetRemoval = TRUE;
|
||||
|
||||
ChannelOpen.VqeConfig.ulComfortNoiseMode = cOCT6100_COMFORT_NOISE_NORMAL;
|
||||
/* cOCT6100_COMFORT_NOISE_NORMAL
|
||||
cOCT6100_COMFORT_NOISE_EXTENDED,
|
||||
cOCT6100_COMFORT_NOISE_OFF,
|
||||
cOCT6100_COMFORT_NOISE_FAST_LATCH
|
||||
*/
|
||||
ulResult = Oct6100ChannelOpen( pApiInstance,
|
||||
&ChannelOpen );
|
||||
if (ulResult != cOCT6100_ERR_OK) {
|
||||
ERR("Found error on chan %d\n", nChan);
|
||||
return ulResult;
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/* *) Open channels in echo cancellation mode for second bus. */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
for( nChan = 8; nChan < 32; nChan++ ) {
|
||||
nSlot = (nChan >> 3) * 32 + (nChan & 0x07);
|
||||
/* open a channel.*/
|
||||
Oct6100ChannelOpenDef( &ChannelOpen );
|
||||
|
||||
/* Assign the handle memory.*/
|
||||
ChannelOpen.pulChannelHndl = &ulChanHndl;
|
||||
|
||||
/* Set the channel to work at the echo cancellation mode.*/
|
||||
ChannelOpen.ulEchoOperationMode = cOCT6100_ECHO_OP_MODE_NORMAL;
|
||||
|
||||
/* Configure the TDM interface.*/
|
||||
ChannelOpen.TdmConfig.ulRinStream = ECHO_RIN_STREAM2;;
|
||||
ChannelOpen.TdmConfig.ulRinTimeslot = nSlot;
|
||||
|
||||
ChannelOpen.TdmConfig.ulSinStream = ECHO_SIN_STREAM2;
|
||||
ChannelOpen.TdmConfig.ulSinTimeslot = nSlot;
|
||||
|
||||
ChannelOpen.TdmConfig.ulRoutStream = ECHO_ROUT_STREAM2;
|
||||
ChannelOpen.TdmConfig.ulRoutTimeslot = nSlot;
|
||||
|
||||
ChannelOpen.TdmConfig.ulSoutStream = ECHO_SOUT_STREAM2;
|
||||
ChannelOpen.TdmConfig.ulSoutTimeslot = nSlot;
|
||||
|
||||
/* Set the desired VQE features.*/
|
||||
ChannelOpen.VqeConfig.fEnableNlp = TRUE;
|
||||
ChannelOpen.VqeConfig.fRinDcOffsetRemoval = TRUE;
|
||||
ChannelOpen.VqeConfig.fSinDcOffsetRemoval = TRUE;
|
||||
|
||||
ChannelOpen.VqeConfig.ulComfortNoiseMode = cOCT6100_COMFORT_NOISE_NORMAL;
|
||||
/* cOCT6100_COMFORT_NOISE_NORMAL
|
||||
cOCT6100_COMFORT_NOISE_EXTENDED,
|
||||
cOCT6100_COMFORT_NOISE_OFF,
|
||||
cOCT6100_COMFORT_NOISE_FAST_LATCH
|
||||
*/
|
||||
ulResult = Oct6100ChannelOpen( pApiInstance,
|
||||
&ChannelOpen );
|
||||
if (ulResult != cOCT6100_ERR_OK) {
|
||||
ERR("Found error on chan %d\n", nChan);
|
||||
return ulResult;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DBG("%s: Finishing\n", __func__);
|
||||
free(pApiInstance);
|
||||
free(echo_mod);
|
||||
return cOCT6100_ERR_OK;
|
||||
|
||||
}
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
int load_echo(struct astribank_device *astribank, char *filename, int is_alaw)
|
||||
{
|
||||
int iLen;
|
||||
int ret;
|
||||
unsigned char *pbyFileData = NULL;
|
||||
const char *devstr;
|
||||
|
||||
devstr = xusb_devpath(astribank->xusb);
|
||||
INFO("%s [%s]: Loading ECHOCAN Firmware: %s (%s)\n",
|
||||
devstr, xusb_serial(astribank->xusb), filename,
|
||||
(is_alaw) ? "alaw" : "ulaw");
|
||||
usb_buffer_init(astribank, &usb_buffer);
|
||||
ret = init_octasic(filename, astribank, is_alaw);
|
||||
if (ret) {
|
||||
ERR("ECHO %s burning failed (%08X)\n", filename, ret);
|
||||
return -ENODEV;
|
||||
}
|
||||
ret = usb_buffer_flush(astribank, &usb_buffer);
|
||||
if (ret < 0) {
|
||||
ERR("ECHO %s buffer flush failed (%d)\n", filename, ret);
|
||||
return -ENODEV;
|
||||
}
|
||||
usb_buffer_showstatistics(astribank, &usb_buffer);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int echo_ver(struct astribank_device *astribank)
|
||||
{
|
||||
usb_buffer_init(astribank, &usb_buffer);
|
||||
return get_ver(astribank);
|
||||
}
|
||||
|
||||
32
xpp/echo_loader.h
Normal file
32
xpp/echo_loader.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef ECHO_LOADER_H
|
||||
#define ECHO_LOADER_H
|
||||
/*
|
||||
* Written by Oron Peled <oron@actcom.co.il>
|
||||
* Copyright (C) 2008, Xorcom
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "astribank_usb.h"
|
||||
|
||||
int spi_send(struct astribank_device *astribank, uint16_t addr, uint16_t data, int recv_answer, int ver);
|
||||
int load_echo(struct astribank_device *astribank, char *filename, int is_alaw);
|
||||
int echo_ver(struct astribank_device *astribank);
|
||||
|
||||
#endif /* ECHO_LOADER_H */
|
||||
@@ -48,7 +48,7 @@ __END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
lsdahdi - List all dahdi channels with their types and spans.
|
||||
lsdahdi - List all Dahdi channels with their types and spans.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
||||
211
xpp/mpp.h
211
xpp/mpp.h
@@ -26,6 +26,10 @@
|
||||
* MPP - Managment Processor Protocol definitions
|
||||
*/
|
||||
|
||||
#include <mpptalk_defs.h>
|
||||
#include <stdint.h>
|
||||
#include <xtalk.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define PACKED __attribute__((packed))
|
||||
#else
|
||||
@@ -63,7 +67,8 @@ struct capabilities {
|
||||
uint8_t ports_bri;
|
||||
uint8_t ports_pri;
|
||||
uint8_t extra_features; /* BIT(0) - TwinStar */
|
||||
uint8_t reserved[3];
|
||||
uint8_t ports_echo;
|
||||
uint8_t reserved[2];
|
||||
uint32_t timestamp;
|
||||
} PACKED;
|
||||
|
||||
@@ -81,53 +86,6 @@ struct extrainfo {
|
||||
char text[24];
|
||||
} PACKED;
|
||||
|
||||
enum mpp_command_ops {
|
||||
/* MSB of op signifies a reply from device */
|
||||
MPP_ACK = 0x80,
|
||||
|
||||
MPP_PROTO_QUERY = 0x01,
|
||||
MPP_PROTO_REPLY = 0x81,
|
||||
|
||||
MPP_RENUM = 0x0B, /* Trigger USB renumeration */
|
||||
|
||||
MPP_EEPROM_SET = 0x0D,
|
||||
|
||||
MPP_CAPS_GET = 0x0E,
|
||||
MPP_CAPS_GET_REPLY = 0x8E,
|
||||
MPP_CAPS_SET = 0x0F, /* Set AB capabilities */
|
||||
|
||||
MPP_DEV_SEND_START = 0x05,
|
||||
MPP_DEV_SEND_SEG = 0x07,
|
||||
MPP_DEV_SEND_END = 0x09,
|
||||
|
||||
MPP_STATUS_GET = 0x11, /* Get Astribank Status */
|
||||
MPP_STATUS_GET_REPLY = 0x91,
|
||||
MPP_STATUS_GET_REPLY_V13 = 0x91, /* backward compat */
|
||||
|
||||
MPP_EXTRAINFO_GET = 0x13, /* Get extra vendor information */
|
||||
MPP_EXTRAINFO_GET_REPLY = 0x93,
|
||||
MPP_EXTRAINFO_SET = 0x15, /* Set extra vendor information */
|
||||
|
||||
MPP_EEPROM_BLK_RD = 0x27,
|
||||
MPP_EEPROM_BLK_RD_REPLY = 0xA7,
|
||||
|
||||
MPP_SER_SEND = 0x37,
|
||||
MPP_SER_RECV = 0xB7,
|
||||
|
||||
MPP_RESET = 0x45, /* Reset both FPGA and USB firmwares */
|
||||
MPP_HALF_RESET = 0x47, /* Reset only FPGA firmware */
|
||||
|
||||
/* Twinstar */
|
||||
MPP_TWS_WD_MODE_SET = 0x31, /* Set watchdog off/on guard */
|
||||
MPP_TWS_WD_MODE_GET = 0x32, /* Current watchdog mode */
|
||||
MPP_TWS_WD_MODE_GET_REPLY = 0xB2, /* Current watchdog mode */
|
||||
MPP_TWS_PORT_SET = 0x34, /* USB-[0/1] */
|
||||
MPP_TWS_PORT_GET = 0x35, /* USB-[0/1] */
|
||||
MPP_TWS_PORT_GET_REPLY = 0xB5, /* USB-[0/1] */
|
||||
MPP_TWS_PWR_GET = 0x36, /* Power: bits -> USB ports */
|
||||
MPP_TWS_PWR_GET_REPLY = 0xB6, /* Power: bits -> USB ports */
|
||||
};
|
||||
|
||||
struct mpp_header {
|
||||
uint16_t len;
|
||||
uint16_t seq;
|
||||
@@ -141,33 +99,10 @@ enum mpp_ser_op {
|
||||
|
||||
/* Individual commands structure */
|
||||
|
||||
#define CMD_DEF(name, ...) struct d_ ## name { __VA_ARGS__ } PACKED d_ ## name
|
||||
|
||||
CMD_DEF(ACK,
|
||||
uint8_t stat;
|
||||
);
|
||||
|
||||
CMD_DEF(PROTO_QUERY,
|
||||
uint8_t proto_version;
|
||||
uint8_t reserved;
|
||||
);
|
||||
|
||||
CMD_DEF(PROTO_REPLY,
|
||||
uint8_t proto_version;
|
||||
uint8_t reserved;
|
||||
);
|
||||
|
||||
CMD_DEF(STATUS_GET);
|
||||
|
||||
CMD_DEF(STATUS_GET_REPLY_V13,
|
||||
uint8_t i2cs_data;
|
||||
|
||||
#define STATUS_FPGA_LOADED(x) ((x) & 0x01)
|
||||
uint8_t status; /* BIT(0) - FPGA is loaded */
|
||||
);
|
||||
CMD_DEF(MPP, STATUS_GET);
|
||||
|
||||
|
||||
CMD_DEF(STATUS_GET_REPLY,
|
||||
CMD_DEF(MPP, STATUS_GET_REPLY,
|
||||
uint8_t i2cs_data;
|
||||
|
||||
#define STATUS_FPGA_LOADED(x) ((x) & 0x01)
|
||||
@@ -175,170 +110,90 @@ CMD_DEF(STATUS_GET_REPLY,
|
||||
struct firmware_versions fw_versions;
|
||||
);
|
||||
|
||||
CMD_DEF(EEPROM_SET,
|
||||
CMD_DEF(MPP, EEPROM_SET,
|
||||
struct eeprom_table data;
|
||||
);
|
||||
|
||||
CMD_DEF(CAPS_GET);
|
||||
CMD_DEF(MPP, CAPS_GET);
|
||||
|
||||
CMD_DEF(CAPS_GET_REPLY,
|
||||
CMD_DEF(MPP, CAPS_GET_REPLY,
|
||||
struct eeprom_table data;
|
||||
struct capabilities capabilities;
|
||||
struct capkey key;
|
||||
);
|
||||
|
||||
CMD_DEF(CAPS_SET,
|
||||
CMD_DEF(MPP, CAPS_SET,
|
||||
struct eeprom_table data;
|
||||
struct capabilities capabilities;
|
||||
struct capkey key;
|
||||
);
|
||||
|
||||
CMD_DEF(EXTRAINFO_GET);
|
||||
CMD_DEF(MPP, EXTRAINFO_GET);
|
||||
|
||||
CMD_DEF(EXTRAINFO_GET_REPLY,
|
||||
CMD_DEF(MPP, EXTRAINFO_GET_REPLY,
|
||||
struct extrainfo info;
|
||||
);
|
||||
|
||||
CMD_DEF(EXTRAINFO_SET,
|
||||
CMD_DEF(MPP, EXTRAINFO_SET,
|
||||
struct extrainfo info;
|
||||
);
|
||||
|
||||
CMD_DEF(RENUM);
|
||||
CMD_DEF(MPP, RENUM);
|
||||
|
||||
CMD_DEF(EEPROM_BLK_RD,
|
||||
CMD_DEF(MPP, EEPROM_BLK_RD,
|
||||
uint16_t offset;
|
||||
uint16_t len;
|
||||
);
|
||||
|
||||
CMD_DEF(EEPROM_BLK_RD_REPLY,
|
||||
CMD_DEF(MPP, EEPROM_BLK_RD_REPLY,
|
||||
uint16_t offset;
|
||||
uint8_t data[0];
|
||||
);
|
||||
|
||||
CMD_DEF(DEV_SEND_START,
|
||||
CMD_DEF(MPP, DEV_SEND_START,
|
||||
uint8_t dest;
|
||||
char ihex_version[VERSION_LEN];
|
||||
);
|
||||
|
||||
CMD_DEF(DEV_SEND_END);
|
||||
CMD_DEF(MPP, DEV_SEND_END);
|
||||
|
||||
CMD_DEF(DEV_SEND_SEG,
|
||||
CMD_DEF(MPP, DEV_SEND_SEG,
|
||||
uint16_t offset;
|
||||
uint8_t data[0];
|
||||
);
|
||||
|
||||
CMD_DEF(RESET);
|
||||
CMD_DEF(HALF_RESET);
|
||||
CMD_DEF(MPP, RESET);
|
||||
CMD_DEF(MPP, HALF_RESET);
|
||||
|
||||
CMD_DEF(SER_SEND,
|
||||
CMD_DEF(MPP, SER_SEND,
|
||||
uint8_t data[0];
|
||||
);
|
||||
|
||||
CMD_DEF(SER_RECV,
|
||||
CMD_DEF(MPP, SER_RECV,
|
||||
uint8_t data[0];
|
||||
);
|
||||
|
||||
CMD_DEF(TWS_WD_MODE_SET,
|
||||
CMD_DEF(MPP, TWS_WD_MODE_SET,
|
||||
uint8_t wd_active;
|
||||
);
|
||||
|
||||
CMD_DEF(TWS_WD_MODE_GET);
|
||||
CMD_DEF(TWS_WD_MODE_GET_REPLY,
|
||||
CMD_DEF(MPP, TWS_WD_MODE_GET);
|
||||
CMD_DEF(MPP, TWS_WD_MODE_GET_REPLY,
|
||||
uint8_t wd_active;
|
||||
);
|
||||
|
||||
CMD_DEF(TWS_PORT_SET,
|
||||
CMD_DEF(MPP, TWS_PORT_SET,
|
||||
uint8_t portnum;
|
||||
);
|
||||
|
||||
CMD_DEF(TWS_PORT_GET);
|
||||
CMD_DEF(TWS_PORT_GET_REPLY,
|
||||
CMD_DEF(MPP, TWS_PORT_GET);
|
||||
CMD_DEF(MPP, TWS_PORT_GET_REPLY,
|
||||
uint8_t portnum;
|
||||
);
|
||||
|
||||
CMD_DEF(TWS_PWR_GET);
|
||||
CMD_DEF(TWS_PWR_GET_REPLY,
|
||||
CMD_DEF(MPP, TWS_PWR_GET);
|
||||
CMD_DEF(MPP, TWS_PWR_GET_REPLY,
|
||||
uint8_t power;
|
||||
);
|
||||
|
||||
#undef CMD_DEF
|
||||
|
||||
#define MEMBER(n) struct d_ ## n d_ ## n
|
||||
|
||||
struct mpp_command {
|
||||
struct mpp_header header;
|
||||
union {
|
||||
MEMBER(ACK);
|
||||
MEMBER(PROTO_QUERY);
|
||||
MEMBER(PROTO_REPLY);
|
||||
MEMBER(STATUS_GET);
|
||||
MEMBER(STATUS_GET_REPLY_V13);
|
||||
MEMBER(STATUS_GET_REPLY);
|
||||
MEMBER(EEPROM_SET);
|
||||
MEMBER(CAPS_GET);
|
||||
MEMBER(CAPS_GET_REPLY);
|
||||
MEMBER(CAPS_SET);
|
||||
MEMBER(EXTRAINFO_GET);
|
||||
MEMBER(EXTRAINFO_GET_REPLY);
|
||||
MEMBER(EXTRAINFO_SET);
|
||||
MEMBER(RENUM);
|
||||
MEMBER(EEPROM_BLK_RD);
|
||||
MEMBER(EEPROM_BLK_RD_REPLY);
|
||||
MEMBER(DEV_SEND_START);
|
||||
MEMBER(DEV_SEND_SEG);
|
||||
MEMBER(DEV_SEND_END);
|
||||
MEMBER(RESET);
|
||||
MEMBER(HALF_RESET);
|
||||
MEMBER(SER_SEND);
|
||||
MEMBER(SER_RECV);
|
||||
/* Twinstar */
|
||||
MEMBER(TWS_WD_MODE_SET);
|
||||
MEMBER(TWS_WD_MODE_GET);
|
||||
MEMBER(TWS_WD_MODE_GET_REPLY);
|
||||
MEMBER(TWS_PORT_SET);
|
||||
MEMBER(TWS_PORT_GET);
|
||||
MEMBER(TWS_PORT_GET_REPLY);
|
||||
MEMBER(TWS_PWR_GET);
|
||||
MEMBER(TWS_PWR_GET_REPLY);
|
||||
uint8_t raw_data[0];
|
||||
} PACKED alt;
|
||||
} PACKED;
|
||||
#undef MEMBER
|
||||
|
||||
#define CMD_FIELD(cmd, name, field) ((cmd)->alt.d_ ## name.field)
|
||||
|
||||
enum mpp_ack_stat {
|
||||
STAT_OK = 0x00, /* acknowledges previous command */
|
||||
STAT_FAIL = 0x01, /* Last command failed */
|
||||
STAT_RESET_FAIL = 0x02, /* reset failed */
|
||||
STAT_NODEST = 0x03, /* No destination is selected */
|
||||
STAT_MISMATCH = 0x04, /* Data mismatch */
|
||||
STAT_NOACCESS = 0x05, /* No access */
|
||||
STAT_BAD_CMD = 0x06, /* Bad command */
|
||||
STAT_TOO_SHORT = 0x07, /* Packet is too short */
|
||||
STAT_ERROFFS = 0x08, /* Offset error */
|
||||
STAT_NOCODE = 0x09, /* Source was not burned before */
|
||||
STAT_NO_LEEPROM = 0x0A, /* Large EEPROM was not found */
|
||||
STAT_NO_EEPROM = 0x0B, /* No EEPROM was found */
|
||||
STAT_WRITE_FAIL = 0x0C, /* Writing to device failed */
|
||||
STAT_FPGA_ERR = 0x0D, /* FPGA error */
|
||||
STAT_KEY_ERR = 0x0E, /* Bad Capabilities Key */
|
||||
STAT_NOCAPS_ERR = 0x0F, /* No matching capability */
|
||||
STAT_NOPWR_ERR = 0x10, /* No power on USB connector */
|
||||
STAT_CAPS_FPGA_ERR = 0x11, /* Setting of the capabilities while FPGA is loaded */
|
||||
};
|
||||
|
||||
enum eeprom_type { /* EEPROM_QUERY: i2cs(ID1, ID0) */
|
||||
EEPROM_TYPE_NONE = 0,
|
||||
EEPROM_TYPE_SMALL = 1,
|
||||
EEPROM_TYPE_LARGE = 2,
|
||||
EEPROM_TYPE_UNUSED = 3,
|
||||
};
|
||||
|
||||
enum dev_dest {
|
||||
DEST_NONE = 0x00,
|
||||
DEST_FPGA = 0x01,
|
||||
DEST_EEPROM = 0x02,
|
||||
};
|
||||
|
||||
#endif /* MPP_H */
|
||||
|
||||
1109
xpp/mpp_funcs.c
1109
xpp/mpp_funcs.c
File diff suppressed because it is too large
Load Diff
915
xpp/mpptalk.c
Normal file
915
xpp/mpptalk.c
Normal file
@@ -0,0 +1,915 @@
|
||||
/*
|
||||
* Written by Oron Peled <oron@actcom.co.il>
|
||||
* Copyright (C) 2008, Xorcom
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "hexfile.h"
|
||||
#include "astribank_usb.h"
|
||||
#include "mpp.h"
|
||||
#include "mpptalk.h"
|
||||
#include <debug.h>
|
||||
#include <xusb.h>
|
||||
#include <xtalk.h>
|
||||
|
||||
static const char rcsid[] = "$Id$";
|
||||
|
||||
#define DBG_MASK 0x02
|
||||
|
||||
const char *ack_status_msg(uint8_t status)
|
||||
{
|
||||
const static char *msgs[] = {
|
||||
[STAT_OK] = "Acknowledges previous command",
|
||||
[STAT_FAIL] = "Last command failed",
|
||||
[STAT_RESET_FAIL] = "Reset failed",
|
||||
[STAT_NODEST] = "No destination is selected",
|
||||
[STAT_MISMATCH] = "Data mismatch",
|
||||
[STAT_NOACCESS] = "No access",
|
||||
[STAT_BAD_CMD] = "Bad command",
|
||||
[STAT_TOO_SHORT] = "Packet is too short",
|
||||
[STAT_ERROFFS] = "Offset error",
|
||||
[STAT_NOCODE] = "Source was not burned before",
|
||||
[STAT_NO_LEEPROM] = "Large EEPROM was not found",
|
||||
[STAT_NO_EEPROM] = "No EEPROM was found",
|
||||
[STAT_WRITE_FAIL] = "Writing to device failed",
|
||||
[STAT_FPGA_ERR] = "FPGA error",
|
||||
[STAT_KEY_ERR] = "Bad Capabilities Key",
|
||||
[STAT_NOCAPS_ERR] = "No matching capability",
|
||||
[STAT_NOPWR_ERR] = "No power on USB connector",
|
||||
[STAT_CAPS_FPGA_ERR] = "Setting of the capabilities while FPGA is loaded",
|
||||
};
|
||||
if(status > sizeof(msgs)/sizeof(msgs[0]))
|
||||
return "ERROR CODE TOO LARGE";
|
||||
if(!msgs[status])
|
||||
return "MISSING ERROR CODE";
|
||||
return msgs[status];
|
||||
}
|
||||
|
||||
const char *eeprom_type2str(int et)
|
||||
{
|
||||
const static char *msgs[] = {
|
||||
[EEPROM_TYPE_NONE] = "NONE",
|
||||
[EEPROM_TYPE_SMALL] = "SMALL",
|
||||
[EEPROM_TYPE_LARGE] = "LARGE",
|
||||
[EEPROM_TYPE_UNUSED] = "UNUSED",
|
||||
};
|
||||
if(et > sizeof(msgs)/sizeof(msgs[0]))
|
||||
return NULL;
|
||||
return msgs[et];
|
||||
};
|
||||
|
||||
const char *dev_dest2str(int dest)
|
||||
{
|
||||
const static char *msgs[] = {
|
||||
[DEST_NONE] = "NONE",
|
||||
[DEST_FPGA] = "FPGA",
|
||||
[DEST_EEPROM] = "EEPROM",
|
||||
};
|
||||
if(dest > sizeof(msgs)/sizeof(msgs[0]))
|
||||
return NULL;
|
||||
return msgs[dest];
|
||||
};
|
||||
|
||||
union XTALK_PDATA(MPP) {
|
||||
MEMBER(MPP, STATUS_GET);
|
||||
MEMBER(MPP, STATUS_GET_REPLY);
|
||||
MEMBER(MPP, EEPROM_SET);
|
||||
MEMBER(MPP, CAPS_GET);
|
||||
MEMBER(MPP, CAPS_GET_REPLY);
|
||||
MEMBER(MPP, CAPS_SET);
|
||||
MEMBER(MPP, EXTRAINFO_GET);
|
||||
MEMBER(MPP, EXTRAINFO_GET_REPLY);
|
||||
MEMBER(MPP, EXTRAINFO_SET);
|
||||
MEMBER(MPP, RENUM);
|
||||
MEMBER(MPP, EEPROM_BLK_RD);
|
||||
MEMBER(MPP, EEPROM_BLK_RD_REPLY);
|
||||
MEMBER(MPP, DEV_SEND_SEG);
|
||||
MEMBER(MPP, DEV_SEND_START);
|
||||
MEMBER(MPP, DEV_SEND_END);
|
||||
MEMBER(MPP, RESET);
|
||||
MEMBER(MPP, HALF_RESET);
|
||||
MEMBER(MPP, SER_SEND);
|
||||
MEMBER(MPP, SER_RECV);
|
||||
/* Twinstar */
|
||||
MEMBER(MPP, TWS_WD_MODE_SET);
|
||||
MEMBER(MPP, TWS_WD_MODE_GET);
|
||||
MEMBER(MPP, TWS_WD_MODE_GET_REPLY);
|
||||
MEMBER(MPP, TWS_PORT_SET);
|
||||
MEMBER(MPP, TWS_PORT_GET);
|
||||
MEMBER(MPP, TWS_PORT_GET_REPLY);
|
||||
MEMBER(MPP, TWS_PWR_GET);
|
||||
MEMBER(MPP, TWS_PWR_GET_REPLY);
|
||||
} PACKED members;
|
||||
|
||||
struct xtalk_protocol astribank_proto = {
|
||||
.name = "ABNK",
|
||||
.proto_version = 0x14,
|
||||
.commands = {
|
||||
CMD_SEND(MPP, STATUS_GET),
|
||||
CMD_RECV(MPP, STATUS_GET_REPLY, NULL),
|
||||
CMD_SEND(MPP, EEPROM_SET),
|
||||
CMD_SEND(MPP, CAPS_GET),
|
||||
CMD_RECV(MPP, CAPS_GET_REPLY, NULL),
|
||||
CMD_SEND(MPP, CAPS_SET),
|
||||
CMD_SEND(MPP, EXTRAINFO_GET),
|
||||
CMD_RECV(MPP, EXTRAINFO_GET_REPLY, NULL),
|
||||
CMD_SEND(MPP, EXTRAINFO_SET),
|
||||
CMD_SEND(MPP, RENUM),
|
||||
CMD_SEND(MPP, EEPROM_BLK_RD),
|
||||
CMD_RECV(MPP, EEPROM_BLK_RD_REPLY, NULL),
|
||||
CMD_SEND(MPP, DEV_SEND_SEG),
|
||||
CMD_SEND(MPP, DEV_SEND_START),
|
||||
CMD_SEND(MPP, DEV_SEND_END),
|
||||
CMD_SEND(MPP, RESET),
|
||||
CMD_SEND(MPP, HALF_RESET),
|
||||
CMD_SEND(MPP, SER_SEND),
|
||||
CMD_SEND(MPP, SER_RECV),
|
||||
/* Twinstar */
|
||||
CMD_SEND(MPP, TWS_WD_MODE_SET),
|
||||
CMD_SEND(MPP, TWS_WD_MODE_GET),
|
||||
CMD_RECV(MPP, TWS_WD_MODE_GET_REPLY, NULL),
|
||||
CMD_SEND(MPP, TWS_PORT_SET),
|
||||
CMD_SEND(MPP, TWS_PORT_GET),
|
||||
CMD_RECV(MPP, TWS_PORT_GET_REPLY, NULL),
|
||||
CMD_SEND(MPP, TWS_PWR_GET),
|
||||
CMD_RECV(MPP, TWS_PWR_GET_REPLY, NULL),
|
||||
},
|
||||
.ack_statuses = {
|
||||
}
|
||||
};
|
||||
|
||||
struct cmd_queue {
|
||||
struct cmd_queue *next;
|
||||
struct cmd_queue *prev;
|
||||
struct xtalk_command *cmd;
|
||||
};
|
||||
|
||||
static struct cmd_queue output_queue = {
|
||||
.next = &output_queue,
|
||||
.prev = &output_queue,
|
||||
.cmd = NULL
|
||||
};
|
||||
|
||||
void dump_command(struct xtalk_command *cmd)
|
||||
{
|
||||
uint16_t len;
|
||||
int i;
|
||||
|
||||
len = cmd->header.len;
|
||||
if(len < sizeof(struct mpp_header)) {
|
||||
ERR("Command too short (%d)\n", len);
|
||||
return;
|
||||
}
|
||||
INFO("DUMP: OP=0x%X len=%d seq=%d\n",
|
||||
cmd->header.op, cmd->header.len, cmd->header.seq);
|
||||
for(i = 0; i < len - sizeof(struct mpp_header); i++) {
|
||||
INFO(" %2d. 0x%X\n", i, cmd->alt.raw_data[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int set_ihex_version(char *dst, const char *src)
|
||||
{
|
||||
memcpy(dst, src, VERSION_LEN);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Protocol Commands
|
||||
*/
|
||||
|
||||
int mpp_status_query(struct astribank_device *astribank)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
DBG("\n");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_STATUS_GET, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
astribank->eeprom_type = 0x3 & (CMD_FIELD(reply, MPP, STATUS_GET_REPLY, i2cs_data) >> 3);
|
||||
astribank->status = CMD_FIELD(reply, MPP, STATUS_GET_REPLY, status);
|
||||
astribank->fw_versions = CMD_FIELD(reply, MPP, STATUS_GET_REPLY, fw_versions);
|
||||
DBG("EEPROM TYPE: %02x\n", astribank->eeprom_type);
|
||||
DBG("FPGA Firmware: %s\n", (astribank->status & 0x1) ? "Loaded" : "Empty");
|
||||
DBG("Firmware Versions: USB='%s' FPGA='%s' EEPROM='%s'\n",
|
||||
astribank->fw_versions.usb,
|
||||
astribank->fw_versions.fpga,
|
||||
astribank->fw_versions.eeprom);
|
||||
free_command(reply);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int mpp_eeprom_set(struct astribank_device *astribank, const struct eeprom_table *et)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
DBG("\n");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_EEPROM_SET, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
memcpy(&CMD_FIELD(cmd, MPP, EEPROM_SET, data), et, sizeof(*et));
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
free_command(reply);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mpp_renumerate(struct astribank_device *astribank)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
DBG("\n");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_RENUM, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
ret = process_command(xtalk_dev, cmd, NULL);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mpp_caps_get(struct astribank_device *astribank,
|
||||
struct eeprom_table *eeprom_table,
|
||||
struct capabilities *capabilities,
|
||||
struct capkey *key)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
DBG("\n");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_CAPS_GET, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
assert(reply->header.op == MPP_CAPS_GET_REPLY);
|
||||
if(eeprom_table) {
|
||||
memcpy(eeprom_table, (void *)&CMD_FIELD(reply, MPP, CAPS_GET_REPLY, data), sizeof(*eeprom_table));
|
||||
}
|
||||
if(capabilities) {
|
||||
const struct capabilities *cap = &CMD_FIELD(reply, MPP, CAPS_GET_REPLY, capabilities);
|
||||
|
||||
memcpy(capabilities, cap, sizeof(*capabilities));
|
||||
}
|
||||
if(key) {
|
||||
const struct capkey *k = &CMD_FIELD(reply, MPP, CAPS_GET_REPLY, key);
|
||||
|
||||
memcpy(key, k, sizeof(*key));
|
||||
}
|
||||
free_command(reply);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mpp_caps_set(struct astribank_device *astribank,
|
||||
const struct eeprom_table *eeprom_table,
|
||||
const struct capabilities *capabilities,
|
||||
const struct capkey *key)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
DBG("\n");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_CAPS_SET, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
memcpy(&CMD_FIELD(cmd, MPP, CAPS_SET, data), eeprom_table, sizeof(*eeprom_table));
|
||||
memcpy(&CMD_FIELD(cmd, MPP, CAPS_SET, capabilities), capabilities, sizeof(*capabilities));
|
||||
memcpy(&CMD_FIELD(cmd, MPP, CAPS_SET, key), key, sizeof(*key));
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
free_command(reply);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mpp_extrainfo_get(struct astribank_device *astribank, struct extrainfo *info)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
DBG("\n");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_EXTRAINFO_GET, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
assert(reply->header.op == MPP_EXTRAINFO_GET_REPLY);
|
||||
if(info) {
|
||||
memcpy(info, (void *)&CMD_FIELD(reply, MPP, EXTRAINFO_GET_REPLY, info), sizeof(*info));
|
||||
}
|
||||
free_command(reply);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mpp_extrainfo_set(struct astribank_device *astribank, const struct extrainfo *info)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
DBG("\n");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_EXTRAINFO_SET, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
memcpy(&CMD_FIELD(cmd, MPP, EXTRAINFO_SET, info), info, sizeof(*info));
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
free_command(reply);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mpp_eeprom_blk_rd(struct astribank_device *astribank, uint8_t *buf, uint16_t offset, uint16_t len)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
int size;
|
||||
|
||||
DBG("len = %d, offset = %d\n", len, offset);
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_EEPROM_BLK_RD, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
CMD_FIELD(cmd, MPP, EEPROM_BLK_RD, len) = len;
|
||||
CMD_FIELD(cmd, MPP, EEPROM_BLK_RD, offset) = offset;
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
size = ret;
|
||||
goto out;
|
||||
}
|
||||
size = reply->header.len - sizeof(struct mpp_header) - sizeof(XTALK_STRUCT(MPP, EEPROM_BLK_RD_REPLY));
|
||||
INFO("size=%d offset=0x%X\n", size, CMD_FIELD(reply, MPP, EEPROM_BLK_RD_REPLY, offset));
|
||||
dump_packet(LOG_DEBUG, DBG_MASK, "BLK_RD", (char *)reply, ret);
|
||||
if(size > len) {
|
||||
ERR("Truncating reply (was %d, now %d)\n", size, len);
|
||||
size = len;
|
||||
}
|
||||
memcpy(buf, CMD_FIELD(reply, MPP, EEPROM_BLK_RD_REPLY, data), size);
|
||||
out:
|
||||
free_command(reply);
|
||||
return size;
|
||||
}
|
||||
|
||||
int mpp_send_start(struct astribank_device *astribank, int dest, const char *ihex_version)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply = NULL;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret = 0;
|
||||
|
||||
DBG("dest = %s ihex_version = '%s'\n", dev_dest2str(dest), ihex_version);
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_DEV_SEND_START, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
CMD_FIELD(cmd, MPP, DEV_SEND_START, dest) = dest;
|
||||
set_ihex_version(CMD_FIELD(cmd, MPP, DEV_SEND_START, ihex_version), ihex_version);
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
goto out;
|
||||
}
|
||||
out:
|
||||
if(reply)
|
||||
free_command(reply);
|
||||
astribank->burn_state = (ret == 0)
|
||||
? BURN_STATE_STARTED
|
||||
: BURN_STATE_FAILED;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int mpp_send_end(struct astribank_device *astribank)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply = NULL;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret = 0;
|
||||
|
||||
DBG("\n");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_DEV_SEND_END, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
goto out;
|
||||
}
|
||||
out:
|
||||
if(reply)
|
||||
free_command(reply);
|
||||
astribank->burn_state = (ret == 0)
|
||||
? BURN_STATE_ENDED
|
||||
: BURN_STATE_FAILED;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int mpp_send_seg(struct astribank_device *astribank, const uint8_t *data, uint16_t offset, uint16_t len)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if(!astribank->burn_state == BURN_STATE_STARTED) {
|
||||
ERR("Tried to send a segment while burn_state=%d\n",
|
||||
astribank->burn_state);
|
||||
return -EINVAL;
|
||||
}
|
||||
DBG("len = %d, offset = %d (0x%02X, 0x%02X)\n", len, offset, *data, *(data + 1));
|
||||
if((cmd = new_command(xtalk_dev, MPP_DEV_SEND_SEG, len)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
CMD_FIELD(cmd, MPP, DEV_SEND_SEG, offset) = offset;
|
||||
memcpy(CMD_FIELD(cmd, MPP, DEV_SEND_SEG, data), data, len);
|
||||
#if 0
|
||||
{
|
||||
FILE *fp;
|
||||
if((fp = fopen("seg_data.bin", "a")) == NULL) {
|
||||
perror("seg_data.bin");
|
||||
exit(1);
|
||||
}
|
||||
if(fwrite(CMD_FIELD(cmd, MPP, DEV_SEND_SEG, data), len, 1, fp) != 1) {
|
||||
perror("fwrite");
|
||||
exit(1);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
#endif
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
free_command(reply);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mpp_reset(struct astribank_device *astribank, int full_reset)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
int op = (full_reset) ? MPP_RESET: MPP_HALF_RESET;
|
||||
|
||||
DBG("full = %s\n", (full_reset) ? "YES" : "NO");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, op, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
ret = process_command(xtalk_dev, cmd, NULL);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mpp_serial_cmd(struct astribank_device *astribank, const uint8_t *in, uint8_t *out, uint16_t len)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
uint8_t *data;
|
||||
|
||||
DBG("len=%d\n", len);
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_SER_SEND, len)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
data = CMD_FIELD(cmd, MPP, SER_SEND, data);
|
||||
memcpy(data, in, len);
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
assert(reply->header.op == MPP_SER_RECV);
|
||||
data = CMD_FIELD(reply, MPP, SER_RECV, data);
|
||||
memcpy(out, data, len);
|
||||
free_command(reply);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mpps_card_info(struct astribank_device *astribank, int unit, uint8_t *card_type, uint8_t *card_status)
|
||||
{
|
||||
struct card_info_send {
|
||||
uint8_t ser_op;
|
||||
uint8_t addr;
|
||||
} *card_info_send;
|
||||
struct card_info_recv {
|
||||
uint8_t ser_op_undef; /* invalid data */
|
||||
uint8_t addr;
|
||||
uint8_t card_full_type; /* (type << 4 | subtype) */
|
||||
uint8_t card_status; /* BIT(0) - PIC burned */
|
||||
} *card_info_recv;
|
||||
uint8_t in[sizeof(struct card_info_recv)];
|
||||
uint8_t out[sizeof(struct card_info_recv)];
|
||||
int len;
|
||||
int ret;
|
||||
|
||||
len = sizeof(struct card_info_recv);
|
||||
memset(in, 0, len);
|
||||
memset(out, 0, len);
|
||||
card_info_send = (struct card_info_send *)∈
|
||||
card_info_recv = (struct card_info_recv *)&out;
|
||||
card_info_send->ser_op = SER_CARD_INFO_GET;
|
||||
card_info_send->addr = (unit << 4); /* low nibble is subunit */
|
||||
ret = mpp_serial_cmd(astribank, in, out, len);
|
||||
if(ret < 0)
|
||||
return ret;
|
||||
*card_type = card_info_recv->card_full_type;
|
||||
*card_status = card_info_recv->card_status;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mpp_tws_watchdog(struct astribank_device *astribank)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
DBG("\n");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_TWS_WD_MODE_GET, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
ret = CMD_FIELD(reply, MPP, TWS_WD_MODE_GET_REPLY, wd_active);
|
||||
DBG("wd_active=0x%X\n", ret);
|
||||
free_command(reply);
|
||||
return ret == 1;
|
||||
}
|
||||
|
||||
int mpp_tws_setwatchdog(struct astribank_device *astribank, int yes)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
DBG("%s\n", (yes) ? "YES" : "NO");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_TWS_WD_MODE_SET, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
CMD_FIELD(cmd, MPP, TWS_WD_MODE_SET, wd_active) = (yes) ? 1 : 0;
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
free_command(reply);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mpp_tws_powerstate(struct astribank_device *astribank)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
DBG("\n");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_TWS_PWR_GET, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
ret = CMD_FIELD(reply, MPP, TWS_PWR_GET_REPLY, power);
|
||||
DBG("power=0x%X\n", ret);
|
||||
free_command(reply);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int mpp_tws_portnum(struct astribank_device *astribank)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_command *reply;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
DBG("\n");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if((cmd = new_command(xtalk_dev, MPP_TWS_PORT_GET, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
ret = process_command(xtalk_dev, cmd, &reply);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
ret = CMD_FIELD(reply, MPP, TWS_PORT_GET_REPLY, portnum);
|
||||
DBG("portnum=0x%X\n", ret);
|
||||
free_command(reply);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int mpp_tws_setportnum(struct astribank_device *astribank, uint8_t portnum)
|
||||
{
|
||||
struct xtalk_command *cmd;
|
||||
struct xtalk_device *xtalk_dev;
|
||||
int ret;
|
||||
|
||||
DBG("\n");
|
||||
assert(astribank != NULL);
|
||||
xtalk_dev = astribank->xtalk_dev;
|
||||
if(portnum >= 2) {
|
||||
ERR("Invalid portnum (%d)\n", portnum);
|
||||
return -EINVAL;
|
||||
}
|
||||
if((cmd = new_command(xtalk_dev, MPP_TWS_PORT_SET, 0)) == NULL) {
|
||||
ERR("new_command failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
CMD_FIELD(cmd, MPP, TWS_PORT_SET, portnum) = portnum;
|
||||
ret = process_command(xtalk_dev, cmd, NULL);
|
||||
if(ret < 0) {
|
||||
ERR("process_command failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Adapters for xusb ops */
|
||||
static inline int xusb_close_func(void *priv)
|
||||
{
|
||||
return xusb_close((struct xusb *)priv);
|
||||
}
|
||||
|
||||
static inline int xusb_send_func(void *priv, void *data, size_t len, int timeout)
|
||||
{
|
||||
return xusb_send((struct xusb *)priv, data, len, timeout);
|
||||
}
|
||||
|
||||
static inline int xusb_recv_func(void *priv, void *data, size_t maxlen, int timeout)
|
||||
{
|
||||
return xusb_recv((struct xusb *)priv, data, maxlen, timeout);
|
||||
}
|
||||
|
||||
|
||||
static struct xtalk_ops xusb_ops = {
|
||||
.send_func = xusb_send_func,
|
||||
.recv_func = xusb_recv_func,
|
||||
.close_func = xusb_close_func,
|
||||
};
|
||||
|
||||
/*
|
||||
* Wrappers
|
||||
*/
|
||||
|
||||
struct astribank_device *mpp_init(const char devpath[], int iface_num)
|
||||
{
|
||||
struct astribank_device *astribank = NULL;
|
||||
struct xtalk_device *xtalk_dev = NULL;
|
||||
struct xusb *xusb = NULL;
|
||||
int packet_size;
|
||||
int ret;
|
||||
|
||||
DBG("devpath='%s' iface_num=%d\n", devpath, iface_num);
|
||||
if((astribank = astribank_open(devpath, iface_num)) == NULL) {
|
||||
ERR("Opening astribank failed\n");
|
||||
goto err;
|
||||
}
|
||||
xusb = astribank->xusb;
|
||||
packet_size = xusb_packet_size(xusb);
|
||||
if((xtalk_dev = xtalk_new(&xusb_ops, packet_size, xusb)) == NULL) {
|
||||
ERR("Allocating new XTALK device failed\n");
|
||||
goto err;
|
||||
}
|
||||
astribank->xtalk_dev = xtalk_dev;
|
||||
ret = xtalk_set_protocol(xtalk_dev, &astribank_proto);
|
||||
if(ret < 0) {
|
||||
ERR("MPP Protocol registration failed: %d\n", ret);
|
||||
goto err;
|
||||
}
|
||||
ret = xtalk_proto_query(xtalk_dev);
|
||||
if(ret < 0) {
|
||||
ERR("Protocol handshake failed: %d\n", ret);
|
||||
goto err;
|
||||
}
|
||||
ret = mpp_status_query(astribank);
|
||||
if(ret < 0) {
|
||||
ERR("Status query failed: %d\n", ret);
|
||||
goto err;
|
||||
}
|
||||
return astribank;
|
||||
|
||||
err:
|
||||
if (astribank) {
|
||||
astribank_close(astribank, 0);
|
||||
astribank = NULL;
|
||||
}
|
||||
if(xtalk_dev) {
|
||||
xtalk_delete(xtalk_dev);
|
||||
xtalk_dev = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void mpp_exit(struct astribank_device *astribank)
|
||||
{
|
||||
DBG("\n");
|
||||
astribank_close(astribank, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* data structures
|
||||
*/
|
||||
|
||||
void show_eeprom(const struct eeprom_table *eprm, FILE *fp)
|
||||
{
|
||||
int rmajor = (eprm->release >> 8) & 0xFF;
|
||||
int rminor = eprm->release & 0xFF;;
|
||||
char buf[BUFSIZ];
|
||||
|
||||
memset(buf, 0, LABEL_SIZE + 1);
|
||||
memcpy(buf, eprm->label, LABEL_SIZE);
|
||||
fprintf(fp, "EEPROM: %-15s: 0x%02X\n", "Source", eprm->source);
|
||||
fprintf(fp, "EEPROM: %-15s: 0x%04X\n", "Vendor", eprm->vendor);
|
||||
fprintf(fp, "EEPROM: %-15s: 0x%04X\n", "Product", eprm->product);
|
||||
fprintf(fp, "EEPROM: %-15s: %d.%d\n", "Release", rmajor, rminor);
|
||||
fprintf(fp, "EEPROM: %-15s: 0x%02X\n", "Config", eprm->config_byte);
|
||||
fprintf(fp, "EEPROM: %-15s: '%s'\n", "Label", buf);
|
||||
}
|
||||
|
||||
void show_capabilities(const struct capabilities *capabilities, FILE *fp)
|
||||
{
|
||||
fprintf(fp, "Capabilities: FXS ports: %2d\n", capabilities->ports_fxs);
|
||||
fprintf(fp, "Capabilities: FXO ports: %2d\n", capabilities->ports_fxo);
|
||||
fprintf(fp, "Capabilities: BRI ports: %2d\n", capabilities->ports_bri);
|
||||
fprintf(fp, "Capabilities: PRI ports: %2d\n", capabilities->ports_pri);
|
||||
fprintf(fp, "Capabilities: ECHO ports: %2d\n", capabilities->ports_echo);
|
||||
fprintf(fp, "Capabilities: TwinStar : %s\n",
|
||||
(CAP_EXTRA_TWINSTAR(capabilities)) ? "Yes" : "No");
|
||||
}
|
||||
|
||||
void show_astribank_status(struct astribank_device *astribank, FILE *fp)
|
||||
{
|
||||
char version_buf[BUFSIZ];
|
||||
int is_loaded = STATUS_FPGA_LOADED(astribank->status);
|
||||
|
||||
fprintf(fp, "Astribank: EEPROM : %s\n",
|
||||
eeprom_type2str(astribank->eeprom_type));
|
||||
fprintf(fp, "Astribank: FPGA status : %s\n",
|
||||
is_loaded ? "Loaded" : "Empty");
|
||||
if(is_loaded) {
|
||||
memset(version_buf, 0, sizeof(version_buf));
|
||||
memcpy(version_buf, astribank->fw_versions.fpga, VERSION_LEN);
|
||||
fprintf(fp, "Astribank: FPGA version: %s\n",
|
||||
version_buf);
|
||||
}
|
||||
}
|
||||
|
||||
void show_extrainfo(const struct extrainfo *extrainfo, FILE *fp)
|
||||
{
|
||||
fprintf(fp, "Extrainfo: : %s\n", (const char *)(extrainfo->text));
|
||||
}
|
||||
|
||||
int twinstar_show(struct astribank_device *astribank, FILE *fp)
|
||||
{
|
||||
int watchdog;
|
||||
int powerstate;
|
||||
int portnum;
|
||||
int i;
|
||||
|
||||
if(!astribank_has_twinstar(astribank)) {
|
||||
fprintf(fp, "TwinStar: NO\n");
|
||||
return 0;
|
||||
}
|
||||
if((watchdog = mpp_tws_watchdog(astribank)) < 0) {
|
||||
ERR("Failed getting TwinStar information\n");
|
||||
return watchdog;
|
||||
}
|
||||
if((powerstate = mpp_tws_powerstate(astribank)) < 0) {
|
||||
ERR("Failed getting TwinStar powerstate\n");
|
||||
return powerstate;
|
||||
}
|
||||
if((portnum = mpp_tws_portnum(astribank)) < 0) {
|
||||
ERR("Failed getting TwinStar portnum\n");
|
||||
return portnum;
|
||||
}
|
||||
fprintf(fp, "TwinStar: Connected to : USB-%1d\n", portnum);
|
||||
fprintf(fp, "TwinStar: Watchdog : %s\n",
|
||||
(watchdog) ? "on-guard" : "off-guard");
|
||||
for(i = 0; i < 2; i++) {
|
||||
int pw = (1 << i) & powerstate;
|
||||
|
||||
fprintf(fp, "TwinStar: USB-%1d POWER : %s\n",
|
||||
i, (pw) ? "ON" : "OFF");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -22,13 +22,22 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mpp.h"
|
||||
#include "astribank_usb.h"
|
||||
|
||||
#define TIMEOUT 2000
|
||||
struct astribank_device;
|
||||
struct eeprom_table;
|
||||
struct extrainfo;
|
||||
struct capabilities;
|
||||
struct capkey;
|
||||
|
||||
#define TIMEOUT 6000
|
||||
|
||||
/* high-level */
|
||||
struct astribank_device *mpp_init(const char devpath[]);
|
||||
struct astribank_device *mpp_init(const char devpath[], int iface_num);
|
||||
void mpp_exit(struct astribank_device *astribank);
|
||||
int mpp_proto_query(struct astribank_device *astribank);
|
||||
int mpp_status_query(struct astribank_device *astribank);
|
||||
@@ -45,7 +54,7 @@ int mpp_caps_set(struct astribank_device *astribank,
|
||||
int mpp_extrainfo_get(struct astribank_device *astribank, struct extrainfo *info);
|
||||
int mpp_extrainfo_set(struct astribank_device *astribank, const struct extrainfo *info);
|
||||
int mpp_eeprom_blk_rd(struct astribank_device *astribank, uint8_t *buf, uint16_t offset, uint16_t len);
|
||||
int mpp_send_start(struct astribank_device *astribank, enum dev_dest dest, const char *ihex_version);
|
||||
int mpp_send_start(struct astribank_device *astribank, int dest, const char *ihex_version);
|
||||
int mpp_send_end(struct astribank_device *astribank);
|
||||
int mpp_send_seg(struct astribank_device *astribank, const uint8_t *data, uint16_t offset, uint16_t len);
|
||||
int mpp_reset(struct astribank_device *astribank, int full_reset);
|
||||
@@ -70,11 +79,6 @@ int mpp_tws_powerstate(struct astribank_device *astribank);
|
||||
int mpp_tws_portnum(struct astribank_device *astribank);
|
||||
int mpp_tws_setportnum(struct astribank_device *astribank, uint8_t portnum);
|
||||
|
||||
/* low-level */
|
||||
int process_command(struct astribank_device *astribank, struct mpp_command *cmd, struct mpp_command **reply_ref);
|
||||
struct mpp_command *new_command(uint8_t protocol_version, uint8_t op, uint16_t extra_data);
|
||||
void free_command(struct mpp_command *cmd);
|
||||
|
||||
const char *dev_dest2str(enum dev_dest dest);
|
||||
const char *dev_dest2str(int dest);
|
||||
|
||||
#endif /* MPP_FUNCS_H */
|
||||
111
xpp/mpptalk_defs.h
Normal file
111
xpp/mpptalk_defs.h
Normal file
@@ -0,0 +1,111 @@
|
||||
#ifndef MPPTALK_DEFS_H
|
||||
#define MPPTALK_DEFS_H
|
||||
/*
|
||||
* Written by Oron Peled <oron@actcom.co.il>
|
||||
* Copyright (C) 2008,2009,2010 Xorcom
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <xtalk_defs.h>
|
||||
/*
|
||||
* MPP - Managment Processor Protocol definitions
|
||||
*/
|
||||
|
||||
/*
|
||||
* OP Codes:
|
||||
* MSB of op signifies a reply from device
|
||||
*/
|
||||
#define MPP_RENUM 0x0B /* Trigger USB renumeration */
|
||||
#define MPP_EEPROM_SET 0x0D
|
||||
|
||||
/* AB capabilities */
|
||||
#define MPP_CAPS_GET 0x0E
|
||||
#define MPP_CAPS_GET_REPLY 0x8E
|
||||
#define MPP_CAPS_SET 0x0F
|
||||
|
||||
#define MPP_DEV_SEND_START 0x05
|
||||
#define MPP_DEV_SEND_SEG 0x07
|
||||
#define MPP_DEV_SEND_END 0x09
|
||||
|
||||
/* Astribank Status */
|
||||
#define MPP_STATUS_GET 0x11
|
||||
#define MPP_STATUS_GET_REPLY 0x91
|
||||
#define MPP_STATUS_GET_REPLY_V13 0x91 /* backward compat */
|
||||
|
||||
/* Get extra vendor information */
|
||||
#define MPP_EXTRAINFO_GET 0x13
|
||||
#define MPP_EXTRAINFO_GET_REPLY 0x93
|
||||
#define MPP_EXTRAINFO_SET 0x15 /* Set extra vendor information */
|
||||
|
||||
#define MPP_EEPROM_BLK_RD 0x27
|
||||
#define MPP_EEPROM_BLK_RD_REPLY 0xA7
|
||||
|
||||
#define MPP_SER_SEND 0x37
|
||||
#define MPP_SER_RECV 0xB7
|
||||
|
||||
#define MPP_RESET 0x45 /* Reset both FPGA and USB firmwares */
|
||||
#define MPP_HALF_RESET 0x47 /* Reset only FPGA firmware */
|
||||
|
||||
/* Twinstar */
|
||||
#define MPP_TWS_WD_MODE_SET 0x31 /* Set watchdog off/on guard */
|
||||
#define MPP_TWS_WD_MODE_GET 0x32 /* Current watchdog mode */
|
||||
#define MPP_TWS_WD_MODE_GET_REPLY 0xB2 /* Current watchdog mode */
|
||||
#define MPP_TWS_PORT_SET 0x34 /* USB-[0/1] */
|
||||
#define MPP_TWS_PORT_GET 0x35 /* USB-[0/1] */
|
||||
#define MPP_TWS_PORT_GET_REPLY 0xB5 /* USB-[0/1] */
|
||||
#define MPP_TWS_PWR_GET 0x36 /* Power: bits -> USB ports */
|
||||
#define MPP_TWS_PWR_GET_REPLY 0xB6 /* Power: bits -> USB ports */
|
||||
|
||||
/*
|
||||
* Statuses
|
||||
*/
|
||||
#define STAT_OK 0x00 /* acknowledges previous command */
|
||||
#define STAT_FAIL 0x01 /* Last command failed */
|
||||
#define STAT_RESET_FAIL 0x02 /* reset failed */
|
||||
#define STAT_NODEST 0x03 /* No destination is selected */
|
||||
#define STAT_MISMATCH 0x04 /* Data mismatch */
|
||||
#define STAT_NOACCESS 0x05 /* No access */
|
||||
#define STAT_BAD_CMD 0x06 /* Bad command */
|
||||
#define STAT_TOO_SHORT 0x07 /* Packet is too short */
|
||||
#define STAT_ERROFFS 0x08 /* Offset error */
|
||||
#define STAT_NOCODE 0x09 /* Source was not burned before */
|
||||
#define STAT_NO_LEEPROM 0x0A /* Large EEPROM was not found */
|
||||
#define STAT_NO_EEPROM 0x0B /* No EEPROM was found */
|
||||
#define STAT_WRITE_FAIL 0x0C /* Writing to device failed */
|
||||
#define STAT_FPGA_ERR 0x0D /* FPGA error */
|
||||
#define STAT_KEY_ERR 0x0E /* Bad Capabilities Key */
|
||||
#define STAT_NOCAPS_ERR 0x0F /* No matching capability */
|
||||
#define STAT_NOPWR_ERR 0x10 /* No power on USB connector */
|
||||
#define STAT_CAPS_FPGA_ERR 0x11 /* Setting of the capabilities while FPGA is loaded */
|
||||
|
||||
/* EEPROM_QUERY: i2cs(ID1, ID0) */
|
||||
enum eeprom_type {
|
||||
EEPROM_TYPE_NONE = 0,
|
||||
EEPROM_TYPE_SMALL = 1,
|
||||
EEPROM_TYPE_LARGE = 2,
|
||||
EEPROM_TYPE_UNUSED = 3,
|
||||
};
|
||||
|
||||
enum dev_dest {
|
||||
DEST_NONE = 0x00,
|
||||
DEST_FPGA = 0x01,
|
||||
DEST_EEPROM = 0x02,
|
||||
};
|
||||
|
||||
#endif /* MPPTALK_DEFS_H */
|
||||
38
xpp/oct612x/Makefile
Normal file
38
xpp/oct612x/Makefile
Normal file
@@ -0,0 +1,38 @@
|
||||
CFLAGS=-V3.4 -ffunction-sections -I/lib/modules/$(shell uname -r)/build/include -Iinclude -Ioctdeviceapi -Ioctdeviceapi/oct6100api -DGFP_ATOMIC=0 -Dkmalloc=calloc -Dkfree=free
|
||||
LDFLAGS=-V3.4 -Wl,-Map -Wl,test.map -Wl,--gc-sections
|
||||
|
||||
APIDIR=octdeviceapi/oct6100api/oct6100_api
|
||||
|
||||
OCTASIC_OBJS=$(APIDIR)/oct6100_adpcm_chan.o \
|
||||
$(APIDIR)/oct6100_channel.o \
|
||||
$(APIDIR)/oct6100_chip_open.o \
|
||||
$(APIDIR)/oct6100_chip_stats.o \
|
||||
$(APIDIR)/oct6100_conf_bridge.o \
|
||||
$(APIDIR)/oct6100_debug.o \
|
||||
$(APIDIR)/oct6100_events.o \
|
||||
$(APIDIR)/oct6100_interrupts.o \
|
||||
$(APIDIR)/oct6100_memory.o \
|
||||
$(APIDIR)/oct6100_miscellaneous.o \
|
||||
$(APIDIR)/oct6100_mixer.o \
|
||||
$(APIDIR)/oct6100_phasing_tsst.o \
|
||||
$(APIDIR)/oct6100_playout_buf.o \
|
||||
$(APIDIR)/oct6100_remote_debug.o \
|
||||
$(APIDIR)/oct6100_tlv.o \
|
||||
$(APIDIR)/oct6100_tone_detection.o \
|
||||
$(APIDIR)/oct6100_tsi_cnct.o \
|
||||
$(APIDIR)/oct6100_tsst.o \
|
||||
$(APIDIR)/oct6100_user.o \
|
||||
apilib/bt/octapi_bt0.o \
|
||||
apilib/largmath/octapi_largmath.o \
|
||||
apilib/llman/octapi_llman.o
|
||||
|
||||
|
||||
all: test
|
||||
|
||||
test.o: test.c
|
||||
|
||||
test: test.o $(OCTASIC_OBJS)
|
||||
|
||||
clean:
|
||||
rm -rf test test.o
|
||||
rm -rf $(OCTASIC_OBJS)
|
||||
1217
xpp/oct612x/apilib/bt/octapi_bt0.c
Normal file
1217
xpp/oct612x/apilib/bt/octapi_bt0.c
Normal file
File diff suppressed because it is too large
Load Diff
93
xpp/oct612x/apilib/bt/octapi_bt0_private.h
Normal file
93
xpp/oct612x/apilib/bt/octapi_bt0_private.h
Normal file
@@ -0,0 +1,93 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: octapi_bt0_private.h
|
||||
|
||||
Copyright (c) 2001 Octasic Inc. All rights reserved.
|
||||
|
||||
Description:
|
||||
|
||||
Library used to manage a binary tree of variable max size. Library is
|
||||
made to use one block of contiguous memory to manage the tree.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 11 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#ifndef __OCTAPI_BT0_PRIVATE_H__
|
||||
#define __OCTAPI_BT0_PRIVATE_H__
|
||||
|
||||
|
||||
|
||||
#include "octdef.h"
|
||||
|
||||
#define OCTAPI_BT0_LKEY_LARGER 0x0
|
||||
#define OCTAPI_BT0_LKEY_SMALLER 0x1
|
||||
#define OCTAPI_BT0_LKEY_EQUAL 0x2
|
||||
|
||||
typedef struct __OCTAPI_BT0_LINK__
|
||||
{
|
||||
UINT32 node_number;
|
||||
UINT32 depth;
|
||||
} OCTAPI_BT0_LINK;
|
||||
|
||||
typedef struct __OCTAPI_BT0_NODE__
|
||||
{
|
||||
UINT32 next_free_node; /* Number of the next node in the free node link-list.*/
|
||||
OCTAPI_BT0_LINK l[2]; /* 0 = left link; 1 = right link.*/
|
||||
} OCTAPI_BT0_NODE;
|
||||
|
||||
|
||||
typedef struct __OCTAPI_BT0__
|
||||
{
|
||||
UINT32 number_of_items; /* Number of items on total that can be allocated in the tree.*/
|
||||
UINT32 key_size; /* Size is in UINT32s*/
|
||||
UINT32 data_size; /* Size is in UINT32s*/
|
||||
|
||||
/* Empty node linked-list:*/
|
||||
UINT32 next_free_node; /* 0xFFFFFFFF means that no nodes are free.*/
|
||||
|
||||
/* Tree as such:*/
|
||||
OCTAPI_BT0_NODE * node; /* Array of nodes (number_of_items in size).*/
|
||||
|
||||
/* Tree root:*/
|
||||
OCTAPI_BT0_LINK root_link;
|
||||
|
||||
/* Associated key structure*/
|
||||
UINT32 * key; /* Array of keys associated to NODEs.*/
|
||||
|
||||
/* Associated data structure.*/
|
||||
UINT32 * data; /* Array of data associated to NODEs.*/
|
||||
|
||||
UINT32 invalid_value;
|
||||
UINT32 no_smaller_key;
|
||||
|
||||
} OCTAPI_BT0;
|
||||
|
||||
void OctApiBt0CorrectPointers( OCTAPI_BT0 * bb );
|
||||
UINT32 OctApiBt0AddNode2( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * link, UINT32 * lkey, UINT32 new_node_number );
|
||||
UINT32 OctApiBt0AddNode3( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * link, UINT32 * lkey, UINT32 *p_new_node_number );
|
||||
UINT32 OctApiBt0AddNode4(OCTAPI_BT0 * bb,OCTAPI_BT0_LINK * link,UINT32 * lkey,UINT32 *p_new_node_number, UINT32 *p_prev_node_number, UINT32 state );
|
||||
UINT32 OctApiBt0KeyCompare( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * link, UINT32 * lkey );
|
||||
void OctApiBt0UpdateLinkDepth( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * link );
|
||||
void OctApiBt0Rebalance( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * root_link );
|
||||
void OctApiBt0ExternalHeavy( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * root_link );
|
||||
UINT32 OctApiBt0RemoveNode2( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * link, UINT32 * lkey, OCTAPI_BT0_LINK * link_to_removed_node, UINT32 state, OCTAPI_BT0_LINK * volatile_grandparent_link );
|
||||
|
||||
|
||||
|
||||
#endif /*__OCTAPI_BT0_PRIVATE_H__*/
|
||||
628
xpp/oct612x/apilib/largmath/octapi_largmath.c
Normal file
628
xpp/oct612x/apilib/largmath/octapi_largmath.c
Normal file
@@ -0,0 +1,628 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: octapi_largmath.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
Library used to perform arithmetic on integer values of an integer multiple
|
||||
of 32-bits.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 10 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#include "apilib/octapi_largmath.h"
|
||||
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
| API UTILITIES
|
||||
|
|
||||
| Function: OctApiLmAdd.
|
||||
|
|
||||
| Description: This function adds 2 numbers, a and b. Number a is
|
||||
| (alen + 1) * 32 bits long; b is (blen + 1) * 32 bits long. The
|
||||
| result is (zlen + 1) * 32 bits long. It the function succeeds it returns
|
||||
| GENERIC_OK, else GENERIC_ERROR.
|
||||
|
|
||||
| -----------------------------------------------------------------------
|
||||
| | Variable | Type | Description
|
||||
| -----------------------------------------------------------------------
|
||||
| *a UINT32 The array containing the first number.
|
||||
| alen USHORT The length of array a, minus 1 (0 - 99).
|
||||
| *b UINT32 The array containing the second number.
|
||||
| blen USHORT The length of array b, minus 1 (0 - 99).
|
||||
| *z UINT32 The array containing the resulting number.
|
||||
| zlen USHORT The length of array z, minus 1 (0 - 99).
|
||||
|
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#if !SKIP_OctApiLmAdd
|
||||
UINT32 OctApiLmAdd(UINT32 * a,USHORT alen,UINT32 * b,USHORT blen,UINT32 * z, USHORT zlen)
|
||||
{
|
||||
USHORT i;
|
||||
UINT32 temp;
|
||||
UINT32 carry=0;
|
||||
UINT32 aprim;
|
||||
UINT32 bprim;
|
||||
|
||||
/* Check for array lengths.*/
|
||||
if (alen > zlen || blen > zlen) return(OCTAPI_LM_ARRAY_SIZE_MISMATCH);
|
||||
|
||||
for(i=0;i<=zlen;i++)
|
||||
{
|
||||
if (i <= alen) aprim = *(a+i); else aprim = 0;
|
||||
if (i <= blen) bprim = *(b+i); else bprim = 0;
|
||||
temp = aprim + bprim + carry;
|
||||
|
||||
/* Calculate carry for next time.*/
|
||||
if (carry == 0)
|
||||
if (temp < aprim) carry = 1; else carry = 0;
|
||||
else
|
||||
if (temp <= aprim) carry = 1; else carry = 0;
|
||||
|
||||
/* Write new value.*/
|
||||
*(z+i) = temp;
|
||||
}
|
||||
|
||||
/* Check for overflow.*/
|
||||
if (carry == 1) return(OCTAPI_LM_OVERFLOW);
|
||||
|
||||
/* All is well.*/
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
| API UTILITIES
|
||||
|
|
||||
| Function: OctApiLmSubtract.
|
||||
|
|
||||
| Description: This function subtracts 2 numbers, a and b. Number a is
|
||||
| (alen + 1) * 32 bits long; b is (blen + 1) * 32 bits long. The result
|
||||
| is (zlen + 1) * 32 bits long. It the function succeeds it returns
|
||||
| GENERIC_OK, else GENERIC_ERROR.
|
||||
|
|
||||
| -----------------------------------------------------------------------
|
||||
| | Variable | Type | Description
|
||||
| -----------------------------------------------------------------------
|
||||
| *a UINT32 The array containing the first number.
|
||||
| alen USHORT The length of array a, minus 1 (0 - 99).
|
||||
| *bneg UINT32 The array containing the second number.
|
||||
| blen USHORT The length of array b, minus 1 (0 - 99).
|
||||
| *z UINT32 The array containing the resulting number.
|
||||
| zlen USHORT The length of array z, minus 1 (0 - 99).
|
||||
| *neg USHORT Indicates if the result is negative
|
||||
| (TRUE/FALSE).
|
||||
|
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#if !SKIP_OctApiLmSubtract
|
||||
UINT32 OctApiLmSubtract(UINT32 * a,USHORT alen,UINT32 * bneg,USHORT blen,UINT32 * z,USHORT zlen,USHORT * neg)
|
||||
{
|
||||
USHORT i;
|
||||
UINT32 temp;
|
||||
UINT32 carry=1;
|
||||
UINT32 aprim;
|
||||
UINT32 bprim;
|
||||
|
||||
/* Check for array lengths.*/
|
||||
if (alen > zlen || blen > zlen) return(OCTAPI_LM_ARRAY_SIZE_MISMATCH);
|
||||
|
||||
for(i=0;i<=zlen;i++)
|
||||
{
|
||||
if (i <= alen) aprim = *(a+i); else aprim = 0;
|
||||
if (i <= blen) bprim = ~(*(bneg+i)); else bprim = 0xFFFFFFFF;
|
||||
temp = aprim + bprim + carry;
|
||||
|
||||
/* Calculate carry for next time.*/
|
||||
if (carry == 0)
|
||||
if (temp < aprim) carry = 1; else carry = 0;
|
||||
else
|
||||
if (temp <= aprim) carry = 1; else carry = 0;
|
||||
|
||||
/* Write new value.*/
|
||||
*(z+i) = temp;
|
||||
}
|
||||
|
||||
/* Check for overflow, which means negative number!*/
|
||||
if (carry == 0)
|
||||
{
|
||||
/* Number is not of right neg. Invert and add one to correct neg.*/
|
||||
for(i=0;i<=zlen;i++)
|
||||
*(z+i) = ~(*(z+i));
|
||||
|
||||
temp = 1;
|
||||
OctApiLmAdd(&temp,0,z,zlen,z,zlen);
|
||||
|
||||
*neg = TRUE;
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
|
||||
/* Result is positive.*/
|
||||
*neg = FALSE;
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
| API UTILITIES
|
||||
|
|
||||
| Function: OctApiLmCompare.
|
||||
|
|
||||
| Description: This function compares two numbers (arrays) of equal lengths.
|
||||
| Number a is (alen + 1) * 32 bits long; b is (blen + 1) * 32 bits long. The result
|
||||
|
|
||||
| -----------------------------------------------------------------------
|
||||
| | Variable | Type | Description
|
||||
| -----------------------------------------------------------------------
|
||||
| *a UINT32 The array containing the first number.
|
||||
| alen USHORT The length of array a, minus 1 (0 - 99).
|
||||
| *b UINT32 The array containing the second number.
|
||||
| blen USHORT The length of array b, minus 1 (0 - 99).
|
||||
| *neg USHORT Result of compare.
|
||||
|
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#if !SKIP_OctApiLmCompare
|
||||
UINT32 OctApiLmCompare(UINT32 * a,USHORT alen,UINT32 * bneg,USHORT blen,USHORT * neg)
|
||||
{
|
||||
USHORT i;
|
||||
UINT32 temp;
|
||||
UINT32 carry=1;
|
||||
UINT32 aprim;
|
||||
UINT32 bprim;
|
||||
UINT32 zlen;
|
||||
|
||||
/* Set zlen to alen or blen (which ever is longer)*/
|
||||
if (alen < blen)
|
||||
zlen = blen;
|
||||
else
|
||||
zlen = alen;
|
||||
|
||||
for(i=0;i<=zlen;i++)
|
||||
{
|
||||
if (i <= alen) aprim = *(a+i); else aprim = 0;
|
||||
if (i <= blen) bprim = ~(*(bneg+i)); else bprim = 0xFFFFFFFF;
|
||||
temp = aprim + bprim + carry;
|
||||
|
||||
/* Calculate carry for next time.*/
|
||||
if (carry == 0)
|
||||
if (temp < aprim) carry = 1; else carry = 0;
|
||||
else
|
||||
if (temp <= aprim) carry = 1; else carry = 0;
|
||||
}
|
||||
|
||||
/* Check for overflow, which means negative number!*/
|
||||
if (carry == 0)
|
||||
{
|
||||
*neg = TRUE;
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
|
||||
/* Result is positive.*/
|
||||
*neg = FALSE;
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
| API UTILITIES
|
||||
|
|
||||
| Function: OctApiLmSubtract.
|
||||
|
|
||||
| Description: This function multiplies 2 numbers, a and b. Number a and
|
||||
| b are both (ablen + 1) * 32 bits long. The result is twice as
|
||||
| long. If the functions succeeds if returns GENERIC_OK,
|
||||
| else GENERIC_ERROR.
|
||||
|
|
||||
| -----------------------------------------------------------------------
|
||||
| | Variable | Type | Description
|
||||
| -----------------------------------------------------------------------
|
||||
| *a UINT32 The array containing the first number.
|
||||
| *b UINT32 The array containing the second number.
|
||||
| ablen USHORT The length of arrays a and b, minus 1 (0 - 99).
|
||||
| *z UINT32 The array containing the resulting number.
|
||||
|
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#if !SKIP_OctApiLmMultiply
|
||||
UINT32 OctApiLmMultiply(UINT32 * a,UINT32 * b,USHORT ablen,UINT32 * z)
|
||||
{
|
||||
USHORT i,j,k;
|
||||
USHORT nos;
|
||||
UINT32 lownum;
|
||||
UINT32 highnum;
|
||||
USHORT longnumi;
|
||||
USHORT longnumj;
|
||||
USHORT indentw,indentl;
|
||||
|
||||
|
||||
/* Caculate number of shorts in a and b.*/
|
||||
nos = (USHORT)((ablen+1) * 2);
|
||||
|
||||
/* Clear answer word.*/
|
||||
for(i=0;i<nos;i++)
|
||||
*(z+i) = 0;
|
||||
|
||||
{
|
||||
USHORT optimizea, optimizeb;
|
||||
USHORT l;
|
||||
optimizea = TRUE;
|
||||
optimizeb = TRUE;
|
||||
for(l = 1; l < ablen+1; l++)
|
||||
{
|
||||
if(*(a+l) != 0)
|
||||
optimizea = FALSE;
|
||||
if(*(b+l) != 0)
|
||||
optimizeb = FALSE;
|
||||
}
|
||||
if(*a > OCTAPI_LM_MAX_OPTIMIZE_MUL)
|
||||
optimizea = FALSE;
|
||||
if(*b > OCTAPI_LM_MAX_OPTIMIZE_MUL)
|
||||
optimizeb = FALSE;
|
||||
|
||||
if(optimizea == TRUE)
|
||||
{
|
||||
for(l = 0; l < *a; l++)
|
||||
OctApiLmAdd(z, (USHORT)(nos-1), b, ablen, z, (USHORT)(nos-1));
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
|
||||
if(optimizeb == TRUE)
|
||||
{
|
||||
for(l = 0; l < *b; l++)
|
||||
OctApiLmAdd(z, (USHORT)(nos-1), a, ablen, z, (USHORT)(nos-1));
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
}
|
||||
|
||||
for(i=0;i<nos;i++)
|
||||
{
|
||||
longnumi = (USHORT)( i/2 );
|
||||
/* One iteration per short in a.*/
|
||||
if ((i%2) == 0)
|
||||
lownum = *(a+longnumi) & 0xFFFF; /* Even word. Lower part of long.*/
|
||||
else
|
||||
lownum = *(a+longnumi)>>16; /* Odd word. Upper part of long.*/
|
||||
|
||||
for(j=0;j<nos;j++)
|
||||
{
|
||||
UINT32 product;
|
||||
|
||||
longnumj = (USHORT)( j/2 );
|
||||
/* One iteration per short in a.*/
|
||||
if ((j%2) == 0)
|
||||
highnum = *(b+longnumj) & 0xFFFF; /* Even word. Lower part of long.*/
|
||||
else
|
||||
highnum = *(b+longnumj)>>16; /* Odd word. Upper part of long.*/
|
||||
|
||||
/* Find the word indent of the answer. 0 = no indent. 1 = one word indent.*/
|
||||
indentw = (USHORT)( j+i );
|
||||
indentl = (USHORT)( indentw / 2 );
|
||||
|
||||
/* Multiply both numbers.*/
|
||||
product = highnum * lownum;
|
||||
|
||||
/* After multiplying both numbers, add result to end result.*/
|
||||
if ((indentw % 2) == 0) /* Even word boundary, addition in one shot!*/
|
||||
{
|
||||
UINT32 carry=0;
|
||||
UINT32 temp;
|
||||
UINT32 addme;
|
||||
|
||||
for(k=indentl;k<nos;k++)
|
||||
{
|
||||
if (k==indentl) addme = product; else addme = 0;
|
||||
|
||||
temp = *(z+k) + addme + carry;
|
||||
|
||||
/* Calculate carry for next time.*/
|
||||
if (carry == 0)
|
||||
if (temp < addme) carry = 1; else carry = 0;
|
||||
else
|
||||
if (temp <= addme) carry = 1; else carry = 0;
|
||||
|
||||
/* Set value.*/
|
||||
*(z+k) = temp;
|
||||
}
|
||||
|
||||
/* Carry should always be 0.*/
|
||||
if (carry == 1) return(GENERIC_ERROR);
|
||||
}
|
||||
else /* Odd word boundary, addition in two shots.*/
|
||||
{
|
||||
UINT32 carry=0;
|
||||
UINT32 temp;
|
||||
UINT32 addme;
|
||||
|
||||
for(k=indentl;k<nos;k++)
|
||||
{
|
||||
if (k==indentl) addme = product<<16;
|
||||
else if (k==(indentl+1)) addme = product>>16;
|
||||
else addme = 0;
|
||||
|
||||
temp = *(z+k) + addme + carry;
|
||||
|
||||
/* Calculate carry for next time.*/
|
||||
if (carry == 0)
|
||||
if (temp < addme) carry = 1; else carry = 0;
|
||||
else
|
||||
if (temp <= addme) carry = 1; else carry = 0;
|
||||
|
||||
/* Set value.*/
|
||||
*(z+k) = temp;
|
||||
}
|
||||
|
||||
/* Carry should always be 0.*/
|
||||
if (carry == 1) return(GENERIC_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
| API UTILITIES
|
||||
|
|
||||
| Function: OctApiLmDivide.
|
||||
|
|
||||
| Description: This function divides the number n by the number d. The
|
||||
| quotient is placed in q and the remainder in r. The arrays
|
||||
| n, d, q and r are all of the same length, namely (ndqrlen + 1).
|
||||
| If the functions succeeds if returns GENERIC_OK, else
|
||||
| GENERIC_ERROR.
|
||||
|
|
||||
| -----------------------------------------------------------------------
|
||||
| | Variable | Type | Description
|
||||
| -----------------------------------------------------------------------
|
||||
| *a UINT32 The array containing the first number.
|
||||
| *b UINT32 The array containing the second number.
|
||||
| ablen USHORT The length of arrays a and b, minus 1 (0 - 99).
|
||||
| *z UINT32 The array containing the resulting number.
|
||||
|
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#if !SKIP_OctApiLmDivide
|
||||
UINT32 OctApiLmDivide(UINT32 * n,UINT32 * d,UINT32 * q,UINT32 * r,USHORT ndqrlen)
|
||||
{
|
||||
/* Proceedure for division:*/
|
||||
/* r = n*/
|
||||
/* q = 0*/
|
||||
/* shift = initial_denominator_shift (for upper '1's to be in same bit position).*/
|
||||
/* d <<= shift;*/
|
||||
/* Start loop:*/
|
||||
/* compare r and d*/
|
||||
/* if r > d then*/
|
||||
/* r -= d;*/
|
||||
/* write a '1' to bit "shift" of array q.*/
|
||||
/* end if;*/
|
||||
/* if shift == 0 then*/
|
||||
/* return;*/
|
||||
/* else*/
|
||||
/* shift--;*/
|
||||
/* d>>=1;*/
|
||||
/* goto "Start loop:"*/
|
||||
/* end if;*/
|
||||
|
||||
UINT32 i;
|
||||
UINT32 result;
|
||||
USHORT shift,n_msb,d_msb;
|
||||
USHORT neg;
|
||||
USHORT ConditionFlag = TRUE;
|
||||
|
||||
/* r = n*/
|
||||
for(i=0;i<=ndqrlen;i++)
|
||||
*(r+i) = *(n+i);
|
||||
|
||||
/* q = 0*/
|
||||
for(i=0;i<=ndqrlen;i++)
|
||||
*(q+i) = 0;
|
||||
|
||||
/* shift = initial_denominator_shift (for upper '1's to be in same bit position).*/
|
||||
result = OctApiLmGetMsb(d,ndqrlen,&d_msb);
|
||||
if (result != GENERIC_OK) return(result);
|
||||
|
||||
result = OctApiLmGetMsb(n,ndqrlen,&n_msb);
|
||||
if (result != GENERIC_OK) return(result);
|
||||
|
||||
if (d_msb == 0xFFFF) /* Division by 0.*/
|
||||
return(OCTAPI_LM_DIVISION_BY_ZERO);
|
||||
|
||||
if (n_msb == 0xFFFF) /* 0/n, returns 0 R 0.*/
|
||||
return(GENERIC_OK);
|
||||
|
||||
if (n_msb < d_msb) /* x/y, where x is smaller than y, returns 0 R x.*/
|
||||
return(GENERIC_OK);
|
||||
|
||||
shift = (USHORT)( n_msb - d_msb );
|
||||
|
||||
/* Shift d to match n highest bit position.*/
|
||||
result = OctApiLmShiftn(d,ndqrlen,TRUE,shift);
|
||||
if (result != GENERIC_OK) return(result);
|
||||
|
||||
/* Start loop:*/
|
||||
while( ConditionFlag == TRUE )
|
||||
{
|
||||
/* compare r and d*/
|
||||
result = OctApiLmCompare(r,ndqrlen,d,ndqrlen,&neg);
|
||||
if (result != GENERIC_OK) return(result);
|
||||
|
||||
if (neg == FALSE) /* Subtraction can be done(do it).*/
|
||||
{
|
||||
/* r -= d;*/
|
||||
result = OctApiLmSubtract(r,ndqrlen,d,ndqrlen,r,ndqrlen,&neg);
|
||||
if (result != GENERIC_OK) return(result);
|
||||
|
||||
/* write a '1' to bit "shift" of array q.*/
|
||||
*(q+(shift/32)) |= (UINT32)0x1 << (shift%32);
|
||||
}
|
||||
|
||||
/* if shift == 0 then*/
|
||||
/* return;*/
|
||||
if (shift == 0) return(GENERIC_OK);
|
||||
|
||||
/* shift--;*/
|
||||
/* d>>=1;*/
|
||||
/* goto "Start loop:"*/
|
||||
shift--;
|
||||
OctApiLmShiftRight1(d,ndqrlen);
|
||||
}
|
||||
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
| API UTILITIES
|
||||
|
|
||||
| Function: octapi_lm_shifright1.
|
||||
|
|
||||
| Description: The function is for internal use only.
|
||||
|
|
||||
| -----------------------------------------------------------------------
|
||||
| | Variable | Type | Description
|
||||
| -----------------------------------------------------------------------
|
||||
| N/A.
|
||||
|
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#if !SKIP_OctApiLmShiftRight1
|
||||
UINT32 OctApiLmShiftRight1(UINT32 * a,USHORT alen)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
/* Start with lower long and move up by one long each time,*/
|
||||
/* shifting each long to the right by one bit. The upper bit*/
|
||||
/* of the next long will have to be concatenated each time a*/
|
||||
/* loop is executed. For the last long, leave the highest bit*/
|
||||
/* intact.*/
|
||||
for(i=0;i<alen;i++)
|
||||
{
|
||||
*(a+i)>>=1; /* Shift long by one to the right.*/
|
||||
*(a+i)|=*(a+i+1)<<31;
|
||||
}
|
||||
*(a+alen)>>=1; /* Shift last long, leaving it's highest bit at 0.*/
|
||||
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
| API UTILITIES
|
||||
|
|
||||
| Function: OctApiLmShiftn.
|
||||
|
|
||||
| Description: The function is for internal use only.
|
||||
|
|
||||
| -----------------------------------------------------------------------
|
||||
| | Variable | Type | Description
|
||||
| -----------------------------------------------------------------------
|
||||
| N/A.
|
||||
|
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#if !SKIP_OctApiLmShiftn
|
||||
UINT32 OctApiLmShiftn(UINT32 * a,USHORT alen,USHORT shiftleft,USHORT shiftn)
|
||||
{
|
||||
UINT32 i;
|
||||
USHORT long_offset;
|
||||
USHORT bit_offset;
|
||||
|
||||
long_offset = (USHORT)( shiftn / 32 );
|
||||
bit_offset = (USHORT)( shiftn % 32 );
|
||||
|
||||
if (shiftleft == TRUE) /* Shift left.*/
|
||||
{
|
||||
for(i=alen;i<=alen;i--)
|
||||
{
|
||||
/* Fill upper bits of long.*/
|
||||
if (i >= long_offset)
|
||||
*(a+i) = *(a+i-long_offset) << bit_offset;
|
||||
else
|
||||
*(a+i) = 0;
|
||||
|
||||
/* Fill lower bits of long.*/
|
||||
if (i > long_offset && bit_offset != 0)
|
||||
*(a+i) |= *(a+i-long_offset-1) >> (32-bit_offset);
|
||||
}
|
||||
}
|
||||
else /* Shift right.*/
|
||||
{
|
||||
for(i=0;i<=alen;i++)
|
||||
{
|
||||
/* Fill lower bits of long.*/
|
||||
if ((alen-i) >= long_offset)
|
||||
*(a+i) = *(a+i+long_offset) >> bit_offset;
|
||||
else
|
||||
*(a+i) = 0;
|
||||
|
||||
/* Fill upper bits of long.*/
|
||||
if ((alen-i) > long_offset && bit_offset != 0)
|
||||
*(a+i) |= *(a+i+long_offset+1) << (32-bit_offset);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
| API UTILITIES
|
||||
|
|
||||
| Function: OctApiLmGetMsb.
|
||||
|
|
||||
| Description: The function is for internal use only.
|
||||
|
|
||||
| -----------------------------------------------------------------------
|
||||
| | Variable | Type | Description
|
||||
| -----------------------------------------------------------------------
|
||||
| N/A.
|
||||
|
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#if !SKIP_OctApiLmGetMsb
|
||||
UINT32 OctApiLmGetMsb(UINT32 * a,USHORT alen,USHORT * msb_pos)
|
||||
{
|
||||
UINT32 i,j;
|
||||
UINT32 x;
|
||||
|
||||
for(i=alen;i<=alen;i--)
|
||||
{
|
||||
if (*(a+i) == 0) continue;
|
||||
|
||||
x = *(a+i);
|
||||
for(j=31;j<=31;j--)
|
||||
{
|
||||
/* Test for bit being '1'.*/
|
||||
if ((x & 0x80000000) != 0)
|
||||
{
|
||||
*msb_pos=(USHORT)(j+(32*i));
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
|
||||
/* Shift bit one bit position, and try again.*/
|
||||
x<<=1;
|
||||
}
|
||||
}
|
||||
|
||||
/* MSB not found.*/
|
||||
*msb_pos = 0xFFFF;
|
||||
|
||||
return(GENERIC_OK);
|
||||
}
|
||||
#endif
|
||||
2787
xpp/oct612x/apilib/llman/octapi_llman.c
Normal file
2787
xpp/oct612x/apilib/llman/octapi_llman.c
Normal file
File diff suppressed because it is too large
Load Diff
206
xpp/oct612x/apilib/llman/octapi_llman_private.h
Normal file
206
xpp/oct612x/apilib/llman/octapi_llman_private.h
Normal file
@@ -0,0 +1,206 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: octapi_llman_private.h
|
||||
|
||||
Copyright (c) 2001 Octasic Inc. All rights reserved.
|
||||
|
||||
Description:
|
||||
|
||||
Library used to manage allocation tables and linked lists. The library is
|
||||
made such that only a block of contiguous memory is needed for the
|
||||
management of the linked list/allocation table.
|
||||
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 13 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#ifndef __OCTAPI_LLMAN_PRIVATE_H__
|
||||
#define __OCTAPI_LLMAN_PRIVATE_H__
|
||||
|
||||
#include "octdef.h"
|
||||
|
||||
|
||||
/**************************************** llm_alloc section **********************************************/
|
||||
|
||||
|
||||
/* Most basic linked list model.
|
||||
LLM_STR contains a list of "number_of_items" that
|
||||
are each "unassigned" or "assigned". When requesting
|
||||
a new element, llm_alloc must choose an "unassigned"
|
||||
element. An element that is deallocated will be last
|
||||
to be allocated.
|
||||
*/
|
||||
|
||||
typedef struct _LLM_ALLOC
|
||||
{
|
||||
UINT32 *linked_list; /* Each item is either used (0xFFFFFFFE)*/
|
||||
/* or unused (pointer to next unused item, 0xFFFFFFFF means last item reached).*/
|
||||
UINT32 next_avail_num; /* Points to the next available item in linked list. (0xFFFFFFFF means none available)*/
|
||||
UINT32 number_of_items; /* Total number of items in linked list.*/
|
||||
UINT32 allocated_items; /* Allocated items in linked list.*/
|
||||
|
||||
} LLM_ALLOC;
|
||||
|
||||
typedef struct _TLLM_ALLOC_NODE_
|
||||
{
|
||||
UINT32 value; /* Each item is either used (0xFFFFFFFE)*/
|
||||
/* or unused (pointer to next unused item, 0xFFFFFFFF means last item reached).*/
|
||||
UINT32 timeout[2]; /* Timeout value that must be exceeded for the node to be considered free again.*/
|
||||
|
||||
} TLLM_ALLOC_NODE;
|
||||
|
||||
|
||||
typedef struct _TLLM_ALLOC_
|
||||
{
|
||||
TLLM_ALLOC_NODE *linked_list; /* List of nodes used by the link list.*/
|
||||
|
||||
UINT32 next_avail_num; /* Points to the next available item in linked list. (0xFFFFFFFF means none available)*/
|
||||
UINT32 number_of_items; /* Total number of items in linked list.*/
|
||||
UINT32 allocated_items; /* Allocated items in linked list.*/
|
||||
|
||||
UINT32 number_of_timeout; /* Number of block currently in timeout.*/
|
||||
UINT32 next_timeout_num; /* Points to the next block currently in timeout.*/
|
||||
UINT32 last_timeout_num; /* Last node of the timeout list.*/
|
||||
|
||||
UINT32 last_known_time[2]; /* last known time.*/
|
||||
|
||||
} TLLM_ALLOC;
|
||||
|
||||
/*
|
||||
void octapi_llm_alloc_build_structure(void *l, LLM_ALLOC ** ls);
|
||||
*/
|
||||
/**************************************** llm_alloc section **********************************************/
|
||||
|
||||
|
||||
|
||||
/**************************************** llm_list section **********************************************/
|
||||
/* This section contains memory structures and functions used
|
||||
to maintain a variable number of lists (FIFOs) that each
|
||||
have a variable amount of items. A total amount of items
|
||||
can be assigned through-out all the lists. Each item in
|
||||
each list contains a UINT32 specified by the software using
|
||||
the lists. Each used item in the list is accessible through
|
||||
it's position in the list. */
|
||||
|
||||
typedef struct _LLM_LIST_HEAD
|
||||
{
|
||||
UINT32 list_length; /* Current number of items in the list.*/
|
||||
/* 0xFFFFFFFF means that the list is not used.*/
|
||||
UINT32 head_pointer; /* Number of the item in the item pool that is the first of this list.*/
|
||||
/* 0xFFFFFFFF indicates end-of-list link.*/
|
||||
UINT32 tail_pointer; /* Number of the item in the item pool that is the last of this list.*/
|
||||
|
||||
/* Item cache (pointer within the list of the last accessed item):*/
|
||||
UINT32 cache_item_number; /* Number of the last accessed item in the list. 0xFFFFFFFF indicates invalid cache.*/
|
||||
UINT32 cache_item_pointer; /* Number of the last accessed item in the item pool.*/
|
||||
} LLM_LIST_HEAD;
|
||||
|
||||
typedef struct _LLM_LIST_ITEM
|
||||
{
|
||||
UINT32 forward_link; /* Number of the item in the item pool that is next in this list.*/
|
||||
/* 0xFFFFFFFF indicates end-of-list link.*/
|
||||
|
||||
/* User item info (variable size)*/
|
||||
UINT32 user_info[1];
|
||||
} LLM_LIST_ITEM;
|
||||
|
||||
typedef struct _LLM_LIST
|
||||
{
|
||||
UINT32 user_info_bytes; /* In bytes, size of the user info in a single item.*/
|
||||
UINT32 user_info_size; /* In bytes, size of the user info in a single item.*/
|
||||
UINT32 item_size;
|
||||
|
||||
UINT32 head_alloc_size;
|
||||
UINT32 total_items;
|
||||
UINT32 assigned_items;
|
||||
|
||||
UINT32 total_lists;
|
||||
UINT32 assigned_lists;
|
||||
|
||||
UINT32 next_empty_item; /* Contains a pointer to the next empty item in the*/
|
||||
/* item pool.*/
|
||||
|
||||
/* Table of all the possible list heads:*/
|
||||
LLM_LIST_HEAD * lh;
|
||||
void * list_head_alloc; /* LLM_ALLOC structure used for list head allocation!*/
|
||||
|
||||
/* Table of the list items:*/
|
||||
LLM_LIST_ITEM * li;
|
||||
} LLM_LIST;
|
||||
|
||||
|
||||
/**********************************************************************************/
|
||||
/* These structures are are used by the Llm2 functions to creates lists of ordered
|
||||
items based on a key given by the user when a new node is inserted in a list. */
|
||||
typedef struct _LLM2_LIST_HEAD
|
||||
{
|
||||
UINT32 list_length; /* Current number of items in the list.*/
|
||||
/* 0xFFFFFFFF means that the list is not used.*/
|
||||
UINT32 head_pointer; /* Number of the item in the item pool that is the first of this list.*/
|
||||
/* 0xFFFFFFFF indicates end-of-list link.*/
|
||||
UINT32 tail_pointer; /* Number of the item in the item pool that is the last of this list.*/
|
||||
|
||||
} LLM2_LIST_HEAD;
|
||||
|
||||
typedef struct _LLM2_LIST_ITEM
|
||||
{
|
||||
UINT32 forward_link; /* Number of the item in the item pool that is next in this list.*/
|
||||
/* 0xFFFFFFFF indicates end-of-list link.*/
|
||||
UINT32 key; /* Key used to order the entries.*/
|
||||
|
||||
/* User item info (variable size)*/
|
||||
UINT32 user_info[1];
|
||||
} LLM2_LIST_ITEM;
|
||||
|
||||
typedef struct _LLM2_LIST
|
||||
{
|
||||
UINT32 user_info_bytes; /* In bytes, size of the user info in a single item.*/
|
||||
UINT32 user_info_size; /* In bytes, size of the user info in a single item.*/
|
||||
UINT32 item_size;
|
||||
|
||||
UINT32 head_alloc_size;
|
||||
UINT32 total_items;
|
||||
UINT32 assigned_items;
|
||||
|
||||
UINT32 total_lists;
|
||||
UINT32 assigned_lists;
|
||||
|
||||
UINT32 next_empty_item; /* Contains a pointer to the next empty item in the*/
|
||||
/* item pool.*/
|
||||
|
||||
/* Table of all the possible list heads:*/
|
||||
LLM2_LIST_HEAD * lh;
|
||||
void * list_head_alloc; /* LLM_ALLOC structure used for list head allocation!*/
|
||||
|
||||
/* Table of the list items:*/
|
||||
LLM2_LIST_ITEM * li;
|
||||
} LLM2_LIST;
|
||||
|
||||
/*void octapi_llm_list_build_structure(void *l, LLM_LIST ** ls);*/
|
||||
LLM_LIST_ITEM * OctApiLlmListGetItemPointer( LLM_LIST * ls, UINT32 item_number );
|
||||
LLM2_LIST_ITEM * OctApiLlm2ListGetItemPointer( LLM2_LIST * ls, UINT32 item_number );
|
||||
UINT32 OctApiTllmCheckTimeoutList( TLLM_ALLOC *ls, UINT32 current_time[2] );
|
||||
VOID * OctApiLlmMemCpy( VOID *f_pvDestination, const VOID * f_pvSource, UINT32 f_ulSize );
|
||||
/**************************************** llm_list section **********************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /*__OCTAPI_LLMAN_PRIVATE_H__*/
|
||||
51
xpp/oct612x/get_discards
Executable file
51
xpp/oct612x/get_discards
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/php
|
||||
|
||||
<?php
|
||||
/*
|
||||
* Written by Jared Smith and Kevin P. Fleming
|
||||
*
|
||||
* Copyright (C) 2006, Jared Smith and Digium, Inc.
|
||||
*
|
||||
*/
|
||||
|
||||
# create an array of all the different prefixes you want to match on,
|
||||
# as Perl-compatible regular expressions
|
||||
# (yes, this is a stupid example, as the second one is just a simplified
|
||||
# version of the first, but it's just an example)
|
||||
$prefixes = array('\.text\.Oct');
|
||||
|
||||
$fp = fopen('test.map','r');
|
||||
|
||||
while (!feof($fp))
|
||||
{
|
||||
# Loop until we find the top of section we want
|
||||
while ($line = fgets($fp))
|
||||
{
|
||||
if (preg_match('/Discarded input sections/i',$line))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
# Now loop until we find the next section
|
||||
while ($line = fgets($fp))
|
||||
{
|
||||
if (preg_match('/Memory Configuration/i',$line))
|
||||
{
|
||||
# we found it!
|
||||
break;
|
||||
}
|
||||
foreach ($prefixes as $prefix)
|
||||
{
|
||||
if (preg_match("/$prefix/i",$line))
|
||||
{
|
||||
preg_match("/Oct.*/", $line, $matches);
|
||||
$line2 = fgets($fp);
|
||||
echo "#define SKIP_".$matches[0]." 1\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose($fp);
|
||||
?>
|
||||
75
xpp/oct612x/include/apilib/octapi_bt0.h
Normal file
75
xpp/oct612x/include/apilib/octapi_bt0.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: octapi_bt0.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
Library used to manage a binary tree of variable max size. Library is
|
||||
made to use one block of contiguous memory to manage the tree.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 11 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#ifndef __OCTAPI_BT0_H__
|
||||
#define __OCTAPI_BT0_H__
|
||||
|
||||
#include "octdef.h"
|
||||
|
||||
#define OCTAPI_BT0_BASE 0xFFFF0000
|
||||
#define OCTAPI_BT0_KEY_SIZE_NOT_MUTLIPLE_OF_UINT32 OCTAPI_BT0_BASE+0x0001
|
||||
#define OCTAPI_BT0_DATA_SIZE_NOT_MUTLIPLE_OF_UINT32 OCTAPI_BT0_BASE+0x0002
|
||||
#define OCTAPI_BT0_MALLOC_FAILED OCTAPI_BT0_BASE+0x0003
|
||||
#define OCTAPI_BT0_NO_NODES_AVAILABLE OCTAPI_BT0_BASE+0x0004
|
||||
#define OCTAPI_BT0_KEY_ALREADY_IN_TREE OCTAPI_BT0_BASE+0x0005
|
||||
#define OCTAPI_BT0_KEY_NOT_IN_TREE OCTAPI_BT0_BASE+0x0006
|
||||
|
||||
/* Possible result for Find Or Add function. */
|
||||
#define OCTAPI0_BT0_NODE_FOUND 0
|
||||
#define OCTAPI0_BT0_NODE_ADDDED 1
|
||||
|
||||
#define OCTAPI_BT0_NO_SMALLER_KEY 0xAAAAAAAA
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define octapi_bt0_get_size( number_of_items, key_size, data_size, b_size ) OctApiBt0GetSize( (UINT32) number_of_items,(UINT32) key_size, (UINT32) data_size, (PUINT32) b_size )
|
||||
#define octapi_bt0_init( b, number_of_items, key_size, data_size ) OctApiBt0Init( (void **) b,(UINT32) number_of_items,(UINT32) key_size, (UINT32) data_size )
|
||||
#define octapi_bt0_add_node( b, key, data ) OctApiBt0AddNode( (void *) b,(void *) key,(void **) data )
|
||||
#define octapi_bt0_remove_node( b, key ) OctApiBt0RemoveNode( (void *) b,(void *) key )
|
||||
#define octapi_bt0_query_node( b, key, data ) OctApiBt0QueryNode( (void *) b,(void *) key,(void **) data )
|
||||
#define octapi_bt0_get_first_node( b, key, data ) OctApiBt0GetFirstNode( (void *) b,(void **) key, (void **) data )
|
||||
|
||||
UINT32 OctApiBt0GetSize( UINT32 number_of_items, UINT32 key_size, UINT32 data_size, UINT32 * b_size );
|
||||
UINT32 OctApiBt0Init( void ** b, UINT32 number_of_items, UINT32 key_size, UINT32 data_size );
|
||||
UINT32 OctApiBt0AddNode( void * b, void * key, void ** data );
|
||||
UINT32 OctApiBt0RemoveNode( void * b, void * key );
|
||||
UINT32 OctApiBt0QueryNode( void * b, void * key, void ** data );
|
||||
UINT32 OctApiBt0GetFirstNode( void * b, void ** key, void ** data );
|
||||
UINT32 OctApiBt0FindOrAddNode( void * b, void * key, void ** data, UINT32 *fnct_result );
|
||||
|
||||
UINT32 OctApiBt0AddNodeReportPrevNodeData( void * b, void * key, void ** data, void ** prev_data, UINT32 *fnct_result );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /*__OCTAPI_BT0_H__*/
|
||||
69
xpp/oct612x/include/apilib/octapi_largmath.h
Normal file
69
xpp/oct612x/include/apilib/octapi_largmath.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: octapi_largmath.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
Library used to perform arithmetic on integer values of an integer multiple
|
||||
of 32-bits.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 6 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#ifndef __OCTAPI_LARGMATH_H__
|
||||
#define __OCTAPI_LARGMATH_H__
|
||||
|
||||
#include "octdef.h"
|
||||
|
||||
#define OCTAPI_LM_DIVISION_BY_ZERO 0xFFFF
|
||||
#define OCTAPI_LM_OVERFLOW 0xFFFE
|
||||
#define OCTAPI_LM_ARRAY_SIZE_MISMATCH 0xFFFD
|
||||
|
||||
#define OCTAPI_LM_MAX_OPTIMIZE_MUL 10
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define octapi_lm_add( a, alen, b, blen, z, zlen ) OctApiLmAdd( (PUINT32) a, (USHORT) alen, (PUINT32) b, (USHORT) blen, (PUINT32) z, (USHORT) zlen )
|
||||
#define octapi_lm_subtract( a, alen, bneg, blen, z, zlen, neg ) OctApiLmSubtract( (PUINT32) a, (USHORT) alen, (PUINT32) bneg, (USHORT) blen, (PUINT32) z, (USHORT) zlen, (USHORT*) neg )
|
||||
#define octapi_lm_compare( a, alen, bneg, blen, neg ) OctApiLmCompare( (PUINT32) a, (USHORT) alen, (PUINT32) bneg, (USHORT) blen, (USHORT*) neg )
|
||||
#define octapi_lm_multiply( a, b, ablen, z ) OctApiLmMultiply( (PUINT32) a, (PUINT32) b, (USHORT) ablen, (PUINT32) z )
|
||||
#define octapi_lm_divide( n, d, q, r, ndqrlen ) OctApiLmDivide( (PUINT32) n, (PUINT32) d, (PUINT32) q, (PUINT32) r, (USHORT) ndqrlen )
|
||||
#define octapi_lm_shiftright1( a, alen ) OctApiLmShiftRight1( (PUINT32) a, (USHORT) alen )
|
||||
#define octapi_lm_shiftn( a, alen, shiftleft, shiftn ) OctApiLmShiftn( (PUINT32) a, (USHORT) alen, (USHORT) shiftleft, (USHORT) shiftn )
|
||||
#define octapi_lm_getmsb( a, alen, msb_pos ) OctApiLmGetMsb( (PUINT32) a, (USHORT) alen, (USHORT*) msb_pos )
|
||||
|
||||
|
||||
UINT32 OctApiLmAdd( PUINT32 a, USHORT alen, PUINT32 b, USHORT blen, PUINT32 z, USHORT zlen );
|
||||
UINT32 OctApiLmSubtract( PUINT32 a, USHORT alen, PUINT32 bneg, USHORT blen, PUINT32 z, USHORT zlen, PUSHORT neg );
|
||||
UINT32 OctApiLmCompare( PUINT32 a, USHORT alen, PUINT32 bneg, USHORT blen, PUSHORT neg );
|
||||
UINT32 OctApiLmMultiply( PUINT32 a, PUINT32 b, USHORT ablen, PUINT32 z );
|
||||
UINT32 OctApiLmDivide( PUINT32 n, PUINT32 d, PUINT32 q, PUINT32 r, USHORT ndqrlen );
|
||||
UINT32 OctApiLmShiftRight1( PUINT32 a, USHORT alen );
|
||||
UINT32 OctApiLmShiftn( PUINT32 a, USHORT alen, USHORT shiftleft, USHORT shiftn );
|
||||
UINT32 OctApiLmGetMsb( PUINT32 a, USHORT alen, PUSHORT msb_pos );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __OCTAPI_LARGMATH_H__ */
|
||||
142
xpp/oct612x/include/apilib/octapi_llman.h
Normal file
142
xpp/oct612x/include/apilib/octapi_llman.h
Normal file
@@ -0,0 +1,142 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: octapi_llman.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
Library used to manage allocation tables and linked lists. The library is
|
||||
made such that only a block of contiguous memory is needed for the
|
||||
management of the linked list/allocation table.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 8 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#ifndef __OCTAPI_LLMAN_H__
|
||||
#define __OCTAPI_LLMAN_H__
|
||||
|
||||
#include "octdef.h"
|
||||
|
||||
/* Error defines. */
|
||||
#define OCTAPI_LLM_MEMORY_NOT_ALLOCATED 0xFFFFFFFF
|
||||
#define OCTAPI_LLM_NO_STRUCTURES_LEFT 0xFFFFFFFE
|
||||
#define OCTAPI_LLM_BLOCKNUM_OUT_OF_RANGE 0xFFFFFFFD
|
||||
#define OCTAPI_LLM_ELEMENT_ALREADY_ASSIGNED 0xFFFFFFFC
|
||||
#define OCTAPI_LLM_ELEMENT_NOT_FOUND 0xFFFFFFFB
|
||||
#define OCTAPI_LLM_LIST_EMPTY 0xFFFFFFFA
|
||||
#define OCTAPI_LLM_INVALID_LIST_HANDLE 0xFFFFFFF9
|
||||
#define OCTAPI_LLM_TREE_NODE_ABSENT 0xFFFFFFF8
|
||||
#define OCTAPI_LLM_INTERNAL_ERROR0 0xFFFFFFF7
|
||||
#define OCTAPI_LLM_INTERNAL_ERROR1 0xFFFFFFF6
|
||||
#define OCTAPI_LLM_INVALID_PARAMETER 0xFFFFFFF5
|
||||
|
||||
#define OCTAPI_LLM2_MEMORY_NOT_ALLOCATED 0xFEFFFFFF
|
||||
#define OCTAPI_LLM2_NO_STRUCTURES_LEFT 0xFEFFFFFE
|
||||
#define OCTAPI_LLM2_BLOCKNUM_OUT_OF_RANGE 0xFEFFFFFD
|
||||
#define OCTAPI_LLM2_ELEMENT_ALREADY_ASSIGNED 0xFEFFFFFC
|
||||
#define OCTAPI_LLM2_ELEMENT_NOT_FOUND 0xFEFFFFFB
|
||||
#define OCTAPI_LLM2_LIST_EMPTY 0xFEFFFFFA
|
||||
#define OCTAPI_LLM2_INVALID_LIST_HANDLE 0xFEFFFFF9
|
||||
#define OCTAPI_LLM2_TREE_NODE_ABSENT 0xFEFFFFF8
|
||||
#define OCTAPI_LLM2_INTERNAL_ERROR0 0xFEFFFFF7
|
||||
#define OCTAPI_LLM2_INTERNAL_ERROR1 0xFEFFFFF6
|
||||
#define OCTAPI_LLM2_INVALID_PARAMETER 0xFEFFFFF5
|
||||
|
||||
/* Other defines. */
|
||||
#define OCTAPI_LLM_LIST_APPEND 0xFFFFFFFF
|
||||
#define OCTAPI_LLM2_INSERT_ERROR 0xFFFFFFFF
|
||||
#define OCTAPI_LLM2_INSERT_FIRST_NODE 0xFFFF0000
|
||||
#define OCTAPI_LLM2_INSERT_LIST_NODE 0xFFFF0001
|
||||
#define OCTAPI_LLM2_INSERT_LAST_NODE 0xFFFF0002
|
||||
#define OCTAPI_LLM2_INSERT_BEFORE_LAST_NODE 0xFFFF0003
|
||||
#define OCTAPI_LLM2_REMOVE_ERROR 0xFFFFFFFF
|
||||
#define OCTAPI_LLM2_REMOVE_FIRST_NODE 0xFFFF0004
|
||||
#define OCTAPI_LLM2_REMOVE_LIST_NODE 0xFFFF0005
|
||||
#define OCTAPI_LLM2_REMOVE_LAST_NODE 0xFFFF0006
|
||||
#define OCTAPI_LLM2_REMOVE_BEFORE_LAST_NODE 0xFFFF0007
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define octapi_llm_alloc_get_size( number_of_items, l_size ) OctapiLlmAllocGetSize( (UINT32) number_of_items,(PUINT32) l_size )
|
||||
#define octapi_llm_alloc_init( l, number_of_items ) OctapiLlmAllocInit( (PVOID*) l,(UINT32) number_of_items )
|
||||
#define octapi_llm_alloc_info( l, allocated_items, available_items ) OctapiLlmAllocInfo( (PVOID) l, (PUINT32) allocated_items, (PUINT32) available_items )
|
||||
#define octapi_llm_alloc_alloc( l, blocknum ) OctapiLlmAllocAlloc( (PVOID) l, (PUINT32) blocknum )
|
||||
#define octapi_llm_alloc_dealloc( l, blocknum ) OctapiLlmAllocDealloc( (PVOID) l,(UINT32) blocknum )
|
||||
#define octapi_llm_list_get_size( number_of_items, number_of_lists, user_info_size, l_size ) OctApiLlmListGetSize( (UINT32) number_of_items,(UINT32) number_of_lists,(UINT32) user_info_size,(PUINT32) l_size )
|
||||
#define octapi_llm_list_init( l, number_of_items, number_of_lists, user_info_size ) OctApiLlmListInit( (PVOID*) l,(UINT32) number_of_items,(UINT32) number_of_lists,(UINT32) user_info_size )
|
||||
#define octapi_llm_list_info( l, allocated_lists, allocated_items, free_lists, free_items ) OctApiLlmListInfo( (PVOID) l,(PUINT32) allocated_lists,(PUINT32) allocated_items,(PUINT32) free_lists,(PUINT32) free_items )
|
||||
#define octapi_llm_list_create( l, list_handle ) OctApiLlmListCreate( (PVOID) l,(PUINT32) list_handle )
|
||||
#define octapi_llm_list_create_full( l, list_length, plist_handle ) OctApiLlmListCreateFull( (PVOID) l, (UINT32) list_length, (PUINT32) plist_handle )
|
||||
#define octapi_llm_list_append_items( l, list_handle, num_items ) OctApiLlmListAppendItems( (PVOID) l, (UINT32) list_handle, (UINT32) num_items )
|
||||
#define octapi_llm_list_append_and_set_items( l, list_handle, num_items, data_list ) OctApiLlmListAppendAndSetItems( (PVOID) l, (UINT32) list_handle, (UINT32) num_items, (PVOID) data_list )
|
||||
#define octapi_llm_list_delete( l, list_handle ) OctApiLlmListDelete( (PVOID) l,(UINT32) list_handle )
|
||||
#define octapi_llm_list_length( l, list_handle, number_of_items_in_list ) OctApiLlmListLength( (PVOID) l,(UINT32) list_handle, (PUINT32) number_of_items_in_list )
|
||||
#define octapi_llm_list_insert_item( l, list_handle, item_number, item_data_pnt ) OctApiLlmListInsertItem( (PVOID) l,(UINT32) list_handle,(UINT32) item_number,(PVOID*) item_data_pnt )
|
||||
#define octapi_llm_list_remove_item( l, list_handle, item_number ) OctApiLlmListRemoveItem( (PVOID) l,(UINT32) list_handle,(UINT32) item_number )
|
||||
#define octapi_llm_list_item_data( l, list_handle, item_number, item_data_pnt ) OctApiLlmListItemData( (PVOID) l,(UINT32) list_handle,(UINT32) item_number,(PVOID*) item_data_pnt )
|
||||
#define octapi_llm_list_copy_data( l, list_handle, start_item, data_length, pdata_list ) OctApiLlmListCopyData( (PVOID) l, (UINT32) list_handle, (UINT32) start_item, (UINT32) data_length, (PVOID) pdata_list )
|
||||
#define octapi_llm_list_set_items( l, list_handle, start_item, data_length, pdata_list ) OctApiLlmListSetItems( (PVOID) l, (UINT32) list_handle, (UINT32) start_item, (UINT32) data_length, (PVOID) pdata_list )
|
||||
|
||||
/* Alloc man. */
|
||||
UINT32 OctapiLlmAllocGetSize( UINT32 number_of_items,PUINT32 l_size );
|
||||
UINT32 OctapiLlmAllocInit( PVOID* l,UINT32 number_of_items );
|
||||
UINT32 OctapiLlmAllocInfo( PVOID l, PUINT32 allocated_items, PUINT32 available_items );
|
||||
UINT32 OctapiLlmAllocAlloc( PVOID l, PUINT32 blocknum );
|
||||
UINT32 OctapiLlmAllocDealloc( PVOID l,UINT32 blocknum );
|
||||
|
||||
/* Time managed alloc man. */
|
||||
UINT32 OctApiTllmAllocGetSize( UINT32 number_of_items, PUINT32 l_size );
|
||||
UINT32 OctApiTllmAllocInit( PVOID* l, UINT32 number_of_items );
|
||||
UINT32 OctApiTllmAllocInfo( PVOID l, PUINT32 allocated_items, PUINT32 available_items );
|
||||
UINT32 OctApiTllmAllocAlloc( PVOID l, PUINT32 blocknum, UINT32 current_time[2] );
|
||||
UINT32 OctApiTllmAllocDealloc( PVOID l, UINT32 blocknum, UINT32 timeout_value, UINT32 current_time[2] );
|
||||
|
||||
/* List man. */
|
||||
UINT32 OctApiLlmListGetSize( UINT32 number_of_items, UINT32 number_of_lists, UINT32 user_info_size, PUINT32 l_size );
|
||||
UINT32 OctApiLlmListInit( PVOID* l, UINT32 number_of_items, UINT32 number_of_lists, UINT32 user_info_size );
|
||||
UINT32 OctApiLlmListInfo( PVOID l, PUINT32 allocated_lists, PUINT32 allocated_items, PUINT32 free_lists, PUINT32 free_items );
|
||||
UINT32 OctApiLlmListCreate( PVOID l, PUINT32 list_handle );
|
||||
UINT32 OctApiLlmListCreateFull( PVOID l, UINT32 list_length, UINT32* plist_handle );
|
||||
UINT32 OctApiLlmListAppendItems( PVOID l, UINT32 list_handle, UINT32 num_items );
|
||||
UINT32 OctApiLlmListAppendAndSetItems( PVOID l, UINT32 list_handle, UINT32 num_items, PVOID data_list );
|
||||
UINT32 OctApiLlmListDelete( PVOID l, UINT32 list_handle );
|
||||
UINT32 OctApiLlmListLength( PVOID l, UINT32 list_handle, PUINT32 number_of_items_in_list );
|
||||
UINT32 OctApiLlmListInsertItem( PVOID l, UINT32 list_handle, UINT32 item_number, PVOID* item_data_pnt );
|
||||
UINT32 OctApiLlmListRemoveItem( PVOID l, UINT32 list_handle, UINT32 item_number );
|
||||
UINT32 OctApiLlmListItemData( PVOID l, UINT32 list_handle, UINT32 item_number, PVOID* item_data_pnt );
|
||||
UINT32 OctApiLlmListCopyData( PVOID l, UINT32 list_handle, UINT32 start_item, UINT32 data_length, PVOID pdata_list );
|
||||
UINT32 OctApiLlmListSetItems( PVOID l, UINT32 list_handle, UINT32 start_item, UINT32 data_length, PVOID pdata_list );
|
||||
|
||||
/* Second list manager using a key to order info in the list. */
|
||||
UINT32 OctApiLlm2ListGetSize( UINT32 number_of_items, UINT32 number_of_lists, UINT32 user_info_size, PUINT32 l_size );
|
||||
UINT32 OctApiLlm2ListInit( PVOID* l,UINT32 number_of_items, UINT32 number_of_lists, UINT32 user_info_size );
|
||||
UINT32 OctApiLlm2ListCreate( PVOID l, PUINT32 list_handle );
|
||||
UINT32 OctApiLlm2ListLength( PVOID l, UINT32 list_handle, PUINT32 number_of_items_in_list );
|
||||
UINT32 OctApiLlm2ListInsertItem(void * l, UINT32 list_handle, UINT32 item_key, void ** item_data_pnt, void ** prev_item_data_pnt, void ** prev_prev_item_data_pnt, PUINT32 insert_status_pnt );
|
||||
UINT32 OctApiLlm2ListRemoveItem(void * l, UINT32 list_handle, UINT32 item_key, PUINT32 prev_item_key_pnt, PUINT32 prev_prev_item_key_pnt, PUINT32 remove_status_pnt );
|
||||
UINT32 OctApiLlm2ListItemData( PVOID l, UINT32 list_handle, UINT32 item_key, PVOID* item_data_pnt, PUINT32 item_number );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __OCTAPI_LLMAN_H__ */
|
||||
297
xpp/oct612x/include/digium_unused.h
Normal file
297
xpp/oct612x/include/digium_unused.h
Normal file
@@ -0,0 +1,297 @@
|
||||
/* Define macros here to suppress functions from the API being built */
|
||||
|
||||
#if 1
|
||||
|
||||
#define SKIP_Oct6100AdpcmChanOpenDef 1
|
||||
#define SKIP_Oct6100AdpcmChanOpen 1
|
||||
#define SKIP_Oct6100AdpcmChanCloseDef 1
|
||||
#define SKIP_Oct6100AdpcmChanClose 1
|
||||
#define SKIP_Oct6100AdpcmChanOpenSer 1
|
||||
#define SKIP_Oct6100ApiCheckAdpcmChanParams 1
|
||||
#define SKIP_Oct6100ApiReserveAdpcmChanResources 1
|
||||
#define SKIP_Oct6100ApiWriteAdpcmChanStructs 1
|
||||
#define SKIP_Oct6100ApiUpdateAdpcmChanEntry 1
|
||||
#define SKIP_Oct6100AdpcmChanCloseSer 1
|
||||
#define SKIP_Oct6100ApiAssertAdpcmChanParams 1
|
||||
#define SKIP_Oct6100ApiInvalidateAdpcmChanStructs 1
|
||||
#define SKIP_Oct6100ApiReleaseAdpcmChanResources 1
|
||||
#define SKIP_Oct6100ApiReserveAdpcmChanEntry 1
|
||||
#define SKIP_Oct6100ApiReleaseAdpcmChanEntry 1
|
||||
#define SKIP_Oct6100ChannelCloseDef 1
|
||||
#define SKIP_Oct6100ChannelClose 1
|
||||
#define SKIP_Oct6100ChannelCreateBiDirDef 1
|
||||
#define SKIP_Oct6100ChannelCreateBiDir 1
|
||||
#define SKIP_Oct6100ChannelDestroyBiDirDef 1
|
||||
#define SKIP_Oct6100ChannelDestroyBiDir 1
|
||||
#define SKIP_Oct6100ChannelBroadcastTsstAddDef 1
|
||||
#define SKIP_Oct6100ChannelBroadcastTsstAdd 1
|
||||
#define SKIP_Oct6100ChannelBroadcastTsstRemove 1
|
||||
#define SKIP_Oct6100ChannelGetStatsDef 1
|
||||
#define SKIP_Oct6100ChannelGetStats 1
|
||||
#define SKIP_Oct6100ChannelMuteDef 1
|
||||
#define SKIP_Oct6100ChannelMute 1
|
||||
#define SKIP_Oct6100ChannelUnMuteDef 1
|
||||
#define SKIP_Oct6100ChannelUnMute 1
|
||||
#define SKIP_Oct6100ChannelCloseSer 1
|
||||
#define SKIP_Oct6100ApiAssertChannelParams 1
|
||||
#define SKIP_Oct6100ApiInvalidateChannelStructs 1
|
||||
#define SKIP_Oct6100ApiReleaseChannelResources 1
|
||||
#define SKIP_Oct6100ChannelBroadcastTsstAddSer 1
|
||||
#define SKIP_Oct6100ApiCheckChanTsstAddParams 1
|
||||
#define SKIP_Oct6100ApiReserveTsstAddResources 1
|
||||
#define SKIP_Oct6100ApiWriteTsstAddStructs 1
|
||||
#define SKIP_Oct6100ApiUpdateTsstAddChanEntry 1
|
||||
#define SKIP_Oct6100ApiChannelGetStatsSer 1
|
||||
#define SKIP_Oct6100ApiReserveBiDirChanEntry 1
|
||||
#define SKIP_Oct6100ApiReleaseBiDirChanEntry 1
|
||||
#define SKIP_Oct6100ApiRetrieveNlpConfDword 1
|
||||
#define SKIP_Oct6100ApiSaveNlpConfDword 1
|
||||
#define SKIP_Oct6100ChannelCreateBiDirSer 1
|
||||
#define SKIP_Oct6100ApiCheckChannelCreateBiDirParams 1
|
||||
#define SKIP_Oct6100ApiReserveChannelCreateBiDirResources 1
|
||||
#define SKIP_Oct6100ApiWriteChannelCreateBiDirStructs 1
|
||||
#define SKIP_Oct6100ApiUpdateBiDirChannelEntry 1
|
||||
#define SKIP_Oct6100ChannelDestroyBiDirSer 1
|
||||
#define SKIP_Oct6100ApiAssertDestroyBiDirChanParams 1
|
||||
#define SKIP_Oct6100ApiInvalidateBiDirChannelStructs 1
|
||||
#define SKIP_Oct6100ApiReleaseBiDirChannelResources 1
|
||||
#define SKIP_Oct6100ApiOctFloatToDbEnergyByte 1
|
||||
#define SKIP_Oct6100ApiOctFloatToDbEnergyHalf 1
|
||||
#define SKIP_Oct6100ChannelMuteSer 1
|
||||
#define SKIP_Oct6100ApiAssertChannelMuteParams 1
|
||||
#define SKIP_Oct6100ChannelUnMuteSer 1
|
||||
#define SKIP_Oct6100ApiAssertChannelUnMuteParams 1
|
||||
#define SKIP_Oct6100ApiMuteSinWithFeatures 1
|
||||
#define SKIP_Oct6100ApiMuteChannelPorts 1
|
||||
#define SKIP_Oct6100CreateLocalInstanceDef 1
|
||||
#define SKIP_Oct6100CreateLocalInstance 1
|
||||
#define SKIP_Oct6100DestroyLocalInstanceDef 1
|
||||
#define SKIP_Oct6100DestroyLocalInstance 1
|
||||
#define SKIP_Oct6100GetHwRevisionDef 1
|
||||
#define SKIP_Oct6100GetHwRevision 1
|
||||
#define SKIP_Oct6100FreeResourcesDef 1
|
||||
#define SKIP_Oct6100FreeResources 1
|
||||
#define SKIP_Oct6100ProductionBistDef 1
|
||||
#define SKIP_Oct6100ProductionBist 1
|
||||
#define SKIP_Oct6100ApiGetVersionDef 1
|
||||
#define SKIP_Oct6100ApiGetVersion 1
|
||||
#define SKIP_Oct6100FreeResourcesSer 1
|
||||
#define SKIP_Oct6100ProductionBistSer 1
|
||||
#define SKIP_Oct6100ChipGetStatsDef 1
|
||||
#define SKIP_Oct6100ChipGetStats 1
|
||||
#define SKIP_Oct6100ChipGetImageInfoDef 1
|
||||
#define SKIP_Oct6100ChipGetImageInfo 1
|
||||
#define SKIP_Oct6100ChipGetStatsSer 1
|
||||
#define SKIP_Oct6100ConfBridgeOpenDef 1
|
||||
#define SKIP_Oct6100ConfBridgeOpen 1
|
||||
#define SKIP_Oct6100ConfBridgeClose 1
|
||||
#define SKIP_Oct6100ConfBridgeChanAddDef 1
|
||||
#define SKIP_Oct6100ConfBridgeChanAdd 1
|
||||
#define SKIP_Oct6100ConfBridgeChanRemove 1
|
||||
#define SKIP_Oct6100ConfBridgeChanMuteDef 1
|
||||
#define SKIP_Oct6100ConfBridgeChanMute 1
|
||||
#define SKIP_Oct6100ConfBridgeChanUnMuteDef 1
|
||||
#define SKIP_Oct6100ConfBridgeChanUnMute 1
|
||||
#define SKIP_Oct6100ConfBridgeDominantSpeakerSetDef 1
|
||||
#define SKIP_Oct6100ConfBridgeDominantSpeakerSet 1
|
||||
#define SKIP_Oct6100ConfBridgeMaskChangeDef 1
|
||||
#define SKIP_Oct6100ConfBridgeMaskChange 1
|
||||
#define SKIP_Oct6100ConfBridgeGetStatsDef 1
|
||||
#define SKIP_Oct6100ConfBridgeGetStats 1
|
||||
#define SKIP_Oct6100ConfBridgeOpenSer 1
|
||||
#define SKIP_Oct6100ApiCheckBridgeParams 1
|
||||
#define SKIP_Oct6100ApiReserveBridgeResources 1
|
||||
#define SKIP_Oct6100ApiUpdateBridgeEntry 1
|
||||
#define SKIP_Oct6100ConfBridgeChanAddSer 1
|
||||
#define SKIP_Oct6100ApiCheckBridgeAddParams 1
|
||||
#define SKIP_Oct6100ApiReserveBridgeAddResources 1
|
||||
#define SKIP_Oct6100ApiBridgeEventAdd 1
|
||||
#define SKIP_Oct6100ApiBridgeAddParticipantToChannel 1
|
||||
#define SKIP_Oct6100ConfBridgeChanMuteSer 1
|
||||
#define SKIP_Oct6100ApiCheckBridgeMuteParams 1
|
||||
#define SKIP_Oct6100ApiUpdateBridgeMuteResources 1
|
||||
#define SKIP_Oct6100ConfBridgeChanUnMuteSer 1
|
||||
#define SKIP_Oct6100ApiCheckBridgeUnMuteParams 1
|
||||
#define SKIP_Oct6100ApiUpdateBridgeUnMuteResources 1
|
||||
#define SKIP_Oct6100ConfBridgeDominantSpeakerSetSer 1
|
||||
#define SKIP_Oct6100ApiCheckBridgeDominantSpeakerParams 1
|
||||
#define SKIP_Oct6100ApiUpdateBridgeDominantSpeakerResources 1
|
||||
#define SKIP_Oct6100ConfBridgeMaskChangeSer 1
|
||||
#define SKIP_Oct6100ApiCheckBridgeMaskChangeParams 1
|
||||
#define SKIP_Oct6100ApiUpdateMaskModifyResources 1
|
||||
#define SKIP_Oct6100ApiBridgeUpdateMask 1
|
||||
#define SKIP_Oct6100ConfBridgeGetStatsSer 1
|
||||
#define SKIP_Oct6100ApiReserveBridgeEntry 1
|
||||
#define SKIP_Oct6100ApiReserveFlexConfParticipantEntry 1
|
||||
#define SKIP_Oct6100DebugSelectChannelDef 1
|
||||
#define SKIP_Oct6100DebugSelectChannel 1
|
||||
#define SKIP_Oct6100DebugGetDataDef 1
|
||||
#define SKIP_Oct6100DebugGetData 1
|
||||
#define SKIP_Oct6100DebugSelectChannelSer 1
|
||||
#define SKIP_Oct6100DebugGetDataSer 1
|
||||
#define SKIP_Oct6100BufferPlayoutGetEventDef 1
|
||||
#define SKIP_Oct6100BufferPlayoutGetEvent 1
|
||||
#define SKIP_Oct6100BufferPlayoutGetEventSer 1
|
||||
#define SKIP_Oct6100InterruptConfigureDef 1
|
||||
#define SKIP_Oct6100InterruptConfigure 1
|
||||
#define SKIP_Oct6100ApiReserveBufferPlayoutMemoryNode 1
|
||||
#define SKIP_Oct6100ApiReleaseBufferPlayoutMemoryNode 1
|
||||
#define SKIP_Oct6100ApiReserveBufferPlayoutMemory 1
|
||||
#define SKIP_Oct6100ApiReleaseBufferPlayoutMemory 1
|
||||
#define SKIP_Oct6100ApiCreateFeatureMask 1
|
||||
#define SKIP_Oct6100MixerCopyEventCreateDef 1
|
||||
#define SKIP_Oct6100MixerCopyEventCreate 1
|
||||
#define SKIP_Oct6100MixerCopyEventDestroyDef 1
|
||||
#define SKIP_Oct6100MixerCopyEventDestroy 1
|
||||
#define SKIP_Oct6100MixerCopyEventCreateSer 1
|
||||
#define SKIP_Oct6100ApiCheckCopyEventCreateParams 1
|
||||
#define SKIP_Oct6100ApiReserveCopyEventCreateResources 1
|
||||
#define SKIP_Oct6100ApiWriteCopyEventCreateStructs 1
|
||||
#define SKIP_Oct6100ApiUpdateCopyEventCreateEntry 1
|
||||
#define SKIP_Oct6100MixerCopyEventDestroySer 1
|
||||
#define SKIP_Oct6100ApiAssertCopyEventDestroyParams 1
|
||||
#define SKIP_Oct6100ApiInvalidateCopyEventStructs 1
|
||||
#define SKIP_Oct6100ApiReleaseCopyEventResources 1
|
||||
#define SKIP_Oct6100ApiReserveCopyEventEntry 1
|
||||
#define SKIP_Oct6100ApiReleaseCopyEventEntry 1
|
||||
#define SKIP_Oct6100PhasingTsstOpenDef 1
|
||||
#define SKIP_Oct6100PhasingTsstOpen 1
|
||||
#define SKIP_Oct6100PhasingTsstCloseDef 1
|
||||
#define SKIP_Oct6100PhasingTsstClose 1
|
||||
#define SKIP_Oct6100PhasingTsstOpenSer 1
|
||||
#define SKIP_Oct6100ApiCheckPhasingParams 1
|
||||
#define SKIP_Oct6100ApiReservePhasingResources 1
|
||||
#define SKIP_Oct6100ApiWritePhasingStructs 1
|
||||
#define SKIP_Oct6100ApiUpdatePhasingEntry 1
|
||||
#define SKIP_Oct6100PhasingTsstCloseSer 1
|
||||
#define SKIP_Oct6100ApiAssertPhasingParams 1
|
||||
#define SKIP_Oct6100ApiInvalidatePhasingStructs 1
|
||||
#define SKIP_Oct6100ApiReleasePhasingResources 1
|
||||
#define SKIP_Oct6100ApiReservePhasingEntry 1
|
||||
#define SKIP_Oct6100ApiReleasePhasingEntry 1
|
||||
#define SKIP_Oct6100BufferPlayoutLoadDef 1
|
||||
#define SKIP_Oct6100BufferPlayoutLoad 1
|
||||
#define SKIP_Oct6100BufferPlayoutLoadBlockInitDef 1
|
||||
#define SKIP_Oct6100BufferPlayoutLoadBlockInit 1
|
||||
#define SKIP_Oct6100BufferPlayoutLoadBlockDef 1
|
||||
#define SKIP_Oct6100BufferPlayoutLoadBlock 1
|
||||
#define SKIP_Oct6100BufferPlayoutUnloadDef 1
|
||||
#define SKIP_Oct6100BufferPlayoutUnload 1
|
||||
#define SKIP_Oct6100BufferPlayoutAddDef 1
|
||||
#define SKIP_Oct6100BufferPlayoutAdd 1
|
||||
#define SKIP_Oct6100BufferPlayoutStartDef 1
|
||||
#define SKIP_Oct6100BufferPlayoutStart 1
|
||||
#define SKIP_Oct6100BufferPlayoutStop 1
|
||||
#define SKIP_Oct6100BufferLoadSer 1
|
||||
#define SKIP_Oct6100BufferLoadBlockInitSer 1
|
||||
#define SKIP_Oct6100BufferLoadBlockSer 1
|
||||
#define SKIP_Oct6100ApiCheckBufferParams 1
|
||||
#define SKIP_Oct6100ApiCheckBufferLoadBlockParams 1
|
||||
#define SKIP_Oct6100ApiReserveBufferResources 1
|
||||
#define SKIP_Oct6100ApiWriteBufferInMemory 1
|
||||
#define SKIP_Oct6100ApiUpdateBufferEntry 1
|
||||
#define SKIP_Oct6100BufferUnloadSer 1
|
||||
#define SKIP_Oct6100ApiAssertBufferParams 1
|
||||
#define SKIP_Oct6100ApiReleaseBufferResources 1
|
||||
#define SKIP_Oct6100BufferPlayoutAddSer 1
|
||||
#define SKIP_Oct6100ApiCheckPlayoutAddParams 1
|
||||
#define SKIP_Oct6100ApiWriteBufferAddStructs 1
|
||||
#define SKIP_Oct6100BufferPlayoutStartSer 1
|
||||
#define SKIP_Oct6100ApiCheckPlayoutStartParams 1
|
||||
#define SKIP_Oct6100ApiWriteChanPlayoutStructs 1
|
||||
#define SKIP_Oct6100ApiReserveBufPlayoutListEntry 1
|
||||
#define SKIP_Oct6100ApiReleaseBufPlayoutListEntry 1
|
||||
#define SKIP_Oct6100RemoteDebugDef 1
|
||||
#define SKIP_Oct6100RemoteDebug 1
|
||||
#define SKIP_Oct6100ApiCheckEndianDetectField 1
|
||||
#define SKIP_Oct6100ApiCalculateChecksum 1
|
||||
#define SKIP_Oct6100ApiFormResponsePkt 1
|
||||
#define SKIP_Oct6100ApiCheckPktCommands 1
|
||||
#define SKIP_Oct6100ApiExecutePktCommands 1
|
||||
#define SKIP_Oct6100ApiCheckSessionNum 1
|
||||
#define SKIP_Oct6100ApiRpcReadWord 1
|
||||
#define SKIP_Oct6100ApiRpcReadBurst 1
|
||||
#define SKIP_Oct6100ApiRpcReadArray 1
|
||||
#define SKIP_Oct6100ApiRpcWriteWord 1
|
||||
#define SKIP_Oct6100ApiRpcWriteSmear 1
|
||||
#define SKIP_Oct6100ApiRpcWriteBurst 1
|
||||
#define SKIP_Oct6100ApiRpcSetHotChannel 1
|
||||
#define SKIP_Oct6100ApiRpcGetDebugChanIndex 1
|
||||
#define SKIP_Oct6100ApiRpcDisconnect 1
|
||||
#define SKIP_Oct6100ToneDetectionDisable 1
|
||||
#define SKIP_Oct6100TsiCnctOpenDef 1
|
||||
#define SKIP_Oct6100TsiCnctOpen 1
|
||||
#define SKIP_Oct6100TsiCnctCloseDef 1
|
||||
#define SKIP_Oct6100TsiCnctClose 1
|
||||
#define SKIP_Oct6100TsiCnctOpenSer 1
|
||||
#define SKIP_Oct6100ApiCheckTsiParams 1
|
||||
#define SKIP_Oct6100ApiReserveTsiResources 1
|
||||
#define SKIP_Oct6100ApiWriteTsiStructs 1
|
||||
#define SKIP_Oct6100ApiUpdateTsiEntry 1
|
||||
#define SKIP_Oct6100TsiCnctCloseSer 1
|
||||
#define SKIP_Oct6100ApiAssertTsiParams 1
|
||||
#define SKIP_Oct6100ApiInvalidateTsiStructs 1
|
||||
#define SKIP_Oct6100ApiReleaseTsiResources 1
|
||||
#define SKIP_Oct6100ApiReserveTsiCnctEntry 1
|
||||
#define SKIP_Oct6100ApiReleaseTsiCnctEntry 1
|
||||
#define SKIP_Oct6100UserDriverWriteOs 1
|
||||
#define SKIP_Oct6100UserDriverWriteSmearOs 1
|
||||
#define SKIP_Oct6100UserDriverWriteBurstOs 1
|
||||
#define SKIP_Oct6100UserDriverReadOs 1
|
||||
#define SKIP_Oct6100UserDriverReadBurstOs 1
|
||||
#define SKIP_OctApiBt0AddNode 1
|
||||
#define SKIP_OctApiBt0AddNode2 1
|
||||
#define SKIP_OctApiBt0AddNode3 1
|
||||
#define SKIP_OctApiBt0AddNode4 1
|
||||
#define SKIP_OctApiBt0KeyCompare 1
|
||||
#define SKIP_OctApiBt0UpdateLinkDepth 1
|
||||
#define SKIP_OctApiBt0Rebalance 1
|
||||
#define SKIP_OctApiBt0ExternalHeavy 1
|
||||
#define SKIP_OctApiBt0RemoveNode2 1
|
||||
#define SKIP_OctApiBt0RemoveNode3 1
|
||||
#define SKIP_OctApiBt0RemoveNode 1
|
||||
#define SKIP_OctApiBt0QueryNode2 1
|
||||
#define SKIP_OctApiBt0QueryNode 1
|
||||
#define SKIP_OctApiBt0GetFirstNode 1
|
||||
#define SKIP_OctApiBt0FindOrAddNode 1
|
||||
#define SKIP_OctApiBt0AddNodeReportPrevNodeData 1
|
||||
#define SKIP_OctApiLmCompare 1
|
||||
#define SKIP_OctApiLmMultiply 1
|
||||
#define SKIP_OctApiLmDivide 1
|
||||
#define SKIP_OctApiLmShiftRight1 1
|
||||
#define SKIP_OctApiLmShiftn 1
|
||||
#define SKIP_OctApiLmGetMsb 1
|
||||
#define SKIP_OctApiTllmAllocGetSize 1
|
||||
#define SKIP_OctApiTllmAllocInit 1
|
||||
#define SKIP_OctApiTllmAllocInfo 1
|
||||
#define SKIP_OctApiTllmAllocAlloc 1
|
||||
#define SKIP_OctApiTllmAllocDealloc 1
|
||||
#define SKIP_OctApiTllmCheckTimeoutList 1
|
||||
#define SKIP_OctApiLlmListGetSize 1
|
||||
#define SKIP_OctApiLlmListGetItemPointer 1
|
||||
#define SKIP_OctApiLlmListInit 1
|
||||
#define SKIP_OctApiLlmListInfo 1
|
||||
#define SKIP_OctApiLlmListCreate 1
|
||||
#define SKIP_OctApiLlmListDelete 1
|
||||
#define SKIP_OctApiLlmListLength 1
|
||||
#define SKIP_OctApiLlmListItemData 1
|
||||
#define SKIP_OctApiLlmListInsertItem 1
|
||||
#define SKIP_OctApiLlmListCreateFull 1
|
||||
#define SKIP_OctApiLlmListAppendItems 1
|
||||
#define SKIP_OctApiLlmListAppendAndSetItems 1
|
||||
#define SKIP_OctApiLlmListSetItems 1
|
||||
#define SKIP_OctApiLlmListCopyData 1
|
||||
#define SKIP_OctApiLlmListRemoveItem 1
|
||||
#define SKIP_OctApiLlm2ListGetSize 1
|
||||
#define SKIP_OctApiLlm2ListGetItemPointer 1
|
||||
#define SKIP_OctApiLlm2ListInit 1
|
||||
#define SKIP_OctApiLlm2ListCreate 1
|
||||
#define SKIP_OctApiLlm2ListDelete 1
|
||||
#define SKIP_OctApiLlm2ListLength 1
|
||||
#define SKIP_OctApiLlm2ListItemData 1
|
||||
#define SKIP_OctApiLlm2ListInsertItem 1
|
||||
#define SKIP_OctApiLlm2ListRemoveItem 1
|
||||
#define SKIP_OctApiLlmMemCpy 1
|
||||
|
||||
#endif
|
||||
|
||||
74
xpp/oct612x/include/oct6100api/oct6100_adpcm_chan_inst.h
Normal file
74
xpp/oct612x/include/oct6100api/oct6100_adpcm_chan_inst.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_adpcm_chan_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_adpcm_chan.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_adpcm_chan_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 6 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_ADPCM_CHAN_INST_H__
|
||||
#define __OCT6100_ADPCM_CHAN_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_ADPCM_CHAN_
|
||||
{
|
||||
/* Flag specifying whether the entry is used or not. */
|
||||
UINT8 fReserved;
|
||||
|
||||
/* Count used to manage entry handles allocated to user. */
|
||||
UINT8 byEntryOpenCnt;
|
||||
|
||||
/* TSI chariot memory entry. */
|
||||
UINT16 usTsiMemIndex;
|
||||
|
||||
/* ADPCM memory entry. */
|
||||
UINT16 usAdpcmMemIndex;
|
||||
|
||||
/* Input and output timeslot information. */
|
||||
UINT16 usInputTimeslot;
|
||||
UINT16 usInputStream;
|
||||
UINT8 byInputNumTssts;
|
||||
UINT8 byInputPcmLaw;
|
||||
|
||||
UINT16 usOutputTimeslot;
|
||||
UINT16 usOutputStream;
|
||||
UINT8 byOutputNumTssts;
|
||||
UINT8 byOutputPcmLaw;
|
||||
|
||||
/* Internal info for quick access to structures associated to this TSI cnct. */
|
||||
UINT16 usInputTsstIndex;
|
||||
UINT16 usOutputTsstIndex;
|
||||
|
||||
} tOCT6100_API_ADPCM_CHAN, *tPOCT6100_API_ADPCM_CHAN;
|
||||
|
||||
#endif /* __OCT6100_ADPCM_CHAN_INST_H__ */
|
||||
90
xpp/oct612x/include/oct6100api/oct6100_adpcm_chan_pub.h
Normal file
90
xpp/oct612x/include/oct6100api/oct6100_adpcm_chan_pub.h
Normal file
@@ -0,0 +1,90 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_adpcm_chan_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_adpcm_chan.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_adpcm_chan_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 5 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_ADPCM_CHAN_PUB_H__
|
||||
#define __OCT6100_ADPCM_CHAN_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_ADPCM_CHAN_OPEN_
|
||||
{
|
||||
PUINT32 pulChanHndl;
|
||||
|
||||
UINT32 ulInputTimeslot;
|
||||
UINT32 ulInputStream;
|
||||
UINT32 ulInputNumTssts;
|
||||
UINT32 ulInputPcmLaw;
|
||||
|
||||
UINT32 ulOutputTimeslot;
|
||||
UINT32 ulOutputStream;
|
||||
UINT32 ulOutputNumTssts;
|
||||
UINT32 ulOutputPcmLaw;
|
||||
|
||||
UINT32 ulChanMode; /* Encoding or decoding. */
|
||||
|
||||
UINT32 ulEncodingRate;
|
||||
UINT32 ulDecodingRate;
|
||||
|
||||
UINT32 ulAdpcmNibblePosition;
|
||||
|
||||
} tOCT6100_ADPCM_CHAN_OPEN, *tPOCT6100_ADPCM_CHAN_OPEN;
|
||||
|
||||
typedef struct _OCT6100_ADPCM_CHAN_CLOSE_
|
||||
{
|
||||
UINT32 ulChanHndl;
|
||||
|
||||
} tOCT6100_ADPCM_CHAN_CLOSE, *tPOCT6100_ADPCM_CHAN_CLOSE;
|
||||
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
|
||||
UINT32 Oct6100AdpcmChanOpenDef(
|
||||
OUT tPOCT6100_ADPCM_CHAN_OPEN f_pAdpcmChanOpen );
|
||||
UINT32 Oct6100AdpcmChanOpen(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_ADPCM_CHAN_OPEN f_pAdpcmChanOpen );
|
||||
|
||||
UINT32 Oct6100AdpcmChanCloseDef(
|
||||
OUT tPOCT6100_ADPCM_CHAN_CLOSE f_pAdpcmChanClose );
|
||||
UINT32 Oct6100AdpcmChanClose(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_ADPCM_CHAN_CLOSE f_pAdpcmChanClose );
|
||||
|
||||
#endif /* __OCT6100_ADPCM_CHAN_PUB_H__ */
|
||||
84
xpp/oct612x/include/oct6100api/oct6100_api.h
Normal file
84
xpp/oct612x/include/oct6100api/oct6100_api.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_api.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
Header file containing all definitions used throughout the API.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 23 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_API_H__
|
||||
#define __OCT6100_API_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
#include "octdef.h"
|
||||
|
||||
#include "oct6100_defines.h"
|
||||
#include "oct6100_errors.h"
|
||||
|
||||
#include "oct6100_apiud.h"
|
||||
#include "oct6100_tlv_inst.h"
|
||||
#include "oct6100_chip_stats_inst.h"
|
||||
#include "oct6100_tsi_cnct_inst.h"
|
||||
#include "oct6100_mixer_inst.h"
|
||||
#include "oct6100_events_inst.h"
|
||||
#include "oct6100_tone_detection_inst.h"
|
||||
#include "oct6100_conf_bridge_inst.h"
|
||||
#include "oct6100_playout_buf_inst.h"
|
||||
|
||||
#include "oct6100_adpcm_chan_inst.h"
|
||||
#include "oct6100_phasing_tsst_inst.h"
|
||||
#include "oct6100_channel_inst.h"
|
||||
#include "oct6100_interrupts_inst.h"
|
||||
#include "oct6100_remote_debug_inst.h"
|
||||
#include "oct6100_debug_inst.h"
|
||||
#include "oct6100_chip_open_inst.h"
|
||||
#include "oct6100_api_inst.h"
|
||||
|
||||
#include "oct6100_interrupts_pub.h"
|
||||
#include "oct6100_tsi_cnct_pub.h"
|
||||
#include "oct6100_events_pub.h"
|
||||
#include "oct6100_tone_detection_pub.h"
|
||||
#include "oct6100_mixer_pub.h"
|
||||
#include "oct6100_conf_bridge_pub.h"
|
||||
#include "oct6100_playout_buf_pub.h"
|
||||
|
||||
#include "oct6100_channel_pub.h"
|
||||
#include "oct6100_remote_debug_pub.h"
|
||||
#include "oct6100_debug_pub.h"
|
||||
#include "oct6100_chip_open_pub.h"
|
||||
#include "oct6100_chip_stats_pub.h"
|
||||
#include "oct6100_adpcm_chan_pub.h"
|
||||
#include "oct6100_phasing_tsst_pub.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OCT6100_API_H__ */
|
||||
138
xpp/oct612x/include/oct6100api/oct6100_api_inst.h
Normal file
138
xpp/oct612x/include/oct6100api/oct6100_api_inst.h
Normal file
@@ -0,0 +1,138 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_api_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing the definition of the API instance structure.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 40 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_API_INST_H__
|
||||
#define __OCT6100_API_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_SHARED_INFO_
|
||||
{
|
||||
/* Local copy of chip configuration structure. */
|
||||
tOCT6100_API_CHIP_CONFIG ChipConfig;
|
||||
|
||||
/* Miscellaneous calculations and mapping of static structures in external memory. */
|
||||
tOCT6100_API_MISCELLANEOUS MiscVars;
|
||||
tOCT6100_API_MEMORY_MAP MemoryMap;
|
||||
|
||||
/* Error stats structure. */
|
||||
tOCT6100_API_CHIP_ERROR_STATS ErrorStats;
|
||||
tOCT6100_API_CHIP_STATS ChipStats;
|
||||
|
||||
/* Mixer information. */
|
||||
tOCT6100_API_MIXER MixerInfo;
|
||||
|
||||
/* Image breakdown information. */
|
||||
tOCT6100_API_IMAGE_REGION ImageRegion[ cOCT6100_MAX_IMAGE_REGION ];
|
||||
tOCT6100_API_IMAGE_INFO ImageInfo;
|
||||
|
||||
/* Configuration and management of interrupts. */
|
||||
tOCT6100_API_INTRPT_CONFIG IntrptConfig;
|
||||
tOCT6100_API_INTRPT_MANAGE IntrptManage;
|
||||
/* Remote debugging. */
|
||||
tOCT6100_API_REMOTE_DEBUG_INFO RemoteDebugInfo;
|
||||
/* Chip debugging information. */
|
||||
tOCT6100_API_DEBUG DebugInfo;
|
||||
|
||||
/* Management variables of software and hardware buffers. */
|
||||
tOCT6100_API_SOFT_BUFS SoftBufs;
|
||||
|
||||
/* Caller buffer playout memory management structure. */
|
||||
tOCT6100_API_BUFFER_PLAYOUT_MALLOC_INFO PlayoutInfo;
|
||||
|
||||
|
||||
|
||||
UINT32 ulChannelListOfst;
|
||||
UINT32 ulChannelAllocOfst;
|
||||
|
||||
UINT32 ulConversionMemoryAllocOfst;
|
||||
|
||||
UINT32 ulTsiMemoryAllocOfst;
|
||||
UINT32 ulExtraTsiMemoryAllocOfst;
|
||||
UINT32 ulEchoMemoryAllocOfst;
|
||||
|
||||
UINT32 ulTsstAllocOfst;
|
||||
UINT32 ulTsstListOfst;
|
||||
UINT32 ulTsstListAllocOfst;
|
||||
|
||||
UINT32 ulTsiCnctListOfst;
|
||||
UINT32 ulTsiCnctAllocOfst;
|
||||
|
||||
UINT32 ulMixerEventListOfst;
|
||||
UINT32 ulMixerEventAllocOfst;
|
||||
|
||||
UINT32 ulCopyEventListOfst;
|
||||
UINT32 ulCopyEventAllocOfst;
|
||||
|
||||
UINT32 ulBiDirChannelListOfst;
|
||||
UINT32 ulBiDirChannelAllocOfst;
|
||||
|
||||
UINT32 ulConfBridgeListOfst;
|
||||
UINT32 ulConfBridgeAllocOfst;
|
||||
|
||||
UINT32 ulFlexConfParticipantListOfst;
|
||||
UINT32 ulFlexConfParticipantAllocOfst;
|
||||
|
||||
UINT32 ulPlayoutBufListOfst;
|
||||
UINT32 ulPlayoutBufAllocOfst;
|
||||
UINT32 ulPlayoutBufMemoryNodeListOfst;
|
||||
|
||||
|
||||
|
||||
UINT32 ulAdpcmChanListOfst;
|
||||
UINT32 ulAdpcmChanAllocOfst;
|
||||
|
||||
UINT32 ulPhasingTsstListOfst;
|
||||
UINT32 ulPhasingTsstAllocOfst;
|
||||
|
||||
} tOCT6100_SHARED_INFO, *tPOCT6100_SHARED_INFO;
|
||||
|
||||
typedef struct _OCT6100_INSTANCE_API_
|
||||
{
|
||||
/* Pointer to portion of API instance structure shared amongst all processes. */
|
||||
tPOCT6100_SHARED_INFO pSharedInfo;
|
||||
|
||||
/* Pointer to user-supplied, process context structure. The structure is
|
||||
a parameter to all user-supplied functions. */
|
||||
PVOID pProcessContext;
|
||||
|
||||
/* Handles to all serialization objects used by the API. */
|
||||
tOCT6100_USER_SERIAL_OBJECT ulApiSerObj;
|
||||
|
||||
|
||||
} tOCT6100_INSTANCE_API, *tPOCT6100_INSTANCE_API;
|
||||
|
||||
#endif /* __OCT6100_API_INST_H__ */
|
||||
69
xpp/oct612x/include/oct6100api/oct6100_apimi.h
Normal file
69
xpp/oct612x/include/oct6100api/oct6100_apimi.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_apimi.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
This file contains the declaration of all functions exported from the
|
||||
APIMI block. The APIMI block contains only one function:
|
||||
Oct6100InterruptMask.
|
||||
The function is used to mask out the interrupt pin of the chip. This
|
||||
function is used when a deferred procedure call treats the interrupt (new
|
||||
interrupts must not be generated until the signalled interrupt is treated).
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 6 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_APIMI_H__
|
||||
#define __OCT6100_APIMI_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
#include "octdef.h"
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_INTERRUPT_MASK_
|
||||
{
|
||||
UINT32 ulUserChipIndex;
|
||||
PVOID pProcessContext;
|
||||
|
||||
|
||||
} tOCT6100_INTERRUPT_MASK, *tPOCT6100_INTERRUPT_MASK;
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100InterruptMaskDef(
|
||||
OUT tPOCT6100_INTERRUPT_MASK f_pInterruptMask );
|
||||
UINT32 Oct6100InterruptMask(
|
||||
IN tPOCT6100_INTERRUPT_MASK f_pInterruptMask );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __OCT6100_APIMI_H__ */
|
||||
312
xpp/oct612x/include/oct6100api/oct6100_apiud.h
Normal file
312
xpp/oct612x/include/oct6100api/oct6100_apiud.h
Normal file
@@ -0,0 +1,312 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_apiud.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
Header file containing the definitions and prototypes that are to be
|
||||
completed by the user.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 16 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_APIUD_H__
|
||||
#define __OCT6100_APIUD_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
#include "octdef.h"
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/* Determines the maximum length of a burst of reads/writes. This value must
|
||||
be in the range 8 - 1024. This value obtains best performance if set to
|
||||
a power of 2 (i.e. 2^n). */
|
||||
#define cOCT6100_MAX_RW_ACCESSES 32
|
||||
|
||||
/* The define used to specify that the Oct6100SeizeSerializeObject function
|
||||
is not to return until the specified serialization object has been seized. */
|
||||
#define cOCT6100_WAIT_INFINITELY 0xFFFFFFFF
|
||||
|
||||
|
||||
/* Compile option: enabling this compile option inserts code to check every
|
||||
call to a user provided function to make sure the function parameters
|
||||
are not changed, as required by the API specification. */
|
||||
#define cOCT6100_USER_FUNCTION_CHECK
|
||||
|
||||
|
||||
|
||||
#define cOCT6100_GET_TIME_FAILED_0 0xFFFF0000
|
||||
#define cOCT6100_GET_TIME_FAILED_1 0xFFFF0001
|
||||
#define cOCT6100_GET_TIME_FAILED_2 0xFFFF0002
|
||||
#define cOCT6100_GET_TIME_FAILED_3 0xFFFF0003
|
||||
#define cOCT6100_GET_TIME_FAILED_4 0xFFFF0004
|
||||
|
||||
#define cOCT6100_CREATE_SERIAL_FAILED_0 0xFFFF0010
|
||||
#define cOCT6100_CREATE_SERIAL_FAILED_1 0xFFFF0011
|
||||
#define cOCT6100_CREATE_SERIAL_FAILED_2 0xFFFF0012
|
||||
#define cOCT6100_CREATE_SERIAL_FAILED_3 0xFFFF0013
|
||||
#define cOCT6100_CREATE_SERIAL_FAILED_4 0xFFFF0014
|
||||
|
||||
#define cOCT6100_DESTROY_SERIAL_FAILED_0 0xFFFF0020
|
||||
#define cOCT6100_DESTROY_SERIAL_FAILED_1 0xFFFF0021
|
||||
#define cOCT6100_DESTROY_SERIAL_FAILED_2 0xFFFF0022
|
||||
#define cOCT6100_DESTROY_SERIAL_FAILED_3 0xFFFF0023
|
||||
#define cOCT6100_DESTROY_SERIAL_FAILED_4 0xFFFF0024
|
||||
|
||||
#define cOCT6100_INVALID_SERIAL_HANDLE_0 0xFFFF0030
|
||||
#define cOCT6100_INVALID_SERIAL_HANDLE_1 0xFFFF0031
|
||||
#define cOCT6100_INVALID_SERIAL_HANDLE_2 0xFFFF0032
|
||||
#define cOCT6100_INVALID_SERIAL_HANDLE_3 0xFFFF0033
|
||||
#define cOCT6100_INVALID_SERIAL_HANDLE_4 0xFFFF0034
|
||||
|
||||
#define cOCT6100_RELEASE_SERIAL_FAILED_0 0xFFFF0040
|
||||
#define cOCT6100_RELEASE_SERIAL_FAILED_1 0xFFFF0041
|
||||
#define cOCT6100_RELEASE_SERIAL_FAILED_2 0xFFFF0042
|
||||
#define cOCT6100_RELEASE_SERIAL_FAILED_3 0xFFFF0043
|
||||
#define cOCT6100_RELEASE_SERIAL_FAILED_4 0xFFFF0044
|
||||
|
||||
#define cOCT6100_SEIZE_SERIAL_FAILED_0 0xFFFF0050
|
||||
#define cOCT6100_SEIZE_SERIAL_FAILED_1 0xFFFF0051
|
||||
#define cOCT6100_SEIZE_SERIAL_FAILED_2 0xFFFF0052
|
||||
#define cOCT6100_SEIZE_SERIAL_FAILED_3 0xFFFF0053
|
||||
#define cOCT6100_SEIZE_SERIAL_FAILED_4 0xFFFF0054
|
||||
|
||||
#define cOCT6100_DRIVER_WRITE_FAILED_0 0xFFFF0060
|
||||
#define cOCT6100_DRIVER_WRITE_FAILED_1 0xFFFF0061
|
||||
#define cOCT6100_DRIVER_WRITE_FAILED_2 0xFFFF0062
|
||||
#define cOCT6100_DRIVER_WRITE_FAILED_3 0xFFFF0063
|
||||
#define cOCT6100_DRIVER_WRITE_FAILED_4 0xFFFF0064
|
||||
|
||||
#define cOCT6100_DRIVER_WSMEAR_FAILED_0 0xFFFF0070
|
||||
#define cOCT6100_DRIVER_WSMEAR_FAILED_1 0xFFFF0071
|
||||
#define cOCT6100_DRIVER_WSMEAR_FAILED_2 0xFFFF0072
|
||||
#define cOCT6100_DRIVER_WSMEAR_FAILED_3 0xFFFF0073
|
||||
#define cOCT6100_DRIVER_WSMEAR_FAILED_4 0xFFFF0074
|
||||
|
||||
#define cOCT6100_DRIVER_WBURST_FAILED_0 0xFFFF0080
|
||||
#define cOCT6100_DRIVER_WBURST_FAILED_1 0xFFFF0081
|
||||
#define cOCT6100_DRIVER_WBURST_FAILED_2 0xFFFF0082
|
||||
#define cOCT6100_DRIVER_WBURST_FAILED_3 0xFFFF0083
|
||||
#define cOCT6100_DRIVER_WBURST_FAILED_4 0xFFFF0084
|
||||
|
||||
#define cOCT6100_DRIVER_READ_FAILED_0 0xFFFF0090
|
||||
#define cOCT6100_DRIVER_READ_FAILED_1 0xFFFF0091
|
||||
#define cOCT6100_DRIVER_READ_FAILED_2 0xFFFF0092
|
||||
#define cOCT6100_DRIVER_READ_FAILED_3 0xFFFF0093
|
||||
#define cOCT6100_DRIVER_READ_FAILED_4 0xFFFF0094
|
||||
|
||||
#define cOCT6100_DRIVER_RBURST_FAILED_0 0xFFFF00A0
|
||||
#define cOCT6100_DRIVER_RBURST_FAILED_1 0xFFFF00A1
|
||||
#define cOCT6100_DRIVER_RBURST_FAILED_2 0xFFFF00A2
|
||||
#define cOCT6100_DRIVER_RBURST_FAILED_3 0xFFFF00A3
|
||||
#define cOCT6100_DRIVER_RBURST_FAILED_4 0xFFFF00A4
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
/*Change this type if your platform uses 64bits semaphores/locks */
|
||||
typedef UINT32 tOCT6100_USER_SERIAL_OBJECT;
|
||||
|
||||
typedef struct _OCT6100_GET_TIME_
|
||||
{
|
||||
PVOID pProcessContext;
|
||||
UINT32 aulWallTimeUs[ 2 ];
|
||||
|
||||
} tOCT6100_GET_TIME, *tPOCT6100_GET_TIME;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct _OCT6100_CREATE_SERIALIZE_OBJECT_
|
||||
{
|
||||
PVOID pProcessContext;
|
||||
PSZ pszSerialObjName;
|
||||
tOCT6100_USER_SERIAL_OBJECT ulSerialObjHndl;
|
||||
|
||||
} tOCT6100_CREATE_SERIALIZE_OBJECT, *tPOCT6100_CREATE_SERIALIZE_OBJECT;
|
||||
|
||||
|
||||
typedef struct _OCT6100_DESTROY_SERIALIZE_OBJECT_
|
||||
{
|
||||
PVOID pProcessContext;
|
||||
tOCT6100_USER_SERIAL_OBJECT ulSerialObjHndl;
|
||||
|
||||
} tOCT6100_DESTROY_SERIALIZE_OBJECT, *tPOCT6100_DESTROY_SERIALIZE_OBJECT;
|
||||
|
||||
|
||||
typedef struct _OCT6100_SEIZE_SERIALIZE_OBJECT_
|
||||
{
|
||||
PVOID pProcessContext;
|
||||
tOCT6100_USER_SERIAL_OBJECT ulSerialObjHndl;
|
||||
UINT32 ulTryTimeMs;
|
||||
|
||||
} tOCT6100_SEIZE_SERIALIZE_OBJECT, *tPOCT6100_SEIZE_SERIALIZE_OBJECT;
|
||||
|
||||
|
||||
typedef struct _OCT6100_RELEASE_SERIALIZE_OBJECT_
|
||||
{
|
||||
PVOID pProcessContext;
|
||||
tOCT6100_USER_SERIAL_OBJECT ulSerialObjHndl;
|
||||
|
||||
} tOCT6100_RELEASE_SERIALIZE_OBJECT, *tPOCT6100_RELEASE_SERIALIZE_OBJECT;
|
||||
|
||||
|
||||
typedef struct _OCT6100_WRITE_PARAMS_
|
||||
{
|
||||
PVOID pProcessContext;
|
||||
|
||||
UINT32 ulUserChipId;
|
||||
UINT32 ulWriteAddress;
|
||||
UINT16 usWriteData;
|
||||
|
||||
} tOCT6100_WRITE_PARAMS, *tPOCT6100_WRITE_PARAMS;
|
||||
|
||||
|
||||
typedef struct _OCT6100_WRITE_SMEAR_PARAMS_
|
||||
{
|
||||
PVOID pProcessContext;
|
||||
|
||||
UINT32 ulUserChipId;
|
||||
UINT32 ulWriteAddress;
|
||||
UINT32 ulWriteLength;
|
||||
UINT16 usWriteData;
|
||||
|
||||
} tOCT6100_WRITE_SMEAR_PARAMS, *tPOCT6100_WRITE_SMEAR_PARAMS;
|
||||
|
||||
|
||||
typedef struct _OCT6100_WRITE_BURST_PARAMS_
|
||||
{
|
||||
PVOID pProcessContext;
|
||||
|
||||
UINT32 ulUserChipId;
|
||||
UINT32 ulWriteAddress;
|
||||
UINT32 ulWriteLength;
|
||||
PUINT16 pusWriteData;
|
||||
|
||||
} tOCT6100_WRITE_BURST_PARAMS, *tPOCT6100_WRITE_BURST_PARAMS;
|
||||
|
||||
|
||||
typedef struct _OCT6100_READ_PARAMS_
|
||||
{
|
||||
PVOID pProcessContext;
|
||||
|
||||
UINT32 ulUserChipId;
|
||||
UINT32 ulReadAddress;
|
||||
PUINT16 pusReadData;
|
||||
|
||||
} tOCT6100_READ_PARAMS, *tPOCT6100_READ_PARAMS;
|
||||
|
||||
|
||||
typedef struct _OCT6100_READ_BURST_PARAMS_
|
||||
{
|
||||
PVOID pProcessContext;
|
||||
|
||||
UINT32 ulUserChipId;
|
||||
UINT32 ulReadAddress;
|
||||
UINT32 ulReadLength;
|
||||
PUINT16 pusReadData;
|
||||
|
||||
} tOCT6100_READ_BURST_PARAMS, *tPOCT6100_READ_BURST_PARAMS;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
/* Time function. */
|
||||
UINT32 Oct6100UserGetTime(
|
||||
IN OUT tPOCT6100_GET_TIME f_pTime );
|
||||
|
||||
|
||||
|
||||
/* Memory management functions. */
|
||||
UINT32 Oct6100UserMemSet(
|
||||
IN PVOID f_pAddress,
|
||||
IN UINT32 f_ulPattern,
|
||||
IN UINT32 f_ulLength );
|
||||
|
||||
UINT32 Oct6100UserMemCopy(
|
||||
IN PVOID f_pDestination,
|
||||
IN const void *f_pSource,
|
||||
IN UINT32 f_ulLength );
|
||||
|
||||
/* Serialization functions. */
|
||||
UINT32 Oct6100UserCreateSerializeObject(
|
||||
IN OUT tPOCT6100_CREATE_SERIALIZE_OBJECT f_pCreate);
|
||||
|
||||
UINT32 Oct6100UserDestroySerializeObject(
|
||||
IN tPOCT6100_DESTROY_SERIALIZE_OBJECT f_pDestroy);
|
||||
|
||||
UINT32 Oct6100UserSeizeSerializeObject(
|
||||
IN tPOCT6100_SEIZE_SERIALIZE_OBJECT f_pSeize);
|
||||
|
||||
UINT32 Oct6100UserReleaseSerializeObject(
|
||||
IN tPOCT6100_RELEASE_SERIALIZE_OBJECT f_pRelease);
|
||||
|
||||
/* Read/Write functions.*/
|
||||
UINT32 Oct6100UserDriverWriteApi(
|
||||
IN tPOCT6100_WRITE_PARAMS f_pWriteParams );
|
||||
|
||||
UINT32 Oct6100UserDriverWriteOs(
|
||||
IN tPOCT6100_WRITE_PARAMS f_pWriteParams );
|
||||
|
||||
UINT32 Oct6100UserDriverWriteSmearApi(
|
||||
IN tPOCT6100_WRITE_SMEAR_PARAMS f_pSmearParams );
|
||||
|
||||
UINT32 Oct6100UserDriverWriteSmearOs(
|
||||
IN tPOCT6100_WRITE_SMEAR_PARAMS f_pSmearParams );
|
||||
|
||||
UINT32 Oct6100UserDriverWriteBurstApi(
|
||||
IN tPOCT6100_WRITE_BURST_PARAMS f_pBurstParams );
|
||||
|
||||
UINT32 Oct6100UserDriverWriteBurstOs(
|
||||
IN tPOCT6100_WRITE_BURST_PARAMS f_pBurstParams );
|
||||
|
||||
UINT32 Oct6100UserDriverReadApi(
|
||||
IN OUT tPOCT6100_READ_PARAMS f_pReadParams );
|
||||
|
||||
UINT32 Oct6100UserDriverReadOs(
|
||||
IN OUT tPOCT6100_READ_PARAMS f_pReadParams );
|
||||
|
||||
UINT32 Oct6100UserDriverReadBurstApi(
|
||||
IN OUT tPOCT6100_READ_BURST_PARAMS f_pBurstParams );
|
||||
|
||||
UINT32 Oct6100UserDriverReadBurstOs(
|
||||
IN OUT tPOCT6100_READ_BURST_PARAMS f_pBurstParams );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __OCT6100_APIUD_H__ */
|
||||
374
xpp/oct612x/include/oct6100api/oct6100_channel_inst.h
Normal file
374
xpp/oct612x/include/oct6100api/oct6100_channel_inst.h
Normal file
@@ -0,0 +1,374 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_channel_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_channel.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_channel_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 90 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_CHANNEL_INST_H__
|
||||
#define __OCT6100_CHANNEL_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifndef PTR_TYPE
|
||||
#define PTR_TYPE UINT16
|
||||
#endif
|
||||
|
||||
typedef struct _OCT6100_API_CHANNEL_TDM_
|
||||
{
|
||||
/* Laws. */
|
||||
UINT8 byRinPcmLaw : 1;
|
||||
UINT8 bySinPcmLaw : 1;
|
||||
UINT8 byRoutPcmLaw : 1;
|
||||
UINT8 bySoutPcmLaw : 1;
|
||||
|
||||
UINT8 byRinNumTssts : 1;
|
||||
UINT8 bySinNumTssts : 1;
|
||||
UINT8 byRoutNumTssts : 1;
|
||||
UINT8 bySoutNumTssts : 1;
|
||||
|
||||
/* RIN port. */
|
||||
UINT16 usRinTimeslot;
|
||||
UINT16 usRinStream;
|
||||
|
||||
/* SIN port. */
|
||||
UINT16 usSinTimeslot;
|
||||
UINT16 usSinStream;
|
||||
|
||||
/* ROUT port. */
|
||||
UINT16 usRoutTimeslot;
|
||||
UINT16 usRoutStream;
|
||||
|
||||
/* SOUT port. */
|
||||
UINT16 usSoutTimeslot;
|
||||
UINT16 usSoutStream;
|
||||
|
||||
/* ROUT broadcast info. */
|
||||
UINT16 usRoutBrdcastTsstFirstEntry;
|
||||
UINT16 usRoutBrdcastTsstNumEntry;
|
||||
|
||||
/* SOUT broadcast info. */
|
||||
UINT16 usSoutBrdcastTsstFirstEntry;
|
||||
UINT16 usSoutBrdcastTsstNumEntry;
|
||||
|
||||
} tOCT6100_API_CHANNEL_TDM, *tPOCT6100_API_CHANNEL_TDM;
|
||||
|
||||
typedef struct _OCT6100_API_CHANNEL_VQE_
|
||||
{
|
||||
UINT8 fEnableNlp : 1;
|
||||
UINT8 fEnableTailDisplacement : 1;
|
||||
UINT8 fSinDcOffsetRemoval : 1;
|
||||
UINT8 fRinDcOffsetRemoval : 1;
|
||||
UINT8 fRinLevelControl : 1;
|
||||
UINT8 fSoutLevelControl : 1;
|
||||
UINT8 fRinAutomaticLevelControl : 1;
|
||||
UINT8 fSoutAutomaticLevelControl : 1;
|
||||
UINT8 fRinHighLevelCompensation : 1;
|
||||
UINT8 fSoutAdaptiveNoiseReduction : 1;
|
||||
UINT8 fDtmfToneRemoval : 1;
|
||||
UINT8 fAcousticEcho : 1;
|
||||
UINT8 byComfortNoiseMode : 1;
|
||||
UINT8 fSoutNaturalListenerEnhancement : 1;
|
||||
UINT8 fRoutNoiseReduction : 1;
|
||||
UINT8 fEnableMusicProtection : 1;
|
||||
UINT8 fIdleCodeDetection : 1;
|
||||
UINT8 byAnrVoiceNoiseSegregation : 1;
|
||||
UINT8 byDoubleTalkBehavior : 1;
|
||||
UINT8 fSoutNoiseBleaching : 1;
|
||||
UINT8 fSoutConferencingNoiseReduction : 1;
|
||||
UINT8 bySoutAutomaticListenerEnhancementGainDb : 1;
|
||||
UINT8 byNonLinearityBehaviorA : 1;
|
||||
UINT8 byNonLinearityBehaviorB : 1;
|
||||
UINT8 bySoutNaturalListenerEnhancementGainDb : 1;
|
||||
|
||||
OCT_INT8 chRinAutomaticLevelControlTargetDb;
|
||||
OCT_INT8 chSoutAutomaticLevelControlTargetDb;
|
||||
|
||||
OCT_INT8 chRinHighLevelCompensationThresholdDb;
|
||||
|
||||
OCT_INT8 chRinLevelControlGainDb;
|
||||
OCT_INT8 chSoutLevelControlGainDb;
|
||||
|
||||
OCT_INT8 chDefaultErlDb;
|
||||
OCT_INT8 chAecDefaultErlDb;
|
||||
|
||||
OCT_INT8 chRoutNoiseReductionLevelGainDb;
|
||||
OCT_INT8 chAnrSnrEnhancementDb;
|
||||
|
||||
UINT16 usToneDisablerVqeActivationDelay;
|
||||
UINT16 usAecTailLength;
|
||||
|
||||
UINT16 usTailDisplacement;
|
||||
UINT16 usTailLength;
|
||||
|
||||
} tOCT6100_API_CHANNEL_VQE, *tPOCT6100_API_CHANNEL_VQE;
|
||||
|
||||
typedef struct _OCT6100_API_CHANNEL_CODEC_
|
||||
{
|
||||
UINT8 byAdpcmNibblePosition : 1;
|
||||
UINT8 fEnableSilenceSuppression : 1;
|
||||
|
||||
UINT8 byEncoderPort : 1;
|
||||
UINT8 byEncodingRate : 1;
|
||||
|
||||
UINT8 byDecoderPort : 1;
|
||||
UINT8 byDecodingRate : 1;
|
||||
|
||||
UINT8 byPhase : 1;
|
||||
UINT8 byPhasingType : 1;
|
||||
|
||||
} tOCT6100_API_CHANNEL_CODEC, *tPOCT6100_API_CHANNEL_CODEC;
|
||||
|
||||
typedef struct _OCT6100_API_CHANNEL_
|
||||
{
|
||||
/*=======================================================================*/
|
||||
/* Channel configuration. */
|
||||
|
||||
/* Flag specifying whether the entry is used or not. */
|
||||
UINT8 fReserved : 1;
|
||||
|
||||
/* Count used to manage entry handles allocated to user. */
|
||||
UINT8 byEntryOpenCnt : 1;
|
||||
|
||||
/* Is this a bidirectionnal channel? */
|
||||
UINT8 fBiDirChannel : 1;
|
||||
|
||||
/* Enable tone disabler? */
|
||||
UINT8 fEnableToneDisabler : 1;
|
||||
|
||||
/* Current echo operation mode. */
|
||||
UINT8 byEchoOperationMode : 1;
|
||||
|
||||
UINT8 byToneDisablerStatus : 1;
|
||||
|
||||
UINT8 fMute : 1;
|
||||
UINT8 fTap : 1;
|
||||
UINT8 fBeingTapped : 1;
|
||||
UINT8 fCopyEventCreated : 1;
|
||||
|
||||
UINT8 fSoutBufPlaying : 1;
|
||||
UINT8 fRinBufPlaying : 1;
|
||||
|
||||
UINT8 fRinBufPlayoutNotifyOnStop : 1;
|
||||
UINT8 fRinBufPlayoutRepeatUsed : 1;
|
||||
|
||||
|
||||
UINT8 fSoutBufPlayoutNotifyOnStop : 1;
|
||||
UINT8 fSoutBufPlayoutRepeatUsed : 1;
|
||||
|
||||
UINT8 fRinHardStop : 1;
|
||||
UINT8 fSoutHardStop : 1;
|
||||
|
||||
UINT8 byRinPlayoutStopEventType : 1;
|
||||
UINT8 bySoutPlayoutStopEventType : 1;
|
||||
|
||||
UINT8 fRinBufAdded : 1;
|
||||
UINT8 fSoutBufAdded : 1;
|
||||
|
||||
UINT8 fBufPlayoutActive : 1;
|
||||
|
||||
/* Enable extended tone detection. */
|
||||
UINT8 fEnableExtToneDetection : 1;
|
||||
|
||||
/* State of the codec structure associated to this channel. */
|
||||
UINT8 fSinSoutCodecActive : 1;
|
||||
UINT8 fRinRoutCodecActive : 1;
|
||||
|
||||
/* TSI chariot memory entry for the Rin/Rout stream. */
|
||||
UINT16 usRinRoutTsiMemIndex;
|
||||
|
||||
/* TSI chariot memory entry for the Sin/Sout stream. */
|
||||
UINT16 usSinSoutTsiMemIndex;
|
||||
|
||||
/* Additional TSI entry used to temporarily store the SIN signal. */
|
||||
UINT16 usExtraSinTsiMemIndex;
|
||||
UINT16 usExtraSinTsiDependencyCnt;
|
||||
|
||||
/* Additional TSI entry used to temporarily store the RIN signal. */
|
||||
UINT16 usExtraRinTsiMemIndex;
|
||||
UINT16 usExtraRinTsiDependencyCnt;
|
||||
|
||||
/* Conversion chariot memory entry. */
|
||||
UINT16 usRinRoutConversionMemIndex;
|
||||
UINT16 usSinSoutConversionMemIndex;
|
||||
|
||||
/* TSST control memory entry. */
|
||||
UINT16 usRinTsstIndex;
|
||||
UINT16 usSinTsstIndex;
|
||||
UINT16 usRoutTsstIndex;
|
||||
UINT16 usSoutTsstIndex;
|
||||
|
||||
/* SSPX memory entry. */
|
||||
UINT16 usEchoMemIndex;
|
||||
|
||||
/* Active mixer events count to test for last event. */
|
||||
UINT16 usMixerEventCnt;
|
||||
|
||||
/* Copy events. */
|
||||
UINT16 usSinCopyEventIndex;
|
||||
UINT16 usSoutCopyEventIndex;
|
||||
|
||||
/* Silence events. */
|
||||
UINT16 usRinSilenceEventIndex;
|
||||
UINT16 usSinSilenceEventIndex;
|
||||
|
||||
/* TDM configuration. */
|
||||
tOCT6100_API_CHANNEL_TDM TdmConfig;
|
||||
|
||||
/* VQE configuration. */
|
||||
tOCT6100_API_CHANNEL_VQE VqeConfig;
|
||||
|
||||
/* Currently muted ports. */
|
||||
UINT16 usMutedPorts;
|
||||
|
||||
/*=======================================================================*/
|
||||
|
||||
/*=======================================================================*/
|
||||
/* Statistics section. */
|
||||
|
||||
INT16 sComfortNoiseLevel;
|
||||
|
||||
UINT16 usCurrentEchoDelay;
|
||||
UINT16 usMaxEchoDelay;
|
||||
|
||||
UINT16 usNumEchoPathChanges;
|
||||
UINT16 usNumEchoPathChangesOfst;
|
||||
|
||||
INT16 sCurrentERL;
|
||||
INT16 sCurrentERLE;
|
||||
|
||||
INT16 sMaxERL;
|
||||
INT16 sMaxERLE;
|
||||
|
||||
INT16 sRinLevel;
|
||||
INT16 sSinLevel;
|
||||
|
||||
INT16 sRinAppliedGain;
|
||||
INT16 sSoutAppliedGain;
|
||||
|
||||
/*=======================================================================*/
|
||||
|
||||
|
||||
/*=======================================================================*/
|
||||
/* Bridge information. */
|
||||
|
||||
UINT16 usBridgeIndex;
|
||||
|
||||
UINT16 usLoadEventIndex;
|
||||
UINT16 usSubStoreEventIndex;
|
||||
|
||||
UINT16 usFlexConfParticipantIndex;
|
||||
UINT16 usTapBridgeIndex;
|
||||
UINT16 usTapChanIndex;
|
||||
|
||||
/*=======================================================================*/
|
||||
|
||||
|
||||
/*=======================================================================*/
|
||||
/* Buffer playout information. */
|
||||
|
||||
PTR_TYPE ulRinBufWritePtr;
|
||||
PTR_TYPE ulRinBufSkipPtr;
|
||||
PTR_TYPE ulSoutBufWritePtr;
|
||||
PTR_TYPE ulSoutBufSkipPtr;
|
||||
|
||||
/* User channel ID, transparently passed to the user. */
|
||||
|
||||
/*=======================================================================*/
|
||||
|
||||
|
||||
/*=======================================================================*/
|
||||
/* Copy events information. */
|
||||
|
||||
/* Number of copy events created. */
|
||||
UINT16 usCopyEventCnt;
|
||||
|
||||
/*=======================================================================*/
|
||||
|
||||
|
||||
/*=======================================================================*/
|
||||
/* Extended tone detection info. */
|
||||
|
||||
|
||||
UINT16 usExtToneChanIndex;
|
||||
UINT16 usExtToneMixerIndex;
|
||||
UINT16 usExtToneTsiIndex;
|
||||
|
||||
/* Index of the phasing TSST */
|
||||
UINT16 usPhasingTsstIndex;
|
||||
|
||||
/* Mode of operation of the channel based on the extended tone detection configuration. */
|
||||
PTR_TYPE ulExtToneChanMode;
|
||||
|
||||
/*=======================================================================*/
|
||||
|
||||
/* Tone detection state. */
|
||||
/* This array is configured as follow. */
|
||||
/* Index 0 contain event 0 to 31 and Index 1 contains event 32 - 55 */
|
||||
PTR_TYPE ulLastSSToneDetected;
|
||||
PTR_TYPE ulLastSSToneTimestamp;
|
||||
|
||||
|
||||
PTR_TYPE ulRinUserBufPlayoutEventId;
|
||||
PTR_TYPE ulSoutUserBufPlayoutEventId;
|
||||
|
||||
UINT32 aulToneConf[2];
|
||||
UINT32 ulUserChanId;
|
||||
/*=======================================================================*/
|
||||
|
||||
|
||||
/*=======================================================================*/
|
||||
|
||||
|
||||
/* Codec configuration. */
|
||||
tOCT6100_API_CHANNEL_CODEC CodecConfig;
|
||||
|
||||
} tOCT6100_API_CHANNEL, *tPOCT6100_API_CHANNEL;
|
||||
|
||||
typedef struct _OCT6100_API_BIDIR_CHANNEL_
|
||||
{
|
||||
UINT16 usFirstChanIndex;
|
||||
UINT16 usSecondChanIndex;
|
||||
|
||||
/* Flag specifying whether the entry is used or not. */
|
||||
UINT8 fReserved : 1;
|
||||
/* Count used to manage entry handles allocated to user. */
|
||||
UINT8 byEntryOpenCnt : 1;
|
||||
|
||||
} tOCT6100_API_BIDIR_CHANNEL, *tPOCT6100_API_BIDIR_CHANNEL;
|
||||
|
||||
#endif /* __OCT6100_CHANNEL_INST_H__ */
|
||||
547
xpp/oct612x/include/oct6100api/oct6100_channel_pub.h
Normal file
547
xpp/oct612x/include/oct6100api/oct6100_channel_pub.h
Normal file
@@ -0,0 +1,547 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_channel_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_channel.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_channel_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 84 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_CHANNEL_PUB_H__
|
||||
#define __OCT6100_CHANNEL_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
/* Channel open structures. */
|
||||
typedef struct _OCT6100_CHANNEL_OPEN_TDM_
|
||||
{
|
||||
UINT32 ulRinNumTssts;
|
||||
UINT32 ulSinNumTssts;
|
||||
UINT32 ulRoutNumTssts;
|
||||
UINT32 ulSoutNumTssts;
|
||||
|
||||
UINT32 ulSinTimeslot;
|
||||
UINT32 ulSinStream;
|
||||
UINT32 ulSinPcmLaw;
|
||||
|
||||
UINT32 ulSoutTimeslot;
|
||||
UINT32 ulSoutStream;
|
||||
UINT32 ulSoutPcmLaw;
|
||||
|
||||
UINT32 ulRinTimeslot;
|
||||
UINT32 ulRinStream;
|
||||
UINT32 ulRinPcmLaw;
|
||||
|
||||
UINT32 ulRoutTimeslot;
|
||||
UINT32 ulRoutStream;
|
||||
UINT32 ulRoutPcmLaw;
|
||||
|
||||
} tOCT6100_CHANNEL_OPEN_TDM, *tPOCT6100_CHANNEL_OPEN_TDM;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_OPEN_VQE_
|
||||
{
|
||||
BOOL fEnableNlp;
|
||||
BOOL fEnableTailDisplacement;
|
||||
UINT32 ulTailDisplacement;
|
||||
UINT32 ulTailLength;
|
||||
|
||||
BOOL fSinDcOffsetRemoval;
|
||||
BOOL fRinDcOffsetRemoval;
|
||||
BOOL fRinLevelControl;
|
||||
BOOL fSoutLevelControl;
|
||||
BOOL fRinAutomaticLevelControl;
|
||||
BOOL fSoutAutomaticLevelControl;
|
||||
BOOL fRinHighLevelCompensation;
|
||||
BOOL fAcousticEcho;
|
||||
BOOL fSoutAdaptiveNoiseReduction;
|
||||
BOOL fDtmfToneRemoval;
|
||||
|
||||
BOOL fSoutNoiseBleaching;
|
||||
BOOL fSoutConferencingNoiseReduction;
|
||||
|
||||
UINT32 ulComfortNoiseMode;
|
||||
UINT32 ulNonLinearityBehaviorA;
|
||||
UINT32 ulNonLinearityBehaviorB;
|
||||
|
||||
INT32 lRinLevelControlGainDb;
|
||||
INT32 lSoutLevelControlGainDb;
|
||||
INT32 lRinAutomaticLevelControlTargetDb;
|
||||
INT32 lSoutAutomaticLevelControlTargetDb;
|
||||
INT32 lRinHighLevelCompensationThresholdDb;
|
||||
INT32 lDefaultErlDb;
|
||||
INT32 lAecDefaultErlDb;
|
||||
UINT32 ulAecTailLength;
|
||||
UINT32 ulSoutAutomaticListenerEnhancementGainDb;
|
||||
UINT32 ulSoutNaturalListenerEnhancementGainDb;
|
||||
BOOL fSoutNaturalListenerEnhancement;
|
||||
BOOL fRoutNoiseReduction;
|
||||
INT32 lRoutNoiseReductionLevelGainDb;
|
||||
INT32 lAnrSnrEnhancementDb;
|
||||
UINT32 ulAnrVoiceNoiseSegregation;
|
||||
UINT32 ulDoubleTalkBehavior;
|
||||
|
||||
UINT32 ulToneDisablerVqeActivationDelay;
|
||||
|
||||
BOOL fEnableMusicProtection;
|
||||
BOOL fIdleCodeDetection;
|
||||
|
||||
|
||||
|
||||
} tOCT6100_CHANNEL_OPEN_VQE, *tPOCT6100_CHANNEL_OPEN_VQE;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_OPEN_CODEC_
|
||||
{
|
||||
UINT32 ulAdpcmNibblePosition;
|
||||
|
||||
UINT32 ulEncoderPort;
|
||||
UINT32 ulEncodingRate;
|
||||
|
||||
UINT32 ulDecoderPort;
|
||||
UINT32 ulDecodingRate;
|
||||
|
||||
BOOL fEnableSilenceSuppression;
|
||||
UINT32 ulPhase;
|
||||
UINT32 ulPhasingType;
|
||||
UINT32 ulPhasingTsstHndl;
|
||||
|
||||
} tOCT6100_CHANNEL_OPEN_CODEC, *tPOCT6100_CHANNEL_OPEN_CODEC;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_OPEN_
|
||||
{
|
||||
PUINT32 pulChannelHndl;
|
||||
UINT32 ulUserChanId;
|
||||
|
||||
UINT32 ulEchoOperationMode;
|
||||
|
||||
BOOL fEnableToneDisabler;
|
||||
|
||||
BOOL fEnableExtToneDetection;
|
||||
|
||||
tOCT6100_CHANNEL_OPEN_TDM TdmConfig;
|
||||
tOCT6100_CHANNEL_OPEN_VQE VqeConfig;
|
||||
tOCT6100_CHANNEL_OPEN_CODEC CodecConfig;
|
||||
|
||||
|
||||
|
||||
} tOCT6100_CHANNEL_OPEN, *tPOCT6100_CHANNEL_OPEN;
|
||||
|
||||
/* Channel close structure. */
|
||||
typedef struct _OCT6100_CHANNEL_CLOSE_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
|
||||
} tOCT6100_CHANNEL_CLOSE, *tPOCT6100_CHANNEL_CLOSE;
|
||||
|
||||
/* Channel modify structures. */
|
||||
typedef struct _OCT6100_CHANNEL_MODIFY_TDM_
|
||||
{
|
||||
UINT32 ulRinNumTssts;
|
||||
UINT32 ulSinNumTssts;
|
||||
UINT32 ulRoutNumTssts;
|
||||
UINT32 ulSoutNumTssts;
|
||||
|
||||
UINT32 ulSinTimeslot;
|
||||
UINT32 ulSinStream;
|
||||
UINT32 ulSinPcmLaw;
|
||||
|
||||
UINT32 ulSoutTimeslot;
|
||||
UINT32 ulSoutStream;
|
||||
UINT32 ulSoutPcmLaw;
|
||||
|
||||
UINT32 ulRinTimeslot;
|
||||
UINT32 ulRinStream;
|
||||
UINT32 ulRinPcmLaw;
|
||||
|
||||
UINT32 ulRoutTimeslot;
|
||||
UINT32 ulRoutStream;
|
||||
UINT32 ulRoutPcmLaw;
|
||||
|
||||
} tOCT6100_CHANNEL_MODIFY_TDM, *tPOCT6100_CHANNEL_MODIFY_TDM;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_MODIFY_VQE_
|
||||
{
|
||||
BOOL fEnableNlp;
|
||||
BOOL fEnableTailDisplacement;
|
||||
UINT32 ulTailDisplacement;
|
||||
|
||||
BOOL fSinDcOffsetRemoval;
|
||||
BOOL fRinDcOffsetRemoval;
|
||||
BOOL fRinLevelControl;
|
||||
BOOL fSoutLevelControl;
|
||||
BOOL fRinAutomaticLevelControl;
|
||||
BOOL fSoutAutomaticLevelControl;
|
||||
BOOL fRinHighLevelCompensation;
|
||||
BOOL fAcousticEcho;
|
||||
BOOL fSoutAdaptiveNoiseReduction;
|
||||
BOOL fDtmfToneRemoval;
|
||||
|
||||
BOOL fSoutConferencingNoiseReduction;
|
||||
BOOL fSoutNoiseBleaching;
|
||||
|
||||
UINT32 ulNonLinearityBehaviorA;
|
||||
UINT32 ulNonLinearityBehaviorB;
|
||||
UINT32 ulComfortNoiseMode;
|
||||
|
||||
INT32 lRinLevelControlGainDb;
|
||||
INT32 lSoutLevelControlGainDb;
|
||||
INT32 lRinAutomaticLevelControlTargetDb;
|
||||
INT32 lSoutAutomaticLevelControlTargetDb;
|
||||
INT32 lRinHighLevelCompensationThresholdDb;
|
||||
INT32 lDefaultErlDb;
|
||||
INT32 lAecDefaultErlDb;
|
||||
UINT32 ulAecTailLength;
|
||||
UINT32 ulSoutAutomaticListenerEnhancementGainDb;
|
||||
UINT32 ulSoutNaturalListenerEnhancementGainDb;
|
||||
BOOL fSoutNaturalListenerEnhancement;
|
||||
BOOL fRoutNoiseReduction;
|
||||
INT32 lRoutNoiseReductionLevelGainDb;
|
||||
INT32 lAnrSnrEnhancementDb;
|
||||
UINT32 ulAnrVoiceNoiseSegregation;
|
||||
UINT32 ulDoubleTalkBehavior;
|
||||
|
||||
UINT32 ulToneDisablerVqeActivationDelay;
|
||||
|
||||
BOOL fEnableMusicProtection;
|
||||
BOOL fIdleCodeDetection;
|
||||
|
||||
|
||||
|
||||
} tOCT6100_CHANNEL_MODIFY_VQE, *tPOCT6100_CHANNEL_MODIFY_VQE;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_MODIFY_CODEC_
|
||||
{
|
||||
UINT32 ulEncoderPort;
|
||||
UINT32 ulEncodingRate;
|
||||
|
||||
UINT32 ulDecoderPort;
|
||||
UINT32 ulDecodingRate;
|
||||
|
||||
BOOL fEnableSilenceSuppression;
|
||||
UINT32 ulPhase;
|
||||
UINT32 ulPhasingType;
|
||||
UINT32 ulPhasingTsstHndl;
|
||||
|
||||
} tOCT6100_CHANNEL_MODIFY_CODEC, *tPOCT6100_CHANNEL_MODIFY_CODEC;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_MODIFY_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
UINT32 ulUserChanId;
|
||||
UINT32 ulEchoOperationMode;
|
||||
|
||||
BOOL fEnableToneDisabler;
|
||||
|
||||
BOOL fApplyToAllChannels;
|
||||
|
||||
BOOL fDisableToneDetection;
|
||||
BOOL fStopBufferPlayout;
|
||||
BOOL fRemoveConfBridgeParticipant;
|
||||
BOOL fRemoveBroadcastTssts;
|
||||
|
||||
BOOL fTdmConfigModified; /* TRUE/FALSE */
|
||||
BOOL fVqeConfigModified; /* TRUE/FALSE */
|
||||
BOOL fCodecConfigModified; /* TRUE/FALSE */
|
||||
|
||||
|
||||
tOCT6100_CHANNEL_MODIFY_TDM TdmConfig;
|
||||
tOCT6100_CHANNEL_MODIFY_VQE VqeConfig;
|
||||
tOCT6100_CHANNEL_MODIFY_CODEC CodecConfig;
|
||||
|
||||
} tOCT6100_CHANNEL_MODIFY, *tPOCT6100_CHANNEL_MODIFY;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_BROADCAST_TSST_ADD_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
|
||||
UINT32 ulPort;
|
||||
UINT32 ulTimeslot;
|
||||
UINT32 ulStream;
|
||||
|
||||
} tOCT6100_CHANNEL_BROADCAST_TSST_ADD, *tPOCT6100_CHANNEL_BROADCAST_TSST_ADD;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_BROADCAST_TSST_REMOVE_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
|
||||
UINT32 ulPort;
|
||||
UINT32 ulTimeslot;
|
||||
UINT32 ulStream;
|
||||
|
||||
BOOL fRemoveAll;
|
||||
|
||||
} tOCT6100_CHANNEL_BROADCAST_TSST_REMOVE, *tPOCT6100_CHANNEL_BROADCAST_TSST_REMOVE;
|
||||
|
||||
/* Channel open structures.*/
|
||||
typedef struct _OCT6100_CHANNEL_STATS_TDM_
|
||||
{
|
||||
UINT32 ulMaxBroadcastTssts;
|
||||
UINT32 ulNumRoutBroadcastTssts;
|
||||
BOOL fMoreRoutBroadcastTssts;
|
||||
UINT32 ulNumSoutBroadcastTssts;
|
||||
BOOL fMoreSoutBroadcastTssts;
|
||||
|
||||
UINT32 ulSinNumTssts;
|
||||
UINT32 ulSoutNumTssts;
|
||||
UINT32 ulRinNumTssts;
|
||||
UINT32 ulRoutNumTssts;
|
||||
|
||||
UINT32 ulSinTimeslot;
|
||||
UINT32 ulSinStream;
|
||||
UINT32 ulSinPcmLaw;
|
||||
|
||||
UINT32 ulSoutTimeslot;
|
||||
UINT32 ulSoutStream;
|
||||
UINT32 ulSoutPcmLaw;
|
||||
|
||||
PUINT32 pulSoutBroadcastTimeslot;
|
||||
PUINT32 pulSoutBroadcastStream;
|
||||
|
||||
UINT32 ulRinTimeslot;
|
||||
UINT32 ulRinStream;
|
||||
UINT32 ulRinPcmLaw;
|
||||
|
||||
UINT32 ulRoutTimeslot;
|
||||
UINT32 ulRoutStream;
|
||||
UINT32 ulRoutPcmLaw;
|
||||
|
||||
PUINT32 pulRoutBroadcastTimeslot;
|
||||
PUINT32 pulRoutBroadcastStream;
|
||||
|
||||
} tOCT6100_CHANNEL_STATS_TDM, *tPOCT6100_CHANNEL_STATS_TDM;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_STATS_VQE_
|
||||
{
|
||||
BOOL fEnableNlp;
|
||||
BOOL fEnableTailDisplacement;
|
||||
UINT32 ulTailDisplacement;
|
||||
UINT32 ulTailLength;
|
||||
|
||||
BOOL fSinDcOffsetRemoval;
|
||||
BOOL fRinDcOffsetRemoval;
|
||||
BOOL fRinLevelControl;
|
||||
BOOL fSoutLevelControl;
|
||||
BOOL fRinAutomaticLevelControl;
|
||||
BOOL fSoutAutomaticLevelControl;
|
||||
BOOL fRinHighLevelCompensation;
|
||||
BOOL fAcousticEcho;
|
||||
BOOL fSoutAdaptiveNoiseReduction;
|
||||
BOOL fDtmfToneRemoval;
|
||||
|
||||
BOOL fSoutConferencingNoiseReduction;
|
||||
BOOL fSoutNoiseBleaching;
|
||||
|
||||
UINT32 ulComfortNoiseMode;
|
||||
UINT32 ulNonLinearityBehaviorA;
|
||||
UINT32 ulNonLinearityBehaviorB;
|
||||
|
||||
INT32 lRinLevelControlGainDb;
|
||||
INT32 lSoutLevelControlGainDb;
|
||||
INT32 lRinAutomaticLevelControlTargetDb;
|
||||
INT32 lSoutAutomaticLevelControlTargetDb;
|
||||
INT32 lRinHighLevelCompensationThresholdDb;
|
||||
INT32 lDefaultErlDb;
|
||||
INT32 lAecDefaultErlDb;
|
||||
UINT32 ulAecTailLength;
|
||||
UINT32 ulSoutAutomaticListenerEnhancementGainDb;
|
||||
UINT32 ulSoutNaturalListenerEnhancementGainDb;
|
||||
BOOL fSoutNaturalListenerEnhancement;
|
||||
BOOL fRoutNoiseReduction;
|
||||
INT32 lRoutNoiseReductionLevelGainDb;
|
||||
INT32 lAnrSnrEnhancementDb;
|
||||
UINT32 ulAnrVoiceNoiseSegregation;
|
||||
UINT32 ulDoubleTalkBehavior;
|
||||
|
||||
UINT32 ulToneDisablerVqeActivationDelay;
|
||||
|
||||
BOOL fEnableMusicProtection;
|
||||
BOOL fIdleCodeDetection;
|
||||
|
||||
|
||||
|
||||
} tOCT6100_CHANNEL_STATS_VQE, *tPOCT6100_CHANNEL_STATS_VQE;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_STATS_CODEC_
|
||||
{
|
||||
UINT32 ulAdpcmNibblePosition;
|
||||
|
||||
UINT32 ulEncoderPort;
|
||||
UINT32 ulEncodingRate;
|
||||
|
||||
UINT32 ulDecoderPort;
|
||||
UINT32 ulDecodingRate;
|
||||
|
||||
BOOL fEnableSilenceSuppression;
|
||||
UINT32 ulPhase;
|
||||
UINT32 ulPhasingType;
|
||||
UINT32 ulPhasingTsstHndl;
|
||||
|
||||
} tOCT6100_CHANNEL_STATS_CODEC, *tPOCT6100_CHANNEL_STATS_CODEC;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_STATS_
|
||||
{
|
||||
BOOL fResetStats;
|
||||
|
||||
UINT32 ulChannelHndl;
|
||||
UINT32 ulUserChanId;
|
||||
|
||||
UINT32 ulEchoOperationMode;
|
||||
BOOL fEnableToneDisabler;
|
||||
|
||||
UINT32 ulMutePortsMask;
|
||||
BOOL fEnableExtToneDetection;
|
||||
|
||||
tOCT6100_CHANNEL_STATS_TDM TdmConfig;
|
||||
tOCT6100_CHANNEL_STATS_VQE VqeConfig;
|
||||
tOCT6100_CHANNEL_STATS_CODEC CodecConfig;
|
||||
|
||||
/* Real stats. */
|
||||
UINT32 ulNumEchoPathChanges;
|
||||
UINT32 ulToneDisablerStatus;
|
||||
|
||||
INT32 lCurrentERL;
|
||||
INT32 lCurrentERLE;
|
||||
UINT32 ulCurrentEchoDelay;
|
||||
|
||||
INT32 lMaxERL;
|
||||
INT32 lMaxERLE;
|
||||
UINT32 ulMaxEchoDelay;
|
||||
|
||||
INT32 lRinLevel;
|
||||
INT32 lSinLevel;
|
||||
INT32 lRinAppliedGain;
|
||||
INT32 lSoutAppliedGain;
|
||||
INT32 lComfortNoiseLevel;
|
||||
|
||||
BOOL fEchoCancellerConverged;
|
||||
BOOL fSinVoiceDetected;
|
||||
|
||||
|
||||
|
||||
} tOCT6100_CHANNEL_STATS, *tPOCT6100_CHANNEL_STATS;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_CREATE_BIDIR_
|
||||
{
|
||||
PUINT32 pulBiDirChannelHndl;
|
||||
|
||||
UINT32 ulFirstChannelHndl;
|
||||
UINT32 ulSecondChannelHndl;
|
||||
|
||||
|
||||
|
||||
} tOCT6100_CHANNEL_CREATE_BIDIR, *tPOCT6100_CHANNEL_CREATE_BIDIR;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_DESTROY_BIDIR_
|
||||
{
|
||||
UINT32 ulBiDirChannelHndl;
|
||||
|
||||
} tOCT6100_CHANNEL_DESTROY_BIDIR, *tPOCT6100_CHANNEL_DESTROY_BIDIR;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_MUTE_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
UINT32 ulPortMask;
|
||||
|
||||
} tOCT6100_CHANNEL_MUTE, *tPOCT6100_CHANNEL_MUTE;
|
||||
|
||||
typedef struct _OCT6100_CHANNEL_UNMUTE_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
UINT32 ulPortMask;
|
||||
|
||||
} tOCT6100_CHANNEL_UNMUTE, *tPOCT6100_CHANNEL_UNMUTE;
|
||||
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
|
||||
UINT32 Oct6100ChannelOpenDef(
|
||||
OUT tPOCT6100_CHANNEL_OPEN f_pChannelOpen );
|
||||
UINT32 Oct6100ChannelOpen(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CHANNEL_OPEN f_pChannelOpen );
|
||||
|
||||
UINT32 Oct6100ChannelCloseDef(
|
||||
OUT tPOCT6100_CHANNEL_CLOSE f_pChannelClose );
|
||||
UINT32 Oct6100ChannelClose(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CHANNEL_CLOSE f_pChannelClose );
|
||||
|
||||
UINT32 Oct6100ChannelModifyDef(
|
||||
OUT tPOCT6100_CHANNEL_MODIFY f_pChannelModify );
|
||||
UINT32 Oct6100ChannelModify(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CHANNEL_MODIFY f_pChannelModify );
|
||||
|
||||
UINT32 Oct6100ChannelBroadcastTsstAddDef(
|
||||
OUT tPOCT6100_CHANNEL_BROADCAST_TSST_ADD f_pChannelTsstAdd );
|
||||
UINT32 Oct6100ChannelBroadcastTsstAdd(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CHANNEL_BROADCAST_TSST_ADD f_pChannelTsstAdd );
|
||||
|
||||
UINT32 Oct6100ChannelBroadcastTsstRemoveDef(
|
||||
OUT tPOCT6100_CHANNEL_BROADCAST_TSST_REMOVE f_pChannelTsstRemove );
|
||||
UINT32 Oct6100ChannelBroadcastTsstRemove(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CHANNEL_BROADCAST_TSST_REMOVE f_pChannelTsstRemove );
|
||||
|
||||
UINT32 Oct6100ChannelGetStatsDef(
|
||||
OUT tPOCT6100_CHANNEL_STATS f_pChannelStats );
|
||||
UINT32 Oct6100ChannelGetStats(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CHANNEL_STATS f_pChannelStats );
|
||||
|
||||
UINT32 Oct6100ChannelCreateBiDirDef(
|
||||
OUT tPOCT6100_CHANNEL_CREATE_BIDIR f_pChannelCreateBiDir );
|
||||
UINT32 Oct6100ChannelCreateBiDir(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CHANNEL_CREATE_BIDIR f_pChannelCreateBiDir );
|
||||
|
||||
UINT32 Oct6100ChannelDestroyBiDirDef(
|
||||
OUT tPOCT6100_CHANNEL_DESTROY_BIDIR f_pChannelDestroyBiDir );
|
||||
UINT32 Oct6100ChannelDestroyBiDir(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CHANNEL_DESTROY_BIDIR f_pChannelDestroyBiDir );
|
||||
|
||||
UINT32 Oct6100ChannelMuteDef(
|
||||
OUT tPOCT6100_CHANNEL_MUTE f_pChannelMute );
|
||||
UINT32 Oct6100ChannelMute(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CHANNEL_MUTE f_pChannelMute );
|
||||
|
||||
UINT32 Oct6100ChannelUnMuteDef(
|
||||
OUT tPOCT6100_CHANNEL_UNMUTE f_pChannelUnMute );
|
||||
UINT32 Oct6100ChannelUnMute(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CHANNEL_UNMUTE f_pChannelUnMute );
|
||||
|
||||
#endif /* __OCT6100_CHANNEL_PUB_H__ */
|
||||
515
xpp/oct612x/include/oct6100api/oct6100_chip_open_inst.h
Normal file
515
xpp/oct612x/include/oct6100api/oct6100_chip_open_inst.h
Normal file
@@ -0,0 +1,515 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_chip_open_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_chip_open.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_chip_open_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 122 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_CHIP_OPEN_INST_H__
|
||||
#define __OCT6100_CHIP_OPEN_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_CHIP_CONFIG_
|
||||
{
|
||||
UINT32 ulUserChipId;
|
||||
PVOID pProcessContext;
|
||||
|
||||
unsigned char const *pbyImageFile; /* Byte pointer to the image file to be uploaded into the chip. */
|
||||
UINT32 ulImageSize; /* Size of the image file (in bytes). */
|
||||
|
||||
UINT32 ulMemClkFreq;
|
||||
UINT32 ulUpclkFreq; /* 33.33 or 66.66 MHz. */
|
||||
UINT8 fEnableMemClkOut; /* TRUE/FALSE */
|
||||
|
||||
UINT8 fMultiProcessSystem;
|
||||
|
||||
UINT8 byMemoryType; /* SDRAM or DDR */
|
||||
UINT8 byNumMemoryChips; /* Number of memory chips present. */
|
||||
UINT32 ulMemoryChipSize; /* The size of the memory chips. */
|
||||
|
||||
UINT16 usMaxRwAccesses;
|
||||
UINT16 usTailDisplacement;
|
||||
|
||||
/* Resource allocation parameters. */
|
||||
UINT16 usMaxChannels;
|
||||
UINT16 usMaxBiDirChannels;
|
||||
|
||||
UINT32 aulTdmStreamFreqs[ cOCT6100_TDM_STREAM_MAX_GROUPS ];
|
||||
|
||||
UINT8 byMaxTdmStreams;
|
||||
UINT8 byTdmSampling;
|
||||
|
||||
UINT8 fEnableFastH100Mode;
|
||||
UINT8 fEnableAcousticEcho; /* Acoustic echo enabled. */
|
||||
|
||||
UINT16 ausTimestampTimeslots[ 4 ];
|
||||
UINT16 ausTimestampStreams[ 4 ];
|
||||
|
||||
UINT8 fUseSynchTimestamp;
|
||||
|
||||
/* Debug feature used to record stream information from a channel.*/
|
||||
UINT8 fEnableChannelRecording;
|
||||
|
||||
UINT16 usMaxRemoteDebugSessions;
|
||||
|
||||
UINT8 byInterruptPolarity;
|
||||
|
||||
UINT16 usMaxTsiCncts;
|
||||
|
||||
UINT8 fEnableExtToneDetection;
|
||||
UINT8 fEnable2100StopEvent;
|
||||
|
||||
|
||||
UINT16 usMaxConfBridges;
|
||||
UINT16 usMaxFlexibleConfParticipants;
|
||||
UINT16 usMaxPlayoutBuffers;
|
||||
|
||||
/* Playout event software buffer size. */
|
||||
UINT32 ulSoftBufPlayoutEventsBufSize;
|
||||
|
||||
/* Soft buffer size. */
|
||||
UINT32 ulSoftToneEventsBufSize;
|
||||
|
||||
UINT16 usMaxPhasingTssts;
|
||||
UINT16 usMaxAdpcmChannels;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UINT8 fEnableProductionBist;
|
||||
UINT32 ulProductionBistMode;
|
||||
UINT32 ulNumProductionBistLoops;
|
||||
|
||||
} tOCT6100_API_CHIP_CONFIG, *tPOCT6100_API_CHIP_CONFIG;
|
||||
|
||||
|
||||
typedef struct _OCT6100_API_MISCELLANEOUS_
|
||||
{
|
||||
/* Total size of external memories. */
|
||||
UINT32 ulTotalMemSize;
|
||||
|
||||
UINT32 ulH100SlaveMode;
|
||||
|
||||
/* Mclk frequency generated by the chip. */
|
||||
UINT32 ulMclkFreq;
|
||||
|
||||
/* Array of UINT32s used to perform a burst of writes (avoids having to
|
||||
allocate on the stack. The size of this array MUST NOT CHANGE (it's
|
||||
used everywhere). */
|
||||
UINT16 ausSuperArray[ cOCT6100_INTERNAL_SUPER_ARRAY_SIZE ];
|
||||
|
||||
/* Chip ID and revision.*/
|
||||
UINT16 usChipId;
|
||||
UINT16 usChipRevision;
|
||||
|
||||
/* Lsu CPU access variables.*/
|
||||
UINT16 usCpuLsuWritePtr;
|
||||
UINT16 usCodepoint;
|
||||
|
||||
/* Max number of channel supported.*/
|
||||
UINT16 usMaxNumberOfChannels;
|
||||
UINT16 usMaxH100Speed;
|
||||
UINT16 usTdmClkBoundary;
|
||||
|
||||
UINT16 usNumBridgesOpened;
|
||||
UINT16 usFirstBridge;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} tOCT6100_API_MISCELLANEOUS, *tPOCT6100_API_MISCELLANEOUS;
|
||||
|
||||
typedef struct _OCT6100_API_MEMORY_MAP_
|
||||
{
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Structure contained in external memory. */
|
||||
|
||||
/* Memory mapping filled using TLV information from the chip. */
|
||||
|
||||
/* Main channel memory. */
|
||||
UINT32 ulChanMainMemBase;
|
||||
UINT32 ulChanMainMemSize;
|
||||
|
||||
UINT32 ulChanMainIoMemOfst;
|
||||
|
||||
UINT32 ulChanMainRinCBMemOfst;
|
||||
UINT32 ulChanMainRinCBMemSize;
|
||||
UINT32 ulChanMainSinCBMemOfst;
|
||||
UINT32 ulChanMainSinCBMemSize;
|
||||
UINT32 ulChanMainSoutCBMemOfst;
|
||||
UINT32 ulChanMainSoutCBMemSize;
|
||||
|
||||
/* Free memory base address. */
|
||||
UINT32 ulFreeMemBaseAddress;
|
||||
|
||||
/* Root channel config offset. */
|
||||
UINT32 ulChanRootConfOfst;
|
||||
|
||||
/* Playout buffer info. */
|
||||
UINT32 ulChanMainRinPlayoutMemOfst;
|
||||
UINT32 ulChanMainRinPlayoutMemSize;
|
||||
UINT32 ulChanMainSoutPlayoutMemOfst;
|
||||
UINT32 ulChanMainSoutPlayoutMemSize;
|
||||
|
||||
/* Channel Stats location */
|
||||
UINT32 ulChanMainIoStatsOfst;
|
||||
UINT32 ulChanMainIoStatsSize;
|
||||
|
||||
/* Buffer playout fields. */
|
||||
tOCT6100_TLV_OFFSET PlayoutRinWritePtrOfst;
|
||||
tOCT6100_TLV_OFFSET PlayoutRinIgnoreSkipCleanOfst;
|
||||
tOCT6100_TLV_OFFSET PlayoutRinSkipPtrOfst;
|
||||
tOCT6100_TLV_OFFSET PlayoutSoutWritePtrOfst;
|
||||
tOCT6100_TLV_OFFSET PlayoutSoutIgnoreSkipCleanOfst;
|
||||
tOCT6100_TLV_OFFSET PlayoutSoutSkipPtrOfst;
|
||||
tOCT6100_TLV_OFFSET PlayoutRinReadPtrOfst;
|
||||
tOCT6100_TLV_OFFSET PlayoutSoutReadPtrOfst;
|
||||
tOCT6100_TLV_OFFSET PlayoutRinHardSkipOfst;
|
||||
tOCT6100_TLV_OFFSET PlayoutSoutHardSkipOfst;
|
||||
|
||||
/* Adaptive noise reduction. */
|
||||
tOCT6100_TLV_OFFSET AdaptiveNoiseReductionOfst;
|
||||
|
||||
/* DC offset removal. */
|
||||
tOCT6100_TLV_OFFSET RinDcOffsetRemovalOfst;
|
||||
tOCT6100_TLV_OFFSET SinDcOffsetRemovalOfst;
|
||||
|
||||
/* Level control. */
|
||||
tOCT6100_TLV_OFFSET RinLevelControlOfst;
|
||||
tOCT6100_TLV_OFFSET SoutLevelControlOfst;
|
||||
|
||||
/* Auto level control. */
|
||||
tOCT6100_TLV_OFFSET RinAutoLevelControlTargetOfst;
|
||||
tOCT6100_TLV_OFFSET SoutAutoLevelControlTargetOfst;
|
||||
|
||||
/* High level compensation. */
|
||||
tOCT6100_TLV_OFFSET RinHighLevelCompensationThresholdOfst;
|
||||
tOCT6100_TLV_OFFSET SoutHighLevelCompensationThresholdOfst;
|
||||
|
||||
/* Auto level control and high level compensation status. */
|
||||
tOCT6100_TLV_OFFSET AlcHlcStatusOfst;
|
||||
|
||||
/* Confort Noise Mode. */
|
||||
tOCT6100_TLV_OFFSET ComfortNoiseModeOfst;
|
||||
|
||||
/* NLP control field. */
|
||||
tOCT6100_TLV_OFFSET NlpControlFieldOfst;
|
||||
|
||||
/* VAD control field offset.*/
|
||||
tOCT6100_TLV_OFFSET VadControlFieldOfst;
|
||||
|
||||
/* NLP Trivial field offset. */
|
||||
tOCT6100_TLV_OFFSET NlpTrivialFieldOfst;
|
||||
|
||||
/* Acoustic echo field offset. */
|
||||
tOCT6100_TLV_OFFSET AecFieldOfst;
|
||||
|
||||
/* Acoustic echo default ERL field offset. */
|
||||
tOCT6100_TLV_OFFSET AecDefaultErlFieldOfst;
|
||||
|
||||
/* Non-linearity behavior A and B field offset. */
|
||||
tOCT6100_TLV_OFFSET PcmLeakFieldOfst;
|
||||
tOCT6100_TLV_OFFSET NlpConvCapFieldOfst;
|
||||
|
||||
/* Default ERL field offset. */
|
||||
tOCT6100_TLV_OFFSET DefaultErlFieldOfst;
|
||||
|
||||
/* Tone Removal field offset.*/
|
||||
tOCT6100_TLV_OFFSET ToneRemovalFieldOfst;
|
||||
|
||||
|
||||
|
||||
/* Channel config fields offset. */
|
||||
tOCT6100_TLV_OFFSET ChanMainIoMaxEchoPointOfst;
|
||||
tOCT6100_TLV_OFFSET TailDisplEnableOfst;
|
||||
|
||||
/* Pouch fields offset. */
|
||||
tOCT6100_TLV_OFFSET PouchBootInstructionOfst;
|
||||
tOCT6100_TLV_OFFSET PouchBootResultOfst;
|
||||
tOCT6100_TLV_OFFSET PouchTailDisplOfst;
|
||||
|
||||
/* 2100 Hz Auto disabling fields offset. */
|
||||
tOCT6100_TLV_OFFSET ToneDisablerControlOfst;
|
||||
|
||||
/* Conferencing dominant speaker field offset. */
|
||||
tOCT6100_TLV_OFFSET DominantSpeakerFieldOfst;
|
||||
|
||||
/* Conferencing noise reduction field offset. */
|
||||
tOCT6100_TLV_OFFSET ConferencingNoiseReductionOfst;
|
||||
|
||||
/* Per channel tail displacement field offset. */
|
||||
tOCT6100_TLV_OFFSET PerChanTailDisplacementFieldOfst;
|
||||
|
||||
/* Per channel tail length field offset. */
|
||||
tOCT6100_TLV_OFFSET PerChanTailLengthFieldOfst;
|
||||
|
||||
/* AF control/echo cancellation bypass. */
|
||||
tOCT6100_TLV_OFFSET AftControlOfst;
|
||||
|
||||
/* Voice detected stat field offset. */
|
||||
tOCT6100_TLV_OFFSET SinVoiceDetectedStatOfst;
|
||||
|
||||
/* Rin currently applied gain field offset. */
|
||||
tOCT6100_TLV_OFFSET RinAppliedGainStatOfst;
|
||||
|
||||
/* Sout currently applied gain field offset. */
|
||||
tOCT6100_TLV_OFFSET SoutAppliedGainStatOfst;
|
||||
|
||||
/* Adaptive listener enhancement field offset. */
|
||||
tOCT6100_TLV_OFFSET AdaptiveAleOfst;
|
||||
|
||||
/* Rin NR field offset. */
|
||||
tOCT6100_TLV_OFFSET RinAnrOfst;
|
||||
|
||||
/* Rin NR value field offset. */
|
||||
tOCT6100_TLV_OFFSET RinAnrValOfst;
|
||||
|
||||
/* Sin Mute field offset. */
|
||||
tOCT6100_TLV_OFFSET SinMuteOfst;
|
||||
|
||||
/* Rin Mute field offset. */
|
||||
tOCT6100_TLV_OFFSET RinMuteOfst;
|
||||
|
||||
/* Sout ANR SNR enhancement offset. */
|
||||
tOCT6100_TLV_OFFSET AnrSnrEnhancementOfst;
|
||||
|
||||
/* Sout ANR voice-noise segregation offset. */
|
||||
tOCT6100_TLV_OFFSET AnrVoiceNoiseSegregationOfst;
|
||||
|
||||
/* Tone disabler VQE activation delay offset. */
|
||||
tOCT6100_TLV_OFFSET ToneDisablerVqeActivationDelayOfst;
|
||||
|
||||
/* AF tail displacement value configuration offset. */
|
||||
tOCT6100_TLV_OFFSET AfTailDisplacementFieldOfst;
|
||||
|
||||
/* Pouch counter field offset. */
|
||||
tOCT6100_TLV_OFFSET PouchCounterFieldOfst;
|
||||
|
||||
/* Acoustic echo tail length. */
|
||||
tOCT6100_TLV_OFFSET AecTailLengthFieldOfst;
|
||||
|
||||
/* Is ISR called field offset. */
|
||||
tOCT6100_TLV_OFFSET IsIsrCalledFieldOfst;
|
||||
|
||||
/* Music protection enable field offset. */
|
||||
tOCT6100_TLV_OFFSET MusicProtectionFieldOfst;
|
||||
|
||||
/* Rin port energy level statistics field offset. */
|
||||
tOCT6100_TLV_OFFSET RinEnergyStatFieldOfst;
|
||||
|
||||
/* Sout port energy level statistics field offset. */
|
||||
tOCT6100_TLV_OFFSET SoutEnergyStatFieldOfst;
|
||||
|
||||
/* Double talk behavior field offset. */
|
||||
tOCT6100_TLV_OFFSET DoubleTalkBehaviorFieldOfst;
|
||||
|
||||
/* Idle code detection field offset. */
|
||||
tOCT6100_TLV_OFFSET IdleCodeDetectionFieldOfst;
|
||||
|
||||
/* TSI memory mapping information.*/
|
||||
UINT32 ulNumTsiEntries;
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
|
||||
} tOCT6100_API_MEMORY_MAP, *tPOCT6100_API_MEMORY_MAP;
|
||||
|
||||
typedef struct _OCT6100_API_SOFT_BUFS_
|
||||
{
|
||||
/* To avoid compilation errors. */
|
||||
UINT32 ulDummyVariable;
|
||||
|
||||
/* Tone events buffer pointers. */
|
||||
UINT32 ulToneEventBufferWritePtr;
|
||||
UINT32 ulToneEventBufferReadPtr;
|
||||
UINT32 ulToneEventBufferSize;
|
||||
UINT32 ulToneEventBufferMemOfst;
|
||||
UINT32 ulToneEventBufferOverflowCnt;
|
||||
|
||||
/* Playout events buffer pointers. */
|
||||
UINT32 ulBufPlayoutEventBufferWritePtr;
|
||||
UINT32 ulBufPlayoutEventBufferReadPtr;
|
||||
UINT32 ulBufPlayoutEventBufferSize;
|
||||
UINT32 ulBufPlayoutEventBufferMemOfst;
|
||||
UINT32 ulBufPlayoutEventBufferOverflowCnt;
|
||||
|
||||
} tOCT6100_API_SOFT_BUFS, *tPOCT6100_API_SOFT_BUFS;
|
||||
|
||||
typedef struct _OCT6100_API_IMAGE_REGION_
|
||||
{
|
||||
UINT32 ulPart1Size;
|
||||
UINT32 ulPart2Size;
|
||||
UINT32 ulClockInfo;
|
||||
|
||||
UINT32 ulReserved;
|
||||
|
||||
UINT32 ulPart1BaseAddress;
|
||||
UINT32 ulPart2BaseAddress;
|
||||
|
||||
} tOCT6100_API_IMAGE_REGION, *tPOCT6100_API_IMAGE_REGION;
|
||||
|
||||
typedef struct _OCT6100_API_IMAGE_INFO_
|
||||
{
|
||||
UINT8 fBufferPlayout;
|
||||
UINT8 fAdaptiveNoiseReduction;
|
||||
UINT8 fRinDcOffsetRemoval;
|
||||
UINT8 fSinDcOffsetRemoval;
|
||||
|
||||
UINT8 fRinAutoLevelControl;
|
||||
UINT8 fSoutAutoLevelControl;
|
||||
UINT8 fRinHighLevelCompensation;
|
||||
UINT8 fSoutHighLevelCompensation;
|
||||
|
||||
UINT8 fAlcHlcStatus;
|
||||
UINT8 fComfortNoise;
|
||||
UINT8 fNlpControl;
|
||||
UINT8 fSilenceSuppression;
|
||||
|
||||
UINT8 fToneDisabler;
|
||||
UINT8 fTailDisplacement;
|
||||
UINT8 fPerChannelTailDisplacement;
|
||||
UINT8 fAcousticEcho;
|
||||
|
||||
UINT8 fAecEnabled;
|
||||
UINT8 fToneRemoval;
|
||||
UINT8 fDefaultErl;
|
||||
UINT8 fMaxEchoPoint;
|
||||
|
||||
UINT8 fNonLinearityBehaviorA;
|
||||
UINT8 fNonLinearityBehaviorB;
|
||||
UINT8 fAecDefaultErl;
|
||||
UINT8 fAdpcm;
|
||||
|
||||
UINT8 fConferencing;
|
||||
UINT8 fConferencingNoiseReduction;
|
||||
UINT8 fMusicProtection;
|
||||
UINT8 fDominantSpeakerEnabled;
|
||||
|
||||
UINT8 fAftControl;
|
||||
UINT8 fSinVoiceDetectedStat;
|
||||
UINT8 fRinAppliedGainStat;
|
||||
UINT8 fSoutAppliedGainStat;
|
||||
|
||||
UINT8 fListenerEnhancement;
|
||||
UINT8 fRoutNoiseReduction;
|
||||
UINT8 fRoutNoiseReductionLevel;
|
||||
UINT8 fRinMute;
|
||||
UINT8 fSinMute;
|
||||
|
||||
UINT8 fAnrSnrEnhancement;
|
||||
UINT8 fAnrVoiceNoiseSegregation;
|
||||
UINT8 fRinBufferPlayoutHardSkip;
|
||||
UINT8 fSoutBufferPlayoutHardSkip;
|
||||
|
||||
UINT16 usMaxNumberOfChannels;
|
||||
UINT8 fPerChannelTailLength;
|
||||
UINT8 fToneDisablerVqeActivationDelay;
|
||||
|
||||
UINT32 ulToneProfileNumber;
|
||||
|
||||
UINT16 usMaxTailDisplacement;
|
||||
UINT16 usMaxTailLength;
|
||||
|
||||
UINT8 byNumToneDetectors;
|
||||
UINT8 byMaxNumberPlayoutEvents;
|
||||
|
||||
UINT8 fAfTailDisplacement;
|
||||
UINT8 fAecTailLength;
|
||||
|
||||
UINT8 fMusicProtectionConfiguration;
|
||||
UINT8 byImageType;
|
||||
|
||||
UINT8 fBufferPlayoutSkipInEvents;
|
||||
UINT8 fSoutNoiseBleaching;
|
||||
|
||||
UINT8 fRinEnergyStat;
|
||||
UINT8 fSoutEnergyStat;
|
||||
|
||||
UINT8 fDoubleTalkBehavior;
|
||||
UINT8 fDoubleTalkBehaviorFieldOfst;
|
||||
|
||||
UINT8 fIdleCodeDetection;
|
||||
UINT8 fIdleCodeDetectionConfiguration;
|
||||
|
||||
UINT8 fSinLevel;
|
||||
|
||||
|
||||
|
||||
UINT8 szVersionNumber[ cOCT6100_VERSION_NUMBER_MAX_SIZE ];
|
||||
UINT32 ulBuildId;
|
||||
|
||||
tOCT6100_TLV_TONE_INFO aToneInfo[ cOCT6100_MAX_TONE_EVENT ];
|
||||
|
||||
} tOCT6100_API_IMAGE_INFO, *tPOCT6100_API_IMAGE_INFO;
|
||||
|
||||
typedef struct _OCT6100_API_MIXER_
|
||||
{
|
||||
/* Pointer to the various event region. */
|
||||
UINT16 usFirstSoutCopyEventPtr;
|
||||
UINT16 usLastSoutCopyEventPtr;
|
||||
|
||||
UINT16 usFirstBridgeEventPtr;
|
||||
UINT16 usLastBridgeEventPtr;
|
||||
|
||||
UINT16 usFirstSinCopyEventPtr;
|
||||
UINT16 usLastSinCopyEventPtr;
|
||||
|
||||
/* Recording event info. */
|
||||
UINT16 usRecordCopyEventIndex;
|
||||
UINT16 usRecordSinEventIndex;
|
||||
|
||||
} tOCT6100_API_MIXER, tPOCT6100_API_MIXER;
|
||||
|
||||
|
||||
typedef struct _OCT6100_API_BUFFER_PLAYOUT_MALLOC_INFO_
|
||||
{
|
||||
/* Next node to be checked for free memory. */
|
||||
UINT32 ulRovingNode;
|
||||
|
||||
/* First unused node in the unused list. */
|
||||
UINT32 ulFirstUnusedNode;
|
||||
|
||||
/* Last unused node in the unused list. */
|
||||
UINT32 ulLastUnusedNode;
|
||||
|
||||
/* Count of unused nodes. */
|
||||
UINT32 ulUnusedNodeCnt;
|
||||
|
||||
} tOCT6100_API_BUFFER_PLAYOUT_MALLOC_INFO, *tPOCT6100_API_BUFFER_PLAYOUT_MALLOC_INFO;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __OCT6100_CHIP_OPEN_INST_H__ */
|
||||
241
xpp/oct612x/include/oct6100api/oct6100_chip_open_pub.h
Normal file
241
xpp/oct612x/include/oct6100api/oct6100_chip_open_pub.h
Normal file
@@ -0,0 +1,241 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_chip_open_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_chip_open.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_chip_open_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 54 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_CHIP_OPEN_PUB_H__
|
||||
#define __OCT6100_CHIP_OPEN_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_CHIP_OPEN_
|
||||
{
|
||||
UINT32 ulUserChipId;
|
||||
BOOL fMultiProcessSystem;
|
||||
PVOID pProcessContext;
|
||||
|
||||
UINT32 ulMaxRwAccesses;
|
||||
|
||||
unsigned char const *pbyImageFile; /* Byte pointer to the image file to be uploaded into the chip. */
|
||||
UINT32 ulImageSize; /* Size of the image file (in bytes). */
|
||||
|
||||
UINT32 ulMemClkFreq; /* 10 - 133.3 MHz. */
|
||||
UINT32 ulUpclkFreq; /* 1 - 66.6 MHz. */
|
||||
BOOL fEnableMemClkOut;
|
||||
|
||||
UINT32 ulMemoryType; /* SDRAM or DDR type external memory. */
|
||||
UINT32 ulNumMemoryChips; /* Number of memory chips present. */
|
||||
UINT32 ulMemoryChipSize; /* The size of the memory chips. */
|
||||
|
||||
UINT32 ulTailDisplacement; /* Tail displacement supported by the chip. */
|
||||
|
||||
BOOL fEnableAcousticEcho;/* Acoustic echo cancellation enabled. */
|
||||
|
||||
/* Resource allocation parameters. */
|
||||
UINT32 ulMaxChannels;
|
||||
UINT32 ulMaxTsiCncts;
|
||||
UINT32 ulMaxBiDirChannels;
|
||||
UINT32 ulMaxConfBridges;
|
||||
UINT32 ulMaxFlexibleConfParticipants;
|
||||
UINT32 ulMaxPlayoutBuffers;
|
||||
|
||||
|
||||
UINT32 ulMaxPhasingTssts;
|
||||
UINT32 ulMaxAdpcmChannels;
|
||||
BOOL fUseSynchTimestamp;
|
||||
UINT32 aulTimestampTimeslots[ 4 ];
|
||||
UINT32 aulTimestampStreams[ 4 ];
|
||||
UINT32 ulInterruptPolarity;
|
||||
tOCT6100_INTERRUPT_CONFIGURE InterruptConfig;
|
||||
|
||||
UINT32 aulTdmStreamFreqs[ cOCT6100_TDM_STREAM_MAX_GROUPS ];
|
||||
UINT32 ulMaxTdmStreams;
|
||||
UINT32 ulTdmSampling;
|
||||
|
||||
BOOL fEnableFastH100Mode;
|
||||
|
||||
UINT32 ulSoftToneEventsBufSize; /* In events. */
|
||||
BOOL fEnableExtToneDetection;
|
||||
BOOL fEnable2100StopEvent;
|
||||
|
||||
|
||||
UINT32 ulSoftBufferPlayoutEventsBufSize; /* In events. */
|
||||
UINT32 ulMaxRemoteDebugSessions;
|
||||
|
||||
BOOL fEnableChannelRecording;
|
||||
|
||||
BOOL fEnableProductionBist;
|
||||
UINT32 ulProductionBistMode;
|
||||
UINT32 ulNumProductionBistLoops;
|
||||
|
||||
} tOCT6100_CHIP_OPEN, *tPOCT6100_CHIP_OPEN;
|
||||
|
||||
typedef struct _OCT6100_GET_INSTANCE_SIZE_
|
||||
{
|
||||
UINT32 ulApiInstanceSize;
|
||||
|
||||
} tOCT6100_GET_INSTANCE_SIZE, *tPOCT6100_GET_INSTANCE_SIZE;
|
||||
|
||||
typedef struct _OCT6100_CHIP_CLOSE_
|
||||
{
|
||||
UINT32 ulDummyVariable;
|
||||
|
||||
} tOCT6100_CHIP_CLOSE, *tPOCT6100_CHIP_CLOSE;
|
||||
|
||||
typedef struct _OCT6100_CREATE_LOCAL_INSTANCE_
|
||||
{
|
||||
tPOCT6100_INSTANCE_API pApiInstShared;
|
||||
tPOCT6100_INSTANCE_API pApiInstLocal;
|
||||
PVOID pProcessContext;
|
||||
UINT32 ulUserChipId;
|
||||
|
||||
} tOCT6100_CREATE_LOCAL_INSTANCE, *tPOCT6100_CREATE_LOCAL_INSTANCE;
|
||||
|
||||
typedef struct _OCT6100_DESTROY_LOCAL_INSTANCE_
|
||||
{
|
||||
UINT32 ulDummy;
|
||||
|
||||
} tOCT6100_DESTROY_LOCAL_INSTANCE, *tPOCT6100_DESTROY_LOCAL_INSTANCE;
|
||||
|
||||
typedef struct _OCT6100_GET_HW_REVISION_
|
||||
{
|
||||
UINT32 ulUserChipId;
|
||||
PVOID pProcessContext;
|
||||
UINT32 ulRevisionNum;
|
||||
|
||||
} tOCT6100_GET_HW_REVISION, *tPOCT6100_GET_HW_REVISION;
|
||||
|
||||
typedef struct _OCT6100_FREE_RESOURCES_
|
||||
{
|
||||
BOOL fFreeTsiConnections;
|
||||
BOOL fFreeConferenceBridges;
|
||||
BOOL fFreePlayoutBuffers;
|
||||
BOOL fFreePhasingTssts;
|
||||
BOOL fFreeAdpcmChannels;
|
||||
|
||||
} tOCT6100_FREE_RESOURCES, *tPOCT6100_FREE_RESOURCES;
|
||||
|
||||
typedef struct _OCT6100_PRODUCTION_BIST_
|
||||
{
|
||||
UINT32 ulCurrentAddress;
|
||||
UINT32 ulCurrentLoop;
|
||||
UINT32 ulCurrentTest;
|
||||
UINT32 ulBistStatus;
|
||||
UINT32 ulFailedAddress;
|
||||
UINT32 ulReadValue;
|
||||
UINT32 ulExpectedValue;
|
||||
|
||||
} tOCT6100_PRODUCTION_BIST, *tPOCT6100_PRODUCTION_BIST;
|
||||
|
||||
typedef struct _OCT6100_API_GET_VERSION_
|
||||
{
|
||||
UINT8 achApiVersion[ cOCT6100_API_VERSION_STRING_LENGTH ];
|
||||
|
||||
} tOCT6100_API_GET_VERSION, *tPOCT6100_API_GET_VERSION;
|
||||
|
||||
typedef struct _OCT6100_API_GET_CAPACITY_PINS_
|
||||
{
|
||||
UINT32 ulUserChipId;
|
||||
PVOID pProcessContext;
|
||||
UINT32 ulMemoryType; /* SDRAM or DDR type external memory. */
|
||||
BOOL fEnableMemClkOut;
|
||||
UINT32 ulMemClkFreq;
|
||||
UINT32 ulCapacityValue;
|
||||
} tOCT6100_API_GET_CAPACITY_PINS, *tPOCT6100_API_GET_CAPACITY_PINS;
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100ChipOpenDef(
|
||||
OUT tPOCT6100_CHIP_OPEN f_pChipOpen );
|
||||
UINT32 Oct6100ChipOpen(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CHIP_OPEN f_pChipOpen );
|
||||
|
||||
UINT32 Oct6100ChipCloseDef(
|
||||
OUT tPOCT6100_CHIP_CLOSE f_pChipClose );
|
||||
UINT32 Oct6100ChipClose(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CHIP_CLOSE f_pChipClose );
|
||||
|
||||
UINT32 Oct6100GetInstanceSizeDef(
|
||||
OUT tPOCT6100_GET_INSTANCE_SIZE f_pInstanceSize );
|
||||
UINT32 Oct6100GetInstanceSize(
|
||||
IN OUT tPOCT6100_CHIP_OPEN f_pChipOpen,
|
||||
IN OUT tPOCT6100_GET_INSTANCE_SIZE f_pInstanceSize );
|
||||
|
||||
UINT32 Oct6100CreateLocalInstanceDef(
|
||||
OUT tPOCT6100_CREATE_LOCAL_INSTANCE f_pCreateLocal );
|
||||
UINT32 Oct6100CreateLocalInstance(
|
||||
IN OUT tPOCT6100_CREATE_LOCAL_INSTANCE f_pCreateLocal );
|
||||
|
||||
UINT32 Oct6100DestroyLocalInstanceDef(
|
||||
OUT tPOCT6100_DESTROY_LOCAL_INSTANCE f_pDestroyLocal );
|
||||
UINT32 Oct6100DestroyLocalInstance(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_DESTROY_LOCAL_INSTANCE f_pDestroyLocal );
|
||||
|
||||
UINT32 Oct6100ApiGetVersionDef(
|
||||
OUT tPOCT6100_API_GET_VERSION f_pApiGetVersion );
|
||||
UINT32 Oct6100ApiGetVersion(
|
||||
IN OUT tPOCT6100_API_GET_VERSION f_pApiGetVersion );
|
||||
|
||||
UINT32 Oct6100GetHwRevisionDef(
|
||||
OUT tPOCT6100_GET_HW_REVISION f_pRevision );
|
||||
UINT32 Oct6100GetHwRevision(
|
||||
IN OUT tPOCT6100_GET_HW_REVISION f_pRevision );
|
||||
|
||||
UINT32 Oct6100FreeResourcesDef(
|
||||
OUT tPOCT6100_FREE_RESOURCES f_pFreeResources );
|
||||
UINT32 Oct6100FreeResources(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_FREE_RESOURCES f_pFreeResources );
|
||||
|
||||
UINT32 Oct6100ProductionBistDef(
|
||||
OUT tPOCT6100_PRODUCTION_BIST f_pProductionBist );
|
||||
UINT32 Oct6100ProductionBist(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_PRODUCTION_BIST f_pProductionBist );
|
||||
|
||||
UINT32 Oct6100ApiGetCapacityPinsDef(
|
||||
tPOCT6100_API_GET_CAPACITY_PINS f_pGetCapacityPins);
|
||||
|
||||
UINT32 Oct6100ApiGetCapacityPins(
|
||||
tPOCT6100_API_GET_CAPACITY_PINS f_pGetCapacityPins );
|
||||
|
||||
|
||||
#endif /* __OCT6100_CHIP_OPEN_PUB_H__ */
|
||||
|
||||
84
xpp/oct612x/include/oct6100api/oct6100_chip_stats_inst.h
Normal file
84
xpp/oct612x/include/oct6100api/oct6100_chip_stats_inst.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_chip_stats_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_chip_stats.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_chip_stats_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 21 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_CHIP_STATS_INST_H__
|
||||
#define __OCT6100_CHIP_STATS_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_CHIP_ERROR_STATS_
|
||||
{
|
||||
UINT8 fFatalChipError;
|
||||
|
||||
UINT32 ulInternalReadTimeoutCnt;
|
||||
UINT32 ulSdramRefreshTooLateCnt;
|
||||
UINT32 ulPllJitterErrorCnt;
|
||||
|
||||
/* Internal tone detector error counter. */
|
||||
UINT32 ulToneDetectorErrorCnt;
|
||||
|
||||
UINT32 ulOverflowToneEventsCnt;
|
||||
|
||||
UINT32 ulH100OutOfSyncCnt;
|
||||
UINT32 ulH100ClkABadCnt;
|
||||
UINT32 ulH100ClkBBadCnt;
|
||||
UINT32 ulH100FrameABadCnt;
|
||||
|
||||
|
||||
|
||||
} tOCT6100_API_CHIP_ERROR_STATS, *tPOCT6100_API_CHIP_ERROR_STATS;
|
||||
|
||||
typedef struct _OCT6100_API_CHIP_STATS_
|
||||
{
|
||||
UINT16 usNumberChannels;
|
||||
UINT16 usNumberBiDirChannels;
|
||||
UINT16 usNumberTsiCncts;
|
||||
UINT16 usNumberConfBridges;
|
||||
UINT16 usNumberPlayoutBuffers;
|
||||
UINT16 usNumEcChanUsingMixer;
|
||||
|
||||
UINT32 ulPlayoutMemUsed;
|
||||
UINT16 usNumberActiveBufPlayoutPorts;
|
||||
|
||||
UINT16 usNumberPhasingTssts;
|
||||
UINT16 usNumberAdpcmChans;
|
||||
|
||||
} tOCT6100_API_CHIP_STATS, *tPOCT6100_API_CHIP_STATS;
|
||||
|
||||
#endif /* __OCT6100_CHIP_STATS_INST_H__ */
|
||||
150
xpp/oct612x/include/oct6100api/oct6100_chip_stats_pub.h
Normal file
150
xpp/oct612x/include/oct6100api/oct6100_chip_stats_pub.h
Normal file
@@ -0,0 +1,150 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_chip_stats_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_chip_stats.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_chip_stats_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 59 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_CHIP_STATS_PUB_H__
|
||||
#define __OCT6100_CHIP_STATS_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_CHIP_STATS_
|
||||
{
|
||||
BOOL fResetChipStats;
|
||||
|
||||
UINT32 ulNumberChannels;
|
||||
UINT32 ulNumberTsiCncts;
|
||||
UINT32 ulNumberConfBridges;
|
||||
UINT32 ulNumberPlayoutBuffers;
|
||||
UINT32 ulPlayoutFreeMemSize;
|
||||
UINT32 ulNumberPhasingTssts;
|
||||
UINT32 ulNumberAdpcmChannels;
|
||||
|
||||
UINT32 ulH100OutOfSynchCount;
|
||||
UINT32 ulH100ClockABadCount;
|
||||
UINT32 ulH100FrameABadCount;
|
||||
UINT32 ulH100ClockBBadCount;
|
||||
|
||||
UINT32 ulInternalReadTimeoutCount;
|
||||
UINT32 ulSdramRefreshTooLateCount;
|
||||
UINT32 ulPllJitterErrorCount;
|
||||
|
||||
UINT32 ulOverflowToneEventsCount;
|
||||
UINT32 ulSoftOverflowToneEventsCount;
|
||||
|
||||
UINT32 ulSoftOverflowBufferPlayoutEventsCount;
|
||||
|
||||
} tOCT6100_CHIP_STATS, *tPOCT6100_CHIP_STATS;
|
||||
|
||||
typedef struct _OCT6100_CHIP_TONE_INFO_
|
||||
{
|
||||
UINT32 ulToneID;
|
||||
UINT32 ulDetectionPort;
|
||||
|
||||
UINT8 aszToneName[ cOCT6100_TLV_MAX_TONE_NAME_SIZE ];
|
||||
|
||||
} tOCT6100_CHIP_TONE_INFO, *tPOCT6100_CHIP_TONE_INFO;
|
||||
|
||||
typedef struct _OCT6100_CHIP_IMAGE_INFO_
|
||||
{
|
||||
BOOL fBufferPlayout;
|
||||
BOOL fAdaptiveNoiseReduction;
|
||||
BOOL fSoutNoiseBleaching;
|
||||
BOOL fAutoLevelControl;
|
||||
BOOL fHighLevelCompensation;
|
||||
BOOL fSilenceSuppression;
|
||||
|
||||
BOOL fAdpcm;
|
||||
BOOL fConferencing;
|
||||
BOOL fConferencingNoiseReduction;
|
||||
BOOL fDominantSpeaker;
|
||||
|
||||
BOOL fAcousticEcho;
|
||||
BOOL fAecTailLength;
|
||||
BOOL fToneRemoval;
|
||||
|
||||
BOOL fDefaultErl;
|
||||
BOOL fNonLinearityBehaviorA;
|
||||
BOOL fNonLinearityBehaviorB;
|
||||
BOOL fPerChannelTailDisplacement;
|
||||
BOOL fPerChannelTailLength;
|
||||
BOOL fListenerEnhancement;
|
||||
BOOL fRoutNoiseReduction;
|
||||
BOOL fRoutNoiseReductionLevel;
|
||||
BOOL fAnrSnrEnhancement;
|
||||
BOOL fAnrVoiceNoiseSegregation;
|
||||
BOOL fToneDisablerVqeActivationDelay;
|
||||
BOOL fMusicProtection;
|
||||
BOOL fDoubleTalkBehavior;
|
||||
BOOL fIdleCodeDetection;
|
||||
BOOL fSinLevel;
|
||||
|
||||
UINT32 ulMaxChannels;
|
||||
UINT32 ulNumTonesAvailable;
|
||||
UINT32 ulToneProfileNumber;
|
||||
UINT32 ulMaxTailDisplacement;
|
||||
UINT32 ulMaxTailLength;
|
||||
UINT32 ulDebugEventSize;
|
||||
UINT32 ulMaxPlayoutEvents;
|
||||
|
||||
UINT32 ulImageType;
|
||||
|
||||
UINT8 szVersionNumber[ cOCT6100_VERSION_NUMBER_MAX_SIZE ];
|
||||
UINT32 ulBuildId;
|
||||
|
||||
tOCT6100_CHIP_TONE_INFO aToneInfo[ cOCT6100_MAX_TONE_EVENT ];
|
||||
|
||||
} tOCT6100_CHIP_IMAGE_INFO, *tPOCT6100_CHIP_IMAGE_INFO;
|
||||
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100ChipGetStatsDef(
|
||||
OUT tPOCT6100_CHIP_STATS f_pChipStats );
|
||||
|
||||
UINT32 Oct6100ChipGetStats(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInst,
|
||||
IN OUT tPOCT6100_CHIP_STATS f_pChipStats );
|
||||
|
||||
UINT32 Oct6100ChipGetImageInfoDef(
|
||||
OUT tPOCT6100_CHIP_IMAGE_INFO f_pChipImageInfo );
|
||||
|
||||
UINT32 Oct6100ChipGetImageInfo(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInst,
|
||||
OUT tPOCT6100_CHIP_IMAGE_INFO f_pChipImageInfo );
|
||||
|
||||
#endif /* __OCT6100_CHIP_STATS_PUB_H__ */
|
||||
104
xpp/oct612x/include/oct6100api/oct6100_conf_bridge_inst.h
Normal file
104
xpp/oct612x/include/oct6100api/oct6100_conf_bridge_inst.h
Normal file
@@ -0,0 +1,104 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_conf_bridge_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_conf_bridge.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_conf_bridge_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 19 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_CONF_BRIDGE_INST_H__
|
||||
#define __OCT6100_CONF_BRIDGE_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_CONF_BRIDGE_
|
||||
{
|
||||
/* Flag specifying whether the entry is used or not. */
|
||||
UINT8 fReserved;
|
||||
|
||||
/* Entry counter for the resources. */
|
||||
UINT8 byEntryOpenCnt;
|
||||
|
||||
/* Next bridge pointer. */
|
||||
UINT16 usNextBridgePtr;
|
||||
|
||||
/* Previous bridge pointer. */
|
||||
UINT16 usPrevBridgePtr;
|
||||
|
||||
/* Number of clients connected to the bridge. */
|
||||
UINT16 usNumClients;
|
||||
|
||||
/* Store the index of the load event, to diffentiate him form the accumulate. */
|
||||
UINT16 usLoadIndex;
|
||||
|
||||
/* Pointer to the first bridge events.*/
|
||||
UINT16 usFirstLoadEventPtr;
|
||||
UINT16 usFirstSubStoreEventPtr;
|
||||
UINT16 usLastSubStoreEventPtr;
|
||||
|
||||
/* Pointer to the silence load event, if it exists. */
|
||||
UINT16 usSilenceLoadEventPtr;
|
||||
|
||||
/* Flag specifying whether the dominant speaker is set or not. */
|
||||
UINT16 usDominantSpeakerChanIndex;
|
||||
UINT8 fDominantSpeakerSet;
|
||||
|
||||
/* Flag specifying if this is flexible conferencing bridge. */
|
||||
UINT8 fFlexibleConferencing;
|
||||
|
||||
/* Number of clients being tapped. */
|
||||
UINT16 usNumTappedClients;
|
||||
|
||||
} tOCT6100_API_CONF_BRIDGE, *tPOCT6100_API_CONF_BRIDGE;
|
||||
|
||||
typedef struct _OCT6100_API_FLEX_CONF_PARTICIPANT_
|
||||
{
|
||||
/* Input port of the conferencing for this participant. */
|
||||
UINT32 ulInputPort;
|
||||
|
||||
/* Whether the flexible mixer has been created. */
|
||||
UINT8 fFlexibleMixerCreated;
|
||||
|
||||
/* Listener mask ( who can hear us ). */
|
||||
UINT32 ulListenerMask;
|
||||
|
||||
/* Our index in the listener mask. */
|
||||
UINT32 ulListenerMaskIndex;
|
||||
|
||||
/* Mixer event indexes for this participant's mixer. */
|
||||
UINT16 ausLoadOrAccumulateEventIndex[ cOCT6100_MAX_FLEX_CONF_PARTICIPANTS_PER_BRIDGE ];
|
||||
|
||||
} tOCT6100_API_FLEX_CONF_PARTICIPANT, *tPOCT6100_API_FLEX_CONF_PARTICIPANT;
|
||||
|
||||
#endif /* __OCT6100_CONF_BRIDGE_INST_H__ */
|
||||
169
xpp/oct612x/include/oct6100api/oct6100_conf_bridge_pub.h
Normal file
169
xpp/oct612x/include/oct6100api/oct6100_conf_bridge_pub.h
Normal file
@@ -0,0 +1,169 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_conf_bridge_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_conf_bridge.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_conf_bridge_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 22 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_CONF_BRIDGE_PUB_H__
|
||||
#define __OCT6100_CONF_BRIDGE_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_CONF_BRIDGE_OPEN_
|
||||
{
|
||||
PUINT32 pulConfBridgeHndl; /* Handle returned when the bridge is opened. */
|
||||
BOOL fFlexibleConferencing;
|
||||
|
||||
} tOCT6100_CONF_BRIDGE_OPEN, *tPOCT6100_CONF_BRIDGE_OPEN;
|
||||
|
||||
typedef struct _OCT6100_CONF_BRIDGE_CLOSE_
|
||||
{
|
||||
UINT32 ulConfBridgeHndl;
|
||||
|
||||
} tOCT6100_CONF_BRIDGE_CLOSE, *tPOCT6100_CONF_BRIDGE_CLOSE;
|
||||
|
||||
typedef struct _OCT6100_CONF_BRIDGE_CHAN_ADD_
|
||||
{
|
||||
UINT32 ulConfBridgeHndl;
|
||||
UINT32 ulChannelHndl;
|
||||
UINT32 ulInputPort;
|
||||
UINT32 ulListenerMaskIndex;
|
||||
UINT32 ulListenerMask;
|
||||
BOOL fMute;
|
||||
UINT32 ulTappedChannelHndl;
|
||||
|
||||
} tOCT6100_CONF_BRIDGE_CHAN_ADD, *tPOCT6100_CONF_BRIDGE_CHAN_ADD;
|
||||
|
||||
typedef struct _OCT6100_CONF_BRIDGE_CHAN_REMOVE_
|
||||
{
|
||||
UINT32 ulConfBridgeHndl;
|
||||
UINT32 ulChannelHndl;
|
||||
BOOL fRemoveAll;
|
||||
|
||||
} tOCT6100_CONF_BRIDGE_CHAN_REMOVE, *tPOCT6100_CONF_BRIDGE_CHAN_REMOVE;
|
||||
|
||||
typedef struct _OCT6100_CONF_BRIDGE_CHAN_MUTE_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
|
||||
} tOCT6100_CONF_BRIDGE_CHAN_MUTE, *tPOCT6100_CONF_BRIDGE_CHAN_MUTE;
|
||||
|
||||
typedef struct _OCT6100_CONF_BRIDGE_CHAN_UNMUTE_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
|
||||
} tOCT6100_CONF_BRIDGE_CHAN_UNMUTE, *tPOCT6100_CONF_BRIDGE_CHAN_UNMUTE;
|
||||
|
||||
typedef struct _OCT6100_CONF_BRIDGE_DOMINANT_SPEAKER_SET_
|
||||
{
|
||||
UINT32 ulConfBridgeHndl;
|
||||
UINT32 ulChannelHndl;
|
||||
|
||||
} tOCT6100_CONF_BRIDGE_DOMINANT_SPEAKER_SET, *tPOCT6100_CONF_BRIDGE_DOMINANT_SPEAKER_SET;
|
||||
|
||||
typedef struct _OCT6100_CONF_BRIDGE_MASK_CHANGE_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
UINT32 ulNewListenerMask;
|
||||
|
||||
} tOCT6100_CONF_BRIDGE_MASK_CHANGE, *tPOCT6100_CONF_BRIDGE_MASK_CHANGE;
|
||||
|
||||
typedef struct _OCT6100_CONF_BRIDGE_STATS_
|
||||
{
|
||||
UINT32 ulConfBridgeHndl;
|
||||
UINT32 ulNumChannels;
|
||||
UINT32 ulNumTappedChannels;
|
||||
BOOL fFlexibleConferencing;
|
||||
|
||||
} tOCT6100_CONF_BRIDGE_STATS, *tPOCT6100_CONF_BRIDGE_STATS;
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100ConfBridgeOpenDef(
|
||||
OUT tPOCT6100_CONF_BRIDGE_OPEN f_pConfBridgeOpen );
|
||||
UINT32 Oct6100ConfBridgeOpen(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CONF_BRIDGE_OPEN f_pConfBridgeOpen );
|
||||
|
||||
UINT32 Oct6100ConfBridgeCloseDef(
|
||||
OUT tPOCT6100_CONF_BRIDGE_CLOSE f_pConfBridgeClose );
|
||||
UINT32 Oct6100ConfBridgeClose(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CONF_BRIDGE_CLOSE f_pConfBridgeClose );
|
||||
|
||||
UINT32 Oct6100ConfBridgeChanAddDef(
|
||||
OUT tPOCT6100_CONF_BRIDGE_CHAN_ADD f_pConfBridgeAdd );
|
||||
UINT32 Oct6100ConfBridgeChanAdd(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CONF_BRIDGE_CHAN_ADD f_pConfBridgeAdd );
|
||||
|
||||
UINT32 Oct6100ConfBridgeChanRemoveDef(
|
||||
OUT tPOCT6100_CONF_BRIDGE_CHAN_REMOVE f_pConfBridgeRemove );
|
||||
UINT32 Oct6100ConfBridgeChanRemove(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CONF_BRIDGE_CHAN_REMOVE f_pConfBridgeRemove );
|
||||
|
||||
UINT32 Oct6100ConfBridgeChanMuteDef(
|
||||
OUT tPOCT6100_CONF_BRIDGE_CHAN_MUTE f_pConfBridgeMute );
|
||||
UINT32 Oct6100ConfBridgeChanMute(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CONF_BRIDGE_CHAN_MUTE f_pConfBridgeMute );
|
||||
|
||||
UINT32 Oct6100ConfBridgeChanUnMuteDef(
|
||||
OUT tPOCT6100_CONF_BRIDGE_CHAN_UNMUTE f_pConfBridgeUnMute );
|
||||
UINT32 Oct6100ConfBridgeChanUnMute(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CONF_BRIDGE_CHAN_UNMUTE f_pConfBridgeUnMute );
|
||||
|
||||
UINT32 Oct6100ConfBridgeDominantSpeakerSetDef(
|
||||
OUT tPOCT6100_CONF_BRIDGE_DOMINANT_SPEAKER_SET f_pConfBridgeDominantSpeaker );
|
||||
UINT32 Oct6100ConfBridgeDominantSpeakerSet(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CONF_BRIDGE_DOMINANT_SPEAKER_SET f_pConfBridgeDominantSpeaker );
|
||||
|
||||
UINT32 Oct6100ConfBridgeMaskChangeDef(
|
||||
OUT tPOCT6100_CONF_BRIDGE_MASK_CHANGE f_pConfBridgeMaskChange );
|
||||
UINT32 Oct6100ConfBridgeMaskChange(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CONF_BRIDGE_MASK_CHANGE f_pConfBridgeMaskChange );
|
||||
|
||||
UINT32 Oct6100ConfBridgeGetStatsDef(
|
||||
OUT tPOCT6100_CONF_BRIDGE_STATS f_pConfBridgeStats );
|
||||
UINT32 Oct6100ConfBridgeGetStats(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_CONF_BRIDGE_STATS f_pConfBridgeStats );
|
||||
|
||||
#endif /* __OCT6100_CONF_BRIDGE_PUB_H__ */
|
||||
124
xpp/oct612x/include/oct6100api/oct6100_debug_inst.h
Normal file
124
xpp/oct612x/include/oct6100api/oct6100_debug_inst.h
Normal file
@@ -0,0 +1,124 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_debug_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_debug.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_debug_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 10 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_DEBUG_INST_H__
|
||||
#define __OCT6100_DEBUG_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_DEBUG_
|
||||
{
|
||||
/* Information from the TLVs. */
|
||||
UINT32 ulDebugEventSize;
|
||||
UINT32 ulMatrixBaseAddress;
|
||||
UINT32 ulDebugChanStatsByteSize;
|
||||
UINT32 ulDebugChanLiteStatsByteSize;
|
||||
UINT32 ulHotChannelSelectBaseAddress;
|
||||
UINT32 ulMatrixTimestampBaseAddress;
|
||||
UINT32 ulAfWritePtrByteOffset;
|
||||
UINT32 ulRecordedPcmEventByteSize;
|
||||
UINT32 ulMatrixWpBaseAddress;
|
||||
|
||||
/* Pouch counter presence in the image. */
|
||||
UINT8 fPouchCounter;
|
||||
|
||||
/* Record channel indexes. */
|
||||
UINT16 usRecordMemIndex;
|
||||
UINT16 usRecordChanIndex;
|
||||
|
||||
UINT16 usRecordRinRoutTsiMemIndex;
|
||||
UINT16 usRecordSinSoutTsiMemIndex;
|
||||
|
||||
/* Debug channel information.*/
|
||||
UINT16 usCurrentDebugChanIndex;
|
||||
|
||||
/* Matrix event mask. */
|
||||
UINT16 usMatrixCBMask;
|
||||
|
||||
/* If data is being dumped now. */
|
||||
UINT8 fDebugDataBeingDumped;
|
||||
|
||||
/* Index of the last event retrieved. */
|
||||
UINT16 usLastDebugEventIndex;
|
||||
|
||||
/* Number of events to retrieve. */
|
||||
UINT16 usNumEvents;
|
||||
|
||||
/* Chip debug event write ptr. */
|
||||
UINT16 usChipDebugEventWritePtr;
|
||||
|
||||
/* Hot channel read data. */
|
||||
UINT16 ausHotChannelData[ 2 ];
|
||||
|
||||
/* Last PCM sample index. */
|
||||
UINT32 ulLastPcmSampleIndex;
|
||||
|
||||
/* Last AF log read pointer. */
|
||||
UINT16 usLastAfLogReadPtr;
|
||||
|
||||
/* AF log hardware write pointer. */
|
||||
UINT16 usAfLogWritePtr;
|
||||
|
||||
/* Last tone event index retrieved. */
|
||||
UINT16 usLastToneEventIndex;
|
||||
|
||||
/* Whether the image version string has been copied in the user buffer. */
|
||||
BOOL fImageVersionCopied;
|
||||
|
||||
/* Whether the api version string has been copied in the user buffer. */
|
||||
BOOL fApiVersionCopied;
|
||||
|
||||
/* Total number of bytes that will be returned for the current dump. */
|
||||
UINT32 ulDebugDataTotalNumBytes;
|
||||
|
||||
/* Field to detect if the ISR is called present? */
|
||||
BOOL fIsIsrCalledField;
|
||||
|
||||
/* Remaining number of bytes that will be returned for the current dump. */
|
||||
UINT32 ulDebugDataRemainingNumBytes;
|
||||
|
||||
/* AF events control block size. */
|
||||
UINT32 ulAfEventCbByteSize;
|
||||
|
||||
/* Current user selected data mode. Must be kept constant throughout a debug session. */
|
||||
UINT32 ulCurrentGetDataMode;
|
||||
|
||||
} tOCT6100_API_DEBUG, *tPOCT6100_API_DEBUG;
|
||||
|
||||
#endif /* __OCT6100_DEBUG_INST_H__ */
|
||||
76
xpp/oct612x/include/oct6100api/oct6100_debug_pub.h
Normal file
76
xpp/oct612x/include/oct6100api/oct6100_debug_pub.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_debug_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_debug.c. All elements defined in this file are for public
|
||||
usage of the API.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 14 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_DEBUG_PUB_H__
|
||||
#define __OCT6100_DEBUG_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_DEBUG_SELECT_CHANNEL_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
|
||||
} tOCT6100_DEBUG_SELECT_CHANNEL, *tPOCT6100_DEBUG_SELECT_CHANNEL;
|
||||
|
||||
typedef struct _OCT6100_DEBUG_GET_DATA_
|
||||
{
|
||||
UINT32 ulGetDataMode;
|
||||
UINT32 ulGetDataContent;
|
||||
UINT32 ulRemainingNumBytes;
|
||||
UINT32 ulTotalNumBytes;
|
||||
UINT32 ulMaxBytes;
|
||||
UINT32 ulValidNumBytes;
|
||||
PUINT8 pbyData;
|
||||
|
||||
} tOCT6100_DEBUG_GET_DATA, *tPOCT6100_DEBUG_GET_DATA;
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100DebugSelectChannelDef(
|
||||
OUT tPOCT6100_DEBUG_SELECT_CHANNEL f_pSelectDebugChan );
|
||||
UINT32 Oct6100DebugSelectChannel(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInst,
|
||||
IN OUT tPOCT6100_DEBUG_SELECT_CHANNEL f_pSelectDebugChan );
|
||||
|
||||
UINT32 Oct6100DebugGetDataDef(
|
||||
OUT tPOCT6100_DEBUG_GET_DATA f_pGetData );
|
||||
UINT32 Oct6100DebugGetData(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInst,
|
||||
IN OUT tPOCT6100_DEBUG_GET_DATA f_pGetData );
|
||||
|
||||
#endif /* __OCT6100_DEBUG_PUB_H__ */
|
||||
679
xpp/oct612x/include/oct6100api/oct6100_defines.h
Normal file
679
xpp/oct612x/include/oct6100api/oct6100_defines.h
Normal file
@@ -0,0 +1,679 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_defines.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
Header file containing all defines used throughout the API.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.7
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 171 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_DEFINES_H__
|
||||
#define __OCT6100_DEFINES_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
#include "octdef.h"
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
/* 32-bits values. */
|
||||
#define cOCT6100_FFFFFFFF 0xFFFFFFFF
|
||||
#define cOCT6100_FFFFFFFE 0xFFFFFFFE
|
||||
#define cOCT6100_7FFFFFFF 0x7FFFFFFF
|
||||
|
||||
/* 16-bits values. */
|
||||
#define cOCT6100_FFFD 0xFFFD
|
||||
#define cOCT6100_FFFE 0xFFFE
|
||||
#define cOCT6100_FFFF 0xFFFF
|
||||
#define cOCT6100_7FFF 0x7FFF
|
||||
|
||||
/* 8-bits values. */
|
||||
#define cOCT6100_FF 0xFF
|
||||
|
||||
#define cOCT6100_CURRENT_VALUE cOCT6100_FFFFFFFF
|
||||
#define cOCT6100_INVALID_CHIP_ID cOCT6100_FFFFFFFF
|
||||
#define cOCT6100_INVALID_HANDLE cOCT6100_FFFFFFFF
|
||||
#define cOCT6100_INVALID_TIMESLOT cOCT6100_FFFFFFFF
|
||||
#define cOCT6100_INVALID_STREAM cOCT6100_FFFFFFFF
|
||||
#define cOCT6100_INVALID_VALUE cOCT6100_FFFFFFFF
|
||||
#define cOCT6100_INVALID_STAT cOCT6100_FFFFFFFF
|
||||
#define cOCT6100_INVALID_STAT_W cOCT6100_FFFF
|
||||
#define cOCT6100_INVALID_PCM_LAW cOCT6100_FF
|
||||
#define cOCT6100_INVALID_EVENT cOCT6100_FFFF
|
||||
#define cOCT6100_INVALID_INDEX cOCT6100_FFFF
|
||||
#define cOCT6100_INVALID_TONE cOCT6100_FFFFFFFF
|
||||
#define cOCT6100_INVALID_PORT cOCT6100_FF
|
||||
|
||||
#define cOCT6100_AUTO_SELECT cOCT6100_FFFFFFFE
|
||||
#define cOCT6100_AUTO_SELECT_TAIL cOCT6100_FFFE
|
||||
|
||||
#define cOCT6100_INVALID_BOOL 2
|
||||
|
||||
#define cOCT6100_KEEP_PREVIOUS_SETTING 0x70100000
|
||||
|
||||
#define cOCT6100_INVALID_SIGNED_STAT cOCT6100_7FFFFFFF
|
||||
#define cOCT6100_INVALID_SIGNED_STAT_W cOCT6100_7FFF
|
||||
#define cOCT6100_INVALID_ECHO_DELAY 0x400
|
||||
|
||||
|
||||
|
||||
#define cOCT6100_SIZE_128 128
|
||||
#define cOCT6100_SIZE_256 256
|
||||
#define cOCT6100_SIZE_512 512
|
||||
#define cOCT6100_SIZE_1K 1024
|
||||
#define cOCT6100_SIZE_2K 2048
|
||||
#define cOCT6100_SIZE_4K 4096
|
||||
#define cOCT6100_SIZE_8K 8192
|
||||
#define cOCT6100_SIZE_16K 16384
|
||||
#define cOCT6100_SIZE_32K 32768
|
||||
#define cOCT6100_SIZE_64K 65536
|
||||
#define cOCT6100_SIZE_128K 131072
|
||||
#define cOCT6100_SIZE_256K 262144
|
||||
#define cOCT6100_SIZE_512K 524288
|
||||
#define cOCT6100_SIZE_1M 1048576
|
||||
#define cOCT6100_SIZE_2M 2097152
|
||||
#define cOCT6100_SIZE_4M 4194304
|
||||
#define cOCT6100_SIZE_8M 8388608
|
||||
#define cOCT6100_SIZE_16M 16777216
|
||||
#define cOCT6100_SIZE_32M 33554432
|
||||
#define cOCT6100_SIZE_64M 67108864
|
||||
#define cOCT6100_SIZE_128M 134217728
|
||||
#define cOCT6100_SIZE_256M 268435456
|
||||
#define cOCT6100_SIZE_512M 536870912
|
||||
#define cOCT6100_SIZE_1G 1073741824
|
||||
#define cOCT6100_SIZE_2G 2147483648
|
||||
|
||||
#define cOCT6100_HNDL_TAG_MASK 0xFF000000
|
||||
#define cOCT6100_HNDL_INDEX_MASK 0x0000FFFF
|
||||
#define cOCT6100_ENTRY_OPEN_CNT_MASK 0x000000FF
|
||||
#define cOCT6100_ENTRY_OPEN_CNT_SHIFT 16
|
||||
|
||||
#define cOCT6100_HNDL_TAG_INVALID 0xFF000000
|
||||
|
||||
#define cOCT6100_HNDL_TAG_CHANNEL 0x01000000
|
||||
#define cOCT6100_HNDL_TAG_TSI_CNCT 0x02000000
|
||||
#define cOCT6100_HNDL_TAG_CONF_BRIDGE 0x03000000
|
||||
#define cOCT6100_HNDL_TAG_PHASING_TSST 0x04000000
|
||||
#define cOCT6100_HNDL_TAG_BIDIR_CHANNEL 0x05000000
|
||||
#define cOCT6100_HNDL_TAG_COPY_EVENT 0x06000000
|
||||
#define cOCT6100_HNDL_TAG_ADPCM_CHANNEL 0x07000000
|
||||
|
||||
#define cOCT6100_INVALID_HANDLE_TYPE cOCT6100_INVALID_VALUE
|
||||
|
||||
#define cOCT6100_MEMORY_ROUND_SIZE 16
|
||||
|
||||
#define mOCT6100_ROUND_MEMORY_SIZE( ulMemorySize, ulTempVar ) \
|
||||
if ((ulTempVar = ulMemorySize % cOCT6100_MEMORY_ROUND_SIZE) != 0) \
|
||||
ulMemorySize += cOCT6100_MEMORY_ROUND_SIZE - ulTempVar;
|
||||
|
||||
#define mOCT6100_ROUND_ADDRESS( ulAddress, ulBoundary, ulTempVar ) \
|
||||
if ((ulTempVar = ulAddress % ulBoundary) != 0) \
|
||||
ulAddress += ulBoundary - ulTempVar;
|
||||
|
||||
#define cOCT6100_INTERNAL_CLOCK_SOURCE 0
|
||||
#define cOCT6100_EXTERNAL_CLOCK_SOURCE 1
|
||||
|
||||
#define cOCT6100_ACTIVE_HIGH_POLARITY 0
|
||||
#define cOCT6100_ACTIVE_LOW_POLARITY 1
|
||||
|
||||
#define cOCT6100_TDM_SAMPLE_AT_3_QUARTERS 0
|
||||
#define cOCT6100_TDM_SAMPLE_AT_RISING_EDGE 1
|
||||
#define cOCT6100_TDM_SAMPLE_AT_FALLING_EDGE 2
|
||||
|
||||
#define cOCT6100_TDM_STREAM_FREQ_2MHZ 0
|
||||
#define cOCT6100_TDM_STREAM_FREQ_4MHZ 1
|
||||
#define cOCT6100_TDM_STREAM_FREQ_8MHZ 2
|
||||
#define cOCT6100_TDM_STREAM_FREQ_16MHZ 3
|
||||
|
||||
#define cOCT6100_TDM_STREAM_MAX_GROUPS 8
|
||||
|
||||
#define cOCT6100_PCM_U_LAW 0
|
||||
#define cOCT6100_PCM_A_LAW 1
|
||||
#define cOCT6100_PCM_UNCHANGED 2
|
||||
#define cOCT6100_ADPCM_ENCODED 3
|
||||
|
||||
#define cOCT6100_INTERRUPT_DISABLE 0
|
||||
#define cOCT6100_INTERRUPT_NO_TIMEOUT 1
|
||||
#define cOCT6100_INTERRUPT_TIMEOUT 2
|
||||
|
||||
#define cOCT6100_NUMBER_TSSTS_1 1
|
||||
#define cOCT6100_NUMBER_TSSTS_2 2
|
||||
|
||||
#define cOCT6100_G711_64KBPS 1
|
||||
#define cOCT6100_G726_40KBPS 2
|
||||
#define cOCT6100_G726_32KBPS 3
|
||||
#define cOCT6100_G726_24KBPS 4
|
||||
#define cOCT6100_G726_16KBPS 5
|
||||
#define cOCT6100_G727_40KBPS_4_1 6
|
||||
#define cOCT6100_G727_40KBPS_3_2 7
|
||||
#define cOCT6100_G727_40KBPS_2_3 8
|
||||
#define cOCT6100_G727_32KBPS_4_0 9
|
||||
#define cOCT6100_G727_32KBPS_3_1 10
|
||||
#define cOCT6100_G727_32KBPS_2_2 11
|
||||
#define cOCT6100_G727_24KBPS_3_0 12
|
||||
#define cOCT6100_G727_24KBPS_2_1 13
|
||||
#define cOCT6100_G727_16KBPS_2_0 14
|
||||
#define cOCT6100_G726_ENCODED 15
|
||||
#define cOCT6100_G711_G726_ENCODED 16
|
||||
#define cOCT6100_G711_G727_2C_ENCODED 17
|
||||
#define cOCT6100_G711_G727_3C_ENCODED 18
|
||||
#define cOCT6100_G711_G727_4C_ENCODED 19
|
||||
#define cOCT6100_G727_2C_ENCODED 20
|
||||
#define cOCT6100_G727_3C_ENCODED 21
|
||||
#define cOCT6100_G727_4C_ENCODED 22
|
||||
|
||||
#define cOCT6100_ADPCM_IN_HIGH_BITS 0
|
||||
#define cOCT6100_ADPCM_IN_LOW_BITS 1
|
||||
|
||||
/* The values of these defines must not change. */
|
||||
#define cOCT6100_H100_TRACKA 0
|
||||
#define cOCT6100_H100_TRACKB 1
|
||||
#define cOCT6100_H100_TRACKA_FALLBACKB 2
|
||||
#define cOCT6100_H100_TRACKB_FALLBACKA 3
|
||||
#define cOCT6100_H100_DISABLED 4
|
||||
#define cOCT6100_H100_MASTERA 5
|
||||
#define cOCT6100_H100_BACKUPA 6
|
||||
#define cOCT6100_H100_MASTERB 7
|
||||
#define cOCT6100_H100_BACKUPB 8
|
||||
|
||||
#define cOCT6100_FREE_TSST 0
|
||||
#define cOCT6100_RX_TSST 16
|
||||
#define cOCT6100_TX_TSST 32
|
||||
|
||||
#define cOCT6100_INTRPT_ACTIVE 0
|
||||
#define cOCT6100_INTRPT_WILL_TIMEOUT 1
|
||||
#define cOCT6100_INTRPT_IN_TIMEOUT 2
|
||||
#define cOCT6100_INTRPT_DISABLED 3
|
||||
|
||||
#define cOCT6100_EXTERNAL_MEM_BIST_TIMEOUT 1000000
|
||||
|
||||
/* Clocks defines */
|
||||
#define cOCT6100_UPCLK_FREQ_33_33_MHZ 33333333
|
||||
|
||||
#define cOCT6100_MCLK_FREQ_133_MHZ 133000000
|
||||
#define cOCT6100_MCLK_FREQ_125_MHZ 125000000
|
||||
#define cOCT6100_MCLK_FREQ_117_MHZ 117000000
|
||||
#define cOCT6100_MCLK_FREQ_108_MHZ 108000000
|
||||
#define cOCT6100_MCLK_FREQ_100_MHZ 100000000
|
||||
#define cOCT6100_MCLK_FREQ_92_MHZ 92000000
|
||||
#define cOCT6100_MCLK_FREQ_83_MHZ 83000000
|
||||
#define cOCT6100_MCLK_FREQ_75_MHZ 75000000
|
||||
|
||||
/* Tone buffer defines.*/
|
||||
#define cOCT6100_MAX_NUM_TONE_BUFFERS 1344
|
||||
#define cOCT6100_MAX_TONES_PER_CALL 32
|
||||
|
||||
/* Memory defines.*/
|
||||
#define cOCT6100_MEM_TYPE_SDR 0
|
||||
#define cOCT6100_MEM_TYPE_DDR 1
|
||||
#define cOCT6100_MEM_TYPE_SDR_PLL_BYPASS 2
|
||||
|
||||
#define cOCT6100_MEMORY_CHIP_SIZE_8MB cOCT6100_SIZE_8M
|
||||
#define cOCT6100_MEMORY_CHIP_SIZE_16MB cOCT6100_SIZE_16M
|
||||
#define cOCT6100_MEMORY_CHIP_SIZE_32MB cOCT6100_SIZE_32M
|
||||
#define cOCT6100_MEMORY_CHIP_SIZE_64MB cOCT6100_SIZE_64M
|
||||
#define cOCT6100_MEMORY_CHIP_SIZE_128MB cOCT6100_SIZE_128M
|
||||
|
||||
#define cOCT6100_MAX_NUM_MEMORY_CHIP 2
|
||||
|
||||
#define cOCT6100_16MB_MEMORY_BANKS 0
|
||||
#define cOCT6100_32MB_MEMORY_BANKS 1
|
||||
#define cOCT6100_64MB_MEMORY_BANKS 2
|
||||
#define cOCT6100_128MB_MEMORY_BANKS 3
|
||||
|
||||
#define cOCT6100_1_MEMORY_BANKS 0
|
||||
#define cOCT6100_2_MEMORY_BANKS 1
|
||||
#define cOCT6100_3_MEMORY_BANKS 2
|
||||
#define cOCT6100_4_MEMORY_BANKS 3
|
||||
|
||||
/* Chip open defines.*/
|
||||
#define cOCT6100_INTERNAL_TONE_ARRAY_SIZE 256 /* in words.*/
|
||||
#ifndef cOCT6100_INTERNAL_SUPER_ARRAY_SIZE
|
||||
#define cOCT6100_INTERNAL_SUPER_ARRAY_SIZE 128 /* in words.*/
|
||||
#endif
|
||||
|
||||
/* Internal memory mapping.*/
|
||||
|
||||
/*=======================================================================*/
|
||||
#define cOCT6100_TSST_CONTROL_MEM_BASE 0x26000
|
||||
|
||||
#define cOCT6100_TSST_CONTROL_MEM_ENTRY_SIZE 2 /* Each entries are 2 bytes.*/
|
||||
#define cOCT6100_TSST_CONTROL_MEM_INPUT_TSST 0x0800
|
||||
#define cOCT6100_TSST_CONTROL_MEM_OUTPUT_TSST 0x2000
|
||||
|
||||
#define cOCT6100_TSST_CONTROL_MEM_PCM_LAW_OFFSET 12
|
||||
#define cOCT6100_TSST_CONTROL_MEM_NIBBLE_POS_OFFSET 11
|
||||
#define cOCT6100_TSST_CONTROL_MEM_TSST_NUM_OFFSET 12
|
||||
|
||||
#define cOCT6100_TSST_CONTROL_MEM_TSI_MEM_MASK 0x7FF
|
||||
|
||||
#define cOCT6100_TSST_CONTROL_PHASING_TSST_BASE_ENTRY 1344
|
||||
#define cOCT6100_TSST_CONTROL_TIMESTAMP_BASE_ENTRY 1516
|
||||
|
||||
/*=======================================================================*/
|
||||
#define cOCT6100_CONVERSION_CONTROL_MEM_BASE 0x28000
|
||||
|
||||
/* Each entries are 8 bytes but an 8 bytes mixer entry is located inbetween each entry.*/
|
||||
#define cOCT6100_CONVERSION_CONTROL_MEM_ENTRY_SIZE 16
|
||||
#define cOCT6100_CONVERSION_CONTROL_MEM_ENCODER 0x0000
|
||||
#define cOCT6100_CONVERSION_CONTROL_MEM_DECODER 0x8000
|
||||
#define cOCT6100_CONVERSION_CONTROL_MEM_ACTIVATE_ENTRY 0x8000
|
||||
#define cOCT6100_CONVERSION_CONTROL_MEM_RST_ON_NEXT_FR 0x8000
|
||||
|
||||
#define cOCT6100_CONVERSION_CONTROL_MEM_PHASE_OFFSET 12
|
||||
#define cOCT6100_CONVERSION_CONTROL_MEM_NIBBLE_POS_OFFSET 9
|
||||
#define cOCT6100_CONVERSION_CONTROL_MEM_COMP_OFFSET 11
|
||||
#define cOCT6100_CONVERSION_CONTROL_MEM_LAW_OFFSET 8
|
||||
#define cOCT6100_CONVERSION_CONTROL_MEM_SIL_SUP_OFFSET 8
|
||||
|
||||
#define cOCT6100_CONVERSION_CONTROL_PHASE_SIZE_BASE_ADD 0x5400
|
||||
|
||||
/*=======================================================================*/
|
||||
#define cOCT6100_MIXER_CONTROL_MEM_BASE 0x28008
|
||||
|
||||
/* Each entries are 8 bytes but an 8 bytes mixer entry is located inbetween each entry.*/
|
||||
#define cOCT6100_MIXER_CONTROL_MEM_ENTRY_SIZE 16
|
||||
#define cOCT6100_MIXER_CONTROL_MEM_SUB_STORE 0xA000
|
||||
#define cOCT6100_MIXER_CONTROL_MEM_STORE 0x8000
|
||||
#define cOCT6100_MIXER_CONTROL_MEM_LOAD 0x4000
|
||||
#define cOCT6100_MIXER_CONTROL_MEM_ACCUMULATE 0x6000
|
||||
#define cOCT6100_MIXER_CONTROL_MEM_COPY 0x2000
|
||||
#define cOCT6100_MIXER_CONTROL_MEM_NO_OP 0x0000
|
||||
|
||||
#define cOCT6100_MIXER_CONTROL_MEM_LAW_OFFSET 11
|
||||
|
||||
#define cOCT6100_MIXER_HEAD_NODE 0
|
||||
#define cOCT6100_MIXER_TAIL_NODE 1
|
||||
#define cOCT6100_MIXER_RECORD_COPY_NODE 2
|
||||
|
||||
/*=======================================================================*/
|
||||
#define cOCT6100_ECHO_CONTROL_MEM_BASE 0x14000
|
||||
|
||||
#define cOCT6100_ECHO_CONTROL_MEM_ENTRY_SIZE 4 /* Each entries are 8 bytes.*/
|
||||
#define cOCT6100_ECHO_CONTROL_MEM_ACTIVATE_ENTRY 0x8000
|
||||
#define cOCT6100_ECHO_CONTROL_MEM_EXTERNAL_AF_CTRL 0x2000
|
||||
|
||||
#define cOCT6100_ECHO_CONTROL_MEM_DEBUG_OFFSET 14
|
||||
#define cOCT6100_ECHO_CONTROL_MEM_AF_CONTROL 14
|
||||
#define cOCT6100_ECHO_CONTROL_MEM_INPUT_LAW_OFFSET 12
|
||||
#define cOCT6100_ECHO_CONTROL_MEM_OUTPUT_LAW_OFFSET 11
|
||||
|
||||
#define cOCT6100_ECHO_CONTROL_MEM_TSI_MEM_MASK 0x7FF
|
||||
|
||||
/*=======================================================================*/
|
||||
#define cOCT6100_ST_CONTROL_MEM_BASE 0x2000000
|
||||
|
||||
#define cOCT6100_ST_CONTROL_MEM_ENTRY_SIZE 16 /* Each entries are 8 bytes.*/
|
||||
|
||||
/*=======================================================================*/
|
||||
#define cOCT6100_PART1_BASE 0x00080000
|
||||
#define cOCT6100_PART1_CPU_LSU_CB_BASE cOCT6100_PART1_BASE+0x0000E3C0 /* 8 * 8 = 64 bytes */
|
||||
#define cOCT6100_PART1_HW_LSU_CB_BASE cOCT6100_PART1_BASE+0x0000E400 /* 8 * 128 = 1K byte */
|
||||
#define cOCT6100_PART1_END_STATICS_BASE cOCT6100_PART1_BASE+0x0000E9F0 /* 912 bytes available for your viewing pleasure. */
|
||||
#define cOCT6100_PART1_API_SCRATCH_PAD cOCT6100_PART1_END_STATICS_BASE+4+(12*8)
|
||||
#define cOCT6100_PART1_EGO_REG cOCT6100_PART1_BASE+0x0007FF00
|
||||
|
||||
/* External Memory mapping. */
|
||||
#define cOCT6100_EXTERNAL_MEM_BLOCK_SIZE 1024
|
||||
#define cOCT6100_EXTERNAL_MEM_BASE_ADDRESS 0x08000000
|
||||
|
||||
|
||||
#define cOCT6100_TLV_BASE ( 0x00016000 + cOCT6100_EXTERNAL_MEM_BASE_ADDRESS )
|
||||
#define cOCT6100_CHANNEL_ROOT_BASE ( 0x00020000 + cOCT6100_EXTERNAL_MEM_BASE_ADDRESS )
|
||||
#define cOCT6100_PGSP_EVENT_OUT_BASE ( 0x002C0000 + cOCT6100_EXTERNAL_MEM_BASE_ADDRESS )
|
||||
#define cOCT6100_POUCH_BASE ( 0x002E0000 + cOCT6100_EXTERNAL_MEM_BASE_ADDRESS )
|
||||
#define cOCT6100_IMAGE_FILE_BASE ( 0x00300000 + cOCT6100_EXTERNAL_MEM_BASE_ADDRESS )
|
||||
|
||||
#define cOCT6100_CHANNEL_ROOT_SIZE 4096
|
||||
#define cOCT6100_CHANNEL_ROOT_TOTAL_SIZE ( 672 * cOCT6100_CHANNEL_ROOT_SIZE )
|
||||
#define cOCT6100_PGSP_EVENT_OUT_SIZE 131072
|
||||
#define cOCT6100_PGSP_TONE_EVENT_SIZE 0x40
|
||||
#define cOCT6100_IMAGE_FILE_SIZE 0x100000
|
||||
|
||||
#define cOCT6100_MATRIX_TIMESTAMP_DWORD_ADD cOCT6100_POUCH_BASE + 0x8
|
||||
#define cOCT6100_MATRIX_CHAN_SELECT_DWORD_ADD cOCT6100_POUCH_BASE + 0x14
|
||||
#define cOCT6100_MATRIX_WRITE_PTR_DWORD_ADD cOCT6100_POUCH_BASE + 0x4
|
||||
#define cOCT6100_MATRIX_PLL_JITTER_COUNT_ADD cOCT6100_POUCH_BASE + 0x1C
|
||||
#define cOCT6100_MATRIX_DWORD_BASE cOCT6100_POUCH_BASE + 0xE0000
|
||||
|
||||
#define cOCT6100_CHANNEL_ROOT_GLOBAL_CONF_OFFSET 0x0000
|
||||
|
||||
#define cOCT6100_NUM_WORDS_PER_TONE_EVENT 32
|
||||
#define cOCT6100_NUM_PGSP_EVENT_OUT 2048 /* CPTAG: Must not be modified, represents number of events stored in hardware. */
|
||||
#define cOCT6100_VALID_TONE_EVENT 0x8000
|
||||
#define cOCT6100_LOCAL_TIMESTAMP_INCREMENT 32 /* 4 ms increment. */
|
||||
#define cOCT6100_ABSOLUTE_MAX_NUM_PGSP_EVENT_OUT 65535
|
||||
#define cOCT6100_MIN_TIMESLOT_FOR_TIMESTAMP 5
|
||||
|
||||
|
||||
/*=======================================================================*/
|
||||
#define cOCT6100_GSC_PGSP_CONTEXT_BASE_ADD_OFFSET 0x0C
|
||||
#define cOCT6100_GSC_PGSP_INIT_CONTEXT_BASE_ADD_OFFSET 0x10
|
||||
#define cOCT6100_GSC_RIN_CIRC_BUFFER_BASE_ADD_OFFSET 0x14
|
||||
#define cOCT6100_GSC_SIN_CIRC_BUFFER_BASE_ADD_OFFSET 0x18
|
||||
#define cOCT6100_GSC_SOUT_CIRC_BUFFER_BASE_ADD_OFFSET 0x1C
|
||||
|
||||
#define cOCT6100_GSC_BUFFER_LAW_OFFSET 27
|
||||
|
||||
/*=======================================================================*/
|
||||
#define cOCT6100_CH_MAIN_PGSP_CONTEXT_OFFSET 0x00000
|
||||
#define cOCT6100_CH_MAIN_TONE_EVENT_OFFSET 0x00488
|
||||
|
||||
/*=======================================================================*/
|
||||
#define cOCT6100_PLAYOUT_EVENT_REPEAT_OFFSET 31
|
||||
#define cOCT6100_PLAYOUT_EVENT_LAW_OFFSET 30
|
||||
#define cOCT6100_PLAYOUT_EVENT_MIX_OFFSET 28
|
||||
#define cOCT6100_PLAYOUT_EVENT_LOOP_TIMES_OFFSET 27
|
||||
#define cOCT6100_PLAYOUT_EVENT_GAIN_OFFSET 24
|
||||
|
||||
#define cOCT6100_PLAYOUT_EVENT_MEM_SIZE 16
|
||||
|
||||
/* Image related defines.*/
|
||||
#define cOCT6100_MIN_IMAGE_SIZE 0x001000
|
||||
#define cOCT6100_MAX_IMAGE_SIZE 0x100000
|
||||
#define cOCT6100_MAX_IMAGE_REGION 60
|
||||
#define cOCT6100_IMAGE_AF_CST_OFFSET 0x1000;
|
||||
|
||||
/* Max defines.*/
|
||||
#ifndef cOCT6100_MAX_ECHO_CHANNELS
|
||||
#define cOCT6100_MAX_ECHO_CHANNELS 128
|
||||
#endif
|
||||
#define cOCT6100_MAX_TSI_CNCTS 1530
|
||||
#define cOCT6100_MAX_CALLER_ID_PLAYOUT_BUFFERS ( 3328 + 6 )
|
||||
#define cOCT6100_MAX_PLAYOUT_BUFFERS ( 1344 + cOCT6100_MAX_CALLER_ID_PLAYOUT_BUFFERS )
|
||||
#define cOCT6100_MAX_CONF_BRIDGE 672
|
||||
#define cOCT6100_MAX_FLEX_CONF_PARTICIPANTS cOCT6100_MAX_ECHO_CHANNELS
|
||||
#define cOCT6100_MAX_PHASING_TSST 16
|
||||
#define cOCT6100_MAX_ADPCM_CHANNELS 672
|
||||
|
||||
#define cOCT6100_NUM_TSI_B4_PHASING 1344
|
||||
#define cOCT6100_TOTAL_TSI_CONTROL_MEM_ENTRY 1534
|
||||
#define cOCT6100_MAX_TSI_CONTROL_MEM_ENTRY 1344
|
||||
#define cOCT6100_MAX_ECHO_CONTROL_MEM_ENTRY 672
|
||||
#define cOCT6100_MAX_TSI_B4_TIMESTAMP 172
|
||||
#define cOCT6100_TSI_MEM_FOR_TIMESTAMP 4
|
||||
#define cOCT6100_API_EXT_TONE_EXTRA_TSI 1533
|
||||
|
||||
/* Echo channel ports */
|
||||
#define cOCT6100_CHANNEL_PORT_RIN 0
|
||||
#define cOCT6100_CHANNEL_PORT_ROUT 1
|
||||
#define cOCT6100_CHANNEL_PORT_SIN 2
|
||||
#define cOCT6100_CHANNEL_PORT_SOUT 3
|
||||
#define cOCT6100_CHANNEL_PORT_ROUT_SOUT 4
|
||||
|
||||
#define cOCT6100_NO_ENCODING 10
|
||||
#define cOCT6100_NO_DECODING 11
|
||||
|
||||
/* Buffer playout defines */
|
||||
#define cOCT6100_NO_SKIP 0
|
||||
#define cOCT6100_BUFFER_PLAYOUT_MIN_SIZE 1024
|
||||
#define cOCT6100_DEFAULT_TIMESTAMP 0
|
||||
#define cOCT6100_MIXING_0_DB 0
|
||||
#define cOCT6100_MIXING_MINUS_6_DB 1
|
||||
#define cOCT6100_MIXING_MINUS_12_DB 2
|
||||
#define cOCT6100_MIXING_MUTE 3
|
||||
#define cOCT6100_PLAYOUT_GAIN 0x41000000
|
||||
#define cOCT6100_PLAYOUT_EVENT 1
|
||||
#define cOCT6100_MINIMUM_BUFFER_SIZE 64
|
||||
#define cOCT6100_BUFFER_SIZE_GRANULARITY 16
|
||||
#define cOCT6100_REPEAT_INFINITELY cOCT6100_INVALID_VALUE
|
||||
#define cOCT6100_REPEAT_MAX 32767
|
||||
#define cOCT6100_SAMPLES_PER_MS 8
|
||||
|
||||
/* For the playout events. */
|
||||
#define cOCT6100_MAX_BUFFER_PLAYOUT_EVENT_PER_CALL 32
|
||||
#define cOCT6100_MIN_BUFFER_PLAYOUT_EVENT 128
|
||||
#define cOCT6100_MAX_BUFFER_PLAYOUT_EVENT 65535
|
||||
/* Event types */
|
||||
#define cOCT6100_BUFFER_PLAYOUT_EVENT_INVALID cOCT6100_INVALID_VALUE
|
||||
#define cOCT6100_BUFFER_PLAYOUT_EVENT_STOP 1
|
||||
|
||||
|
||||
/* Phasing defines.*/
|
||||
#define cOCT6100_SINGLE_PHASING 0
|
||||
#define cOCT6100_DUAL_PHASING 1
|
||||
#define cOCT6100_NO_PHASING 2
|
||||
|
||||
/* Echo canceller mode.*/
|
||||
#define cOCT6100_ELECTRIC_EC 0
|
||||
#define cOCT6100_ELECTRIC_EC_DISPLACEMENT 1
|
||||
#define cOCT6100_ACCOUSTIC_ES 2
|
||||
|
||||
/* Echo control modes.*/
|
||||
#define cOCT6100_ECHO_OP_MODE_NORMAL 0
|
||||
#define cOCT6100_ECHO_OP_MODE_HT_FREEZE 1
|
||||
#define cOCT6100_ECHO_OP_MODE_HT_RESET 2
|
||||
#define cOCT6100_ECHO_OP_MODE_POWER_DOWN 3
|
||||
#define cOCT6100_ECHO_OP_MODE_EXTERNAL 4
|
||||
#define cOCT6100_ECHO_OP_MODE_NO_ECHO 5
|
||||
#define cOCT6100_ECHO_OP_MODE_SPEECH_RECOGNITION 6
|
||||
#define cOCT6100_ECHO_OP_MODE_G169_ALC cOCT6100_ECHO_OP_MODE_NO_ECHO
|
||||
|
||||
/* 2100 Hz disabling configuration. */
|
||||
#define cOCT6100_NEVER_DISABLED 0
|
||||
#define cOCT6100_G164_2100_HZ 1
|
||||
#define cOCT6100_G165_2100_HZ_WITH_PHASE_REV 2
|
||||
|
||||
/* TSST defines.*/
|
||||
#define cOCT6100_UNASSIGNED cOCT6100_FFFD
|
||||
|
||||
#define cOCT6100_MAX_TSSTS (cOCT6100_MAX_ECHO_CHANNELS*4) /* cOCT6100_MAX_ECHO_CHANNELS channels, 4 TSSTs per channel. */
|
||||
#define cOCT6100_TWO_TSSTS_INDEX_MASK 0x8000
|
||||
#define cOCT6100_TSST_INDEX_MASK 0x7FFF
|
||||
#define cOCT6100_INPUT_TSST 0
|
||||
#define cOCT6100_OUTPUT_TSST 1
|
||||
|
||||
/* Conference bridges defines.*/
|
||||
/* CPTAG: No application needs for mixer events. */
|
||||
/* 2 needed for head and tail nodes. 2 more needed to get through channel modify function. */
|
||||
/* Careful. This value cannot be zero. */
|
||||
#ifndef cOCT6100_MAX_MIXER_EVENTS
|
||||
#define cOCT6100_MAX_MIXER_EVENTS 4
|
||||
#endif
|
||||
#define cOCT6100_MAX_FLEX_CONF_PARTICIPANTS_PER_BRIDGE 32
|
||||
#define cOCT6100_CONF_DOMINANT_SPEAKER_UNASSIGNED 672
|
||||
#define cOCT6100_CONF_NO_DOMINANT_SPEAKER_HNDL cOCT6100_FFFFFFFE
|
||||
|
||||
/* Conversion memory defines.*/
|
||||
#define cOCT6100_MAX_CONVERSION_MEMORY_BLOCKS (cOCT6100_MAX_ECHO_CHANNELS*2) /* CPTAG: Max this out to the expected max number of channels * 2, was 1344 */
|
||||
|
||||
/* Tone detection defines.*/
|
||||
#define cOCT6100_MAX_TONE_NUMBER 55
|
||||
|
||||
/* Register definition and address. */
|
||||
#define cOCT6100_TONE_EVENT_WRITE_PTR_REG 0x722
|
||||
#define cOCT6100_TONE_EVENT_READ_PTR_REG 0x720
|
||||
|
||||
/* Special Signaling tone IDs. */
|
||||
#define cOCT6100_TONE_SIN_SYSTEM7_2000 0x20000023
|
||||
#define cOCT6100_TONE_SIN_SYSTEM7_1780 0x20000024
|
||||
#define cOCT6100_TONE_ROUT_G168_2100GB_ON 0x10000000
|
||||
#define cOCT6100_TONE_ROUT_G168_2100GB_WSPR 0x10000002
|
||||
#define cOCT6100_TONE_ROUT_G168_1100GB_ON 0x10000004
|
||||
#define cOCT6100_TONE_ROUT_G168_2100GB_ON_WIDE_A 0x10000005
|
||||
#define cOCT6100_TONE_ROUT_G168_2100GB_ON_WIDE_B 0x10000006
|
||||
#define cOCT6100_TONE_ROUT_G168_2100GB_WSPR_WIDE 0x10000008
|
||||
#define cOCT6100_TONE_SOUT_G168_2100GB_ON 0x40000000
|
||||
#define cOCT6100_TONE_SOUT_G168_2100GB_WSPR 0x40000002
|
||||
#define cOCT6100_TONE_SOUT_G168_1100GB_ON 0x40000004
|
||||
#define cOCT6100_TONE_SOUT_G168_2100GB_ON_WIDE_A 0x40000005
|
||||
#define cOCT6100_TONE_SOUT_G168_2100GB_ON_WIDE_B 0x40000006
|
||||
#define cOCT6100_TONE_SOUT_G168_2100GB_WSPR_WIDE 0x40000008
|
||||
#define cOCT6100_TONE_SIN_SYSTEM5_2400 0x20000020
|
||||
#define cOCT6100_TONE_SIN_SYSTEM5_2600 0x20000021
|
||||
#define cOCT6100_TONE_SIN_SYSTEM5_2400_2600 0x20000022
|
||||
|
||||
#define cOCT6100_CHIP_ID_REVISION_REG 0x17E
|
||||
|
||||
/* BOOT type. */
|
||||
#define cOCT6100_AF_BOOT_TYPE 0x5
|
||||
#define cOCT6100_PRODUCTION_BOOT_TYPE 0x7
|
||||
#define cOCT6100_PRODUCTION_SHORT_BOOT_TYPE 0x8
|
||||
|
||||
/*Production Bist Modes*/
|
||||
#define cOCT6100_PRODUCTION_BIST_STANDARD 0x0
|
||||
#define cOCT6100_PRODUCTION_BIST_SHORT 0x1
|
||||
|
||||
/* Interrupt register masks.*/
|
||||
#define cOCT6100_INTRPT_MASK_REG_102H 0x0001
|
||||
#define cOCT6100_INTRPT_MASK_REG_202H 0x1C01
|
||||
#define cOCT6100_INTRPT_MASK_REG_302H 0xF100
|
||||
#define cOCT6100_INTRPT_MASK_REG_502H 0x0002
|
||||
#define cOCT6100_INTRPT_MASK_REG_702H 0x0002
|
||||
|
||||
#define cOCT6100_DECODER_MEMORY_OFFSET 672
|
||||
|
||||
/* Debug defines.*/
|
||||
#define cOCT6100_DEBUG_MAX_READ_LENGTH 10240
|
||||
#define cOCT6100_DEBUG_SOUT_MAX_READ_LENGTH 2560
|
||||
#define cOCT6100_DEBUG_CHAN_RECORD_INDEX 64
|
||||
#define cOCT6100_DEBUG_RECORD_BUFFER_BYTE_SIZE 0x20000
|
||||
#define cOCT6100_DEBUG_RECORD_MATRIX_SIZE 0x8000
|
||||
#define cOCT6100_DEBUG_RECORD_READ_DATA_BYTE_SIZE 1024
|
||||
#define cOCT6100_DEBUG_RECORD_BLOCK_BYTE_SIZE 0x1000
|
||||
|
||||
/* Tone event defines.*/
|
||||
#define cOCT6100_MAX_TONE_EVENT 56
|
||||
#define cOCT6100_TONE_PRESENT 0
|
||||
#define cOCT6100_TONE_STOP 1
|
||||
#define cOCT6100_TONE_REFRESH 2
|
||||
|
||||
/* TLV defines.*/
|
||||
#define cOCT6100_TLV_MAX_ADDRESS 0x10000000
|
||||
#define cOCT6100_TLV_MAX_TONE_NAME_SIZE 64
|
||||
|
||||
#define cOCT6100_VERSION_NUMBER_MAX_SIZE 1016
|
||||
|
||||
/* Echo Tail defines.*/
|
||||
#define cOCT6100_TAIL_LENGTH_32MS 32
|
||||
#define cOCT6100_TAIL_LENGTH_64MS 64
|
||||
#define cOCT6100_TAIL_LENGTH_128MS 128
|
||||
#define cOCT6100_MAX_ECHO_TAIL_DISPLACEMENT 5600 /* In milliseconds */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Generic loop counter.*/
|
||||
#define cOCT6100_MAX_LOOP 0x2000
|
||||
/* CPU boot timeout counter. */
|
||||
#define cOCT6100_MAX_LOOP_CPU_TIMEOUT 0x20000
|
||||
|
||||
/* Automatic level control */
|
||||
#define cOCT6100_PASS_THROUGH_LEVEL_CONTROL 0x90
|
||||
|
||||
/* Channel stats debug info */
|
||||
#define cOCT6100_DEBUG_CHAN_STATS_EVENT_BYTE_SIZE 1024
|
||||
#define cOCT6100_DEBUG_CHAN_STATS_LITE_EVENT_BYTE_SIZE 720
|
||||
|
||||
/* Image start string define */
|
||||
#define cOCT6100_IMAGE_START_STRING "EDS3_IMAGE_NAME"
|
||||
|
||||
/* Tone image info defines.*/
|
||||
#define cOCT6100_TONE_INFO_START_STRING "[ToneDetectorInfo]"
|
||||
#define cOCT6100_TONE_INFO_STOP_STRING "[~ToneDetectorInfo]"
|
||||
#define cOCT6100_TONE_INFO_EVENT_STRING "TONEEVENT=0x"
|
||||
|
||||
#define cOCT6100_MAX_NLP_CONF_DWORD 20
|
||||
|
||||
/* Tail displacement info.*/
|
||||
#define cOCT6100_MAX_TAIL_DISPLACEMENT 896
|
||||
|
||||
/* Comfort noise define */
|
||||
#define cOCT6100_COMFORT_NOISE_NORMAL 0x0
|
||||
#define cOCT6100_COMFORT_NOISE_EXTENDED 0x3
|
||||
#define cOCT6100_COMFORT_NOISE_OFF 0x2
|
||||
#define cOCT6100_COMFORT_NOISE_FAST_LATCH 0x1
|
||||
|
||||
/* Mixer event type.*/
|
||||
#define cOCT6100_EVENT_TYPE_SOUT_COPY 0x0
|
||||
#define cOCT6100_EVENT_TYPE_SIN_COPY 0x1
|
||||
|
||||
/* Tone disabler status.*/
|
||||
#define cOCT6100_TONE_DISABLER_EC_ENABLED 0
|
||||
#define cOCT6100_TONE_DISABLER_EC_DISABLED 1
|
||||
|
||||
/* ADPCM Channel defines */
|
||||
#define cOCT6100_ADPCM_ENCODING 0
|
||||
#define cOCT6100_ADPCM_DECODING 1
|
||||
|
||||
/* Double talk behavior modes. */
|
||||
#define cOCT6100_DOUBLE_TALK_BEH_NORMAL 0x0
|
||||
#define cOCT6100_DOUBLE_TALK_BEH_LESS_AGGRESSIVE 0x1
|
||||
|
||||
/* Api Version string length.*/
|
||||
#define cOCT6100_API_VERSION_STRING_LENGTH 32
|
||||
|
||||
/* Extended tone detection information. */
|
||||
#define cOCT6100_API_EXT_TONE_DISABLED 0
|
||||
#define cOCT6100_API_EXT_TONE_SIN_PORT_MODE 1
|
||||
#define cOCT6100_API_EXT_TONE_RIN_PORT_MODE 2
|
||||
|
||||
|
||||
|
||||
/* Mute/UnMute defines. */
|
||||
#define cOCT6100_CHANNEL_MUTE_PORT_NONE 0x00
|
||||
#define cOCT6100_CHANNEL_MUTE_PORT_RIN 0x01
|
||||
#define cOCT6100_CHANNEL_MUTE_PORT_ROUT 0x02
|
||||
#define cOCT6100_CHANNEL_MUTE_PORT_SIN 0x04
|
||||
#define cOCT6100_CHANNEL_MUTE_PORT_SOUT 0x08
|
||||
#define cOCT6100_CHANNEL_MUTE_PORT_SIN_WITH_FEATURES 0x10
|
||||
|
||||
/* Debug get data dump modes. */
|
||||
#define cOCT6100_DEBUG_GET_DATA_MODE_16S_LITE 0x0
|
||||
#define cOCT6100_DEBUG_GET_DATA_MODE_120S_LITE 0x1
|
||||
#define cOCT6100_DEBUG_GET_DATA_MODE_16S 0x2
|
||||
#define cOCT6100_DEBUG_GET_DATA_MODE_120S 0x3
|
||||
|
||||
/* Debug get data dump content. */
|
||||
#define cOCT6100_DEBUG_GET_DATA_CONTENT_COMPLETE 0x0 /* Full binary dump to be sent for support. */
|
||||
#define cOCT6100_DEBUG_GET_DATA_CONTENT_RIN_PCM 0x1 /* Only Rin PCM stream data. */
|
||||
#define cOCT6100_DEBUG_GET_DATA_CONTENT_SIN_PCM 0x2 /* Only Sin PCM stream data. */
|
||||
#define cOCT6100_DEBUG_GET_DATA_CONTENT_SOUT_PCM 0x3 /* Only Sout PCM stream data. */
|
||||
|
||||
|
||||
|
||||
#define cOCT6100_BIST_IN_PROGRESS 0x0
|
||||
#define cOCT6100_BIST_CONFIGURATION_FAILED 0x1
|
||||
#define cOCT6100_BIST_STATUS_CRC_FAILED 0x2
|
||||
#define cOCT6100_BIST_MEMORY_FAILED 0x3
|
||||
#define cOCT6100_BIST_SUCCESS 0x4
|
||||
|
||||
/* Image types. */
|
||||
#define cOCT6100_IMAGE_TYPE_WIRELINE 0x0
|
||||
#define cOCT6100_IMAGE_TYPE_COMBINED 0x1
|
||||
|
||||
/* Fatal general error types. */
|
||||
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_1 0x0001
|
||||
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_2 0x0002
|
||||
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_3 0x0004
|
||||
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_4 0x0008
|
||||
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_5 0x0010
|
||||
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_6 0x0020
|
||||
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_7 0x0040
|
||||
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_8 0x0080
|
||||
#define cOCT6100_FATAL_GENERAL_ERROR_TYPE_9 0x0100
|
||||
|
||||
#endif /* __OCT6100_DEFINES_H__ */
|
||||
|
||||
838
xpp/oct612x/include/oct6100api/oct6100_errors.h
Normal file
838
xpp/oct612x/include/oct6100api/oct6100_errors.h
Normal file
@@ -0,0 +1,838 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_errors.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
Header file containing all defines used for error codes.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 205 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_ERRORS_H__
|
||||
#define __OCT6100_ERRORS_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
#include "octdef.h"
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
#define cOCT6100_ERR_OK 0x00000000
|
||||
#define cOCT6100_ERR_BASE 0x00100000
|
||||
|
||||
#define cOCT6100_NOT_SUPPORTED_BASE (0xFF000 + cOCT6100_ERR_BASE)
|
||||
|
||||
/* Not supported defines. */
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_OPEN_DEBUG_RECORD (0x00000 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_NLP_CONTROL (0x00001 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_BKG_NOISE_FREEZE (0x00002 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_SIN_DC_OFFSET_REM (0x00003 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_RIN_DC_OFFSET_REM (0x00004 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_RIN_AUTO_LC (0x00005 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_SOUT_AUTO_LC (0x00006 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_ANR (0x00007 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_TAIL_DISPLACEMENT (0x00008 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_ENCODING (0x00009 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_DECODING (0x0000A + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_LAW_TRANSLATION (0x0000B + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_ACOUSTIC_ECHO (0x0000C + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_DEFAULT_ERL (0x0000D + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_DOUBLE_TALK (0x0000E + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_NON_LINEARITY_B (0x0000F + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_AEC_DEFAULT_ERL (0x00010 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_RIN_HIGH_LEVEL_COMP (0x00011 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_PER_CHAN_TAIL (0x00012 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_SIL_SUP (0x00013 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_OPEN_ACOUSTIC_ECHO (0x00014 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_OPEN_TAIL_DISPLACEMENT_VALUE (0x00015 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_OPEN_MAX_ECHO_CHANNELS_VALUE (0x00016 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_ALE (0x00017 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_NLE (0x00018 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_ROUT_NR (0x00019 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_SIN_MUTE_FEATURES (0x0001A + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_ANR_SNR_ENHANCEMENT (0x0001B + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_ANR_SEGREGATION (0x0001C + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_OPEN_USE_SYNCH_TIMESTAMP (0x0001D + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_TAIL_LENGTH (0x0001E + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_TONE_DISABLER_ACTIVATION_DELAY (0x0001F + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_ACOUSTIC_ECHO_TAIL_LENGTH (0x00020 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_MUSIC_PROTECTION (0x00021 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_DEBUG_DATA_MODE_120S (0x00022 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_TONE_NOT_PRESENT_IN_FIRMWARE (0x00023 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_DOUBLE_TALK_BEHAVIOR_MODE (0x00024 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_IDLE_CODE_DETECTION (0x00025 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_IDLE_CODE_DETECTION_CONFIG (0x00026 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
|
||||
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_ROUT_NOISE_REDUCTION_GAIN (0x0002B + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_BUFFER_PLAYOUT (0x00100 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_CNR (0x00101 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CONF_BRIDGE (0x00102 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CALLER_ID (0x00104 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_NOISE_BLEACHING (0x00105 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_CHANNEL_TONE_REMOVAL (0x00300 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
#define cOCT6100_ERR_NOT_SUPPORTED_DOMINANT_SPEAKER (0x00301 + cOCT6100_NOT_SUPPORTED_BASE)
|
||||
|
||||
|
||||
|
||||
#define cOCT6100_ERR_OPEN_INVALID_DEVICE (0x03000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_INSUFFICIENT_EXTERNAL_MEMORY (0x03001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MEMORY_CHIP_SIZE (0x03002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_UP_CLK_FREQ (0x03003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_USER_CHIP_ID (0x03004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MULTI_PROCESS_SYSTEM (0x03005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MAX_RW_ACCESSES (0x03006 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_IMAGE_SIZE (0x03007 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_IMAGE_FILE (0x03008 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MEM_CLK_FREQ (0x03009 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MEMORY_CHIPS_NUMBER (0x0300A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_TOTAL_MEMORY_SIZE (0x0300B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_USE_SYNCH_TIMESTAMP (0x0300C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_TIMESTAMP_STREAM (0x0300D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_TIMESTAMP_TIMESLOT (0x0300E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_TIMESTAMP_TSSTS (0x0300F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_TDM_STREAM_FREQS (0x03010 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_TDM_SAMPLING (0x03011 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_FAST_H100_MODE (0x03012 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MAX_ECHO_CHANNELS (0x03013 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MAX_PLAYOUT_BUFFERS (0x03014 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MAX_TSI_CNCTS (0x03015 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MAX_PHASING_TSSTS (0x03016 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_EXTERNAL_MEM_BIST_FAILED (0x03017 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_EXTERNAL_MEM_BIST_TIMEOUT (0x03018 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_SDRAM_BIST_FAILED (0x03019 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_CORRUPTED_IMAGE (0x0301A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_CPU_REG_BIST_ERROR (0x0301B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_SOFT_TONE_EVENT_SIZE (0x0301C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_INTERRUPT_POLARITY (0x0301D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_FATAL_GENERAL_CONFIG (0x0301E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MAX_REMOTE_DEBUG_SESSIONS (0x0301F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_ENABLE_MEM_CLK_OUT (0x03020 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MAX_TDM_STREAM (0x03021 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MAX_CONF_BRIDGES (0x03022 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_OPEN_AF_CPU_TIMEOUT (0x03024 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MEMORY_TYPE (0x03025 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_FATAL_MEMORY_CONFIG (0x03026 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_ERROR_MEMORY_CONFIG (0x03027 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_ERROR_OVERFLOW_TONE_EVENTS_CONFIG (0x03028 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_ERROR_H100_CONFIG (0x03029 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_FATAL_MEMORY_TIMEOUT (0x0302A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_ERROR_MEMORY_TIMEOUT (0x0302B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_ERROR_OVERFLOW_TONE_EVENTS_TIMEOUT (0x0302C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_ERROR_H100_TIMEOUT (0x0302D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_IMAGE_WRITE_FAILED (0x0302E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_CRC_ERROR (0x0302F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_EGO_TIMEOUT (0x03030 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_SOFT_DEBUG_EVENT_BUF_SIZE (0x03031 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_TONE_INFO_START_TAG_NOT_FOUND (0x03032 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_TONE_INFO_STOP_TAG_NOT_FOUND (0x03033 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_INVALID_TONE_EVENT (0x03034 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_INVALID_TONE_NAME (0x03035 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_INVALID_EVENT_NUMBER_SIZE (0x03036 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_INTERNAL_MEMORY_BIST (0x03037 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_TAIL_DISPLACEMENT (0x03038 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_DEBUG_CHANNEL_RECORDING (0x03039 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MAX_BIDIR_CHANNELS (0x0303A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_FUNCTIONAL_BIST_FAILED (0x0303C + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_OPEN_MAX_ADPCM_CHANNELS (0x0303E + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_OPEN_ENABLE_EXT_TONE_DETECTION (0x03040 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_SOFT_PLAYOUT_STOP_EVENT_SIZE (0x03041 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_INVALID_FIRMWARE_OR_CAPACITY_PINS (0x03042 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_ENABLE_ACOUSTIC_ECHO (0x03043 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_OPEN_USER_WRITE_BURST_FAILED (0x03045 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_USER_WRITE_SMEAR_FAILED (0x03046 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_USER_READ_BURST_FAILED (0x03047 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_MAX_FLEXIBLE_CONF_PARTICIPANTS (0x03048 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_OPEN_DEBUG_MEM_INDEX (0x03051 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_ENABLE_CALLER_ID (0x03052 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_CALLER_ID_PLAYOUT_BUFFERS (0x03053 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_OPEN_ENABLE_PRODUCTION_BIST (0x03055 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_PRODUCTION_BIST_ACTIVATED (0x03056 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_NUM_PRODUCTION_BIST_LOOPS (0x03057 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_PRODUCTION_BOOT_FAILED (0x03058 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_PRODUCTION_BIST_CONF_FAILED (0x03059 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_PRODUCTION_BIST_POUCH_ERROR (0x0305A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_INVALID_TLV_LENGTH (0x0305B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_OPEN_PRODUCTION_BIST_MODE (0x0305C + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_OPEN_ENABLE_2100_STOP_EVENT (0x03060 + cOCT6100_ERR_BASE)
|
||||
|
||||
|
||||
#define cOCT6100_ERR_CAP_PINS_INVALID_CHIP_STATE (0x03081 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CAP_PINS_INVALID_CAPACITY_VALUE (0x03082 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_TSI_CNCT_ALL_CHANNELS_ARE_OPENED (0x04000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_DISABLED (0x04001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_INVALID_HANDLE (0x04002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_INPUT_TIMESLOT (0x04003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_INPUT_STREAM (0x04004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_OUTPUT_TIMESLOT (0x04005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_OUTPUT_STREAM (0x04006 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_INPUT_PCM_LAW (0x04007 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_TIMESLOT (0x04008 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_STREAM (0x04009 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_TSST_RESERVED (0x0400A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_NOT_OPEN (0x0400B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_ASSOCIATED_TSST_RESERVED (0x0400C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSI_CNCT_NO_MORE_TSI_AVAILABLE (0x0400D + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_DISABLED (0x05000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_PATTERN (0x05001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_TOO_SMALL (0x05002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_PCM_LAW (0x05003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_ALL_BUFFERS_OPEN (0x05004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_BUF_SIZE (0x05005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_BUF_INDEX (0x05006 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_NOT_OPEN (0x05007 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_ACTIVE_DEPENDENCIES (0x05008 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_CHANNEL_HANDLE_INVALID (0x05009 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_CHANNEL_NOT_OPEN (0x0500A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_ROUT_PORT_PLAYING (0x0500B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_SOUT_PORT_PLAYING (0x0500C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_PORT_INVALID (0x0500D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_PLAYOUT_PORT (0x0500E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_ADD_EVENT_BUF_FULL (0x0500F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_ADD_REPEAT (0x05010 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_ADD_MIXING (0x05011 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_STOP_CLEANLY (0x05012 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_NOT_STARTED (0x05013 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_WRITE_BYTE_COUNT (0x05015 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_ECHO_OP_MODE (0x05016 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_BLOCK_LENGTH_INVALID (0x05017 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_BLOCK_OFFSET_INVALID (0x05018 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_EVENT_RESET (0x05019 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_EVENT_BUF_EMPTY (0x0501A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_MAX_EVENT (0x0501B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_EVENT_DISABLED (0x0501C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_NOTIFY_ON_STOP (0x0501D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_ALLOW_ACTIVE (0x0501E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_STILL_ACTIVE (0x0501F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_REPEAT_USED (0x05020 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_NLP_DISABLED (0x05021 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_MALLOC_ZERO (0x05022 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_NO_MEMORY (0x05023 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_MALLOC_POINT_NOT_FOUND (0x05024 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_ADD_REPEAT_COUNT (0x05025 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_ADD_GAIN_DB (0x05026 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_BUFFER_PLAYOUT_LIST_EMPTY (0x05027 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_MEMORY_ALL_TSI_MEM_ENTRY_RESERVED (0x06000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MEMORY_ALL_ECHO_MEM_ENTRY_RESERVED (0x06002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MEMORY_EXTERNAL_MEMORY_FULL (0x06003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MEMORY_ALL_CONVERSION_MEM_ENTRY_RESERVED (0x06004 + cOCT6100_ERR_BASE)
|
||||
|
||||
|
||||
#define cOCT6100_ERR_CHANNEL_DISABLED (0x07000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_INVALID_HANDLE (0x07001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_NUM_TSSTS (0x07002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SIN_NUM_TSSTS (0x07003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ROUT_NUM_TSSTS (0x07004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_NUM_TSSTS (0x07005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_TIMESLOT (0x07006 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_STREAM (0x07007 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SIN_TIMESLOT (0x07008 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SIN_STREAM (0x07009 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ROUT_TIMESLOT (0x0700A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ROUT_STREAM (0x0700B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_TIMESLOT (0x0700C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_STREAM (0x0700D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_MISSING_TSST (0x07012 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SIL_SUP_ENABLE (0x07013 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_PHASING_TYPE (0x07014 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_INVALID_PHASING_HANDLE (0x07015 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_PHASING_TSST_NOT_OPEN (0x07016 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_PHASING_INVALID_PHASE (0x07017 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_DEBUG (0x07018 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ECHO_OP_MODE (0x0701F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SIN_DC_OFFSET_REM (0x07020 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_DC_OFFSET_REM (0x07021 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_LEVEL_CONTROL (0x07022 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_LEVEL_CONTROL (0x07023 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_LEVEL_CONTROL_GAIN (0x07024 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_LEVEL_CONTROL_GAIN (0x07025 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_ADAPT_NOISE_REDUCTION (0x07026 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ALL_CHANNELS_ARE_OPENED (0x07027 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_NOT_OPEN (0x07029 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ADPCM_NIBBLE (0x0702A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TSST_ADD_PORT (0x0702B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TSST_ADD_TIMESLOT (0x0702C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TSST_ADD_STREAM (0x0702D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ECHO_OP_MODE_INVALID (0x0702E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_PCM_LAW (0x0702F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SIN_PCM_LAW (0x07030 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ROUT_PCM_LAW (0x07031 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_PCM_LAW (0x07032 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_DECODER_PORT (0x07033 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ENCODER_PORT (0x07034 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_DECODING_RATE (0x07035 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ENCODING_RATE (0x07036 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ENABLE_NLP (0x07037 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_COMFORT_NOISE_MODE (0x07038 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_PHASING_TSST_REQUIRED (0x07039 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SIL_SUP_INVALID_ENCODER_PORT (0x0703A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_MODIFY_CODEC_CONFIG (0x0703B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_MODIFY_VQE_CONFIG (0x0703C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_MODIFY_TDM_CONFIG (0x0703D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ECHO_OP_MODE_RIN_PORT_INVALID (0x0703E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ECHO_OP_MODE_SIN_PORT_INVALID (0x0703F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TSST_REMOVE_PORT (0x07041 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TSST_REMOVE_TIMESLOT (0x07042 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TSST_REMOVE_STREAM (0x07043 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TSST_REMOVE_INVALID_TSST (0x07044 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_GET_STATS_MAX_BROADCAST_TSST (0x07045 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ROUT_BROADCAST_TIMESLOT (0x07046 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ROUT_BROADCAST_STREAM (0x07047 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_BROADCAST_TIMESLOT (0x07048 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_BROADCAST_STREAM (0x07049 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ACTIVE_DEPENDENCIES (0x0704A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TONE_DISABLER_ENABLE (0x0704B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TAIL_LENGTH (0x07053 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TAIL_DISPLACEMENT (0x07054 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_CHANNEL_INVALID_RIN_CB_SIZE (0x07058 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TSST_REMOVE_NO_BROADCAST_TSST (0x07059 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_INVALID_CODEC_POSITION (0x0705A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_STATS_RESET (0x0705B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ENABLE_TAIL_DISPLACEMENT (0x0705C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_BIDIR_CHANNEL_HANDLE (0x0705E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_BIDIR_FIRST_CHANNEL_HANDLE (0x0705F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_BIDIR_SECOND_CHANNEL_HANDLE (0x07060 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_CODEC_ACTIVATED (0x07061 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ALREADY_BIDIR (0x07062 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ALL_BIDIR_CHANNELS_ARE_OPENED (0x07063 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_FIRST_CHAN_SOUT_PORT (0x07064 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_FIRST_CHAN_RIN_PORT (0x07065 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SECOND_CHAN_SOUT_PORT (0x07066 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SECOND_CHAN_RIN_PORT (0x07067 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_BIDIR_PCM_LAW (0x07068 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_BIDIR_CHAN_NOT_OPEN (0x07069 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_ROUT_LAW_CONVERSION (0x0706A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SIN_SOUT_LAW_CONVERSION (0x0706B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_PART_OF_BIDIR_CHANNEL (0x0706C + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_CHANNEL_NO_VALID_TDM_CLOCKS (0x0706E + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_CHANNEL_OUT_OF_TSI_MEMORY (0x07073 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TONE_REMOVAL (0x07075 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ACOUSTIC_ECHO (0x07077 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_DEFAULT_ERL (0x07079 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_DOUBLE_TALK (0x0707B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_PHASE_TYPE_REQUIRED (0x0707C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SIL_SUP_NLP_MUST_BE_ENABLED (0x0707D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ENABLE_EXT_TONE_DETECTION (0x0707E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_EXT_TONE_DETECTION_DECODER_PORT (0x0707F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_EXT_TONE_DETECTION_DISABLED (0x07080 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_NON_LINEARITY_B (0x07082 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_FIRST_CHAN_IN_CONFERENCE (0x07083 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SECOND_CHAN_IN_CONFERENCE (0x07084 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TAIL_DISPLACEMENT_CANNOT_MODIFY (0x07085 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_NON_LINEARITY_B_CANNOT_MODIFY (0x07086 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ACOUSTIC_ECHO_NOT_ENABLED (0x07087 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_CHANNEL_BIDIR_DISABLED (0x0708B + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_CHANNEL_TAIL_DISPLACEMENT_INVALID (0x0708D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_PER_CHAN_TAIL_DISPLACEMENT (0x0708E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_CONFERENCE_NOISE_REDUCTION (0x0708F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_AEC_DEFAULT_ERL (0x07092 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ECHO_OP_MODE_NLP_REQUIRED (0x07093 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_AUTO_LEVEL_CONTROL (0x07094 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_AUTO_LEVEL_CONTROL (0x07095 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_AUTO_LEVEL_CONTROL_TARGET (0x07096 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_AUTO_LEVEL_CONTROL_TARGET (0x07097 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_AUTO_LEVEL_MANUAL (0x07098 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_AUTO_LEVEL_MANUAL (0x07099 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_HIGH_LEVEL_COMP (0x0709A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_AUTO_LEVEL_HIGH_LEVEL_COMP (0x0709C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_HIGH_LEVEL_COMP_MANUAL (0x0709D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_HIGH_LEVEL_COMP_THRESHOLD (0x0709E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_MUTE_MASK (0x0709F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_MUTE_MASK_SIN (0x070A0 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ALE_RATIO (0x070A1 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_NLE_FLAG (0x070A2 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ALE_NLE_SIMULTANEOUSLY (0x070A3 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ROUT_NOISE_REDUCTION (0x070A4 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ANR_SNR_ENHANCEMENT (0x070A5 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ANR_SEGREGATION (0x070A6 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_NLE_RATIO (0x070A7 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_APPLY_TO_ALL_CHANNELS (0x070A8 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ROUT_STREAM_UNASSIGN (0x070A9 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ROUT_TIMESLOT_UNASSIGN (0x070AA + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_STREAM_UNASSIGN (0x070AB + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_TIMESLOT_UNASSIGN (0x070AC + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_STREAM_UNASSIGN (0x070AD + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_TIMESLOT_UNASSIGN (0x070AE + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SIN_STREAM_UNASSIGN (0x070AF + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SIN_TIMESLOT_UNASSIGN (0x070B0 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_DISABLE_TONE_DETECTION (0x070B1 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_STOP_BUFFER_PLAYOUT (0x070B2 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_REMOVE_CONF_BRIDGE_PARTICIPANT (0x070B3 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_REMOVE_BROADCAST_TSSTS (0x070B4 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TONE_DISABLER_ACTIVATION_DELAY (0x070B5 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_CHANNEL_OUT_OF_MIXER_EVENTS (0x070B8 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ACOUSTIC_ECHO_TAIL_LENGTH (0x070B9 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ENABLE_MUSIC_PROTECTION (0x070BA + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_TAIL_LENGTH_INVALID (0x070BB + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ACOUSTIC_ECHO_TAIL_SUM (0x070BC + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_DOUBLE_TALK_MODE (0x070BD + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_NOISE_BLEACHING (0x070BE + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_NOISE_BLEACHING_NR (0x070BF + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ANR_CNR_SIMULTANEOUSLY (0x070C0 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_IDLE_CODE_DETECTION (0x070C1 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_MUST_ENABLE_TONE_DISABLER (0x070C2 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_CHANNEL_RIN_AUTO_LEVEL_CONTROL_REQUIRED (0x070C5 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_SOUT_AUTO_LEVEL_CONTROL_REQUIRED (0x070C6 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_CHANNEL_AUTO_LEVEL_CONTROL_REQUIRED (0x070C8 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_CHANNEL_COMFORT_NOISE_REQUIRED (0x070CB + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CHANNEL_ROUT_NOISE_REDUCTION_GAIN (0x070CC + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_PHASING_TSST_ALL_ENTRIES_ARE_OPENED (0x08000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_PHASING_TSST_DISABLED (0x08001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_PHASING_TSST_INVALID_HANDLE (0x08002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_PHASING_TSST_TIMESLOT (0x08003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_PHASING_TSST_STREAM (0x08004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_PHASING_TSST_PHASING_LENGTH (0x08005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_PHASING_TSST_NOT_OPEN (0x08006 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_PHASING_TSST_ACTIVE_DEPENDENCIES (0x08007 + cOCT6100_ERR_BASE)
|
||||
|
||||
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_INVALID_HANDLE (0x09000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_DISABLED (0x09001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_NOT_OPEN (0x09002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_ACTIVE_DEPENDENCIES (0x09003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_ADD_INVALID_HANDLE (0x09004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_MIXER_EVENT_NOT_FOUND (0x09005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_ALL_BUFFERS_OPEN (0x09006 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_REMOVE_INVALID_HANDLE (0x09007 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHAN_NOT_ON_BRIDGE (0x09008 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_ADD_MUTE (0x09009 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_MUTE_INVALID_HANDLE (0x0900A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_MUTE_ALREADY_MUTED (0x0900B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_MUTE_NOT_MUTED (0x0900C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_ADD_CODEC_ACTIVE (0x0900D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_ADD_MIXER_FULL (0x0900E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_ALREADY_ON_BRIDGE (0x0900F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_REMOVE_ALL (0x09010 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_ADD_EXT_TONE_ENABLED (0x09011 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_INVALID_INPUT_PORT (0x09012 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_DOMINANT_SPEAKER (0x09013 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_BIDIR (0x09015 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CNR_MUST_BE_ENABLED (0x09016 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_NLP_MUST_BE_ENABLED (0x09017 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_FLEX_CONF (0x09018 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_FLEX_CONF_PARTICIPANT_CNT (0x09019 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_FLEX_CONF_LISTENER_MASK_INDEX (0x0901A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_FLEX_CONF_ALL_BUFFERS_OPEN (0x0901B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_FLEX_CONF_DISABLED (0x0901C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_FLEX_CONF_LISTENER_INDEX_USED (0x0901D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_SIMPLE_BRIDGE (0x0901E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_COPY_EVENTS (0x0901F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_ADD_INVALID_TAP_HANDLE (0x09020 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_FLEX_CONF_TAP_NOT_SUPPORTED (0x09021 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_TAP_NOT_ON_BRIDGE (0x09022 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_TAP_DEPENDENCY (0x09023 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_TAP_NOT_ON_SAME_BRIDGE (0x09024 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_ADD_TAP_SOUT_ONLY (0x09025 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_ADD_ALREADY_TAPPED (0x09026 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_TAP_ALWAYS_MUTE (0x09027 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_CONF_BRIDGE_CHANNEL_LAW_CONVERSION (0x09028 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_MISC_CANNOT_ROUND_UP_NUMBER (0x0A000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MISC_ASCII_CONVERSION_FAILED (0x0A001 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_TONE_DETECTION_CHANNEL_HANDLE_INVALID (0x0B000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TONE_DETECTION_CHANNEL_NOT_OPEN (0x0B001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TONE_DETECTION_TONE_NUMBER_INVALID (0x0B002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TONE_DETECTION_TONE_NOT_ACTIVATED (0x0B003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TONE_DETECTION_TONE_ACTIVATED (0x0B004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TONE_DETECTION_TONE_NOT_AVAILABLE (0x0B005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TONE_DETECTION_DISABLE_ALL (0x0B006 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_EVENTS_GET_TONE_RESET_BUFS (0x0C000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_EVENTS_TONE_BUF_EMPTY (0x0C001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_EVENTS_MAX_TONES (0x0C002 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_INTRPTS_RW_ERROR (0x0D000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_NOT_ACTIVE (0x0D001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_FATAL_GENERAL_CONFIG (0x0D002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_FATAL_MEMORY_CONFIG (0x0D003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_DATA_ERR_MEMORY_CONFIG (0x0D004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_OVERFLOW_TONE_EVENTS_CONFIG (0x0D005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_H100_ERROR_CONFIG (0x0D006 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_FATAL_GENERAL_TIMEOUT (0x0D007 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_FATAL_MEMORY_TIMEOUT (0x0D008 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_DATA_ERR_MEMORY_TIMEOUT (0x0D009 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_OVERFLOW_TONE_EVENTS_TIMEOUT (0x0D00A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_H100_ERROR_TIMEOUT (0x0D00B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_AF_TIMESTAMP_READ_TIMEOUT (0x0D00C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_INTRPTS_NLP_TIMESTAMP_READ_TIMEOUT (0x0D00D + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_TSST_TIMESLOT (0x0E000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSST_STREAM (0x0E001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSST_TSST_RESERVED (0x0E002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSST_ASSOCIATED_TSST_RESERVED (0x0E003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_TSST_ALL_TSSTS_ARE_OPENED (0x0E004 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_MULTIPROC_API_INST_SHARED (0x10000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MULTIPROC_API_INST_LOCAL (0x10001 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_DEBUG_CHANNEL_INVALID_HANDLE (0x11000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_PORT (0x11001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_READ_LENGTH (0x11002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_SOUT_READ_LENGTH (0x11003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_READ_DATA (0x11004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_GET_EVENTS_RESET_BUFS (0x11005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_GET_EVENTS_BUF_EMPTY (0x11006 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_RECORD_RIN_PTR_INVALID (0x11007 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_RECORD_SIN_PTR_INVALID (0x11008 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_RECORD_ROUT_PTR_INVALID (0x11009 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_RECORD_SOUT_PTR_INVALID (0x1100A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_RECORD_RAW_DATA_PTR_INVALID (0x1100B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_RECORD_LENGTH_INVALID (0x1100C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_RECORD_NO_CHAN_SELECTED (0x1100D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_PCM_LAW (0x1100E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_CHANNEL_RECORDING_DISABLED (0x1100F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_GET_DATA_MAX_BYTES (0x11010 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_GET_DATA_PTR_INVALID (0x11011 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_RC_CHANNEL_RECORDING_DISABLED (0x11012 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_GET_DATA_MODE (0x11013 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_CHANNEL_IN_POWER_DOWN (0x11014 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_GET_DATA_CONTENT (0x11015 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_DEBUG_GET_DATA_MODE_CANNOT_CHANGE (0x11016 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_MIXER_ALL_COPY_EVENT_ENTRY_OPENED (0x12000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MIXER_COPY_EVENT_HANDLE (0x12001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MIXER_SOURCE_CHAN_HANDLE (0x12002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MIXER_DESTINATION_CHAN_HANDLE (0x12003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MIXER_SOURCE_PORT (0x12004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MIXER_DESTINATION_PORT (0x12005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MIXER_EVENT_NOT_OPEN (0x12006 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MIXER_SOURCE_ADPCM_RESOURCES_ACTIVATED (0x12007 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MIXER_DEST_ADPCM_RESOURCES_ACTIVATED (0x12008 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_MIXER_ALL_MIXER_EVENT_ENTRY_OPENED (0x12009 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_DISABLED (0x13000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_INVALID_HANDLE (0x13001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_INPUT_TIMESLOT (0x13002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_INPUT_STREAM (0x13003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_OUTPUT_TIMESLOT (0x13004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_OUTPUT_STREAM (0x13005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_INPUT_NUM_TSSTS (0x13006 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_OUTPUT_NUM_TSSTS (0x13007 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_INPUT_PCM_LAW (0x13008 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_MODE (0x13009 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_ENCODING_RATE (0x1300A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_DECODING_RATE (0x1300B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_INCOMPATIBLE_NUM_TSSTS (0x1300C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_NO_MORE_TSI_AVAILABLE (0x1300D + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_OUTPUT_PCM_LAW (0x1300E + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_ADPCM_NIBBLE_POSITION (0x1300F + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_NOT_OPEN (0x13010 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_ADPCM_CHAN_ALL_ADPCM_CHAN_ARE_OPENED (0x13011 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_CHIP_STATS_RESET (0x14000 + cOCT6100_ERR_BASE)
|
||||
|
||||
|
||||
|
||||
#define cOCT6100_ERR_PRODUCTION_BIST_DISABLED (0x16000 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_RECEIVED_PKT_PAYLOAD (0x2C000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_RESPONSE_PKT_PAYLOAD (0x2C001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_RECEIVED_PKT_LENGTH (0x2C002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_RESPONSE_PKT_LENGTH (0x2C003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_ENDIAN_DETECTION_FIELD (0x2C004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_CHECKSUM (0x2C005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTE_DEBUG_PARSING_ERROR (0x2C006 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_ALL_SESSIONS_OPEN (0x2C007 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_INVALID_PACKET (0x2C008 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_TRANSACTION_ANSWERED (0x2C009 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_INAVLID_SESSION_NUMBER (0x2C00A + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_INVALID_HOT_CHAN_INDEX (0x2C00B + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_DISABLED (0x2C00C + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_REMOTEDEBUG_INVALID_RPC_COMMAND_NUM (0x2C00D + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_TLV_TIMEOUT (0x31000 + cOCT6100_ERR_BASE)
|
||||
|
||||
/* Fatal errors must always be greater or equal to 0xE000. */
|
||||
#define cOCT6100_ERR_FATAL (0xDE000 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_FATAL_DRIVER_WRITE_API (0xDE000 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DRIVER_WRITE_EXT_API (0xDE001 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DRIVER_WRITE_SMEAR_API (0xDE002 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DRIVER_WRITE_BURST_API (0xDE003 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DRIVER_READ_API (0xDE004 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DRIVER_READ_BURST_API (0xDE005 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DRIVER_READ_DEBUG_API (0xDE006 + cOCT6100_ERR_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DRIVER_WRITE_ARRAY_API (0xDE007 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_FATAL_BASE (0xDF000 + cOCT6100_ERR_BASE)
|
||||
|
||||
#define cOCT6100_ERR_FATAL_0 (0x00000 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_1 (0x00001 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_2 (0x00002 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_3 (0x00003 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_4 (0x00004 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_5 (0x00005 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_6 (0x00006 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_7 (0x00007 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_8 (0x00008 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_9 (0x00009 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_A (0x0000A + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_B (0x0000B + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_C (0x0000C + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_D (0x0000D + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_E (0x0000E + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_F (0x0000F + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_10 (0x00010 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_11 (0x00011 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_12 (0x00012 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_13 (0x00013 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_14 (0x00014 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_15 (0x00015 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_16 (0x00016 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_17 (0x00017 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_18 (0x00018 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_19 (0x00019 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_1A (0x0001A + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_1B (0x0001B + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_1C (0x0001C + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_1D (0x0001D + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_1E (0x0001E + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_1F (0x0001F + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_20 (0x00020 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_21 (0x00021 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_22 (0x00022 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_23 (0x00023 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_24 (0x00024 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_25 (0x00025 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_26 (0x00026 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_27 (0x00027 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_28 (0x00028 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_29 (0x00029 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_2A (0x0002A + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_2B (0x0002B + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_2C (0x0002C + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_2D (0x0002D + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_2E (0x0002E + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_2F (0x0002F + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_30 (0x00030 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_31 (0x00031 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_32 (0x00032 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_33 (0x00033 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_34 (0x00034 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_35 (0x00035 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_36 (0x00036 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_37 (0x00037 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_38 (0x00038 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_39 (0x00039 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_3A (0x0003A + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_3B (0x0003B + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_3C (0x0003C + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_3D (0x0003D + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_3E (0x0003E + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_3F (0x0003F + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_40 (0x00040 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_41 (0x00041 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_42 (0x00042 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_43 (0x00043 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_44 (0x00044 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_45 (0x00045 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_46 (0x00046 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_47 (0x00047 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_48 (0x00048 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_49 (0x00049 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_4A (0x0004A + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_4B (0x0004B + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_4C (0x0004C + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_4D (0x0004D + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_4E (0x0004E + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_4F (0x0004F + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_50 (0x00050 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_51 (0x00051 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_52 (0x00052 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_53 (0x00053 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_54 (0x00054 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_55 (0x00055 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_56 (0x00056 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_57 (0x00057 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_58 (0x00058 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_59 (0x00059 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_5A (0x0005A + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_5B (0x0005B + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_5C (0x0005C + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_5D (0x0005D + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_5E (0x0005E + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_5F (0x0005F + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_60 (0x00060 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_61 (0x00061 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_62 (0x00062 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_63 (0x00063 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_64 (0x00064 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_65 (0x00065 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_66 (0x00066 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_67 (0x00067 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_68 (0x00068 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_69 (0x00069 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_6A (0x0006A + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_6B (0x0006B + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_6C (0x0006C + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_6D (0x0006D + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_6E (0x0006E + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_6F (0x0006F + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_70 (0x00070 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_71 (0x00071 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_72 (0x00072 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_73 (0x00073 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_74 (0x00074 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_75 (0x00075 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_76 (0x00076 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_77 (0x00077 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_78 (0x00078 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_79 (0x00079 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_7A (0x0007A + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_7B (0x0007B + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_7C (0x0007C + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_7D (0x0007D + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_7E (0x0007E + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_7F (0x0007F + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_80 (0x00080 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_81 (0x00081 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_82 (0x00082 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_83 (0x00083 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_84 (0x00084 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_85 (0x00085 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_86 (0x00086 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_87 (0x00087 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_88 (0x00088 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_89 (0x00089 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_8A (0x0008A + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_8B (0x0008B + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_8C (0x0008C + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_8D (0x0008D + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_8E (0x0008E + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_8F (0x0008F + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_90 (0x00090 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_91 (0x00091 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_92 (0x00092 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_93 (0x00093 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_94 (0x00094 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_95 (0x00095 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_96 (0x00096 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_97 (0x00097 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_98 (0x00098 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_99 (0x00099 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_9A (0x0009A + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_9B (0x0009B + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_9C (0x0009C + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_9D (0x0009D + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_9E (0x0009E + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_9F (0x0009F + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_A0 (0x000A0 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_A1 (0x000A1 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_A2 (0x000A2 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_A3 (0x000A3 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_A4 (0x000A4 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_A5 (0x000A5 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_A6 (0x000A6 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_A7 (0x000A7 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_A8 (0x000A8 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_A9 (0x000A9 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_AA (0x000AA + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_AB (0x000AB + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_AC (0x000AC + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_AD (0x000AD + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_AE (0x000AE + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_AF (0x000AF + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_B0 (0x000B0 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_B1 (0x000B1 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_B2 (0x000B2 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_B3 (0x000B3 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_B4 (0x000B4 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_B5 (0x000B5 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_B6 (0x000B6 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_B7 (0x000B7 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_B8 (0x000B8 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_B9 (0x000B9 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_BA (0x000BA + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_BB (0x000BB + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_BC (0x000BC + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_BD (0x000BD + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_BE (0x000BE + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_BF (0x000BF + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_C0 (0x000C0 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_C1 (0x000C1 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_C2 (0x000C2 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_C3 (0x000C3 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_C4 (0x000C4 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_C5 (0x000C5 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_C6 (0x000C6 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_C7 (0x000C7 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_C8 (0x000C8 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_C9 (0x000C9 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_CA (0x000CA + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_CB (0x000CB + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_CC (0x000CC + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_CD (0x000CD + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_CE (0x000CE + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_CF (0x000CF + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_D0 (0x000D0 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_D1 (0x000D1 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_D2 (0x000D2 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_D3 (0x000D3 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_D4 (0x000D4 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_D5 (0x000D5 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_D6 (0x000D6 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_D7 (0x000D7 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_D8 (0x000D8 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_D9 (0x000D9 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DA (0x000DA + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DB (0x000DB + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DC (0x000DC + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DD (0x000DD + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DE (0x000DE + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_DF (0x000DF + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_E0 (0x000E0 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_E1 (0x000E1 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_E2 (0x000E2 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_E3 (0x000E3 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_E4 (0x000E4 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_E5 (0x000E5 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_E6 (0x000E6 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_E7 (0x000E7 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_E8 (0x000E8 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_E9 (0x000E9 + cOCT6100_FATAL_BASE)
|
||||
#define cOCT6100_ERR_FATAL_EA (0x000EA + cOCT6100_FATAL_BASE)
|
||||
|
||||
#endif /* __OCT6100_ERRORS_H__ */
|
||||
69
xpp/oct612x/include/oct6100api/oct6100_events_inst.h
Normal file
69
xpp/oct612x/include/oct6100api/oct6100_events_inst.h
Normal file
@@ -0,0 +1,69 @@
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_events_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_events.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_events_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 12 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_EVENTS_INST_H__
|
||||
#define __OCT6100_EVENTS_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_TONE_EVENT_
|
||||
{
|
||||
UINT32 ulChannelHandle;
|
||||
UINT32 ulUserChanId;
|
||||
UINT32 ulToneDetected; /* Tone number of the tone detected. */
|
||||
UINT32 ulTimestamp;
|
||||
UINT32 ulEventType;
|
||||
UINT32 ulExtToneDetectionPort;
|
||||
|
||||
} tOCT6100_API_TONE_EVENT, *tPOCT6100_API_TONE_EVENT;
|
||||
|
||||
typedef struct _OCT6100_API_BUFFER_PLAYOUT_EVENT_
|
||||
{
|
||||
UINT32 ulChannelHandle;
|
||||
UINT32 ulUserChanId;
|
||||
UINT32 ulChannelPort;
|
||||
UINT32 ulTimestamp;
|
||||
UINT32 ulUserEventId;
|
||||
UINT32 ulEventType;
|
||||
|
||||
} tOCT6100_API_BUFFER_PLAYOUT_EVENT, *tPOCT6100_API_BUFFER_PLAYOUT_EVENT;
|
||||
|
||||
#endif /* __OCT6100_EVENTS_INST_H__ */
|
||||
|
||||
111
xpp/oct612x/include/oct6100api/oct6100_events_pub.h
Normal file
111
xpp/oct612x/include/oct6100api/oct6100_events_pub.h
Normal file
@@ -0,0 +1,111 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_events_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_events.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_events_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 14 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_EVENTS_PUB_H__
|
||||
#define __OCT6100_EVENTS_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_TONE_EVENT_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
UINT32 ulUserChanId;
|
||||
|
||||
UINT32 ulToneDetected;
|
||||
|
||||
UINT32 ulTimestamp;
|
||||
UINT32 ulEventType;
|
||||
|
||||
UINT32 ulExtToneDetectionPort;
|
||||
|
||||
} tOCT6100_TONE_EVENT, *tPOCT6100_TONE_EVENT;
|
||||
|
||||
typedef struct _OCT6100_EVENT_GET_TONE_
|
||||
{
|
||||
BOOL fMoreEvents;
|
||||
BOOL fResetBufs;
|
||||
|
||||
UINT32 ulMaxToneEvent;
|
||||
UINT32 ulNumValidToneEvent;
|
||||
|
||||
tPOCT6100_TONE_EVENT pToneEvent;
|
||||
|
||||
} tOCT6100_EVENT_GET_TONE, *tPOCT6100_EVENT_GET_TONE;
|
||||
|
||||
typedef struct _OCT6100_BUFFER_PLAYOUT_EVENT_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
UINT32 ulUserChanId;
|
||||
UINT32 ulChannelPort;
|
||||
|
||||
UINT32 ulTimestamp;
|
||||
|
||||
UINT32 ulUserEventId;
|
||||
UINT32 ulEventType;
|
||||
|
||||
} tOCT6100_BUFFER_PLAYOUT_EVENT, *tPOCT6100_BUFFER_PLAYOUT_EVENT;
|
||||
|
||||
typedef struct _OCT6100_BUFFER_PLAYOUT_GET_EVENT_
|
||||
{
|
||||
BOOL fMoreEvents;
|
||||
BOOL fResetBufs;
|
||||
|
||||
UINT32 ulMaxEvent;
|
||||
UINT32 ulNumValidEvent;
|
||||
|
||||
tPOCT6100_BUFFER_PLAYOUT_EVENT pBufferPlayoutEvent;
|
||||
|
||||
} tOCT6100_BUFFER_PLAYOUT_GET_EVENT, *tPOCT6100_BUFFER_PLAYOUT_GET_EVENT;
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100EventGetToneDef(
|
||||
OUT tPOCT6100_EVENT_GET_TONE f_pEventGetTone );
|
||||
UINT32 Oct6100EventGetTone(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInst,
|
||||
IN OUT tPOCT6100_EVENT_GET_TONE f_pEventGetTone );
|
||||
|
||||
UINT32 Oct6100BufferPlayoutGetEventDef(
|
||||
OUT tPOCT6100_BUFFER_PLAYOUT_GET_EVENT f_pBufPlayoutGetEvent );
|
||||
UINT32 Oct6100BufferPlayoutGetEvent(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInst,
|
||||
IN OUT tPOCT6100_BUFFER_PLAYOUT_GET_EVENT f_pBufPlayoutGetEvent );
|
||||
|
||||
#endif /* __OCT6100_EVENTS_PUB_H__ */
|
||||
|
||||
134
xpp/oct612x/include/oct6100api/oct6100_interrupts_inst.h
Normal file
134
xpp/oct612x/include/oct6100api/oct6100_interrupts_inst.h
Normal file
@@ -0,0 +1,134 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_interrupts_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_interrupts.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_interrupts_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 16 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_INTERRUPTS_INST_H__
|
||||
#define __OCT6100_INTERRUPTS_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_INTRPT_CONFIG_
|
||||
{
|
||||
/* The configuration of each group of interrupts. Each can have one of the
|
||||
following values:
|
||||
cOCT6100_INTRPT_DISABLE,
|
||||
cOCT6100_INTRPT_NO_TIMEOUT,
|
||||
cOCT6100_INTRPT_TIMEOUT. */
|
||||
UINT8 byFatalGeneralConfig;
|
||||
UINT8 byFatalMemoryConfig;
|
||||
UINT8 byErrorMemoryConfig;
|
||||
UINT8 byErrorOverflowToneEventsConfig;
|
||||
UINT8 byErrorH100Config;
|
||||
|
||||
/* The timeout value for each interrupt group, if the corresponding
|
||||
configuration variable is set to cOCT6100_INTRPT_TIMEOUT. This
|
||||
value is kept in mclk cycles. */
|
||||
UINT32 ulFatalMemoryTimeoutMclk;
|
||||
UINT32 ulErrorMemoryTimeoutMclk;
|
||||
UINT32 ulErrorOverflowToneEventsTimeoutMclk;
|
||||
UINT32 ulErrorH100TimeoutMclk;
|
||||
|
||||
} tOCT6100_API_INTRPT_CONFIG, *tPOCT6100_API_INTRPT_CONFIG;
|
||||
|
||||
typedef struct _OCT6100_API_INTRPT_MANAGE_
|
||||
{
|
||||
/* Number of mclk cycles in 1ms. */
|
||||
UINT32 ulNumMclkCyclesIn1Ms;
|
||||
|
||||
/* Whether the mclk interrupt is active. */
|
||||
UINT8 fMclkIntrptActive;
|
||||
UINT32 ulNextMclkIntrptTimeHigh;
|
||||
UINT32 ulNextMclkIntrptTimeLow;
|
||||
|
||||
/* Mclk time read from registers. */
|
||||
UINT32 ulRegMclkTimeHigh;
|
||||
UINT32 ulRegMclkTimeLow;
|
||||
|
||||
/* Used by the interrupt service routine. */
|
||||
UINT16 usRegister102h;
|
||||
UINT16 usRegister202h;
|
||||
UINT16 usRegister302h;
|
||||
UINT16 usRegister502h;
|
||||
UINT16 usRegister702h;
|
||||
|
||||
/* The state of each interrupt group. Can be one of the following:
|
||||
cOCT6100_INTRPT_ACTIVE,
|
||||
cOCT6100_INTRPT_WILL_TIMEOUT,
|
||||
cOCT6100_INTRPT_IN_TIMEOUT,
|
||||
cOCT6100_INTRPT_WILL_DISABLED. */
|
||||
UINT16 byFatalGeneralState;
|
||||
UINT16 byFatalMemoryState;
|
||||
UINT16 byErrorMemoryState;
|
||||
UINT16 byErrorOverflowToneEventsState;
|
||||
UINT16 byErrorH100State;
|
||||
|
||||
/* The time at which each disabled interrupt was disabled, in mclk cycles. */
|
||||
UINT32 ulFatalMemoryDisableMclkHigh;
|
||||
UINT32 ulFatalMemoryDisableMclkLow;
|
||||
UINT32 ulErrorMemoryDisableMclkHigh;
|
||||
UINT32 ulErrorMemoryDisableMclkLow;
|
||||
UINT32 ulErrorOverflowToneEventsDisableMclkHigh;
|
||||
UINT32 ulErrorOverflowToneEventsDisableMclkLow;
|
||||
UINT32 ulErrorH100DisableMclkHigh;
|
||||
UINT32 ulErrorH100DisableMclkLow;
|
||||
|
||||
/* The time at which each disabled interrupt group is to be reenabled,
|
||||
in number of mclk cycles. */
|
||||
UINT32 ulFatalGeneralEnableMclkHigh;
|
||||
UINT32 ulFatalGeneralEnableMclkLow;
|
||||
UINT32 ulFatalMemoryEnableMclkHigh;
|
||||
UINT32 ulFatalMemoryEnableMclkLow;
|
||||
UINT32 ulErrorMemoryEnableMclkHigh;
|
||||
UINT32 ulErrorMemoryEnableMclkLow;
|
||||
UINT32 ulErrorOverflowToneEventsEnableMclkHigh;
|
||||
UINT32 ulErrorOverflowToneEventsEnableMclkLow;
|
||||
UINT32 ulErrorH100EnableMclkHigh;
|
||||
UINT32 ulErrorH100EnableMclkLow;
|
||||
|
||||
/* If this is set, buffer playout events are pending. */
|
||||
UINT8 fBufferPlayoutEventsPending;
|
||||
/* If this is set, tone events are pending. */
|
||||
UINT8 fToneEventsPending;
|
||||
|
||||
|
||||
|
||||
UINT8 fIsrCalled;
|
||||
|
||||
} tOCT6100_API_INTRPT_MANAGE, *tPOCT6100_API_INTRPT_MANAGE;
|
||||
|
||||
#endif /* __OCT6100_INTERRUPTS_INST_H__ */
|
||||
102
xpp/oct612x/include/oct6100api/oct6100_interrupts_pub.h
Normal file
102
xpp/oct612x/include/oct6100api/oct6100_interrupts_pub.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_interrupts_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_interrupts.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_interrupts_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 23 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_INTERRUPTS_PUB_H__
|
||||
#define __OCT6100_INTERRUPTS_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_INTERRUPT_CONFIGURE_
|
||||
{
|
||||
UINT32 ulFatalGeneralConfig;
|
||||
UINT32 ulFatalMemoryConfig;
|
||||
|
||||
UINT32 ulErrorMemoryConfig;
|
||||
UINT32 ulErrorOverflowToneEventsConfig;
|
||||
UINT32 ulErrorH100Config;
|
||||
|
||||
UINT32 ulFatalMemoryTimeout;
|
||||
UINT32 ulErrorMemoryTimeout;
|
||||
UINT32 ulErrorOverflowToneEventsTimeout;
|
||||
UINT32 ulErrorH100Timeout;
|
||||
|
||||
} tOCT6100_INTERRUPT_CONFIGURE, *tPOCT6100_INTERRUPT_CONFIGURE;
|
||||
|
||||
typedef struct _OCT6100_INTERRUPT_FLAGS_
|
||||
{
|
||||
BOOL fFatalGeneral;
|
||||
UINT32 ulFatalGeneralFlags;
|
||||
|
||||
BOOL fFatalReadTimeout;
|
||||
|
||||
BOOL fErrorRefreshTooLate;
|
||||
BOOL fErrorPllJitter;
|
||||
|
||||
BOOL fErrorOverflowToneEvents;
|
||||
|
||||
BOOL fErrorH100OutOfSync;
|
||||
BOOL fErrorH100ClkA;
|
||||
BOOL fErrorH100ClkB;
|
||||
BOOL fErrorH100FrameA;
|
||||
|
||||
BOOL fToneEventsPending;
|
||||
BOOL fBufferPlayoutEventsPending;
|
||||
|
||||
BOOL fApiSynch;
|
||||
|
||||
|
||||
|
||||
} tOCT6100_INTERRUPT_FLAGS, *tPOCT6100_INTERRUPT_FLAGS;
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100InterruptConfigureDef(
|
||||
OUT tPOCT6100_INTERRUPT_CONFIGURE f_pConfigInts );
|
||||
UINT32 Oct6100InterruptConfigure(
|
||||
IN tPOCT6100_INSTANCE_API f_pApiInst,
|
||||
IN OUT tPOCT6100_INTERRUPT_CONFIGURE f_pConfigInts );
|
||||
|
||||
UINT32 Oct6100InterruptServiceRoutineDef(
|
||||
OUT tPOCT6100_INTERRUPT_FLAGS f_pIntFlags );
|
||||
UINT32 Oct6100InterruptServiceRoutine(
|
||||
IN tPOCT6100_INSTANCE_API f_pApiInst,
|
||||
IN OUT tPOCT6100_INTERRUPT_FLAGS f_pIntFlags );
|
||||
|
||||
#endif /* __OCT6100_INTERRUPTS_PUB_H__ */
|
||||
|
||||
86
xpp/oct612x/include/oct6100api/oct6100_mixer_inst.h
Normal file
86
xpp/oct612x/include/oct6100api/oct6100_mixer_inst.h
Normal file
@@ -0,0 +1,86 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_mixer_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_mixer.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_mixer_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 13 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_MIXER_INST_H__
|
||||
#define __OCT6100_MIXER_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_MIXER_EVENT_
|
||||
{
|
||||
/* Flag specifying whether the entry is used or not. */
|
||||
UINT8 fReserved;
|
||||
|
||||
/* Type of the event.*/
|
||||
UINT16 usEventType;
|
||||
|
||||
/* Source channel index */
|
||||
UINT16 usSourceChanIndex;
|
||||
|
||||
/* Destination channel index */
|
||||
UINT16 usDestinationChanIndex;
|
||||
|
||||
/* Pointer to the next entry.*/
|
||||
UINT16 usNextEventPtr;
|
||||
|
||||
} tOCT6100_API_MIXER_EVENT, *tPOCT6100_API_MIXER_EVENT;
|
||||
|
||||
|
||||
typedef struct _OCT6100_API_COPY_EVENT_
|
||||
{
|
||||
/* Flag specifying whether the entry is used or not. */
|
||||
UINT8 fReserved;
|
||||
|
||||
/* Count used to manage entry handles allocated to user. */
|
||||
UINT8 byEntryOpenCnt;
|
||||
|
||||
/* Source + destination ports. */
|
||||
UINT8 bySourcePort;
|
||||
UINT8 byDestinationPort;
|
||||
|
||||
/* Index of the channels associated to this event.*/
|
||||
UINT16 usSourceChanIndex;
|
||||
UINT16 usDestinationChanIndex;
|
||||
|
||||
UINT16 usMixerEventIndex;
|
||||
|
||||
} tOCT6100_API_COPY_EVENT, *tPOCT6100_API_COPY_EVENT;
|
||||
|
||||
|
||||
#endif /* __OCT6100_MIXER_INST_H__ */
|
||||
77
xpp/oct612x/include/oct6100api/oct6100_mixer_pub.h
Normal file
77
xpp/oct612x/include/oct6100api/oct6100_mixer_pub.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_mixer_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_mixer.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_mixer_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 7 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_MIXER_PUB_H__
|
||||
#define __OCT6100_MIXER_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_COPY_EVENT_CREATE_
|
||||
{
|
||||
PUINT32 pulCopyEventHndl;
|
||||
|
||||
UINT32 ulSourceChanHndl;
|
||||
UINT32 ulSourcePort;
|
||||
|
||||
UINT32 ulDestinationChanHndl;
|
||||
UINT32 ulDestinationPort;
|
||||
|
||||
} tOCT6100_COPY_EVENT_CREATE, *tPOCT6100_COPY_EVENT_CREATE;
|
||||
|
||||
typedef struct _OCT6100_COPY_EVENT_DESTROY_
|
||||
{
|
||||
UINT32 ulCopyEventHndl;
|
||||
|
||||
} tOCT6100_COPY_EVENT_DESTROY, *tPOCT6100_COPY_EVENT_DESTROY;
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100MixerCopyEventCreateDef(
|
||||
OUT tPOCT6100_COPY_EVENT_CREATE f_pCopyEventCreate );
|
||||
UINT32 Oct6100MixerCopyEventCreate(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInst,
|
||||
IN OUT tPOCT6100_COPY_EVENT_CREATE f_pCopyEventCreate );
|
||||
|
||||
UINT32 Oct6100MixerCopyEventDestroyDef(
|
||||
OUT tPOCT6100_COPY_EVENT_DESTROY f_pCopyEventDestroy );
|
||||
UINT32 Oct6100MixerCopyEventDestroy(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInst,
|
||||
IN OUT tPOCT6100_COPY_EVENT_DESTROY f_pCopyEventDestroy );
|
||||
|
||||
#endif /* __OCT6100_MIXER_PUB_H__ */
|
||||
68
xpp/oct612x/include/oct6100api/oct6100_phasing_tsst_inst.h
Normal file
68
xpp/oct612x/include/oct6100api/oct6100_phasing_tsst_inst.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_phasing_tsst_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_phasing_tsst.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_phasing_tsst_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 11 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_PHASING_TSST_INST_H__
|
||||
#define __OCT6100_PHASING_TSST_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_PHASING_TSST_
|
||||
{
|
||||
/* Flag specifying whether the entry is used or not. */
|
||||
UINT8 fReserved;
|
||||
|
||||
/* Count used to manage entry handles allocated to user. */
|
||||
UINT8 byEntryOpenCnt;
|
||||
|
||||
/* Count of number of resources connected in some way to this buffer. */
|
||||
UINT16 usDependencyCnt;
|
||||
|
||||
/* TDM timeslot and stream where the counter is read. */
|
||||
UINT16 usStream;
|
||||
UINT16 usTimeslot;
|
||||
|
||||
/* Length of the phasing TSST counter. */
|
||||
UINT16 usPhasingLength;
|
||||
|
||||
/* TSST control index where the counter comes from. */
|
||||
UINT16 usPhasingTsstIndex;
|
||||
|
||||
} tOCT6100_API_PHASING_TSST, *tPOCT6100_API_PHASING_TSST;
|
||||
|
||||
#endif /* __OCT6100_PHASING_TSST_INST_H__ */
|
||||
78
xpp/oct612x/include/oct6100api/oct6100_phasing_tsst_pub.h
Normal file
78
xpp/oct612x/include/oct6100api/oct6100_phasing_tsst_pub.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_phasing_tsst_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_phasing_tsst.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_phasing_tsst_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 10 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_PHASING_TSST_PUB_H__
|
||||
#define __OCT6100_PHASING_TSST_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_PHASING_TSST_OPEN_
|
||||
{
|
||||
PUINT32 pulPhasingTsstHndl;
|
||||
|
||||
UINT32 ulPhasingLength;
|
||||
UINT32 ulTimeslot;
|
||||
UINT32 ulStream;
|
||||
|
||||
|
||||
|
||||
} tOCT6100_PHASING_TSST_OPEN, *tPOCT6100_PHASING_TSST_OPEN;
|
||||
|
||||
typedef struct _OCT6100_PHASING_TSST_CLOSE_
|
||||
{
|
||||
UINT32 ulPhasingTsstHndl;
|
||||
|
||||
} tOCT6100_PHASING_TSST_CLOSE, *tPOCT6100_PHASING_TSST_CLOSE;
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100PhasingTsstOpenDef(
|
||||
OUT tPOCT6100_PHASING_TSST_OPEN f_pPhasingTsstOpen );
|
||||
UINT32 Oct6100PhasingTsstOpen(
|
||||
IN tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_PHASING_TSST_OPEN f_pPhasingTsstOpen );
|
||||
|
||||
UINT32 Oct6100PhasingTsstCloseDef(
|
||||
OUT tPOCT6100_PHASING_TSST_CLOSE f_pPhasingTsstClose );
|
||||
UINT32 Oct6100PhasingTsstClose(
|
||||
IN tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_PHASING_TSST_CLOSE f_pPhasingTsstClose );
|
||||
|
||||
#endif /* __OCT6100_PHASING_TSST_PUB_H__ */
|
||||
|
||||
88
xpp/oct612x/include/oct6100api/oct6100_playout_buf_inst.h
Normal file
88
xpp/oct612x/include/oct6100api/oct6100_playout_buf_inst.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_playout_buf_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_playout_buf.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_playout_buf_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 10 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_PLAYOUT_BUF_INST_H__
|
||||
#define __OCT6100_PLAYOUT_BUF_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
#define mOCT6100_GET_BUFFER_MEMORY_NODE_LIST_PNT( pSharedInfo, pList ) \
|
||||
pList = ( tPOCT6100_API_BUFFER_PLAYOUT_MALLOC_NODE )(( PUINT8 )pSharedInfo + pSharedInfo->ulPlayoutBufMemoryNodeListOfst );
|
||||
|
||||
#define mOCT6100_GET_BUFFER_MEMORY_NODE_ENTRY_PNT( pSharedInfo, pEntry, ulIndex ) \
|
||||
pEntry = (( tPOCT6100_API_BUFFER_PLAYOUT_MALLOC_NODE )(( PUINT8 )pSharedInfo + pSharedInfo->ulPlayoutBufMemoryNodeListOfst)) + ulIndex;
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_BUFFER_PLAYOUT_MALLOC_NODE_
|
||||
{
|
||||
/* Next node. */
|
||||
UINT32 ulNext;
|
||||
|
||||
/* Previous node. */
|
||||
UINT32 ulPrevious;
|
||||
|
||||
/* Start address of this node. */
|
||||
UINT32 ulStartAddress;
|
||||
|
||||
/* Size of this node. */
|
||||
UINT32 ulSize;
|
||||
|
||||
/* Allocated node? Free node? */
|
||||
UINT8 fAllocated;
|
||||
|
||||
} tOCT6100_API_BUFFER_PLAYOUT_MALLOC_NODE, *tPOCT6100_API_BUFFER_PLAYOUT_MALLOC_NODE;
|
||||
|
||||
typedef struct _OCT6100_API_BUFFER_
|
||||
{
|
||||
/* Flag specifying whether the entry is used or not. */
|
||||
UINT8 fReserved;
|
||||
|
||||
/* Pcm law of the buffer. */
|
||||
UINT8 byBufferPcmLaw;
|
||||
|
||||
/* Number of channels currently playing this buffer.*/
|
||||
UINT16 usDependencyCnt;
|
||||
|
||||
/* Length of the buffer ( in bytes ).*/
|
||||
UINT32 ulBufferSize;
|
||||
|
||||
/* Address in external memory of the buffer. */
|
||||
UINT32 ulBufferBase;
|
||||
|
||||
} tOCT6100_API_BUFFER, *tPOCT6100_API_BUFFER;
|
||||
|
||||
#endif /* __OCT6100_PLAYOUT_BUF_INST_H__ */
|
||||
183
xpp/oct612x/include/oct6100api/oct6100_playout_buf_pub.h
Normal file
183
xpp/oct612x/include/oct6100api/oct6100_playout_buf_pub.h
Normal file
@@ -0,0 +1,183 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_playout_buf_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_playout_buf.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_playout_buf_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 21 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_PLAYOUT_BUF_PUB_H__
|
||||
#define __OCT6100_PLAYOUT_BUF_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_BUFFER_LOAD_
|
||||
{
|
||||
PUINT32 pulBufferIndex; /* Index identifying the buffer. */
|
||||
PUINT32 pulPlayoutFreeMemSize; /* Amount of free memory available for other buffers. */
|
||||
|
||||
PUINT8 pbyBufferPattern; /* A byte pointer pointing to a valid buffer to be loaded into the chip's external memory. */
|
||||
UINT32 ulBufferSize; /* Size of the buffer loaded into external memory. */
|
||||
|
||||
UINT32 ulBufferPcmLaw; /* Buffer PCM law. */
|
||||
|
||||
} tOCT6100_BUFFER_LOAD, *tPOCT6100_BUFFER_LOAD;
|
||||
|
||||
typedef struct _OCT6100_BUFFER_LOAD_BLOCK_INIT_
|
||||
{
|
||||
PUINT32 pulBufferIndex; /* Index identifying the buffer. */
|
||||
PUINT32 pulPlayoutFreeMemSize; /* Amount of free memory available for other buffers. */
|
||||
|
||||
UINT32 ulBufferSize; /* Size of the buffer to be loaded in memory. This space will be reserved. */
|
||||
|
||||
UINT32 ulBufferPcmLaw; /* Buffer PCM law. */
|
||||
|
||||
} tOCT6100_BUFFER_LOAD_BLOCK_INIT, *tPOCT6100_BUFFER_LOAD_BLOCK_INIT;
|
||||
|
||||
typedef struct _OCT6100_BUFFER_LOAD_BLOCK_
|
||||
{
|
||||
UINT32 ulBufferIndex; /* Index identifying the buffer. */
|
||||
|
||||
/* Offset, in bytes, of the first byte in the block to be loaded. */
|
||||
/* This offset is with respect to the beginning of the buffer. */
|
||||
/* This value must be modulo 2 */
|
||||
UINT32 ulBlockOffset;
|
||||
|
||||
/* Size of the block to be loaded into external memory. */
|
||||
/* This value must be modulo 2. */
|
||||
UINT32 ulBlockLength;
|
||||
|
||||
/* A pointer pointing to a valid buffer block to be loaded */
|
||||
/* into the chip's external memory. This is a pointer to the entire */
|
||||
/* buffer. The API uses the ulBlockOffset and ulBlockLength to index */
|
||||
/* within this buffer and obtain the block to be loaded. */
|
||||
PUINT8 pbyBufferPattern;
|
||||
|
||||
} tOCT6100_BUFFER_LOAD_BLOCK, *tPOCT6100_BUFFER_LOAD_BLOCK;
|
||||
|
||||
typedef struct _OCT6100_BUFFER_UNLOAD_
|
||||
{
|
||||
UINT32 ulBufferIndex; /* Index identifying the buffer. */
|
||||
|
||||
} tOCT6100_BUFFER_UNLOAD, *tPOCT6100_BUFFER_UNLOAD;
|
||||
|
||||
typedef struct _OCT6100_BUFFER_PLAYOUT_ADD_
|
||||
{
|
||||
UINT32 ulChannelHndl; /* Echo cancelling channel on which to play the buffer. */
|
||||
|
||||
UINT32 ulBufferIndex; /* Index identifying the buffer. */
|
||||
|
||||
UINT32 ulPlayoutPort; /* Selected channel port where to play to tone. */
|
||||
UINT32 ulMixingMode; /* Weither or not the voice stream will be muted while playing the buffer. */
|
||||
|
||||
INT32 lGainDb; /* Gain applied to the buffer that will be played on the specified port. */
|
||||
|
||||
BOOL fRepeat; /* Use ulRepeatCount variable. */
|
||||
UINT32 ulRepeatCount; /* Number of times to repeat playing the selected buffer. */
|
||||
|
||||
UINT32 ulDuration; /* Duration in millisecond that this buffer should play. Setting this overrides fRepeat. */
|
||||
|
||||
UINT32 ulBufferLength; /* Length of the buffer to play (starting at the beginning), AUTO_SELECT for all. */
|
||||
|
||||
} tOCT6100_BUFFER_PLAYOUT_ADD, *tPOCT6100_BUFFER_PLAYOUT_ADD;
|
||||
|
||||
typedef struct _OCT6100_BUFFER_PLAYOUT_START_
|
||||
{
|
||||
UINT32 ulChannelHndl; /* Echo cancelling channel on which to play the buffer. */
|
||||
UINT32 ulPlayoutPort; /* Selected channel port where to play to tone. */
|
||||
|
||||
BOOL fNotifyOnPlayoutStop; /* Check if the buffers have finished playing on this channel/port. */
|
||||
/* The events are queued in a soft buffer that the user must empty regularly. */
|
||||
UINT32 ulUserEventId; /* Returned to the user when the playout is finished and the user has set the fNotifyOnPlayoutStop flag. */
|
||||
|
||||
BOOL fAllowStartWhileActive; /* Use this to add buffers to something that is already playing on the channel/port. */
|
||||
|
||||
} tOCT6100_BUFFER_PLAYOUT_START, *tPOCT6100_BUFFER_PLAYOUT_START;
|
||||
|
||||
typedef struct _OCT6100_BUFFER_PLAYOUT_STOP_
|
||||
{
|
||||
UINT32 ulChannelHndl; /* Echo cancelling channel on which to play the buffer. */
|
||||
UINT32 ulPlayoutPort; /* Selected channel port where to play to tone. */
|
||||
BOOL fStopCleanly; /* Whether or not the skip will be clean. */
|
||||
|
||||
PBOOL pfAlreadyStopped; /* Whether playout was already stopped or not. */
|
||||
PBOOL pfNotifyOnPlayoutStop; /* Whether the user chosed to receive an event on playout stop. */
|
||||
|
||||
} tOCT6100_BUFFER_PLAYOUT_STOP, *tPOCT6100_BUFFER_PLAYOUT_STOP;
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100BufferPlayoutLoadDef(
|
||||
OUT tPOCT6100_BUFFER_LOAD f_pBufferLoad );
|
||||
UINT32 Oct6100BufferPlayoutLoad(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_BUFFER_LOAD f_pBufferLoad );
|
||||
|
||||
UINT32 Oct6100BufferPlayoutLoadBlockInitDef(
|
||||
OUT tPOCT6100_BUFFER_LOAD_BLOCK_INIT f_pBufferLoadBlockInit );
|
||||
UINT32 Oct6100BufferPlayoutLoadBlockInit(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_BUFFER_LOAD_BLOCK_INIT f_pBufferLoadBlockInit );
|
||||
|
||||
UINT32 Oct6100BufferPlayoutLoadBlockDef(
|
||||
OUT tPOCT6100_BUFFER_LOAD_BLOCK f_pBufferLoadBlock );
|
||||
UINT32 Oct6100BufferPlayoutLoadBlock(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_BUFFER_LOAD_BLOCK f_pBufferLoadBlock );
|
||||
|
||||
UINT32 Oct6100BufferPlayoutUnloadDef(
|
||||
OUT tPOCT6100_BUFFER_UNLOAD f_pBufferUnload );
|
||||
UINT32 Oct6100BufferPlayoutUnload(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_BUFFER_UNLOAD f_pBufferUnload );
|
||||
|
||||
UINT32 Oct6100BufferPlayoutAddDef(
|
||||
OUT tPOCT6100_BUFFER_PLAYOUT_ADD f_pBufferPlayoutAdd );
|
||||
UINT32 Oct6100BufferPlayoutAdd(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_BUFFER_PLAYOUT_ADD f_pBufferPlayoutAdd );
|
||||
|
||||
UINT32 Oct6100BufferPlayoutStartDef(
|
||||
OUT tPOCT6100_BUFFER_PLAYOUT_START f_pBufferPlayoutStart );
|
||||
UINT32 Oct6100BufferPlayoutStart(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_BUFFER_PLAYOUT_START f_pBufferPlayoutStart );
|
||||
|
||||
UINT32 Oct6100BufferPlayoutStopDef(
|
||||
OUT tPOCT6100_BUFFER_PLAYOUT_STOP f_pBufferPlayoutStop );
|
||||
UINT32 Oct6100BufferPlayoutStop(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_BUFFER_PLAYOUT_STOP f_pBufferPlayoutStop );
|
||||
|
||||
#endif /* __OCT6100_PLAYOUT_BUF_PUB_H__ */
|
||||
73
xpp/oct612x/include/oct6100api/oct6100_remote_debug_inst.h
Normal file
73
xpp/oct612x/include/oct6100api/oct6100_remote_debug_inst.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_remote_debug_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_remote_debug.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_remote_debug_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 6 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_REMOTE_DEBUG_INST_H__
|
||||
#define __OCT6100_REMOTE_DEBUG_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_REMOTE_DEBUG_INFO_
|
||||
{
|
||||
UINT32 ulSessionTreeOfst;
|
||||
UINT32 ulSessionListOfst;
|
||||
UINT32 ulSessionListHead;
|
||||
UINT32 ulSessionListTail;
|
||||
|
||||
UINT32 ulPktCacheOfst;
|
||||
UINT32 ulDataBufOfst;
|
||||
|
||||
UINT32 ulNumSessionsOpen;
|
||||
UINT32 ulMaxSessionsOpen;
|
||||
|
||||
} tOCT6100_API_REMOTE_DEBUG_INFO, *tPOCT6100_API_REMOTE_DEBUG_INFO;
|
||||
|
||||
typedef struct _OCT6100_API_REMOTE_DEBUG_SESSION_
|
||||
{
|
||||
UINT32 ulSessionNum;
|
||||
UINT32 ulTransactionNum;
|
||||
UINT32 ulPktRetryNum;
|
||||
UINT32 ulPktByteSize;
|
||||
|
||||
UINT32 aulLastPktTime[ 2 ];
|
||||
UINT32 ulForwardLink;
|
||||
UINT32 ulBackwardLink;
|
||||
|
||||
} tOCT6100_API_REMOTE_DEBUG_SESSION, *tPOCT6100_API_REMOTE_DEBUG_SESSION;
|
||||
|
||||
#endif /* __OCT6100_REMOTE_DEBUG_INST_H__ */
|
||||
64
xpp/oct612x/include/oct6100api/oct6100_remote_debug_pub.h
Normal file
64
xpp/oct612x/include/oct6100api/oct6100_remote_debug_pub.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_remote_debug_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_remote_debug.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_remote_debug_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 6 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_REMOTE_DEBUG_PUB_H__
|
||||
#define __OCT6100_REMOTE_DEBUG_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_REMOTE_DEBUG_
|
||||
{
|
||||
PUINT32 pulReceivedPktPayload;
|
||||
UINT32 ulReceivedPktLength;
|
||||
|
||||
PUINT32 pulResponsePktPayload;
|
||||
UINT32 ulMaxResponsePktLength;
|
||||
UINT32 ulResponsePktLength;
|
||||
|
||||
} tOCT6100_REMOTE_DEBUG, *tPOCT6100_REMOTE_DEBUG;
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100RemoteDebugDef(
|
||||
OUT tPOCT6100_REMOTE_DEBUG f_pRemoteDebug );
|
||||
UINT32 Oct6100RemoteDebug(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInst,
|
||||
IN OUT tPOCT6100_REMOTE_DEBUG f_pRemoteDebug );
|
||||
|
||||
#endif /* __OCT6100_REMOTE_DEBUG_PUB_H__ */
|
||||
72
xpp/oct612x/include/oct6100api/oct6100_tlv_inst.h
Normal file
72
xpp/oct612x/include/oct6100api/oct6100_tlv_inst.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_tlv_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_tlv.c. All elements defined in this file are for public
|
||||
usage of the API. All instate elements are defined in the
|
||||
oct6100_tlv_inst.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 7 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_TLV_INST_H__
|
||||
#define __OCT6100_TLV_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_TLV_OFFSET_
|
||||
{
|
||||
/* The dword offset contain the number of dword from a base address to reach the desired dword.
|
||||
|
||||
i.e. usDwordOffset = (total bit offset) / 32; */
|
||||
|
||||
UINT16 usDwordOffset;
|
||||
|
||||
/* The bit offset will contain the bit offset required to right shift the DWORD read and obtain
|
||||
the desired value. This field is depend on the field size.
|
||||
|
||||
i.e. byBitOffset = 31 - ((total bit offset) % 32) - byFieldSize; */
|
||||
|
||||
UINT8 byBitOffset;
|
||||
UINT8 byFieldSize;
|
||||
|
||||
} tOCT6100_TLV_OFFSET, *tPOCT6100_TLV_OFFSET;
|
||||
|
||||
typedef struct _OCT6100_TLV_TONE_INFO_
|
||||
{
|
||||
UINT32 ulToneID;
|
||||
UINT32 ulDetectionPort;
|
||||
|
||||
UINT8 aszToneName[ cOCT6100_TLV_MAX_TONE_NAME_SIZE ];
|
||||
|
||||
|
||||
|
||||
} tOCT6100_TLV_TONE_INFO, *tPOCT6100_TLV_TONE_INFO;
|
||||
|
||||
#endif /* __OCT6100_TLV_INST_H__ */
|
||||
46
xpp/oct612x/include/oct6100api/oct6100_tone_detection_inst.h
Normal file
46
xpp/oct612x/include/oct6100api/oct6100_tone_detection_inst.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_tone_detection_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_tone_detection_buf.c. All elements defined in this file are for
|
||||
public usage of the API. All private elements are defined in the
|
||||
oct6100_tone_detection_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 8 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_TONE_DETECTION_INST_H__
|
||||
#define __OCT6100_TONE_DETECTION_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
|
||||
#endif /* __OCT6100_TONE_DETECTION_INST_H__ */
|
||||
74
xpp/oct612x/include/oct6100api/oct6100_tone_detection_pub.h
Normal file
74
xpp/oct612x/include/oct6100api/oct6100_tone_detection_pub.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_tone_detection_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_tone_detection.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_tone_detection_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 10 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_TONE_DETECTION_PUB_H__
|
||||
#define __OCT6100_TONE_DETECTION_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_TONE_DETECTION_ENABLE_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
UINT32 ulToneNumber;
|
||||
|
||||
} tOCT6100_TONE_DETECTION_ENABLE, *tPOCT6100_TONE_DETECTION_ENABLE;
|
||||
|
||||
typedef struct _OCT6100_TONE_DETECTION_DISABLE_
|
||||
{
|
||||
UINT32 ulChannelHndl;
|
||||
UINT32 ulToneNumber;
|
||||
BOOL fDisableAll;
|
||||
|
||||
} tOCT6100_TONE_DETECTION_DISABLE, *tPOCT6100_TONE_DETECTION_DISABLE;
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100ToneDetectionEnableDef(
|
||||
OUT tPOCT6100_TONE_DETECTION_ENABLE f_pBufferLoad );
|
||||
UINT32 Oct6100ToneDetectionEnable(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_TONE_DETECTION_ENABLE f_pBufferLoad );
|
||||
|
||||
UINT32 Oct6100ToneDetectionDisableDef(
|
||||
OUT tPOCT6100_TONE_DETECTION_DISABLE f_pBufferUnload );
|
||||
UINT32 Oct6100ToneDetectionDisable(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_TONE_DETECTION_DISABLE f_pBufferUnload );
|
||||
|
||||
#endif /* __OCT6100_TONE_DETECTION_PUB_H__ */
|
||||
70
xpp/oct612x/include/oct6100api/oct6100_tsi_cnct_inst.h
Normal file
70
xpp/oct612x/include/oct6100api/oct6100_tsi_cnct_inst.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_tsi_cnct_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_tsi_cnct.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_tsi_cnct_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 9 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_TSI_CNCT_INST_H__
|
||||
#define __OCT6100_TSI_CNCT_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_TSI_CNCT_
|
||||
{
|
||||
/* Flag specifying whether the entry is used or not. */
|
||||
UINT8 fReserved;
|
||||
|
||||
/* Count used to manage entry handles allocated to user. */
|
||||
UINT8 byEntryOpenCnt;
|
||||
|
||||
/* Input PCM law. */
|
||||
UINT8 byInputPcmLaw;
|
||||
|
||||
/* TSI chariot memory entry. */
|
||||
UINT16 usTsiMemIndex;
|
||||
|
||||
/* Input and output timeslot information. */
|
||||
UINT16 usInputTimeslot;
|
||||
UINT16 usInputStream;
|
||||
|
||||
UINT16 usOutputTimeslot;
|
||||
UINT16 usOutputStream;
|
||||
|
||||
/* Internal info for quick access to structures associated to this TSI cnct. */
|
||||
UINT16 usInputTsstIndex;
|
||||
UINT16 usOutputTsstIndex;
|
||||
|
||||
} tOCT6100_API_TSI_CNCT, *tPOCT6100_API_TSI_CNCT;
|
||||
|
||||
#endif /* __OCT6100_TSI_CNCT_INST_H__ */
|
||||
76
xpp/oct612x/include/oct6100api/oct6100_tsi_cnct_pub.h
Normal file
76
xpp/oct612x/include/oct6100api/oct6100_tsi_cnct_pub.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_tsi_cnct_pub.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_tsi_cnct.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_tsi_cnct_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 11 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_TSI_CNCT_PUB_H__
|
||||
#define __OCT6100_TSI_CNCT_PUB_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_TSI_CNCT_OPEN_
|
||||
{
|
||||
PUINT32 pulTsiCnctHndl;
|
||||
|
||||
UINT32 ulInputTimeslot;
|
||||
UINT32 ulInputStream;
|
||||
UINT32 ulOutputTimeslot;
|
||||
UINT32 ulOutputStream;
|
||||
|
||||
} tOCT6100_TSI_CNCT_OPEN, *tPOCT6100_TSI_CNCT_OPEN;
|
||||
|
||||
typedef struct _OCT6100_TSI_CNCT_CLOSE_
|
||||
{
|
||||
UINT32 ulTsiCnctHndl;
|
||||
|
||||
} tOCT6100_TSI_CNCT_CLOSE, *tPOCT6100_TSI_CNCT_CLOSE;
|
||||
|
||||
/************************** FUNCTION PROTOTYPES *****************************/
|
||||
|
||||
UINT32 Oct6100TsiCnctOpenDef(
|
||||
OUT tPOCT6100_TSI_CNCT_OPEN f_pTsiCnctOpen );
|
||||
UINT32 Oct6100TsiCnctOpen(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_TSI_CNCT_OPEN f_pTsiCnctOpen );
|
||||
|
||||
UINT32 Oct6100TsiCnctCloseDef(
|
||||
OUT tPOCT6100_TSI_CNCT_CLOSE f_pTsiCnctClose );
|
||||
UINT32 Oct6100TsiCnctClose(
|
||||
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
|
||||
IN OUT tPOCT6100_TSI_CNCT_CLOSE f_pTsiCnctClose );
|
||||
|
||||
#endif /* __OCT6100_TSI_CNCT_PUB_H__ */
|
||||
55
xpp/oct612x/include/oct6100api/oct6100_tsst_inst.h
Normal file
55
xpp/oct612x/include/oct6100api/oct6100_tsst_inst.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_tsst_inst.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines, macros, and structures pertaining to the file
|
||||
oct6100_tsst.c. All elements defined in this file are for public
|
||||
usage of the API. All private elements are defined in the
|
||||
oct6100_tsst_priv.h file.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 5 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_TSST_INST_H__
|
||||
#define __OCT6100_TSST_INST_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCT6100_API_TSST_ENTRY_
|
||||
{
|
||||
UINT16 usTsstMemoryIndex; /* Index in the TSST memory of the TSST */
|
||||
UINT16 usTsstValue; /* Tsst value given by the user. */
|
||||
/* bit 5:0 = stream value, bit 13:6 = timeslot value. */
|
||||
|
||||
UINT16 usNextEntry; /* Pointer to the next entry in the list. */
|
||||
|
||||
} tOCT6100_API_TSST_ENTRY, *tPOCT6100_API_TSST_ENTRY;
|
||||
|
||||
#endif /* __OCT6100_TSST_INST_H__ */
|
||||
116
xpp/oct612x/include/octdef.h
Normal file
116
xpp/oct612x/include/octdef.h
Normal file
@@ -0,0 +1,116 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: octdef.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
Common system definitions.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 12 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCTDEF_H__
|
||||
#define __OCTDEF_H__
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
C language
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
Get Platform Dependency headers
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "octosdependant.h"
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
Common Type definitions
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "octtype.h"
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
/* List of functions to skip compiling since we don't use them */
|
||||
#include "digium_unused.h"
|
||||
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
Miscellaneous constants
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef PROTO
|
||||
#define PROTO extern
|
||||
#endif
|
||||
|
||||
/* Generic return codes. */
|
||||
#define cOCTDEF_RC_OK 0 /* Generic Ok */
|
||||
#define cOCTDEF_RC_ERROR 1 /* Generic Error */
|
||||
|
||||
/* Default return values of all OCTAPI functions. */
|
||||
#ifndef GENERIC_OK
|
||||
#define GENERIC_OK 0x00000000
|
||||
#endif
|
||||
|
||||
#ifndef GENERIC_ERROR
|
||||
#define GENERIC_ERROR 0x00000001
|
||||
#endif
|
||||
|
||||
#ifndef GENERIC_BAD_PARAM
|
||||
#define GENERIC_BAD_PARAM 0x00000002
|
||||
#endif
|
||||
|
||||
/* Defines of boolean expressions (TRUE/FALSE) */
|
||||
#ifndef FALSE
|
||||
#define FALSE (BOOL)0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE (BOOL)1
|
||||
#endif
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
DLL Import-Export
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef OCT_WINENV
|
||||
#define DLLIMP __declspec( dllimport )
|
||||
#define DLLEXP __declspec( dllexport )
|
||||
#else
|
||||
#define DLLIMP
|
||||
#define DLLEXP
|
||||
#endif
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
C language
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OCTDEF_H__ */
|
||||
98
xpp/oct612x/include/octmac.h
Normal file
98
xpp/oct612x/include/octmac.h
Normal file
@@ -0,0 +1,98 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: octmac.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
Common macro definitions.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 14 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#ifndef __OCTMAC_H__
|
||||
#define __OCTMAC_H__
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
C language
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
/* Combine l & h to form a 32 bit quantity. */
|
||||
#define mMAKEULONG(l, h) ((ULONG)(((USHORT)(l)) | (((ULONG)((USHORT)(h))) << 16)))
|
||||
|
||||
#define mLOUCHAR(w) ((UCHAR)(w))
|
||||
#define mHIUCHAR(w) ((UCHAR)(((USHORT)(w) >> 8) & 0xff))
|
||||
#define mLOUSHORT(l) ((USHORT)((ULONG)l))
|
||||
#define mHIUSHORT(l) ((USHORT)(((ULONG)(l) >> 16) & 0xffff))
|
||||
#define mLOSHORT(l) ((SHORT)((ULONG)l))
|
||||
#define mHISHORT(l) ((SHORT)(((ULONG)(l) >> 16) & 0xffff))
|
||||
|
||||
/* Combine l & h to form a 16 bit quantity. */
|
||||
#define mMAKEUSHORT(l, h) (((USHORT)(l)) | ((USHORT)(h)) << 8)
|
||||
#define mMAKESHORT(l, h) ((SHORT)mMAKEUSHORT(l, h))
|
||||
|
||||
/* Extract high and low order parts of 16 and 32 bit quantity */
|
||||
#define mLOBYTE(w) mLOUCHAR(w)
|
||||
#define mHIBYTE(w) mHIUCHAR(w)
|
||||
#define mMAKELONG(l, h) ((LONG)mMAKEULONG(l, h))
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
Bite conversion macro
|
||||
----------------------------------------------------------------------------*/
|
||||
#define mSWAP_INT16(x) mMAKEUSHORT( mHIBYTE(x), mLOBYTE(x) )
|
||||
#define mSWAP_INT32(x) mMAKEULONG( mSWAP_INT16(mHIUSHORT(x)), mSWAP_INT16(mLOUSHORT(x)) )
|
||||
|
||||
|
||||
/* Cast any variable to an instance of the specified type. */
|
||||
#define mMAKETYPE(v, type) (*((type *)&v))
|
||||
|
||||
/* Calculate the byte offset of a field in a structure of type type. */
|
||||
#define mFIELDOFFSET(type, field) ((UINT32)&(((type *)0)->field))
|
||||
#define mCOUNTOF(array) (sizeof(array)/sizeof(array[0]))
|
||||
|
||||
#define mMAX(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#define mMIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
#define mDIM(x) (sizeof(x) / sizeof(x[0]))
|
||||
|
||||
#define mFROMDIGIT(ch) ((ch) - 0x30) /* digit to char */
|
||||
#define mTODIGIT(ch) ((ch) + 0x30) /* int to char */
|
||||
|
||||
#define mISLEAP(a) ( !( a % 400 ) || ( ( a % 100 ) && !( a % 4 ) ) )
|
||||
|
||||
#define mFOREVER for( ;; )
|
||||
|
||||
#define mROUND_TO_NEXT_4( a ) ( ((a) % 4) ? ( (a) + 4 - ((a)%4) ) : (a) )
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
C language
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OCTMAC_H__ */
|
||||
170
xpp/oct612x/include/octosdependant.h
Normal file
170
xpp/oct612x/include/octosdependant.h
Normal file
@@ -0,0 +1,170 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: octosdependant.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
This file is included to set target-specific constants.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 18 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCTOSDEPENDANT_H__
|
||||
#define __OCTOSDEPENDANT_H__
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
C language
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
Known define values
|
||||
|
||||
MSDEV:
|
||||
WIN32 == WINDOWS 32 bit app
|
||||
__WIN32__ == WINDOWS 32 bit app
|
||||
_Windows == WINDOWS 16 bit app
|
||||
|
||||
_WINDOWS == Windows application .. not console
|
||||
_DLL == Dll Application
|
||||
_CONSOLE == Console Application .. no windows
|
||||
|
||||
BORLANDC
|
||||
__TURBOC__ == Turbo Compiler
|
||||
__BORLANDC__ == Borland compiler
|
||||
__OS2__ == Borland OS2 compiler
|
||||
_Windows == Windows 16 bit app
|
||||
|
||||
GCC Compiler
|
||||
__GNUC__ == GCC Compiler
|
||||
__unix__ == Unix system
|
||||
__vax__ == Unix system
|
||||
unix == Unix system
|
||||
vax == vax system
|
||||
|
||||
TORNADO
|
||||
_VXWORKS_ == VXWORK
|
||||
|
||||
ECOS/CYGWIN
|
||||
_ECOS_ == eCos
|
||||
|
||||
SOLARIS
|
||||
_SOLARIS_ == Solaris
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
/* Machine endian type */
|
||||
|
||||
#define OCT_MACH_LITTLE_ENDIAN 1
|
||||
#define OCT_MACH_BIG_ENDIAN 2
|
||||
|
||||
/* Try to find current OCT_MACH_ENDIAN from compiler define values */
|
||||
#if !defined( MACH_TYPE_BIG_ENDIAN ) && !defined( MACH_TYPE_LITTLE_ENDIAN )
|
||||
/* Does GNU defines the endian ? */
|
||||
#if defined(__GNU_C__)
|
||||
#if defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__)
|
||||
#define OCT_MACH_ENDIAN OCT_MACH_BIG_ENDIAN
|
||||
#elif defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN__)
|
||||
#define OCT_MACH_ENDIAN OCT_MACH_LITTLE_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Try with cpu type */
|
||||
#if !defined(OCT_MACH_ENDIAN)
|
||||
/* Look for intel */
|
||||
#if defined( _M_IX86 )
|
||||
#define OCT_MACH_ENDIAN OCT_MACH_LITTLE_ENDIAN
|
||||
/* Look for PowerPC */
|
||||
#elif defined( _M_MPPC ) || defined( _M_PPC ) || defined(PPC) || defined(__PPC) || defined(_ARCH_PPC)
|
||||
#define OCT_MACH_ENDIAN OCT_MACH_BIG_ENDIAN
|
||||
/* Look for Blackfin */
|
||||
#elif defined( __bfin__ )
|
||||
#define OCT_MACH_ENDIAN OCT_MACH_LITTLE_ENDIAN
|
||||
#elif defined( CPU )
|
||||
#if CPU==PPC860 || CPU==SIMNT
|
||||
#define OCT_MACH_ENDIAN OCT_MACH_BIG_ENDIAN
|
||||
#else
|
||||
#define OCT_MACH_ENDIAN OCT_MACH_LITTLE_ENDIAN
|
||||
#endif
|
||||
#else
|
||||
#define OCT_MACH_ENDIAN OCT_MACH_LITTLE_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if defined( MACH_TYPE_BIG_ENDIAN )
|
||||
#define OCT_MACH_ENDIAN OCT_MACH_BIG_ENDIAN
|
||||
#else
|
||||
#define OCT_MACH_ENDIAN OCT_MACH_LITTLE_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Find system type if not already defined */
|
||||
#if !defined( OCT_NTDRVENV ) && !defined( OCT_VXENV ) && !defined( OCT_WINENV )
|
||||
|
||||
#if defined( WIN32 ) || defined( __WIN32__ ) || defined( _WIN32_ ) || defined( WIN32S )
|
||||
/* Verif if building a win32 driver */
|
||||
#if ( defined( WIN32 ) && WIN32==100 )
|
||||
#define OCT_NTDRVENV
|
||||
#else
|
||||
#define OCT_WINENV
|
||||
#endif
|
||||
#elif defined( _VXWORKS_ )
|
||||
#define OCT_VXENV
|
||||
#elif defined( _ECOS_ )
|
||||
#ifndef OCT_ECOSENV
|
||||
#define OCT_ECOSENV
|
||||
#endif /* OCT_ECOSENV */
|
||||
#elif defined( _SOLARIS_ )
|
||||
#define OCT_SOLARISENV
|
||||
#elif defined( _LINUX_ )
|
||||
#define OCT_LINUXENV
|
||||
#else
|
||||
/* Unknown environment */
|
||||
#define OCT_UNKNOWNENV
|
||||
#endif /* WIN env */
|
||||
|
||||
#endif /* Already defined */
|
||||
|
||||
#if defined( __KERNEL__ ) && defined( OCT_LINUXENV )
|
||||
#define OCT_LINUXDRVENV
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define OCT_OPT_USER_DEBUG
|
||||
#endif
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
C language
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OCTOSDEPENDANT_H__ */
|
||||
348
xpp/oct612x/include/octrpc/oct6100_rpc_protocol.h
Normal file
348
xpp/oct612x/include/octrpc/oct6100_rpc_protocol.h
Normal file
@@ -0,0 +1,348 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: oct6100_rpc_protocol.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
File containing all defines and prototypes related to the OCT6100 RPC
|
||||
protocol for exchanging debug commands.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 6 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCT6100_RPC_PROTOCOL_H__
|
||||
#define __OCT6100_RPC_PROTOCOL_H__
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
#define cOCTRPC_INTERFACE_VERSION 0x00010002
|
||||
|
||||
/* Octasic commands. */
|
||||
#define cOCT6100_RPC_CHIP_LIST 0xFF000000
|
||||
#define cOCT6100_RPC_CHIP_CHOICE 0xFF000001
|
||||
#define cOCT6100_RPC_ENV_DISCONNECT 0xFF000002
|
||||
|
||||
/* Commands */
|
||||
/* Read commands */
|
||||
#define cOCT6100_RPC_READ_WORD 0x00000000
|
||||
#define cOCT6100_RPC_READ_BURST 0x00000001
|
||||
#define cOCT6100_RPC_READ_DEBUG 0x00000002
|
||||
#define cOCT6100_RPC_READ_ARRAY 0x00000003
|
||||
#define cOCT6100_RPC_API_DISCONNECT 0x00000004
|
||||
|
||||
/* Write commands */
|
||||
#define cOCT6100_RPC_WRITE_WORD 0x00000010
|
||||
#define cOCT6100_RPC_WRITE_BURST 0x00000011
|
||||
#define cOCT6100_RPC_WRITE_SMEAR 0x00000012
|
||||
#define cOCT6100_RPC_WRITE_INC 0x00000013
|
||||
|
||||
/* Debug commands.*/
|
||||
#define cOCT6100_RPC_SET_HOT_CHANNEL 0x00000014
|
||||
#define cOCT6100_RPC_GET_DEBUG_CHAN_INDEX 0x00000015
|
||||
|
||||
#define cOCTRPC_UNKNOWN_COMMAND_NUM 0xFFFFFFFF
|
||||
|
||||
/* Errors */
|
||||
#define cOCT6100_RPCERR_OK 0x00000000
|
||||
#define cOCT6100_RPCERR_INVALID_COMMAND_NUMBER 0x00000001
|
||||
#define cOCT6100_RPCERR_INVALID_COMMAND_PAYLOAD 0x00000002
|
||||
#define cOCT6100_RPCERR_INVALID_COMMAND_LENGTH 0x00000003
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
Structure: OCT6100_RPC_READ_WORD
|
||||
|
||||
Description: Command structure for the read of one word.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
| Member | Description
|
||||
-------------------------------------------------------------------------------
|
||||
IN ulAddress Address at which to read.
|
||||
OUT ulReadData The word read, returned.
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
typedef struct _OCT6100_RPC_READ_WORD_
|
||||
{
|
||||
UINT32 IN ulAddress;
|
||||
UINT32 OUT ulReadData;
|
||||
|
||||
} tOCT6100_RPC_READ_WORD, *tPOCT6100_RPC_READ_WORD;
|
||||
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
Structure: OCT6100_RPC_READ_BURST
|
||||
|
||||
Description: Command structure for a read burst. The burst starts at the
|
||||
given address and reads the specified number of consecutive
|
||||
words.
|
||||
|
||||
Whereas every command structure uses a complete dword for every
|
||||
member, irrespective of the size of data unit needed, this
|
||||
structure does not do so for the read data. To save bandwidth
|
||||
the read data words are returned two per dword.
|
||||
|
||||
Example packet: 31 16 15 0
|
||||
-------------------------------------------
|
||||
| ulAddress = 0x100 |
|
||||
-------------------------------------------
|
||||
| ulBurstLength = 0x3 |
|
||||
-------------------------------------------
|
||||
aulReadData -> | D0 | D1 |
|
||||
-------------------------------------------
|
||||
| D2 | xx |
|
||||
-------------------------------------------
|
||||
|
||||
Dy is the read data at ulAddress + 2 * y.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
| Member | Description
|
||||
-------------------------------------------------------------------------------
|
||||
IN ulAddress Address at which to read.
|
||||
IN ulBurstLength The number of consecutive words to be read.
|
||||
OUT aulReadData The read data returned. The dwords of the structure
|
||||
starting at this address are arranged as indicated in
|
||||
the example packet above.
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
typedef struct _OCT6100_RPC_READ_BURST_
|
||||
{
|
||||
UINT32 IN ulAddress;
|
||||
UINT32 IN ulBurstLength;
|
||||
UINT32 OUT aulReadData[ 1 ];
|
||||
|
||||
} tOCT6100_RPC_READ_BURST, *tPOCT6100_RPC_READ_BURST;
|
||||
|
||||
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
Structure: OCT6100_RPC_READ_ARRAY
|
||||
|
||||
Description: Command structure for a variable number of reads. The reads do
|
||||
not have to be at contiguous addresses.
|
||||
|
||||
Whereas every command structure uses a complete dword for every
|
||||
member, irrespective of the size of data unit needed, this
|
||||
structure does not do so for the read data. To save bandwidth
|
||||
the read data words are returned two per dword, and the
|
||||
parity bits are returned 16 per dword (two parity bits per read
|
||||
access).
|
||||
|
||||
Example packet: 31 16 15 0
|
||||
-------------------------------------------
|
||||
| ulArrayLength = 0x3 |
|
||||
-------------------------------------------
|
||||
aulArrayData ->| A0 |
|
||||
-------------------------------------------
|
||||
| A1 |
|
||||
-------------------------------------------
|
||||
| A2 |
|
||||
-------------------------------------------
|
||||
| D0 | D1 |
|
||||
-------------------------------------------
|
||||
| D2 | xx |
|
||||
-------------------------------------------
|
||||
|
||||
Ay is the address for access y.
|
||||
Dy is the read data at Ay.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
| Member | Description
|
||||
-------------------------------------------------------------------------------
|
||||
IN ulArrayLength Number of reads to do.
|
||||
IN OUT aulArrayData The addresses at which to read (IN) and the read data
|
||||
returned (OUT). The dwords of the command structure
|
||||
starting at this address are arranged as indicated in
|
||||
the example packet above.
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
typedef struct _OCT6100_RPC_READ_ARRAY
|
||||
{
|
||||
UINT32 IN ulArrayLength;
|
||||
UINT32 IN OUT aulArrayData[ 1 ];
|
||||
|
||||
} tOCT6100_RPC_READ_ARRAY, *tPOCT6100_RPC_READ_ARRAY;
|
||||
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
Structure: OCT6100_RPC_WRITE_WORD
|
||||
|
||||
Description: Command structure for the write of one word.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
| Member | Description
|
||||
-------------------------------------------------------------------------------
|
||||
IN ulAddress Address at which to write.
|
||||
IN ulWriteData The word to write.
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
typedef struct _OCT6100_RPC_WRITE_WORD_
|
||||
{
|
||||
UINT32 IN ulAddress;
|
||||
UINT32 IN ulParity;
|
||||
UINT32 IN ulWriteData;
|
||||
|
||||
} tOCT6100_RPC_WRITE_WORD, *tPOCT6100_RPC_WRITE_WORD;
|
||||
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
Structure: OCT6100_RPC_WRITE_SMEAR
|
||||
|
||||
Description: Command structure for the write of one word at one or many
|
||||
consecutive addresses.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
| Member | Description
|
||||
-------------------------------------------------------------------------------
|
||||
IN ulAddress Address of first write.
|
||||
IN ulSmearLength Number of consecutive addresses to write.
|
||||
IN ulWriteData The word to write at each address.
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
typedef struct _OCT6100_RPC_WRITE_SMEAR_
|
||||
{
|
||||
UINT32 IN ulAddress;
|
||||
UINT32 IN ulSmearLength;
|
||||
UINT32 IN ulParity;
|
||||
UINT32 IN ulWriteData;
|
||||
|
||||
} tOCT6100_RPC_WRITE_SMEAR, *tPOCT6100_RPC_WRITE_SMEAR;
|
||||
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
Structure: OCT6100_RPC_WRITE_INC
|
||||
|
||||
Description: Command structure for the write of an incremental pattern at
|
||||
one or many consecutive addresses.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
| Member | Description
|
||||
-------------------------------------------------------------------------------
|
||||
IN ulAddress Address of first write.
|
||||
IN ulIncLength Number of consecutive addresses to write.
|
||||
IN ulWriteData The first word of the incremental pattern. For each
|
||||
consecutive write the word will be incremented by 1.
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
typedef struct _OCT6100_RPC_WRITE_INC_
|
||||
{
|
||||
UINT32 IN ulAddress;
|
||||
UINT32 IN ulIncLength;
|
||||
UINT32 IN ulParity;
|
||||
UINT32 IN ulWriteData;
|
||||
|
||||
} tOCT6100_RPC_WRITE_INC, *tPOCT6100_RPC_WRITE_INC;
|
||||
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
Structure: OCT6100_RPC_WRITE_BURST
|
||||
|
||||
Description: Command structure for a write burst. The burst starts at the
|
||||
given address and writes a given word for each address.
|
||||
|
||||
Whereas every command structure uses a complete dword for every
|
||||
member, irrespective of the size of data unit needed, this
|
||||
structure does not do so for the write data. To save bandwidth
|
||||
the write data words are sent two per dword.
|
||||
|
||||
Example packet: 31 16 15 0
|
||||
-------------------------------------------
|
||||
| ulAddress = 0x100 |
|
||||
-------------------------------------------
|
||||
| ulBurstLength = 0x3 |
|
||||
-------------------------------------------
|
||||
aulWriteData ->| D0 | D1 |
|
||||
-------------------------------------------
|
||||
| D2 | xx |
|
||||
-------------------------------------------
|
||||
|
||||
Dy is the write data for ulAddress + 2 * y.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
| Member | Description
|
||||
-------------------------------------------------------------------------------
|
||||
IN ulAddress First address at which to write.
|
||||
IN ulBurstLength The number of consecutive addresses to be write.
|
||||
IN aulWriteData The write data words. The dwords of the structure
|
||||
starting at this address are arranged as indicated in
|
||||
the example packet above.
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
typedef struct _OCT6100_RPC_WRITE_BURST_
|
||||
{
|
||||
UINT32 IN ulAddress;
|
||||
UINT32 IN ulBurstLength;
|
||||
UINT32 IN ulParity;
|
||||
UINT32 IN aulWriteData[ 1 ];
|
||||
|
||||
} tOCT6100_RPC_WRITE_BURST, *tPOCT6100_RPC_WRITE_BURST;
|
||||
|
||||
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
Structure: OCT6100_RPC_SET_HOT_CHANNEL
|
||||
|
||||
Description: Command structure to set the hot channel.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
| Member | Description
|
||||
-------------------------------------------------------------------------------
|
||||
IN ulDebugChannel Index of the channel to debug.
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
typedef struct _OCT6100_RPC_SET_HOT_CHANNEL_
|
||||
{
|
||||
UINT32 IN ulHotChannel;
|
||||
UINT32 IN ulPcmLaw;
|
||||
|
||||
} tOCT6100_RPC_SET_HOT_CHANNEL, *tPOCT6100_RPC_SET_HOT_CHANNEL;
|
||||
|
||||
|
||||
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
Structure: OCT6100_RPC_GET_DEBUG_CHAN_INDEX
|
||||
|
||||
Description: Command structure to get the debug channel index used by the API.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
| Member | Description
|
||||
-------------------------------------------------------------------------------
|
||||
IN ulDebugChannel Index of the channel to debug.
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
typedef struct _OCT6100_RPC_GET_DEBUG_CHAN_INDEX_
|
||||
{
|
||||
UINT32 OUT ulDebugChanIndex;
|
||||
|
||||
} tOCT6100_RPC_GET_DEBUG_CHAN_INDEX, *tPOCT6100_RPC_GET_DEBUG_CHAN_INDEX;
|
||||
|
||||
#endif /* __OCT6100_RPC_PROTOCOL_H__ */
|
||||
115
xpp/oct612x/include/octrpc/rpc_protocol.h
Normal file
115
xpp/oct612x/include/octrpc/rpc_protocol.h
Normal file
@@ -0,0 +1,115 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: rpc_protocol.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
This file contains RPC related definitions and prototypes.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 23 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __RPC_PROTOCOL_H__
|
||||
#define __RPC_PROTOCOL_H__
|
||||
|
||||
/***************************** INCLUDE FILES *******************************/
|
||||
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
|
||||
#define cOCTRPC_ENDIAN_DETECT 0x27182819
|
||||
#define cOCTRPC_ENDIAN_DETECT_BYTE_W 0x19
|
||||
#define cOCTRPC_ENDIAN_DETECT_BYTE_X 0x28
|
||||
#define cOCTRPC_ENDIAN_DETECT_BYTE_Y 0x18
|
||||
#define cOCTRPC_ENDIAN_DETECT_BYTE_Z 0x27
|
||||
#define cOCTRPC_ECHO_PROTOCOL 0x00000000
|
||||
|
||||
#define cOCTRPC_MIN_PACKET_BYTE_LENGTH (sizeof( tOCTRPC_OGRDTP_HEADER ))
|
||||
#define cOCTRPC_FIRST_COMMAND_BYTE_OFFSET (sizeof( tOCTRPC_OGRDTP_HEADER ) + sizeof( tOCTRPC_INTERFACE_HEADER ))
|
||||
#define cOCTRPC_GENERIC_HEADERS_BYTE_SIZE (sizeof( tOCTRPC_OGRDTP_HEADER ) + sizeof( tOCTRPC_INTERFACE_HEADER ) + sizeof( tOCTRPC_COMMAND_HEADER ))
|
||||
#define cOCTRPC_MAX_PACKET_BYTE_LENGTH 32768
|
||||
|
||||
/* Protocol versions */
|
||||
#define cOCTRPC_PROTOCOL_V1_0 0x00010000
|
||||
#define cOCTRPC_PROTOCOL_V1_1 0x00010001
|
||||
#define cOCTRPC_PROTOCOL_V1_2 0x00010002
|
||||
#define cOCTRPC_PROTOCOL_V1_3 0x00010003
|
||||
#define cOCTRPC_OCTASIC_PROTOCOL_V1_0 0xFF010000
|
||||
#define cOCTRPC_OCTASIC_PROTOCOL_V1_1 0xFF010001
|
||||
#define cOCTRPC_OCTASIC_PROTOCOL_V1_2 0xFF010002
|
||||
#define cOCTRPC_OCTASIC_PROTOCOL_V1_3 0xFF010003
|
||||
|
||||
/* Chips */
|
||||
#define cOCTRPC_OCT8304_INTERFACE 0x00000000
|
||||
#define cOCTRPC_OCT6100_INTERFACE 0x00000001
|
||||
|
||||
/* Timeout values. */
|
||||
#define cOCTRPC_SESSION_TIMEOUT 30
|
||||
|
||||
/* Generic errors */
|
||||
#define cOCTRPC_RDBGERR_OK 0x00000000
|
||||
#define cOCTRPC_RDBGERR_NO_ANSWER 0xFFFF0000
|
||||
#define cOCTRPC_RDBGERR_ALL_SESSIONS_OPEN 0xFFFF0001
|
||||
#define cOCTRPC_RDBGERR_PROTOCOL_NUMBER 0xFFFF0002
|
||||
#define cOCTRPC_RDBGERR_NO_COMMAND_HEADER 0xFFFF0003
|
||||
#define cOCTRPC_RDBGERR_INTERFACE_TYPE 0xFFFF0004
|
||||
#define cOCTRPC_RDBGERR_INTERFACE_VERSION 0xFFFF0005
|
||||
#define cOCTRPC_RDBGERR_INVALID_PACKET_LENGTH 0xFFFF0006
|
||||
#define cOCTRPC_RDBGERR_INVALID_COMMAND_LENGTH 0xFFFF0007
|
||||
#define cOCTRPC_RDBGERR_INVALID_COMMAND_NUMBER 0xFFFF0008
|
||||
#define cOCTRPC_RDBGERR_PACKET_TOO_LARGE 0xFFFF0009
|
||||
#define cOCTRPC_RDBGERR_LIST_EMPTY 0xFFFF000A
|
||||
|
||||
#define cOCTRPC_RDBGERR_FATAL 0xFFFFFFFF
|
||||
|
||||
|
||||
/***************************** TYPES ***************************************/
|
||||
|
||||
typedef struct _OCTRPC_OGRDTP_HEADER_
|
||||
{
|
||||
UINT32 IN ulEndianDetect;
|
||||
UINT32 IN ulDebugSessionNum;
|
||||
UINT32 IN ulTransactionNum;
|
||||
UINT32 IN ulPktRetryNum;
|
||||
UINT32 IN ulPktByteSize;
|
||||
UINT32 IN ulChecksum;
|
||||
UINT32 OUT ulParsingError;
|
||||
UINT32 IN ulRpcProtocolNum;
|
||||
|
||||
} tOCTRPC_OGRDTP_HEADER, *tPOCTRPC_OGRDTP_HEADER;
|
||||
|
||||
typedef struct _OCTRPC_INTERFACE_HEADER_
|
||||
{
|
||||
UINT32 IN ulInterfaceType;
|
||||
UINT32 IN ulInterfaceVersion;
|
||||
|
||||
} tOCTRPC_INTERFACE_HEADER, *tPOCTRPC_INTERFACE_HEADER;
|
||||
|
||||
typedef struct _OCTRPC_COMMAND_HEADER_
|
||||
{
|
||||
UINT32 IN ulCommandByteSize;
|
||||
UINT32 IN OUT ulRpcCommandNum;
|
||||
UINT32 OUT ulFunctionResult;
|
||||
|
||||
} tOCTRPC_COMMAND_HEADER, *tPOCTRPC_COMMAND_HEADER;
|
||||
|
||||
#endif /* __RPC_PROTOCOL_H__ */
|
||||
159
xpp/oct612x/include/octtype.h
Normal file
159
xpp/oct612x/include/octtype.h
Normal file
@@ -0,0 +1,159 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: octtype.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
This file defines the base storage types.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 18 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
#ifndef __OCTTYPE_H__
|
||||
#define __OCTTYPE_H__
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
C language
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
Include target-specific header if available
|
||||
----------------------------------------------------------------------------*/
|
||||
#if defined( OCT_NTDRVENV )
|
||||
#include "octtypentdrv.h" /* All NT driver typedef */
|
||||
#elif defined( OCT_WINENV )
|
||||
#include "octtypewin.h" /* All Win32 typedef */
|
||||
#elif defined( OCT_VXENV )
|
||||
#include "octtypevx.h" /* All VxWorks typedef */
|
||||
#else
|
||||
/*--------------------------------------------------------------------------
|
||||
No target-specific header available
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef SZ
|
||||
#undef SZ
|
||||
#endif
|
||||
|
||||
/***************************** DEFINES *************************************/
|
||||
/* 16-bit integer */
|
||||
typedef unsigned short UINT16;
|
||||
typedef signed short INT16;
|
||||
typedef unsigned short *PUINT16;
|
||||
typedef signed short *PINT16;
|
||||
|
||||
/* 8-bit integer */
|
||||
typedef unsigned char UINT8;
|
||||
typedef signed char INT8;
|
||||
typedef signed char OCT_INT8;
|
||||
typedef unsigned char *PUINT8;
|
||||
typedef signed char *PINT8;
|
||||
|
||||
|
||||
/* 32 bit integer */
|
||||
typedef unsigned int UINT32;
|
||||
typedef signed int INT32;
|
||||
typedef INT32 * PINT32;
|
||||
typedef UINT32 * PUINT32;
|
||||
|
||||
/* Long integer */
|
||||
typedef signed long LONG;
|
||||
typedef unsigned long ULONG;
|
||||
typedef long * PLONG;
|
||||
typedef unsigned long * PULONG;
|
||||
|
||||
/* Short integer */
|
||||
typedef short SHORT;
|
||||
typedef unsigned short USHORT;
|
||||
typedef short * PSHORT;
|
||||
typedef unsigned short *PUSHORT;
|
||||
|
||||
/* 8-bit integer*/
|
||||
typedef unsigned char BYTE;
|
||||
typedef BYTE * PBYTE;
|
||||
typedef unsigned char UCHAR;
|
||||
|
||||
/* Character and strings */
|
||||
typedef char CHAR;
|
||||
typedef CHAR SZ;
|
||||
typedef CHAR * PSZ;
|
||||
typedef CHAR * PCHAR;
|
||||
|
||||
/* Double integers */
|
||||
typedef double DOUBLE;
|
||||
typedef double * PDOUBLE;
|
||||
typedef float FLOAT;
|
||||
typedef float * PFLOAT;
|
||||
|
||||
typedef void VOID;
|
||||
typedef void * PVOID;
|
||||
|
||||
/* Booleans */
|
||||
typedef int BOOL;
|
||||
typedef BOOL * PBOOL;
|
||||
|
||||
/* Integers */
|
||||
typedef int INT;
|
||||
typedef int * PINT;
|
||||
typedef unsigned int UINT;
|
||||
typedef unsigned int * PUINT;
|
||||
|
||||
/* Define pseudo-keywords IN and OUT if not defined yet */
|
||||
#ifndef IN
|
||||
#define IN /* IN param */
|
||||
#endif
|
||||
|
||||
#ifndef OUT
|
||||
#define OUT /* OUT param */
|
||||
#endif
|
||||
|
||||
/* LONG LONG */
|
||||
#define LLONG signed long long
|
||||
#define PLLONG signed long long *
|
||||
#define ULLONG unsigned long long
|
||||
#define PULLONG unsigned long long *
|
||||
|
||||
#ifndef OPT
|
||||
#define OPT /* OPT param */
|
||||
#endif
|
||||
|
||||
typedef PSZ * PPSZ;
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#include <sys/stddef.h>
|
||||
#else
|
||||
#include <linux/stddef.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
C language
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OCTTYPE_H__ */
|
||||
132
xpp/oct612x/include/octtypevx.h
Normal file
132
xpp/oct612x/include/octtypevx.h
Normal file
@@ -0,0 +1,132 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: octtypevx.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
This file defines the base storage types for the VxWorks environment.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 9 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCTTYPEVX_H__
|
||||
#define __OCTTYPEVX_H__
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
C language
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "vxWorks.h"
|
||||
|
||||
/* 16-bit pointer integer */
|
||||
typedef unsigned short *PUINT16;
|
||||
typedef signed short *PINT16;
|
||||
|
||||
/* 8-bit integer pointer */
|
||||
typedef unsigned char *PUINT8;
|
||||
typedef signed char *PINT8;
|
||||
|
||||
/* 32-bit integer pointer */
|
||||
typedef INT32 * PINT32;
|
||||
typedef UINT32 * PUINT32;
|
||||
|
||||
/* Long integer pointer */
|
||||
/*Intel library for file system definition*/
|
||||
#ifndef DATATYPE_H
|
||||
typedef long LONG;
|
||||
#endif
|
||||
typedef long * PLONG;
|
||||
typedef unsigned long * PULONG;
|
||||
|
||||
/* Short integer pointer */
|
||||
typedef short SHORT;
|
||||
typedef short * PSHORT;
|
||||
typedef unsigned short *PUSHORT;
|
||||
|
||||
/* 8-bit integer*/
|
||||
#if (CPU!=SIMNT) && !defined(DATATYPE_H)
|
||||
typedef char BYTE;
|
||||
#endif
|
||||
|
||||
|
||||
typedef BYTE * PBYTE;
|
||||
|
||||
/* Character and strings */
|
||||
/*Intel library for file system definition*/
|
||||
#ifndef DATATYPE_H
|
||||
typedef char CHAR;
|
||||
#endif
|
||||
typedef char * PCHAR;
|
||||
typedef CHAR SZ;
|
||||
typedef CHAR * PSZ;
|
||||
typedef signed char OCT_INT8;
|
||||
|
||||
/* Double integers */
|
||||
typedef double DOUBLE;
|
||||
typedef double * PDOUBLE;
|
||||
typedef float FLOAT;
|
||||
typedef float * PFLOAT;
|
||||
|
||||
typedef void * PVOID;
|
||||
|
||||
/* Booleans */
|
||||
typedef BOOL * PBOOL;
|
||||
|
||||
/* Integers */
|
||||
typedef int INT;
|
||||
typedef int * PINT;
|
||||
typedef unsigned int PUINT;
|
||||
|
||||
/* Define pseudo-keywords IN and OUT if not defined yet */
|
||||
#ifndef IN
|
||||
#define IN /* IN param */
|
||||
#endif
|
||||
|
||||
#ifndef OUT
|
||||
#define OUT /* OUT param */
|
||||
#endif
|
||||
|
||||
/* LONG LONG */
|
||||
#define LLONG signed long long
|
||||
#define PLLONG signed long long *
|
||||
#define ULLONG unsigned long long
|
||||
#define PULLONG unsigned long long *
|
||||
|
||||
#ifndef OPT
|
||||
#define OPT /* OPT param */
|
||||
#endif
|
||||
|
||||
typedef PSZ * PPSZ;
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
C language
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OCTTYPEVX_H__ */
|
||||
100
xpp/oct612x/include/octtypewin.h
Normal file
100
xpp/oct612x/include/octtypewin.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
|
||||
|
||||
File: octtypewin.h
|
||||
|
||||
Copyright (c) 2001-2007 Octasic Inc.
|
||||
|
||||
Description:
|
||||
|
||||
This file defines the base storage types for the Windows environment.
|
||||
Includes the Windows definition file and add the missing ones here.
|
||||
|
||||
This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
|
||||
free software; you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
The OCT6100 GPL API is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the OCT6100 GPL API; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
$Octasic_Release: OCT612xAPI-01.00-PR49 $
|
||||
|
||||
$Octasic_Revision: 16 $
|
||||
|
||||
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
|
||||
|
||||
#ifndef __OCTTYPEWIN_H__
|
||||
#define __OCTTYPEWIN_H__
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
C language
|
||||
----------------------------------------------------------------------------*/
|
||||
#define WIN32_LEAN_AND_MEAN /* just get the base type definition from Windows */
|
||||
#include <windows.h>
|
||||
|
||||
/* Disable argument not used warning */
|
||||
#pragma warning( disable : 4100 )
|
||||
/* Disable Level 4 warning: nonstandard extension used : translation unit is empty */
|
||||
#pragma warning( disable : 4206 )
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* 16-bit integer */
|
||||
typedef unsigned short UINT16;
|
||||
typedef signed short INT16;
|
||||
typedef unsigned short *PUINT16;
|
||||
typedef signed short *PINT16;
|
||||
|
||||
/* 8-bit integer */
|
||||
typedef unsigned char UINT8;
|
||||
typedef signed char INT8;
|
||||
typedef signed char OCT_INT8;
|
||||
typedef unsigned char *PUINT8;
|
||||
typedef signed char *PINT8;
|
||||
|
||||
typedef double DOUBLE;
|
||||
|
||||
|
||||
/* 32 bit integer */
|
||||
#if ( defined( _MSC_VER ) && _MSC_VER == 1100 )
|
||||
/* MFC5 compiler does not define UINT32 */
|
||||
typedef unsigned int UINT32;
|
||||
typedef signed int INT32;
|
||||
typedef INT32 * PINT32;
|
||||
typedef UINT32 * PUINT32;
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* LONG LONG */
|
||||
#define LLONG signed __int64
|
||||
#define PLLONG signed __int64 *
|
||||
#define ULLONG unsigned __int64
|
||||
#define PULLONG unsigned __int64 *
|
||||
|
||||
/* Double integers */
|
||||
typedef double DOUBLE;
|
||||
typedef double * PDOUBLE;
|
||||
typedef float FLOAT;
|
||||
typedef float * PFLOAT;
|
||||
|
||||
#ifndef OPT
|
||||
#define OPT /* OPT param */
|
||||
#endif
|
||||
|
||||
typedef PSZ * PPSZ;
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
C language
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OCTTYPEWIN_H__ */
|
||||
39
xpp/oct612x/octasic-helper
Executable file
39
xpp/oct612x/octasic-helper
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Jeffrey C. Ollie <jeff@ocjtech.us>
|
||||
#
|
||||
# $1 == information requested
|
||||
# $2 == path to octasic directory
|
||||
#
|
||||
|
||||
APIDIR=$2/octdeviceapi/oct6100api/oct6100_api
|
||||
|
||||
case $1 in
|
||||
objects)
|
||||
echo $APIDIR/oct6100_adpcm_chan.o \
|
||||
$APIDIR/oct6100_channel.o \
|
||||
$APIDIR/oct6100_chip_open.o \
|
||||
$APIDIR/oct6100_chip_stats.o \
|
||||
$APIDIR/oct6100_conf_bridge.o \
|
||||
$APIDIR/oct6100_debug.o \
|
||||
$APIDIR/oct6100_events.o \
|
||||
$APIDIR/oct6100_interrupts.o \
|
||||
$APIDIR/oct6100_memory.o \
|
||||
$APIDIR/oct6100_miscellaneous.o \
|
||||
$APIDIR/oct6100_mixer.o \
|
||||
$APIDIR/oct6100_phasing_tsst.o \
|
||||
$APIDIR/oct6100_playout_buf.o \
|
||||
$APIDIR/oct6100_remote_debug.o \
|
||||
$APIDIR/oct6100_tlv.o \
|
||||
$APIDIR/oct6100_tone_detection.o \
|
||||
$APIDIR/oct6100_tsi_cnct.o \
|
||||
$APIDIR/oct6100_tsst.o \
|
||||
$2/apilib/bt/octapi_bt0.o \
|
||||
$2/apilib/largmath/octapi_largmath.o \
|
||||
$2/apilib/llman/octapi_llman.o
|
||||
;;
|
||||
cflags)
|
||||
echo -I$2/include -I$2/octdeviceapi -I$2/octdeviceapi/oct6100api
|
||||
;;
|
||||
esac
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user