Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
October 2008
- 13 participants
- 384 discussions
[commit] r9770 - in freeswitch/trunk/libs/spandsp: . src src/spandsp tests
by Freeswitch SVN 01 Oct '08
by Freeswitch SVN 01 Oct '08
01 Oct '08
Author: anthm
Date: Tue Sep 30 23:59:45 2008
New Revision: 9770
Modified:
freeswitch/trunk/libs/spandsp/.update
freeswitch/trunk/libs/spandsp/src/Makefile.am
freeswitch/trunk/libs/spandsp/src/awgn.c
freeswitch/trunk/libs/spandsp/src/complex_vector_float.c
freeswitch/trunk/libs/spandsp/src/echo.c
freeswitch/trunk/libs/spandsp/src/gsm0610_decode.c
freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c
freeswitch/trunk/libs/spandsp/src/gsm0610_long_term.c
freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c
freeswitch/trunk/libs/spandsp/src/gsm0610_preprocess.c
freeswitch/trunk/libs/spandsp/src/gsm0610_rpe.c
freeswitch/trunk/libs/spandsp/src/gsm0610_short_term.c
freeswitch/trunk/libs/spandsp/src/ima_adpcm.c
freeswitch/trunk/libs/spandsp/src/libspandsp.dsp
freeswitch/trunk/libs/spandsp/src/make_modem_filter.c
freeswitch/trunk/libs/spandsp/src/noise.c
freeswitch/trunk/libs/spandsp/src/plc.c
freeswitch/trunk/libs/spandsp/src/sig_tone.c
freeswitch/trunk/libs/spandsp/src/spandsp.h.in
freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h
freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_int.h
freeswitch/trunk/libs/spandsp/src/spandsp/dc_restore.h
freeswitch/trunk/libs/spandsp/src/spandsp/g722.h
freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/vector_float.h
freeswitch/trunk/libs/spandsp/src/spandsp/vector_int.h
freeswitch/trunk/libs/spandsp/src/spandsp/version.h
freeswitch/trunk/libs/spandsp/src/time_scale.c
freeswitch/trunk/libs/spandsp/src/v17rx.c
freeswitch/trunk/libs/spandsp/src/v22bis_rx.c
freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
freeswitch/trunk/libs/spandsp/src/v29rx.c
freeswitch/trunk/libs/spandsp/src/vector_float.c
freeswitch/trunk/libs/spandsp/src/vector_int.c
freeswitch/trunk/libs/spandsp/tests/Makefile.am
freeswitch/trunk/libs/spandsp/tests/g722_tests.c
freeswitch/trunk/libs/spandsp/tests/regression_tests.sh
freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c
Log:
update to snapshot spandsp-20080919.tar.gz
Modified: freeswitch/trunk/libs/spandsp/.update
==============================================================================
--- freeswitch/trunk/libs/spandsp/.update (original)
+++ freeswitch/trunk/libs/spandsp/.update Tue Sep 30 23:59:45 2008
@@ -1 +1 @@
-Tue Sep 30 23:55:26 EDT 2008
+Tue Sep 30 23:59:24 EDT 2008
Modified: freeswitch/trunk/libs/spandsp/src/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/Makefile.am (original)
+++ freeswitch/trunk/libs/spandsp/src/Makefile.am Tue Sep 30 23:59:45 2008
@@ -16,7 +16,7 @@
## License along with this program; if not, write to the Free Software
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
-## $Id: Makefile.am,v 1.101 2008/09/08 12:45:02 steveu Exp $
+## $Id: Makefile.am,v 1.103 2008/09/19 14:02:05 steveu Exp $
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -37,6 +37,7 @@
bitstream.c \
complex_filters.c \
complex_vector_float.c \
+ complex_vector_int.c \
crc.c \
dds_float.c \
dds_int.c \
@@ -45,8 +46,7 @@
fax.c \
fsk.c \
g711.c \
- g722_encode.c \
- g722_decode.c \
+ g722.c \
g726.c \
gsm0610_decode.c \
gsm0610_encode.c \
Modified: freeswitch/trunk/libs/spandsp/src/awgn.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/awgn.c (original)
+++ freeswitch/trunk/libs/spandsp/src/awgn.c Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: awgn.c,v 1.16 2008/07/02 14:48:25 steveu Exp $
+ * $Id: awgn.c,v 1.17 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -57,7 +57,7 @@
#endif
#include "spandsp/telephony.h"
-#include "spandsp/dc_restore.h"
+#include "spandsp/saturated.h"
#include "spandsp/awgn.h"
/* Gaussian noise generator constants */
Modified: freeswitch/trunk/libs/spandsp/src/complex_vector_float.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/complex_vector_float.c (original)
+++ freeswitch/trunk/libs/spandsp/src/complex_vector_float.c Tue Sep 30 23:59:45 2008
@@ -1,7 +1,7 @@
/*
* SpanDSP - a series of DSP components for telephony
*
- * vector_float.c - Floating vector arithmetic routines.
+ * complex_vector_float.c - Floating complex vector arithmetic routines.
*
* Written by Steve Underwood <steveu(a)coppice.org>
*
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex_vector_float.c,v 1.8 2008/07/02 14:48:25 steveu Exp $
+ * $Id: complex_vector_float.c,v 1.10 2008/09/18 13:16:49 steveu Exp $
*/
/*! \file */
@@ -50,4 +50,84 @@
#include "spandsp/vector_float.h"
#include "spandsp/complex_vector_float.h"
+complexf_t cvec_dot_prodf(const complexf_t x[], const complexf_t y[], int n)
+{
+ int i;
+ complexf_t z;
+
+ z = complex_setf(0.0f, 0.0f);
+ for (i = 0; i < n; i++)
+ {
+ z.re += (x[i].re*y[i].re - x[i].im*y[i].im);
+ z.im += (x[i].re*y[i].im + x[i].im*y[i].re);
+ }
+ return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+complex_t cvec_dot_prod(const complex_t x[], const complex_t y[], int n)
+{
+ int i;
+ complex_t z;
+
+ z = complex_set(0.0, 0.0);
+ for (i = 0; i < n; i++)
+ {
+ z.re += (x[i].re*y[i].re - x[i].im*y[i].im);
+ z.im += (x[i].re*y[i].im + x[i].im*y[i].re);
+ }
+ return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+complexl_t cvec_dot_prodl(const complexl_t x[], const complexl_t y[], int n)
+{
+ int i;
+ complexl_t z;
+
+ z = complex_setl(0.0L, 0.0L);
+ for (i = 0; i < n; i++)
+ {
+ z.re += (x[i].re*y[i].re - x[i].im*y[i].im);
+ z.im += (x[i].re*y[i].im + x[i].im*y[i].re);
+ }
+ return z;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+complexf_t cvec_circular_dot_prodf(const complexf_t x[], const complexf_t y[], int n, int pos)
+{
+ complexf_t z;
+ complexf_t z1;
+
+ z = cvec_dot_prodf(&x[pos], &y[0], n - pos);
+ z1 = cvec_dot_prodf(&x[0], &y[n - pos], pos);
+ z = complex_addf(&z, &z1);
+ return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+void cvec_lmsf(const complexf_t x[], complexf_t y[], int n, const complexf_t *error)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ {
+ y[i].re += (x[i].im*error->im + x[i].re*error->re);
+ y[i].im += (x[i].re*error->im - x[i].im*error->re);
+ /* Leak a little to tame uncontrolled wandering */
+ y[i].re *= 0.9999f;
+ y[i].im *= 0.9999f;
+ }
+}
+/*- End of function --------------------------------------------------------*/
+
+void cvec_circular_lmsf(const complexf_t x[], complexf_t y[], int n, int pos, const complexf_t *error)
+{
+ cvec_lmsf(&x[pos], &y[0], n - pos, error);
+ cvec_lmsf(&x[0], &y[n - pos], pos, error);
+}
+/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/echo.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/echo.c (original)
+++ freeswitch/trunk/libs/spandsp/src/echo.c Tue Sep 30 23:59:45 2008
@@ -27,7 +27,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: echo.c,v 1.27 2008/08/29 09:28:13 steveu Exp $
+ * $Id: echo.c,v 1.28 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -96,6 +96,7 @@
#include "spandsp/telephony.h"
#include "spandsp/logging.h"
+#include "spandsp/saturated.h"
#include "spandsp/dc_restore.h"
#include "spandsp/bit_operations.h"
#include "spandsp/echo.h"
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_decode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_decode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_decode.c Tue Sep 30 23:59:45 2008
@@ -25,7 +25,7 @@
* This code is based on the widely used GSM 06.10 code available from
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
*
- * $Id: gsm0610_decode.c,v 1.21 2008/07/02 14:48:25 steveu Exp $
+ * $Id: gsm0610_decode.c,v 1.22 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -48,7 +48,7 @@
#include "spandsp/telephony.h"
#include "spandsp/bitstream.h"
-#include "spandsp/dc_restore.h"
+#include "spandsp/saturated.h"
#include "spandsp/gsm0610.h"
#include "gsm0610_local.h"
@@ -66,9 +66,9 @@
{
tmp = gsm_mult_r(msr, 28180);
/* De-emphasis */
- msr = gsm_add(amp[k], tmp);
+ msr = saturated_add16(amp[k], tmp);
/* Truncation & upscaling */
- amp[k] = (int16_t) (gsm_add(msr, msr) & 0xFFF8);
+ amp[k] = (int16_t) (saturated_add16(msr, msr) & 0xFFF8);
}
/*endfor*/
s->msr = msr;
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c Tue Sep 30 23:59:45 2008
@@ -25,7 +25,7 @@
* This code is based on the widely used GSM 06.10 code available from
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
*
- * $Id: gsm0610_encode.c,v 1.25 2008/07/02 14:48:25 steveu Exp $
+ * $Id: gsm0610_encode.c,v 1.26 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -48,7 +48,7 @@
#include "spandsp/telephony.h"
#include "spandsp/bitstream.h"
-#include "spandsp/dc_restore.h"
+#include "spandsp/saturated.h"
#include "spandsp/gsm0610.h"
#include "gsm0610_local.h"
@@ -93,7 +93,7 @@
gsm0610_rpe_encoding(s, s->e + 5, &f->xmaxc[k], &f->Mc[k], f->xMc[k]);
for (i = 0; i < 40; i++)
- dp[i] = gsm_add(s->e[5 + i], dpp[i]);
+ dp[i] = saturated_add16(s->e[5 + i], dpp[i]);
/*endfor*/
dp += 40;
dpp += 40;
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_long_term.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_long_term.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_long_term.c Tue Sep 30 23:59:45 2008
@@ -25,7 +25,7 @@
* This code is based on the widely used GSM 06.10 code available from
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
*
- * $Id: gsm0610_long_term.c,v 1.16 2008/07/02 14:48:25 steveu Exp $
+ * $Id: gsm0610_long_term.c,v 1.17 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -47,7 +47,7 @@
#include "spandsp/telephony.h"
#include "spandsp/bitstream.h"
-#include "spandsp/dc_restore.h"
+#include "spandsp/saturated.h"
#include "spandsp/gsm0610.h"
#include "gsm0610_local.h"
@@ -185,7 +185,7 @@
for (k = 0; k < 40; k++)
{
temp = d[k];
- temp = gsm_abs(temp);
+ temp = saturated_abs16(temp);
if (temp > dmax)
dmax = temp;
/*endif*/
@@ -314,12 +314,12 @@
quantization of the LTP gain b to get the coded version bc. */
for (bc = 0; bc <= 2; bc++)
{
- if (R <= gsm_mult(S, gsm_DLB[bc]))
+ if (R <= saturated_mul16(S, gsm_DLB[bc]))
break;
/*endif*/
}
/*endfor*/
- return bc;
+ return bc;
}
/*- End of function --------------------------------------------------------*/
@@ -340,7 +340,7 @@
for (k = 0; k < 40; k++)
{
dpp[k] = gsm_mult_r(gsm_QLB[bc], dp[k - Nc]);
- e[k] = gsm_sub(d[k], dpp[k]);
+ e[k] = saturated_sub16(d[k], dpp[k]);
}
/*endfor*/
}
@@ -398,7 +398,7 @@
for (k = 0; k < 40; k++)
{
drpp = gsm_mult_r(brp, drp[k - Nr]);
- drp[k] = gsm_add(erp[k], drpp);
+ drp[k] = saturated_add16(erp[k], drpp);
}
/*endfor*/
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c Tue Sep 30 23:59:45 2008
@@ -25,7 +25,7 @@
* This code is based on the widely used GSM 06.10 code available from
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
*
- * $Id: gsm0610_lpc.c,v 1.21 2008/09/04 14:40:05 steveu Exp $
+ * $Id: gsm0610_lpc.c,v 1.22 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -49,7 +49,7 @@
#include "spandsp/telephony.h"
#include "spandsp/bitstream.h"
#include "spandsp/bit_operations.h"
-#include "spandsp/dc_restore.h"
+#include "spandsp/saturated.h"
#include "spandsp/vector_int.h"
#include "spandsp/gsm0610.h"
@@ -230,7 +230,7 @@
#else
for (smax = 0, k = 0; k < GSM0610_FRAME_LEN; k++)
{
- temp = gsm_abs(amp[k]);
+ temp = saturated_abs16(amp[k]);
if (temp > smax)
smax = (int16_t) temp;
/*endif*/
@@ -398,7 +398,7 @@
for (n = 1; n <= 8; n++, r++)
{
temp = P[1];
- temp = gsm_abs (temp);
+ temp = saturated_abs16(temp);
if (P[0] < temp)
{
for (i = n; i <= 8; i++)
@@ -421,15 +421,15 @@
/* Schur recursion */
temp = gsm_mult_r(P[1], *r);
- P[0] = gsm_add(P[0], temp);
+ P[0] = saturated_add16(P[0], temp);
for (m = 1; m <= 8 - n; m++)
{
temp = gsm_mult_r(K[m], *r);
- P[m] = gsm_add(P[m + 1], temp);
+ P[m] = saturated_add16(P[m + 1], temp);
temp = gsm_mult_r(P[m + 1], *r);
- K[m] = gsm_add(K[m], temp);
+ K[m] = saturated_add16(K[m], temp);
}
/*endfor*/
}
@@ -453,8 +453,7 @@
/* Computation of the LAR[0..7] from the r[0..7] */
for (i = 1; i <= 8; i++, r++)
{
- temp = *r;
- temp = gsm_abs(temp);
+ temp = saturated_abs16(*r);
assert(temp >= 0);
if (temp < 22118)
@@ -496,9 +495,9 @@
#undef STEP
#define STEP(A,B,MAC,MIC) \
- temp = gsm_mult(A, *LAR); \
- temp = gsm_add(temp, B); \
- temp = gsm_add(temp, 256); \
+ temp = saturated_mul16(A, *LAR); \
+ temp = saturated_add16(temp, B); \
+ temp = saturated_add16(temp, 256); \
temp >>= 9; \
*LAR = (int16_t) ((temp > MAC) \
? \
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_preprocess.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_preprocess.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_preprocess.c Tue Sep 30 23:59:45 2008
@@ -25,7 +25,7 @@
* This code is based on the widely used GSM 06.10 code available from
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
*
- * $Id: gsm0610_preprocess.c,v 1.13 2008/07/02 14:48:25 steveu Exp $
+ * $Id: gsm0610_preprocess.c,v 1.14 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -47,7 +47,7 @@
#include "spandsp/telephony.h"
#include "spandsp/bitstream.h"
-#include "spandsp/dc_restore.h"
+#include "spandsp/saturated.h"
#include "spandsp/gsm0610.h"
#include "gsm0610_local.h"
@@ -121,7 +121,7 @@
* L_temp = (++L_temp) >> 1;
* L_z2 = L_z2 - L_temp;
*/
- L_z2 = gsm_l_add(L_z2, L_s2);
+ L_z2 = saturated_add32(L_z2, L_s2);
#else
/* This does L_z2 = L_z2 * 0x7FD5/0x8000 + L_s2 */
msp = (int16_t) (L_z2 >> 15);
@@ -129,16 +129,16 @@
L_s2 += gsm_mult_r(lsp, 32735);
L_temp = (int32_t) msp*32735;
- L_z2 = gsm_l_add(L_temp, L_s2);
+ L_z2 = saturated_add32(L_temp, L_s2);
#endif
/* Compute sof[k] with rounding */
- L_temp = gsm_l_add(L_z2, 16384);
+ L_temp = saturated_add32(L_z2, 16384);
/* 4.2.3 Preemphasis */
msp = gsm_mult_r(mp, -28180);
mp = (int16_t) (L_temp >> 15);
- so[k] = gsm_add(mp, msp);
+ so[k] = saturated_add16(mp, msp);
}
/*endfor*/
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_rpe.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_rpe.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_rpe.c Tue Sep 30 23:59:45 2008
@@ -25,7 +25,7 @@
* This code is based on the widely used GSM 06.10 code available from
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
*
- * $Id: gsm0610_rpe.c,v 1.21 2008/07/02 14:48:25 steveu Exp $
+ * $Id: gsm0610_rpe.c,v 1.22 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -47,7 +47,7 @@
#include "spandsp/telephony.h"
#include "spandsp/bitstream.h"
-#include "spandsp/dc_restore.h"
+#include "spandsp/saturated.h"
#include "spandsp/gsm0610.h"
#include "gsm0610_local.h"
@@ -139,8 +139,8 @@
/* for (i = 0; i <= 10; i++)
* {
- * L_temp = gsm_l_mult(wt[k + i], gsm_H[i]);
- * L_result = gsm_l_add(L_result, L_temp);
+ * L_temp = saturated_mul_16_32(wt[k + i], gsm_H[i]);
+ * L_result = saturated_add32(L_result, L_temp);
* }
*/
@@ -351,7 +351,7 @@
for (i = 0; i < 13; i++)
{
temp = xM[i];
- temp = gsm_abs(temp);
+ temp = saturated_abs16(temp);
if (temp > xmax)
xmax = temp;
/*endif*/
@@ -379,7 +379,7 @@
temp = (int16_t) (exp + 5);
assert(temp <= 11 && temp >= 0);
- xmaxc = gsm_add((xmax >> temp), exp << 3);
+ xmaxc = saturated_add16((xmax >> temp), exp << 3);
/* Quantizing and coding of the xM[0..12] RPE sequence
to get the xMc[0..12] */
@@ -406,7 +406,7 @@
assert(temp1 >= 0 && temp1 < 16);
temp = xM[i] << temp1;
- temp = gsm_mult(temp, temp2);
+ temp = saturated_mul16(temp, temp2);
temp >>= 12;
xMc[i] = (int16_t) (temp + 4); /* See note below */
}
@@ -444,9 +444,9 @@
assert(mant >= 0 && mant <= 7);
#endif
- temp1 = gsm_FAC[mant]; /* See 4.2-15 for mant */
- temp2 = gsm_sub(6, exp); /* See 4.2-15 for exp */
- temp3 = gsm_asl(1, gsm_sub (temp2, 1));
+ temp1 = gsm_FAC[mant]; /* See 4.2-15 for mant */
+ temp2 = saturated_sub16(6, exp); /* See 4.2-15 for exp */
+ temp3 = gsm_asl(1, saturated_sub16(temp2, 1));
for (i = 0; i < 13; i++)
{
@@ -457,7 +457,7 @@
temp <<= 12; /* 16 bit signed */
temp = gsm_mult_r(temp1, temp);
- temp = gsm_add(temp, temp3);
+ temp = saturated_add16(temp, temp3);
xMp[i] = gsm_asr(temp, temp2);
}
/*endfor*/
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_short_term.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_short_term.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_short_term.c Tue Sep 30 23:59:45 2008
@@ -25,7 +25,7 @@
* This code is based on the widely used GSM 06.10 code available from
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
*
- * $Id: gsm0610_short_term.c,v 1.15 2008/07/02 14:48:25 steveu Exp $
+ * $Id: gsm0610_short_term.c,v 1.16 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -47,7 +47,7 @@
#include "spandsp/telephony.h"
#include "spandsp/bitstream.h"
-#include "spandsp/dc_restore.h"
+#include "spandsp/saturated.h"
#include "spandsp/gsm0610.h"
#include "gsm0610_local.h"
@@ -68,11 +68,11 @@
/* Compute the LARpp[1..8] */
#undef STEP
-#define STEP(B,MIC,INVA) \
- temp1 = gsm_add(*LARc++, MIC) << 10; \
- temp1 = gsm_sub(temp1, B << 1); \
- temp1 = gsm_mult_r (INVA, temp1); \
- *LARpp++ = gsm_add(temp1, temp1);
+#define STEP(B,MIC,INVA) \
+ temp1 = saturated_add16(*LARc++, MIC) << 10; \
+ temp1 = saturated_sub16(temp1, B << 1); \
+ temp1 = gsm_mult_r(INVA, temp1); \
+ *LARpp++ = saturated_add16(temp1, temp1);
STEP( 0, -32, 13107);
STEP( 0, -32, 13107);
@@ -110,8 +110,8 @@
for (i = 1; i <= 8; i++, LARp++, LARpp_j_1++, LARpp_j++)
{
- *LARp = gsm_add(*LARpp_j_1 >> 2, *LARpp_j >> 2);
- *LARp = gsm_add(*LARp, *LARpp_j_1 >> 1);
+ *LARp = saturated_add16(*LARpp_j_1 >> 2, *LARpp_j >> 2);
+ *LARp = saturated_add16(*LARp, *LARpp_j_1 >> 1);
}
/*endfor*/
}
@@ -124,7 +124,7 @@
int i;
for (i = 1; i <= 8; i++, LARpp_j_1++, LARpp_j++, LARp++)
- *LARp = gsm_add(*LARpp_j_1 >> 1, *LARpp_j >> 1);
+ *LARp = saturated_add16(*LARpp_j_1 >> 1, *LARpp_j >> 1);
/*endfor*/
}
/*- End of function --------------------------------------------------------*/
@@ -137,8 +137,8 @@
for (i = 1; i <= 8; i++, LARpp_j_1++, LARpp_j++, LARp++)
{
- *LARp = gsm_add(*LARpp_j_1 >> 2, *LARpp_j >> 2);
- *LARp = gsm_add(*LARp, *LARpp_j >> 1);
+ *LARp = saturated_add16(*LARpp_j_1 >> 2, *LARpp_j >> 2);
+ *LARp = saturated_add16(*LARp, *LARpp_j >> 1);
}
/*endfor*/
}
@@ -182,7 +182,7 @@
else if (temp < 20070)
temp += 11059;
else
- temp = gsm_add(temp >> 2, 26112);
+ temp = saturated_add16(temp >> 2, 26112);
/*endif*/
*LARpx = -temp;
}
@@ -193,7 +193,7 @@
else if (temp < 20070)
temp += 11059;
else
- temp = gsm_add(temp >> 2, 26112);
+ temp = saturated_add16(temp >> 2, 26112);
/*endif*/
*LARpx = temp;
}
@@ -279,7 +279,7 @@
:
(int16_t) (((int32_t) tmp1*(int32_t) tmp2 + 16384) >> 15) & 0xFFFF);
- sri = gsm_sub(sri, tmp2);
+ sri = saturated_sub16(sri, tmp2);
tmp1 = ((tmp1 == INT16_MIN && sri == INT16_MIN)
?
@@ -287,7 +287,7 @@
:
(int16_t) (((int32_t) tmp1*(int32_t) sri + 16384) >> 15) & 0xFFFF);
- v[i + 1] = gsm_add(v[i], tmp1);
+ v[i + 1] = saturated_add16(v[i], tmp1);
}
/*endfor*/
*sr++ =
Modified: freeswitch/trunk/libs/spandsp/src/ima_adpcm.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/ima_adpcm.c (original)
+++ freeswitch/trunk/libs/spandsp/src/ima_adpcm.c Tue Sep 30 23:59:45 2008
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: ima_adpcm.c,v 1.28 2008/07/02 14:48:25 steveu Exp $
+ * $Id: ima_adpcm.c,v 1.29 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -44,7 +44,7 @@
#endif
#include "spandsp/telephony.h"
-#include "spandsp/dc_restore.h"
+#include "spandsp/saturated.h"
#include "spandsp/ima_adpcm.h"
/*
Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.dsp
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.dsp (original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.dsp Tue Sep 30 23:59:45 2008
@@ -133,6 +133,10 @@
# End Source File
# Begin Source File
+SOURCE=.\complex_vector_int.c
+# End Source File
+# Begin Source File
+
SOURCE=.\crc.c
# End Source File
# Begin Source File
@@ -165,11 +169,7 @@
# End Source File
# Begin Source File
-SOURCE=.\g722_encode.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\g722_decode.c
+SOURCE=.\g722.c
# End Source File
# Begin Source File
Modified: freeswitch/trunk/libs/spandsp/src/make_modem_filter.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/make_modem_filter.c (original)
+++ freeswitch/trunk/libs/spandsp/src/make_modem_filter.c Tue Sep 30 23:59:45 2008
@@ -23,7 +23,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: make_modem_filter.c,v 1.11 2008/07/02 14:48:25 steveu Exp $
+ * $Id: make_modem_filter.c,v 1.12 2008/09/18 14:59:30 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -158,6 +158,7 @@
{
int i;
int j;
+ int k;
int m;
int x;
int total_coeffs;
@@ -166,7 +167,11 @@
double gain;
double peak;
double coeffs[MAX_COEFF_SETS*MAX_COEFFS_PER_FILTER + 1];
+#if 0
complex_t co[MAX_COEFFS_PER_FILTER];
+#else
+ double cox[MAX_COEFFS_PER_FILTER];
+#endif
total_coeffs = coeff_sets*coeffs_per_filter + 1;
alpha = baud_rate/(2.0*(double) (coeff_sets*SAMPLE_RATE));
@@ -203,6 +208,7 @@
modem code. */
printf("#define RX_PULSESHAPER%s_GAIN %ff\n", tag, gain);
printf("#define RX_PULSESHAPER%s_COEFF_SETS %d\n", tag, coeff_sets);
+#if 0
printf("static const %s rx_pulseshaper%s[RX_PULSESHAPER%s_COEFF_SETS][%d] =\n",
(fixed_point) ? "complexi16_t" : "complexf_t",
tag,
@@ -244,6 +250,55 @@
printf(" }\n");
}
printf("};\n");
+#else
+ for (k = 0; k < 2; k++)
+ {
+ printf("static const %s rx_pulseshaper%s_%s[RX_PULSESHAPER%s_COEFF_SETS][%d] =\n",
+ (fixed_point) ? "int16_t" : "float",
+ tag,
+ (k == 0) ? "re" : "im",
+ tag,
+ coeffs_per_filter);
+ printf("{\n");
+ for (j = 0; j < coeff_sets; j++)
+ {
+ /* Complex modulate the filter, to make it a complex pulse shaping bandpass filter
+ centred at the nominal carrier frequency. Use the same phase for all the coefficient
+ sets. This means the modem can step the carrier in whole samples, and not worry about
+ the fractional sample shift caused by selecting amongst the various coefficient sets. */
+ for (i = 0; i < coeffs_per_filter; i++)
+ {
+ m = i - (coeffs_per_filter >> 1);
+ x = i*coeff_sets + j;
+ if (k == 0)
+ cox[i] = coeffs[x]*cos(carrier*m);
+ else
+ cox[i] = coeffs[x]*sin(carrier*m);
+ }
+ printf(" {\n");
+ if (fixed_point)
+ printf(" %8d, /* Filter %d */\n", (int) cox[0], j);
+ else
+ printf(" %15.10ff, /* Filter %d */\n", cox[0], j);
+ for (i = 1; i < coeffs_per_filter - 1; i++)
+ {
+ if (fixed_point)
+ printf(" %8d,\n", (int) cox[i]);
+ else
+ printf(" %15.10ff,\n", cox[i]);
+ }
+ if (fixed_point)
+ printf(" %8d\n", (int) cox[i]);
+ else
+ printf(" %15.10ff\n", cox[i]);
+ if (j < coeff_sets - 1)
+ printf(" },\n");
+ else
+ printf(" }\n");
+ }
+ printf("};\n");
+ }
+#endif
}
/*- End of function --------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/noise.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/noise.c (original)
+++ freeswitch/trunk/libs/spandsp/src/noise.c Tue Sep 30 23:59:45 2008
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: noise.c,v 1.24 2008/08/17 14:18:11 steveu Exp $
+ * $Id: noise.c,v 1.25 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -45,7 +45,7 @@
#endif
#include "spandsp/telephony.h"
-#include "spandsp/dc_restore.h"
+#include "spandsp/saturated.h"
#include "spandsp/noise.h"
int16_t noise(noise_state_t *s)
Modified: freeswitch/trunk/libs/spandsp/src/plc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/plc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/plc.c Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: plc.c,v 1.22 2008/07/02 14:48:25 steveu Exp $
+ * $Id: plc.c,v 1.23 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -45,7 +45,7 @@
#include <limits.h>
#include "spandsp/telephony.h"
-#include "spandsp/dc_restore.h"
+#include "spandsp/saturated.h"
#include "spandsp/plc.h"
/* We do a straight line fade to zero volume in 50ms when we are filling in for missing data. */
Modified: freeswitch/trunk/libs/spandsp/src/sig_tone.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/sig_tone.c (original)
+++ freeswitch/trunk/libs/spandsp/src/sig_tone.c Tue Sep 30 23:59:45 2008
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: sig_tone.c,v 1.24 2008/08/17 16:25:52 steveu Exp $
+ * $Id: sig_tone.c,v 1.25 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -48,6 +48,7 @@
#undef SPANDSP_USE_FIXED_POINT
#include "spandsp/telephony.h"
#include "spandsp/dc_restore.h"
+#include "spandsp/saturated.h"
#include "spandsp/complex.h"
#include "spandsp/dds.h"
#include "spandsp/sig_tone.h"
Modified: freeswitch/trunk/libs/spandsp/src/spandsp.h.in
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp.h.in (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp.h.in Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: spandsp.h.in,v 1.10 2008/09/01 16:07:34 steveu Exp $
+ * $Id: spandsp.h.in,v 1.11 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -69,6 +69,7 @@
#include <spandsp/hdlc.h>
#include <spandsp/async.h>
#include <spandsp/noise.h>
+#include <spandsp/saturated.h>
#include <spandsp/time_scale.h>
#include <spandsp/tone_detect.h>
#include <spandsp/tone_generate.h>
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex_vector_float.h,v 1.8 2008/04/17 14:27:00 steveu Exp $
+ * $Id: complex_vector_float.h,v 1.10 2008/09/18 13:16:49 steveu Exp $
*/
#if !defined(_SPANDSP_COMPLEX_VECTOR_FLOAT_H_)
@@ -120,6 +120,42 @@
/*- End of function --------------------------------------------------------*/
#endif
+/*! \brief Find the dot product of two complex float vectors.
+ \param x The first vector.
+ \param y The first vector.
+ \param n The number of elements in the vectors.
+ \return The dot product of the two vectors. */
+complexf_t cvec_dot_prodf(const complexf_t x[], const complexf_t y[], int n);
+
+/*! \brief Find the dot product of two complex double vectors.
+ \param x The first vector.
+ \param y The first vector.
+ \param n The number of elements in the vectors.
+ \return The dot product of the two vectors. */
+complex_t cvec_dot_prod(const complex_t x[], const complex_t y[], int n);
+
+#if defined(HAVE_LONG_DOUBLE)
+/*! \brief Find the dot product of two complex long double vectors.
+ \param x The first vector.
+ \param y The first vector.
+ \param n The number of elements in the vectors.
+ \return The dot product of the two vectors. */
+complexl_t cvec_dot_prodl(const complexl_t x[], const complexl_t y[], int n);
+#endif
+
+/*! \brief Find the dot product of two complex float vectors, where the first is a circular buffer
+ with an offset for the starting position.
+ \param x The first vector.
+ \param y The first vector.
+ \param n The number of elements in the vectors.
+ \param pos The starting position in the x vector.
+ \return The dot product of the two vectors. */
+complexf_t cvec_circular_dot_prodf(const complexf_t x[], const complexf_t y[], int n, int pos);
+
+void cvec_lmsf(const complexf_t x[], complexf_t y[], int n, const complexf_t *error);
+
+void cvec_circular_lmsf(const complexf_t x[], complexf_t y[], int n, int pos, const complexf_t *error);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_int.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_int.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_int.h Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex_vector_int.h,v 1.1 2008/09/01 16:07:34 steveu Exp $
+ * $Id: complex_vector_int.h,v 1.3 2008/09/18 13:16:49 steveu Exp $
*/
#if !defined(_SPANDSP_COMPLEX_VECTOR_INT_H_)
@@ -96,6 +96,33 @@
}
/*- End of function --------------------------------------------------------*/
+/*! \brief Find the dot product of two complex int16_t vectors.
+ \param x The first vector.
+ \param y The first vector.
+ \param n The number of elements in the vectors.
+ \return The dot product of the two vectors. */
+complexi32_t cvec_dot_prodi16(const complexi16_t x[], const complexi16_t y[], int n);
+
+/*! \brief Find the dot product of two complex int32_t vectors.
+ \param x The first vector.
+ \param y The first vector.
+ \param n The number of elements in the vectors.
+ \return The dot product of the two vectors. */
+complexi32_t cvec_dot_prodi32(const complexi32_t x[], const complexi32_t y[], int n);
+
+/*! \brief Find the dot product of two complex int16_t vectors, where the first is a circular buffer
+ with an offset for the starting position.
+ \param x The first vector.
+ \param y The first vector.
+ \param n The number of elements in the vectors.
+ \param pos The starting position in the x vector.
+ \return The dot product of the two vectors. */
+complexi32_t cvec_circular_dot_prodi16(const complexi16_t x[], const complexi16_t y[], int n, int pos);
+
+void cvec_lmsi16(const complexi16_t x[], complexi16_t y[], int n, const complexi16_t *error);
+
+void cvec_circular_lmsi16(const complexi16_t x[], complexi16_t y[], int n, int pos, const complexi16_t *error);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/dc_restore.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/dc_restore.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/dc_restore.h Tue Sep 30 23:59:45 2008
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: dc_restore.h,v 1.23 2008/08/16 14:59:50 steveu Exp $
+ * $Id: dc_restore.h,v 1.24 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -85,60 +85,6 @@
}
/*- End of function --------------------------------------------------------*/
-static __inline__ int16_t saturate(int32_t amp)
-{
- int16_t amp16;
-
- /* Hopefully this is optimised for the common case - not clipping */
- amp16 = (int16_t) amp;
- if (amp == amp16)
- return amp16;
- if (amp > INT16_MAX)
- return INT16_MAX;
- return INT16_MIN;
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ int16_t fsaturatef(float famp)
-{
- if (famp > 32767.0f)
- return INT16_MAX;
- if (famp < -32768.0f)
- return INT16_MIN;
- return (int16_t) rintf(famp);
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ int16_t fsaturate(double damp)
-{
- if (damp > 32767.0)
- return INT16_MAX;
- if (damp < -32768.0)
- return INT16_MIN;
- return (int16_t) rint(damp);
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ float ffsaturatef(float famp)
-{
- if (famp > 32767.0f)
- return (float) INT16_MAX;
- if (famp < -32768.0f)
- return (float) INT16_MIN;
- return famp;
-}
-/*- End of function --------------------------------------------------------*/
-
-static __inline__ double ffsaturate(double famp)
-{
- if (famp > 32767.0)
- return (double) INT16_MAX;
- if (famp < -32768.0)
- return (double) INT16_MIN;
- return famp;
-}
-/*- End of function --------------------------------------------------------*/
-
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g722.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g722.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g722.h Tue Sep 30 23:59:45 2008
@@ -28,7 +28,7 @@
* Computer Science, Speech Group
* Chengxiang Lu and Alex Hauptmann
*
- * $Id: g722.h,v 1.19 2008/04/17 14:27:00 steveu Exp $
+ * $Id: g722.h,v 1.20 2008/09/19 14:02:05 steveu Exp $
*/
@@ -56,6 +56,20 @@
G722_PACKED = 0x0002
};
+/*! The per band parameters for both encoding and decoding G.722 */
+typedef struct
+{
+ int16_t s;
+ int16_t sz;
+ int16_t r[3];
+ int16_t a[3];
+ int16_t p[3];
+ int16_t d[7];
+ int16_t b[7];
+ int16_t nb;
+ int16_t det;
+} g722_band_t;
+
typedef struct
{
/*! TRUE if the operating in the special ITU test mode, with the band split filters
@@ -69,28 +83,15 @@
int bits_per_sample;
/*! Signal history for the QMF */
- int x[24];
+ int16_t x[12];
+ int16_t y[12];
+ int ptr;
- struct
- {
- int s;
- int sp;
- int sz;
- int r[3];
- int a[3];
- int ap[3];
- int p[3];
- int d[7];
- int b[7];
- int bp[7];
- int sg[7];
- int nb;
- int det;
- } band[2];
+ g722_band_t band[2];
- unsigned int in_buffer;
+ uint32_t in_buffer;
int in_bits;
- unsigned int out_buffer;
+ uint32_t out_buffer;
int out_bits;
} g722_encode_state_t;
@@ -107,28 +108,15 @@
int bits_per_sample;
/*! Signal history for the QMF */
- int x[24];
+ int16_t x[12];
+ int16_t y[12];
+ int ptr;
- struct
- {
- int s;
- int sp;
- int sz;
- int r[3];
- int a[3];
- int ap[3];
- int p[3];
- int d[7];
- int b[7];
- int bp[7];
- int sg[7];
- int nb;
- int det;
- } band[2];
+ g722_band_t band[2];
- unsigned int in_buffer;
+ uint32_t in_buffer;
int in_bits;
- unsigned int out_buffer;
+ uint32_t out_buffer;
int out_bits;
} g722_decode_state_t;
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17rx.h,v 1.54 2008/09/16 13:02:05 steveu Exp $
+ * $Id: v17rx.h,v 1.57 2008/09/18 14:59:30 steveu Exp $
*/
/*! \file */
@@ -213,9 +213,8 @@
/* Target length for the equalizer is about 63 taps, to deal with the worst stuff
in V.56bis. */
-#define V17_EQUALIZER_PRE_LEN 7 /* this much before the real event */
-#define V17_EQUALIZER_POST_LEN 7 /* this much after the real event */
-#define V17_EQUALIZER_MASK 63 /* one less than a power of 2 >= (V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN) */
+#define V17_EQUALIZER_PRE_LEN 8 /* This much before the real event */
+#define V17_EQUALIZER_POST_LEN 8 /* This much after the real event (must be even) */
#define V17_RX_FILTER_STEPS 27
@@ -253,9 +252,9 @@
/*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
#if defined(SPANDSP_USE_FIXED_POINT)
- int16_t rrc_filter[2*V17_RX_FILTER_STEPS];
+ int16_t rrc_filter[V17_RX_FILTER_STEPS];
#else
- float rrc_filter[2*V17_RX_FILTER_STEPS];
+ float rrc_filter[V17_RX_FILTER_STEPS];
#endif
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
int rrc_filter_step;
@@ -332,7 +331,7 @@
/*! \brief A saved set of adaptive equalizer coefficients for use after restarts. */
complexi16_t eq_coeff_save[V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN];
/*! \brief The equalizer signal buffer. */
- complexi16_t eq_buf[V17_EQUALIZER_MASK + 1];
+ complexi16_t eq_buf[V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN];
/*! Low band edge filter for symbol sync. */
int32_t symbol_sync_low[2];
@@ -355,7 +354,7 @@
/*! \brief A saved set of adaptive equalizer coefficients for use after restarts. */
complexf_t eq_coeff_save[V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN];
/*! \brief The equalizer signal buffer. */
- complexf_t eq_buf[V17_EQUALIZER_MASK + 1];
+ complexf_t eq_buf[V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN];
/*! Low band edge filter for symbol sync. */
float symbol_sync_low[2];
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_rx.h,v 1.51 2008/09/16 14:12:23 steveu Exp $
+ * $Id: v27ter_rx.h,v 1.53 2008/09/18 14:59:30 steveu Exp $
*/
/*! \file */
@@ -48,9 +48,8 @@
/* Target length for the equalizer is about 43 taps for 4800bps and 32 taps for 2400bps
to deal with the worst stuff in V.56bis. */
-#define V27TER_EQUALIZER_PRE_LEN 15 /* this much before the real event */
-#define V27TER_EQUALIZER_POST_LEN 15 /* this much after the real event */
-#define V27TER_EQUALIZER_MASK 63 /* one less than a power of 2 >= (V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN) */
+#define V27TER_EQUALIZER_PRE_LEN 16 /* This much before the real event */
+#define V27TER_EQUALIZER_POST_LEN 14 /* This much after the real event (must be even) */
#define V27TER_RX_4800_FILTER_STEPS 27
#define V27TER_RX_2400_FILTER_STEPS 27
@@ -88,9 +87,9 @@
/*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
#if defined(SPANDSP_USE_FIXED_POINT)
- int16_t rrc_filter[2*V27TER_RX_FILTER_STEPS];
+ int16_t rrc_filter[V27TER_RX_FILTER_STEPS];
#else
- float rrc_filter[2*V27TER_RX_FILTER_STEPS];
+ float rrc_filter[V27TER_RX_FILTER_STEPS];
#endif
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
int rrc_filter_step;
@@ -174,7 +173,7 @@
/*! \brief A saved set of adaptive equalizer coefficients for use after restarts. */
/*complexi16_t*/ complexf_t eq_coeff_save[V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN];
/*! \brief The equalizer signal buffer. */
- /*complexi16_t*/ complexf_t eq_buf[V27TER_EQUALIZER_MASK + 1];
+ /*complexi16_t*/ complexf_t eq_buf[V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN];
#else
/*! \brief The scaling factor accessed by the AGC algorithm. */
float agc_scaling;
@@ -188,7 +187,7 @@
/*! \brief A saved set of adaptive equalizer coefficients for use after restarts. */
complexf_t eq_coeff_save[V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN];
/*! \brief The equalizer signal buffer. */
- complexf_t eq_buf[V27TER_EQUALIZER_MASK + 1];
+ complexf_t eq_buf[V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN];
#endif
/*! \brief Integration variable for damping the Gardner algorithm tests. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29rx.h,v 1.62 2008/09/16 14:12:23 steveu Exp $
+ * $Id: v29rx.h,v 1.64 2008/09/18 14:59:30 steveu Exp $
*/
/*! \file */
@@ -122,9 +122,8 @@
/* Target length for the equalizer is about 63 taps, to deal with the worst stuff
in V.56bis. */
-#define V29_EQUALIZER_PRE_LEN 15 /* this much before the real event */
-#define V29_EQUALIZER_POST_LEN 15 /* this much after the real event */
-#define V29_EQUALIZER_MASK 63 /* one less than a power of 2 >= (2*V29_EQUALIZER_LEN + 1) */
+#define V29_EQUALIZER_PRE_LEN 16 /* This much before the real event */
+#define V29_EQUALIZER_POST_LEN 14 /* This much after the real event (must be even) */
#define V29_RX_FILTER_STEPS 27
@@ -157,9 +156,9 @@
/*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
#if defined(SPANDSP_USE_FIXED_POINT)
- int16_t rrc_filter[2*V29_RX_FILTER_STEPS];
+ int16_t rrc_filter[V29_RX_FILTER_STEPS];
#else
- float rrc_filter[2*V29_RX_FILTER_STEPS];
+ float rrc_filter[V29_RX_FILTER_STEPS];
#endif
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
int rrc_filter_step;
@@ -242,7 +241,7 @@
/*! \brief A saved set of adaptive equalizer coefficients for use after restarts. */
complexi16_t eq_coeff_save[V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN];
/*! \brief The equalizer signal buffer. */
- complexi16_t eq_buf[V29_EQUALIZER_MASK + 1];
+ complexi16_t eq_buf[V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN];
/*! Low band edge filter for symbol sync. */
int32_t symbol_sync_low[2];
@@ -265,7 +264,7 @@
/*! \brief A saved set of adaptive equalizer coefficients for use after restarts. */
complexf_t eq_coeff_save[V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN];
/*! \brief The equalizer signal buffer. */
- complexf_t eq_buf[V29_EQUALIZER_MASK + 1];
+ complexf_t eq_buf[V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN];
/*! Low band edge filter for symbol sync. */
float symbol_sync_low[2];
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/vector_float.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/vector_float.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/vector_float.h Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_float.h,v 1.11 2008/09/01 16:07:34 steveu Exp $
+ * $Id: vector_float.h,v 1.13 2008/09/18 13:54:32 steveu Exp $
*/
#if !defined(_SPANDSP_VECTOR_FLOAT_H_)
@@ -128,6 +128,19 @@
long double vec_dot_prodl(const long double x[], const long double y[], int n);
#endif
+/*! \brief Find the dot product of two float vectors, where the first is a circular buffer
+ with an offset for the starting position.
+ \param x The first vector.
+ \param y The first vector.
+ \param n The number of elements in the vectors.
+ \param pos The starting position in the x vector.
+ \return The dot product of the two vectors. */
+float vec_circular_dot_prodf(const float x[], const float y[], int n, int pos);
+
+void vec_lmsf(const float x[], float y[], int n, float error);
+
+void vec_circular_lmsf(const float x[], float y[], int n, int pos, float error);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/vector_int.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/vector_int.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/vector_int.h Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_int.h,v 1.11 2008/09/01 16:07:34 steveu Exp $
+ * $Id: vector_int.h,v 1.13 2008/09/18 13:54:32 steveu Exp $
*/
#if !defined(_SPANDSP_VECTOR_INT_H_)
@@ -103,6 +103,19 @@
\return The dot product of the two vectors. */
int32_t vec_dot_prodi16(const int16_t x[], const int16_t y[], int n);
+/*! \brief Find the dot product of two int16_t vectors, where the first is a circular buffer
+ with an offset for the starting position.
+ \param x The first vector.
+ \param y The first vector.
+ \param n The number of elements in the vectors.
+ \param pos The starting position in the x vector.
+ \return The dot product of the two vectors. */
+int32_t vec_circular_dot_prodi16(const int16_t x[], const int16_t y[], int n, int pos);
+
+void vec_lmsi16(const int16_t x[], int16_t y[], int n, int16_t error);
+
+void vec_circular_lmsi16(const int16_t x[], int16_t y[], int n, int pos, int16_t error);
+
/*! \brief Find the minimum and maximum values in an int16_t vector.
\param x The vector to be searched.
\param n The number of elements in the vector.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/version.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/version.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/version.h Tue Sep 30 23:59:45 2008
@@ -30,8 +30,8 @@
/* The date and time of the version are in UTC form. */
-#define SPANDSP_RELEASE_DATE 20080916
-#define SPANDSP_RELEASE_TIME 152844
+#define SPANDSP_RELEASE_DATE 20080919
+#define SPANDSP_RELEASE_TIME 142905
#endif
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/time_scale.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/time_scale.c (original)
+++ freeswitch/trunk/libs/spandsp/src/time_scale.c Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: time_scale.c,v 1.23 2008/07/28 15:14:30 steveu Exp $
+ * $Id: time_scale.c,v 1.24 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -48,6 +48,7 @@
#include "spandsp/telephony.h"
#include "spandsp/time_scale.h"
+#include "spandsp/saturated.h"
/*
Time scaling for speech, based on the Pointer Interval Controlled
Modified: freeswitch/trunk/libs/spandsp/src/v17rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17rx.c Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17rx.c,v 1.118 2008/09/16 14:12:23 steveu Exp $
+ * $Id: v17rx.c,v 1.123 2008/09/18 15:59:55 steveu Exp $
*/
/*! \file */
@@ -48,6 +48,8 @@
#include "spandsp/complex.h"
#include "spandsp/vector_float.h"
#include "spandsp/complex_vector_float.h"
+#include "spandsp/vector_int.h"
+#include "spandsp/complex_vector_int.h"
#include "spandsp/async.h"
#include "spandsp/power_meter.h"
#include "spandsp/arctan2.h"
@@ -81,6 +83,8 @@
#define V17_BRIDGE_WORD 0x8880
+#define V17_EQUALIZER_LEN (V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN)
+
enum
{
TRAINING_STAGE_NORMAL_OPERATION = 0,
@@ -149,16 +153,16 @@
#endif
{
*coeffs = s->eq_coeff;
- return V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN;
+ return V17_EQUALIZER_LEN;
}
/*- End of function --------------------------------------------------------*/
static void equalizer_save(v17_rx_state_t *s)
{
#if defined(SPANDSP_USE_FIXED_POINTx)
- cvec_copyi16(s->eq_coeff_save, s->eq_coeff, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+ cvec_copyi16(s->eq_coeff_save, s->eq_coeff, V17_EQUALIZER_LEN);
#else
- cvec_copyf(s->eq_coeff_save, s->eq_coeff, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+ cvec_copyf(s->eq_coeff_save, s->eq_coeff, V17_EQUALIZER_LEN);
#endif
}
/*- End of function --------------------------------------------------------*/
@@ -166,13 +170,13 @@
static void equalizer_restore(v17_rx_state_t *s)
{
#if defined(SPANDSP_USE_FIXED_POINTx)
- cvec_copyi16(s->eq_coeff, s->eq_coeff_save, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
- cvec_zeroi16(s->eq_buf, V17_EQUALIZER_MASK);
- s->eq_delta = 32768.0f*EQUALIZER_SLOW_ADAPT_RATIO*EQUALIZER_DELTA/(V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
-#else
- cvec_copyf(s->eq_coeff, s->eq_coeff_save, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
- cvec_zerof(s->eq_buf, V17_EQUALIZER_MASK);
- s->eq_delta = EQUALIZER_SLOW_ADAPT_RATIO*EQUALIZER_DELTA/(V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+ cvec_copyi16(s->eq_coeff, s->eq_coeff_save, V17_EQUALIZER_LEN);
+ cvec_zeroi16(s->eq_buf, V17_EQUALIZER_LEN);
+ s->eq_delta = 32768.0f*EQUALIZER_SLOW_ADAPT_RATIO*EQUALIZER_DELTA/V17_EQUALIZER_LEN;
+#else
+ cvec_copyf(s->eq_coeff, s->eq_coeff_save, V17_EQUALIZER_LEN);
+ cvec_zerof(s->eq_buf, V17_EQUALIZER_LEN);
+ s->eq_delta = EQUALIZER_SLOW_ADAPT_RATIO*EQUALIZER_DELTA/V17_EQUALIZER_LEN;
#endif
s->eq_put_step = RX_PULSESHAPER_COEFF_SETS*10/(3*2) - 1;
@@ -184,15 +188,15 @@
{
/* Start with an equalizer based on everything being perfect */
#if defined(SPANDSP_USE_FIXED_POINTx)
- cvec_zeroi16(s->eq_coeff, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+ cvec_zeroi16(s->eq_coeff, V17_EQUALIZER_LEN);
s->eq_coeff[V17_EQUALIZER_PRE_LEN] = complex_seti16(3*FP_FACTOR, 0);
- cvec_zeroi16(s->eq_buf, V17_EQUALIZER_MASK);
- s->eq_delta = 32768.0f*EQUALIZER_DELTA/(V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+ cvec_zeroi16(s->eq_buf, V17_EQUALIZER_LEN);
+ s->eq_delta = 32768.0f*EQUALIZER_DELTA/V17_EQUALIZER_LEN;
#else
- cvec_zerof(s->eq_coeff, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+ cvec_zerof(s->eq_coeff, V17_EQUALIZER_LEN);
s->eq_coeff[V17_EQUALIZER_PRE_LEN] = complex_setf(3.0f, 0.0f);
- cvec_zerof(s->eq_buf, V17_EQUALIZER_MASK);
- s->eq_delta = EQUALIZER_DELTA/(V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+ cvec_zerof(s->eq_buf, V17_EQUALIZER_LEN);
+ s->eq_delta = EQUALIZER_DELTA/V17_EQUALIZER_LEN;
#endif
s->eq_put_step = RX_PULSESHAPER_COEFF_SETS*10/(3*2) - 1;
@@ -206,21 +210,7 @@
static __inline__ complexf_t equalizer_get(v17_rx_state_t *s)
#endif
{
- int i;
- int p;
- complexf_t z;
- complexf_t z1;
-
- /* Get the next equalized value. */
- z = complex_setf(0.0f, 0.0f);
- p = s->eq_step - 1;
- for (i = 0; i < V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN; i++)
- {
- p = (p - 1) & V17_EQUALIZER_MASK;
- z1 = complex_mulf(&s->eq_coeff[i], &s->eq_buf[p]);
- z = complex_addf(&z, &z1);
- }
- return z;
+ return cvec_circular_dot_prodf(s->eq_buf, s->eq_coeff, V17_EQUALIZER_LEN, s->eq_step);
}
/*- End of function --------------------------------------------------------*/
@@ -230,28 +220,18 @@
static void tune_equalizer(v17_rx_state_t *s, const complexf_t *z, const complexf_t *target)
#endif
{
- int i;
- int p;
- complexf_t ez;
- complexf_t z1;
+ complexf_t err;
/* Find the x and y mismatch from the exact constellation position. */
- ez = complex_subf(target, z);
+ err = complex_subf(target, z);
//span_log(&s->logging, SPAN_LOG_FLOW, "Equalizer error %f\n", sqrt(ez.re*ez.re + ez.im*ez.im));
- ez.re *= s->eq_delta;
- ez.im *= s->eq_delta;
+ err.re *= s->eq_delta;
+ err.im *= s->eq_delta;
- p = s->eq_step - 1;
- for (i = 0; i < V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN; i++)
- {
- p = (p - 1) & V17_EQUALIZER_MASK;
- z1 = complex_conjf(&s->eq_buf[p]);
- z1 = complex_mulf(&ez, &z1);
- s->eq_coeff[i] = complex_addf(&s->eq_coeff[i], &z1);
- /* Leak a little to tame uncontrolled wandering */
- s->eq_coeff[i].re *= 0.9999f;
- s->eq_coeff[i].im *= 0.9999f;
- }
+ err = complex_subf(target, z);
+ err.re *= s->eq_delta;
+ err.im *= s->eq_delta;
+ cvec_circular_lmsf(s->eq_buf, s->eq_coeff, V17_EQUALIZER_LEN, s->eq_step, &err);
}
/*- End of function --------------------------------------------------------*/
@@ -565,7 +545,8 @@
/* Add a sample to the equalizer's circular buffer, but don't calculate anything
at this time. */
s->eq_buf[s->eq_step] = *sample;
- s->eq_step = (s->eq_step + 1) & V17_EQUALIZER_MASK;
+ if (++s->eq_step >= V17_EQUALIZER_LEN)
+ s->eq_step = 0;
/* On alternate insertions we have a whole baud and must process it. */
if ((s->baud_half ^= 1))
@@ -628,7 +609,7 @@
p = 3.14159f + angle*2.0f*3.14159f/(65536.0f*65536.0f) - 0.321751f;
span_log(&s->logging, SPAN_LOG_FLOW, "Spin (short) by %.5f rads\n", p);
zz = complex_setf(cosf(p), -sinf(p));
- for (i = 0; i <= V17_EQUALIZER_MASK; i++)
+ for (i = 0; i < V17_EQUALIZER_LEN; i++)
s->eq_buf[i] = complex_mulf(&s->eq_buf[i], &zz);
s->carrier_phase += (0x80000000 + angle - 219937506);
@@ -716,7 +697,7 @@
p = angle*2.0f*3.14159f/(65536.0f*65536.0f) - 0.321751f;
span_log(&s->logging, SPAN_LOG_FLOW, "Spin (long) by %.5f rads\n", p);
zz = complex_setf(cosf(p), -sinf(p));
- for (i = 0; i <= V17_EQUALIZER_MASK; i++)
+ for (i = 0; i < V17_EQUALIZER_LEN; i++)
s->eq_buf[i] = complex_mulf(&s->eq_buf[i], &zz);
s->carrier_phase += (angle - 219937506);
@@ -960,7 +941,6 @@
int v17_rx(v17_rx_state_t *s, const int16_t amp[], int len)
{
int i;
- int j;
int step;
int16_t x;
int32_t diff;
@@ -968,15 +948,18 @@
complexf_t zz;
complexf_t sample;
#if defined(SPANDSP_USE_FIXED_POINT)
- complexi_t zi;
+ int32_t vi;
#endif
- int32_t power;
+#if defined(SPANDSP_USE_FIXED_POINTx)
+ int32_t v;
+#else
float v;
+#endif
+ int32_t power;
for (i = 0; i < len; i++)
{
- s->rrc_filter[s->rrc_filter_step] =
- s->rrc_filter[s->rrc_filter_step + V17_RX_FILTER_STEPS] = amp[i];
+ s->rrc_filter[s->rrc_filter_step] = amp[i];
if (++s->rrc_filter_step >= V17_RX_FILTER_STEPS)
s->rrc_filter_step = 0;
@@ -1052,17 +1035,13 @@
if (step < 0)
step += RX_PULSESHAPER_COEFF_SETS;
#if defined(SPANDSP_USE_FIXED_POINT)
- zi.re = (int32_t) rx_pulseshaper[step][0].re*(int32_t) s->rrc_filter[s->rrc_filter_step];
- for (j = 1; j < V17_RX_FILTER_STEPS; j++)
- zi.re += (int32_t) rx_pulseshaper[step][j].re*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
- sample.re = zi.re*s->agc_scaling;
-#else
- zz.re = rx_pulseshaper[step][0].re*s->rrc_filter[s->rrc_filter_step];
- for (j = 1; j < V17_RX_FILTER_STEPS; j++)
- zz.re += rx_pulseshaper[step][j].re*s->rrc_filter[j + s->rrc_filter_step];
- sample.re = zz.re*s->agc_scaling;
+ vi = vec_circular_dot_prodi16(s->rrc_filter, rx_pulseshaper_re[step], V17_RX_FILTER_STEPS, s->rrc_filter_step);
+ //sample.re = (vi*(int32_t) s->agc_scaling) >> 15;
+ sample.re = vi*s->agc_scaling;
+#else
+ v = vec_circular_dot_prodf(s->rrc_filter, rx_pulseshaper_re[step], V17_RX_FILTER_STEPS, s->rrc_filter_step);
+ sample.re = v*s->agc_scaling;
#endif
-
/* Symbol timing synchronisation band edge filters */
/* Low Nyquist band edge filter */
v = s->symbol_sync_low[0]*SYNC_LOW_BAND_EDGE_COEFF_0 + s->symbol_sync_low[1]*SYNC_LOW_BAND_EDGE_COEFF_1 + sample.re;
@@ -1087,27 +1066,22 @@
step = -s->eq_put_step;
if (step > RX_PULSESHAPER_COEFF_SETS - 1)
step = RX_PULSESHAPER_COEFF_SETS - 1;
-#if defined(SPANDSP_USE_FIXED_POINT)
- zi.im = (int32_t) rx_pulseshaper[step][0].im*(int32_t) s->rrc_filter[s->rrc_filter_step];
- for (j = 1; j < V17_RX_FILTER_STEPS; j++)
- zi.im += (int32_t) rx_pulseshaper[step][j].im*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
- sample.im = zi.im*s->agc_scaling;
s->eq_put_step += RX_PULSESHAPER_COEFF_SETS*10/(3*2);
+#if defined(SPANDSP_USE_FIXED_POINT)
+ vi = vec_circular_dot_prodi16(s->rrc_filter, rx_pulseshaper_im[step], V17_RX_FILTER_STEPS, s->rrc_filter_step);
+ //sample.im = (vi*(int32_t) s->agc_scaling) >> 15;
+ sample.im = vi*s->agc_scaling;
z = dds_lookup_complexf(s->carrier_phase);
zz.re = sample.re*z.re - sample.im*z.im;
zz.im = -sample.re*z.im - sample.im*z.re;
- process_half_baud(s, &zz);
#else
- zz.im = rx_pulseshaper[step][0].im*s->rrc_filter[s->rrc_filter_step];
- for (j = 1; j < V17_RX_FILTER_STEPS; j++)
- zz.im += rx_pulseshaper[step][j].im*s->rrc_filter[j + s->rrc_filter_step];
- sample.im = zz.im*s->agc_scaling;
- s->eq_put_step += RX_PULSESHAPER_COEFF_SETS*10/(3*2);
+ v = vec_circular_dot_prodf(s->rrc_filter, rx_pulseshaper_im[step], V17_RX_FILTER_STEPS, s->rrc_filter_step);
+ sample.im = v*s->agc_scaling;
z = dds_lookup_complexf(s->carrier_phase);
zz.re = sample.re*z.re - sample.im*z.im;
zz.im = -sample.re*z.im - sample.im*z.re;
- process_half_baud(s, &zz);
#endif
+ process_half_baud(s, &zz);
}
#if defined(SPANDSP_USE_FIXED_POINT)
dds_advance(&s->carrier_phase, s->carrier_phase_rate);
@@ -1165,7 +1139,7 @@
}
s->bit_rate = bit_rate;
#if defined(SPANDSP_USE_FIXED_POINT)
- memset(s->rrc_filter, 0, sizeof(s->rrc_filter));
+ vec_zeroi16(s->rrc_filter, sizeof(s->rrc_filter)/sizeof(s->rrc_filter[0]));
#else
vec_zerof(s->rrc_filter, sizeof(s->rrc_filter)/sizeof(s->rrc_filter[0]));
#endif
Modified: freeswitch/trunk/libs/spandsp/src/v22bis_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v22bis_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v22bis_rx.c Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis_rx.c,v 1.41 2008/09/07 12:45:17 steveu Exp $
+ * $Id: v22bis_rx.c,v 1.42 2008/09/18 14:59:30 steveu Exp $
*/
/*! \file */
@@ -590,15 +590,15 @@
/* TODO: get rid of this */
if (s->caller)
{
- ii = rx_pulseshaper_2400[6][0].re*s->rx.rrc_filter[s->rx.rrc_filter_step];
+ ii = rx_pulseshaper_2400_re[6][0]*s->rx.rrc_filter[s->rx.rrc_filter_step];
for (j = 1; j < V22BIS_RX_FILTER_STEPS; j++)
- ii += rx_pulseshaper_2400[6][j].re*s->rx.rrc_filter[j + s->rx.rrc_filter_step];
+ ii += rx_pulseshaper_2400_re[6][j]*s->rx.rrc_filter[j + s->rx.rrc_filter_step];
}
else
{
- ii = rx_pulseshaper_1200[6][0].re*s->rx.rrc_filter[s->rx.rrc_filter_step];
+ ii = rx_pulseshaper_1200_re[6][0]*s->rx.rrc_filter[s->rx.rrc_filter_step];
for (j = 1; j < V22BIS_RX_FILTER_STEPS; j++)
- ii += rx_pulseshaper_1200[6][j].re*s->rx.rrc_filter[j + s->rx.rrc_filter_step];
+ ii += rx_pulseshaper_1200_re[6][j]*s->rx.rrc_filter[j + s->rx.rrc_filter_step];
}
power = power_meter_update(&(s->rx.rx_power), (int16_t) (ii/10.0f));
if (s->rx.signal_present)
@@ -643,22 +643,22 @@
s->rx.eq_put_step += PULSESHAPER_COEFF_SETS*40/(3*2);
if (s->caller)
{
- ii = rx_pulseshaper_2400[step][0].re*s->rx.rrc_filter[s->rx.rrc_filter_step];
- qq = rx_pulseshaper_2400[step][0].im*s->rx.rrc_filter[s->rx.rrc_filter_step];
+ ii = rx_pulseshaper_2400_re[step][0]*s->rx.rrc_filter[s->rx.rrc_filter_step];
+ qq = rx_pulseshaper_2400_im[step][0]*s->rx.rrc_filter[s->rx.rrc_filter_step];
for (j = 1; j < V22BIS_RX_FILTER_STEPS; j++)
{
- ii += rx_pulseshaper_2400[step][j].re*s->rx.rrc_filter[j + s->rx.rrc_filter_step];
- qq += rx_pulseshaper_2400[step][j].im*s->rx.rrc_filter[j + s->rx.rrc_filter_step];
+ ii += rx_pulseshaper_2400_re[step][j]*s->rx.rrc_filter[j + s->rx.rrc_filter_step];
+ qq += rx_pulseshaper_2400_im[step][j]*s->rx.rrc_filter[j + s->rx.rrc_filter_step];
}
}
else
{
- ii = rx_pulseshaper_1200[step][0].re*s->rx.rrc_filter[s->rx.rrc_filter_step];
- qq = rx_pulseshaper_1200[step][0].im*s->rx.rrc_filter[s->rx.rrc_filter_step];
+ ii = rx_pulseshaper_1200_re[step][0]*s->rx.rrc_filter[s->rx.rrc_filter_step];
+ qq = rx_pulseshaper_1200_im[step][0]*s->rx.rrc_filter[s->rx.rrc_filter_step];
for (j = 1; j < V22BIS_RX_FILTER_STEPS; j++)
{
- ii += rx_pulseshaper_1200[step][j].re*s->rx.rrc_filter[j + s->rx.rrc_filter_step];
- qq += rx_pulseshaper_1200[step][j].im*s->rx.rrc_filter[j + s->rx.rrc_filter_step];
+ ii += rx_pulseshaper_1200_re[step][j]*s->rx.rrc_filter[j + s->rx.rrc_filter_step];
+ qq += rx_pulseshaper_1200_im[step][j]*s->rx.rrc_filter[j + s->rx.rrc_filter_step];
}
}
sample.re = ii*s->rx.agc_scaling;
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_rx.c Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_rx.c,v 1.104 2008/09/16 14:12:23 steveu Exp $
+ * $Id: v27ter_rx.c,v 1.107 2008/09/18 14:59:30 steveu Exp $
*/
/*! \file */
@@ -86,6 +86,8 @@
#define V27TER_TRAINING_SEG_5_LEN 1074
#define V27TER_TRAINING_SEG_6_LEN 8
+#define V27TER_EQUALIZER_LEN (V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN)
+
enum
{
TRAINING_STAGE_NORMAL_OPERATION = 0,
@@ -168,16 +170,16 @@
#endif
{
*coeffs = s->eq_coeff;
- return V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN;
+ return V27TER_EQUALIZER_LEN;
}
/*- End of function --------------------------------------------------------*/
static void equalizer_save(v27ter_rx_state_t *s)
{
#if defined(SPANDSP_USE_FIXED_POINTx)
- cvec_copyi16(s->eq_coeff_save, s->eq_coeff, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
+ cvec_copyi16(s->eq_coeff_save, s->eq_coeff, V27TER_EQUALIZER_LEN);
#else
- cvec_copyf(s->eq_coeff_save, s->eq_coeff, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
+ cvec_copyf(s->eq_coeff_save, s->eq_coeff, V27TER_EQUALIZER_LEN);
#endif
}
/*- End of function --------------------------------------------------------*/
@@ -185,13 +187,13 @@
static void equalizer_restore(v27ter_rx_state_t *s)
{
#if defined(SPANDSP_USE_FIXED_POINTx)
- cvec_copyi16(s->eq_coeff, s->eq_coeff_save, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
- cvec_zeroi16(s->eq_buf, V27TER_EQUALIZER_MASK);
- s->eq_delta = 32768.0f*EQUALIZER_DELTA/(V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
-#else
- cvec_copyf(s->eq_coeff, s->eq_coeff_save, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
- cvec_zerof(s->eq_buf, V27TER_EQUALIZER_MASK);
- s->eq_delta = EQUALIZER_DELTA/(V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
+ cvec_copyi16(s->eq_coeff, s->eq_coeff_save, V27TER_EQUALIZER_LEN);
+ cvec_zeroi16(s->eq_buf, V27TER_EQUALIZER_LEN);
+ s->eq_delta = 32768.0f*EQUALIZER_DELTA/V27TER_EQUALIZER_LEN);
+#else
+ cvec_copyf(s->eq_coeff, s->eq_coeff_save, V27TER_EQUALIZER_LEN);
+ cvec_zerof(s->eq_buf, V27TER_EQUALIZER_LEN);
+ s->eq_delta = EQUALIZER_DELTA/V27TER_EQUALIZER_LEN;
#endif
s->eq_put_step = (s->bit_rate == 4800) ? RX_PULSESHAPER_4800_COEFF_SETS*5/2 : RX_PULSESHAPER_2400_COEFF_SETS*20/(3*2);
@@ -203,15 +205,15 @@
{
/* Start with an equalizer based on everything being perfect. */
#if defined(SPANDSP_USE_FIXED_POINTx)
- cvec_zeroi16(s->eq_coeff, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
+ cvec_zeroi16(s->eq_coeff, V27TER_EQUALIZER_LEN);
s->eq_coeff[V27TER_EQUALIZER_PRE_LEN] = complex_seti16(1.414f*FP_FACTOR, 0);
- cvec_zeroi16(s->eq_buf, V27TER_EQUALIZER_MASK);
- s->eq_delta = 32768.0f*EQUALIZER_DELTA/(V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
+ cvec_zeroi16(s->eq_buf, V27TER_EQUALIZER_LEN);
+ s->eq_delta = 32768.0f*EQUALIZER_DELTA/V27TER_EQUALIZER_LEN);
#else
- cvec_zerof(s->eq_coeff, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
+ cvec_zerof(s->eq_coeff, V27TER_EQUALIZER_LEN);
s->eq_coeff[V27TER_EQUALIZER_PRE_LEN] = complex_setf(1.414f, 0.0f);
- cvec_zerof(s->eq_buf, V27TER_EQUALIZER_MASK);
- s->eq_delta = EQUALIZER_DELTA/(V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
+ cvec_zerof(s->eq_buf, V27TER_EQUALIZER_LEN);
+ s->eq_delta = EQUALIZER_DELTA/V27TER_EQUALIZER_LEN;
#endif
s->eq_put_step = (s->bit_rate == 4800) ? RX_PULSESHAPER_4800_COEFF_SETS*5/2 : RX_PULSESHAPER_2400_COEFF_SETS*20/(3*2);
@@ -237,36 +239,19 @@
static __inline__ complexf_t equalizer_get(v27ter_rx_state_t *s)
#endif
{
- int i;
- int p;
#if defined(SPANDSP_USE_FIXED_POINTx)
+ complexi32_t zz;
complexi16_t z;
- complexi16_t z1;
-#else
- complexf_t z;
- complexf_t z1;
-#endif
/* Get the next equalized value. */
- p = s->eq_step - 1;
-#if defined(SPANDSP_USE_FIXED_POINTx)
- z = complex_seti16(0, 0);
- for (i = 0; i < V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN; i++)
- {
- p = (p - 1) & V27TER_EQUALIZER_MASK;
- z1 = complex_mul_q4_12(&s->eq_coeff[i], &s->eq_buf[p]);
- z = complex_addi16(&z, &z1);
- }
+ zz = cvec_circular_dot_prodi16(s->eq_buf, s->eq_coeff, V27TER_EQUALIZER_LEN, s->eq_step);
+ z.re = zz.re >> FP_SHIFT_FACTOR;
+ z.im = zz.im >> FP_SHIFT_FACTOR;
+ return z;
#else
- z = complex_setf(0.0f, 0.0f);
- for (i = 0; i < V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN; i++)
- {
- p = (p - 1) & V27TER_EQUALIZER_MASK;
- z1 = complex_mulf(&s->eq_coeff[i], &s->eq_buf[p]);
- z = complex_addf(&z, &z1);
- }
+ /* Get the next equalized value. */
+ return cvec_circular_dot_prodf(s->eq_buf, s->eq_coeff, V27TER_EQUALIZER_LEN, s->eq_step);
#endif
- return z;
}
/*- End of function --------------------------------------------------------*/
@@ -276,45 +261,24 @@
static void tune_equalizer(v27ter_rx_state_t *s, const complexf_t *z, const complexf_t *target)
#endif
{
- int i;
- int p;
#if defined(SPANDSP_USE_FIXED_POINTx)
- complexi16_t ez;
- complexi16_t z1;
-#else
- complexf_t ez;
- complexf_t z1;
-#endif
+ complexi16_t err;
/* Find the x and y mismatch from the exact constellation position. */
-#if defined(SPANDSP_USE_FIXED_POINTx)
- ez.re = target->re*FP_FACTOR - z->re;
- ez.im = target->im*FP_FACTOR - z->im;
- ez.re = ((int32_t) ez.re*(int32_t) s->eq_delta) >> 15;
- ez.im = ((int32_t) ez.im*(int32_t) s->eq_delta) >> 15;
-#else
- ez = complex_subf(target, z);
- ez.re *= s->eq_delta;
- ez.im *= s->eq_delta;
-#endif
+ err.re = target->re*FP_FACTOR - z->re;
+ err.im = target->im*FP_FACTOR - z->im;
+ err.re = ((int32_t) err.re*(int32_t) s->eq_delta) >> 15;
+ err.im = ((int32_t) err.im*(int32_t) s->eq_delta) >> 15;
+ cvec_circular_lmsi16(s->eq_buf, s->eq_coeff, V27TER_EQUALIZER_LEN, s->eq_step, &err);
+#else
+ complexf_t err;
- p = s->eq_step - 1;
- for (i = 0; i < V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN; i++)
- {
- p = (p - 1) & V27TER_EQUALIZER_MASK;
-#if defined(SPANDSP_USE_FIXED_POINTx)
- z1 = complex_conji16(&s->eq_buf[p]);
- z1 = complex_mul_q4_12(&ez, &z1);
- s->eq_coeff[i] = complex_addi16(&s->eq_coeff[i], &z1);
-#else
- z1 = complex_conjf(&s->eq_buf[p]);
- z1 = complex_mulf(&ez, &z1);
- s->eq_coeff[i] = complex_addf(&s->eq_coeff[i], &z1);
- /* Leak a little to tame uncontrolled wandering */
- s->eq_coeff[i].re *= 0.9999f;
- s->eq_coeff[i].im *= 0.9999f;
+ /* Find the x and y mismatch from the exact constellation position. */
+ err = complex_subf(target, z);
+ err.re *= s->eq_delta;
+ err.im *= s->eq_delta;
+ cvec_circular_lmsf(s->eq_buf, s->eq_coeff, V27TER_EQUALIZER_LEN, s->eq_step, &err);
#endif
- }
}
/*- End of function --------------------------------------------------------*/
@@ -508,13 +472,13 @@
/* This routine adapts the position of the half baud samples entering the equalizer. */
/* Perform a Gardner test for baud alignment */
- p = s->eq_buf[(s->eq_step - 3) & V27TER_EQUALIZER_MASK].re
- - s->eq_buf[(s->eq_step - 1) & V27TER_EQUALIZER_MASK].re;
- p *= s->eq_buf[(s->eq_step - 2) & V27TER_EQUALIZER_MASK].re;
-
- q = s->eq_buf[(s->eq_step - 3) & V27TER_EQUALIZER_MASK].im
- - s->eq_buf[(s->eq_step - 1) & V27TER_EQUALIZER_MASK].im;
- q *= s->eq_buf[(s->eq_step - 2) & V27TER_EQUALIZER_MASK].im;
+ p = s->eq_buf[(s->eq_step - 3) & V27TER_EQUALIZER_LEN].re
+ - s->eq_buf[(s->eq_step - 1) & V27TER_EQUALIZER_LEN].re;
+ p *= s->eq_buf[(s->eq_step - 2) & V27TER_EQUALIZER_LEN].re;
+
+ q = s->eq_buf[(s->eq_step - 3) & V27TER_EQUALIZER_LEN].im
+ - s->eq_buf[(s->eq_step - 1) & V27TER_EQUALIZER_LEN].im;
+ q *= s->eq_buf[(s->eq_step - 2) & V27TER_EQUALIZER_LEN].im;
s->gardner_integrate += (p + q > 0.0f) ? s->gardner_step : -s->gardner_step;
@@ -560,7 +524,8 @@
#else
s->eq_buf[s->eq_step] = *sample;
#endif
- s->eq_step = (s->eq_step + 1) & V27TER_EQUALIZER_MASK;
+ if (++s->eq_step >= V27TER_EQUALIZER_LEN)
+ s->eq_step = 0;
/* On alternate insertions we have a whole baud, and must process it. */
if ((s->baud_half ^= 1))
@@ -642,7 +607,7 @@
p = angle*2.0f*3.14159f/(65536.0f*65536.0f);
#if defined(SPANDSP_USE_FIXED_POINTx)
zz = complex_setf(cosf(p), -sinf(p));
- for (i = 0; i <= V27TER_EQUALIZER_MASK; i++)
+ for (i = 0; i < V27TER_EQUALIZER_LEN; i++)
{
z1 = complex_setf(s->eq_buf[i].re, s->eq_buf[i].im);
z1 = complex_mulf(&z1, &zz);
@@ -651,7 +616,7 @@
}
#else
zz = complex_setf(cosf(p), -sinf(p));
- for (i = 0; i <= V27TER_EQUALIZER_MASK; i++)
+ for (i = 0; i < V27TER_EQUALIZER_LEN; i++)
s->eq_buf[i] = complex_mulf(&s->eq_buf[i], &zz);
#endif
s->carrier_phase += angle;
@@ -774,7 +739,6 @@
int v27ter_rx(v27ter_rx_state_t *s, const int16_t amp[], int len)
{
int i;
- int j;
int step;
int16_t x;
int32_t diff;
@@ -782,11 +746,12 @@
complexi16_t z;
complexi16_t zz;
complexi16_t sample;
- complexi32_t zi;
+ int32_t v;
#else
complexf_t z;
complexf_t zz;
complexf_t sample;
+ float v;
#endif
int32_t power;
@@ -794,8 +759,7 @@
{
for (i = 0; i < len; i++)
{
- s->rrc_filter[s->rrc_filter_step] =
- s->rrc_filter[s->rrc_filter_step + V27TER_RX_4800_FILTER_STEPS] = amp[i];
+ s->rrc_filter[s->rrc_filter_step] = amp[i];
if (++s->rrc_filter_step >= V27TER_RX_4800_FILTER_STEPS)
s->rrc_filter_step = 0;
@@ -887,28 +851,18 @@
step = RX_PULSESHAPER_4800_COEFF_SETS - 1;
s->eq_put_step += RX_PULSESHAPER_4800_COEFF_SETS*5/2;
#if defined(SPANDSP_USE_FIXED_POINT)
- zi.re = (int32_t) rx_pulseshaper_4800[step][0].re*(int32_t) s->rrc_filter[s->rrc_filter_step];
- zi.im = (int32_t) rx_pulseshaper_4800[step][0].im*(int32_t) s->rrc_filter[s->rrc_filter_step];
- for (j = 1; j < V27TER_RX_4800_FILTER_STEPS; j++)
- {
- zi.re += (int32_t) rx_pulseshaper_4800[step][j].re*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
- zi.im += (int32_t) rx_pulseshaper_4800[step][j].im*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
- }
- sample.re = ((int32_t) zi.re*(int32_t) s->agc_scaling) >> 15;
- sample.im = ((int32_t) zi.im*(int32_t) s->agc_scaling) >> 15;
+ v = vec_circular_dot_prodi16(s->rrc_filter, rx_pulseshaper_4800_re[step], V27TER_RX_FILTER_STEPS, s->rrc_filter_step);
+ sample.re = (v*(int32_t) s->agc_scaling) >> 15;
+ v = vec_circular_dot_prodi16(s->rrc_filter, rx_pulseshaper_4800_im[step], V27TER_RX_FILTER_STEPS, s->rrc_filter_step);
+ sample.im = (v*(int32_t) s->agc_scaling) >> 15;
z = dds_lookup_complexi16(s->carrier_phase);
zz.re = ((int32_t) sample.re*(int32_t) z.re - (int32_t) sample.im*(int32_t) z.im) >> 15;
zz.im = ((int32_t) -sample.re*(int32_t) z.im - (int32_t) sample.im*(int32_t) z.re) >> 15;
#else
- zz.re = rx_pulseshaper_4800[step][0].re*s->rrc_filter[s->rrc_filter_step];
- zz.im = rx_pulseshaper_4800[step][0].im*s->rrc_filter[s->rrc_filter_step];
- for (j = 1; j < V27TER_RX_4800_FILTER_STEPS; j++)
- {
- zz.re += rx_pulseshaper_4800[step][j].re*s->rrc_filter[j + s->rrc_filter_step];
- zz.im += rx_pulseshaper_4800[step][j].im*s->rrc_filter[j + s->rrc_filter_step];
- }
- sample.re = zz.re*s->agc_scaling;
- sample.im = zz.im*s->agc_scaling;
+ v = vec_circular_dot_prodf(s->rrc_filter, rx_pulseshaper_4800_re[step], V27TER_RX_FILTER_STEPS, s->rrc_filter_step);
+ sample.re = v*s->agc_scaling;
+ v = vec_circular_dot_prodf(s->rrc_filter, rx_pulseshaper_4800_im[step], V27TER_RX_FILTER_STEPS, s->rrc_filter_step);
+ sample.im = v*s->agc_scaling;
z = dds_lookup_complexf(s->carrier_phase);
zz.re = sample.re*z.re - sample.im*z.im;
zz.im = -sample.re*z.im - sample.im*z.re;
@@ -926,8 +880,7 @@
{
for (i = 0; i < len; i++)
{
- s->rrc_filter[s->rrc_filter_step] =
- s->rrc_filter[s->rrc_filter_step + V27TER_RX_2400_FILTER_STEPS] = amp[i];
+ s->rrc_filter[s->rrc_filter_step] = amp[i];
if (++s->rrc_filter_step >= V27TER_RX_2400_FILTER_STEPS)
s->rrc_filter_step = 0;
@@ -1020,28 +973,18 @@
step = RX_PULSESHAPER_2400_COEFF_SETS - 1;
s->eq_put_step += RX_PULSESHAPER_2400_COEFF_SETS*20/(3*2);
#if defined(SPANDSP_USE_FIXED_POINT)
- zi.re = (int32_t) rx_pulseshaper_2400[step][0].re*(int32_t) s->rrc_filter[s->rrc_filter_step];
- zi.im = (int32_t) rx_pulseshaper_2400[step][0].im*(int32_t) s->rrc_filter[s->rrc_filter_step];
- for (j = 1; j < V27TER_RX_2400_FILTER_STEPS; j++)
- {
- zi.re += (int32_t) rx_pulseshaper_2400[step][j].re*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
- zi.im += (int32_t) rx_pulseshaper_2400[step][j].im*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
- }
- sample.re = ((int32_t) zi.re*(int32_t) s->agc_scaling) >> 15;
- sample.im = ((int32_t) zi.im*(int32_t) s->agc_scaling) >> 15;
+ v = vec_circular_dot_prodi16(s->rrc_filter, rx_pulseshaper_2400_re[step], V27TER_RX_FILTER_STEPS, s->rrc_filter_step);
+ sample.re = (v*(int32_t) s->agc_scaling) >> 15;
+ v = vec_circular_dot_prodi16(s->rrc_filter, rx_pulseshaper_2400_im[step], V27TER_RX_FILTER_STEPS, s->rrc_filter_step);
+ sample.im = (v*(int32_t) s->agc_scaling) >> 15;
z = dds_lookup_complexi16(s->carrier_phase);
zz.re = ((int32_t) sample.re*(int32_t) z.re - (int32_t) sample.im*(int32_t) z.im) >> 15;
zz.im = ((int32_t) -sample.re*(int32_t) z.im - (int32_t) sample.im*(int32_t) z.re) >> 15;
#else
- zz.re = rx_pulseshaper_2400[step][0].re*s->rrc_filter[s->rrc_filter_step];
- zz.im = rx_pulseshaper_2400[step][0].im*s->rrc_filter[s->rrc_filter_step];
- for (j = 1; j < V27TER_RX_2400_FILTER_STEPS; j++)
- {
- zz.re += rx_pulseshaper_2400[step][j].re*s->rrc_filter[j + s->rrc_filter_step];
- zz.im += rx_pulseshaper_2400[step][j].im*s->rrc_filter[j + s->rrc_filter_step];
- }
- sample.re = zz.re*s->agc_scaling;
- sample.im = zz.im*s->agc_scaling;
+ v = vec_circular_dot_prodf(s->rrc_filter, rx_pulseshaper_2400_re[step], V27TER_RX_FILTER_STEPS, s->rrc_filter_step);
+ sample.re = v*s->agc_scaling;
+ v = vec_circular_dot_prodf(s->rrc_filter, rx_pulseshaper_2400_im[step], V27TER_RX_FILTER_STEPS, s->rrc_filter_step);
+ sample.im = v*s->agc_scaling;
z = dds_lookup_complexf(s->carrier_phase);
zz.re = sample.re*z.re - sample.im*z.im;
zz.im = -sample.re*z.im - sample.im*z.re;
Modified: freeswitch/trunk/libs/spandsp/src/v29rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29rx.c Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29rx.c,v 1.140 2008/09/16 14:12:23 steveu Exp $
+ * $Id: v29rx.c,v 1.144 2008/09/18 14:59:30 steveu Exp $
*/
/*! \file */
@@ -79,6 +79,8 @@
#define V29_TRAINING_SEG_3_LEN 384
#define V29_TRAINING_SEG_4_LEN 48
+#define V29_EQUALIZER_LEN (V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN)
+
enum
{
TRAINING_STAGE_NORMAL_OPERATION = 0,
@@ -176,16 +178,16 @@
#endif
{
*coeffs = s->eq_coeff;
- return V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN;
+ return V29_EQUALIZER_LEN;
}
/*- End of function --------------------------------------------------------*/
static void equalizer_save(v29_rx_state_t *s)
{
#if defined(SPANDSP_USE_FIXED_POINT)
- cvec_copyi16(s->eq_coeff_save, s->eq_coeff, V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
+ cvec_copyi16(s->eq_coeff_save, s->eq_coeff, V29_EQUALIZER_LEN);
#else
- cvec_copyf(s->eq_coeff_save, s->eq_coeff, V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
+ cvec_copyf(s->eq_coeff_save, s->eq_coeff, V29_EQUALIZER_LEN);
#endif
}
/*- End of function --------------------------------------------------------*/
@@ -193,13 +195,13 @@
static void equalizer_restore(v29_rx_state_t *s)
{
#if defined(SPANDSP_USE_FIXED_POINT)
- cvec_copyi16(s->eq_coeff, s->eq_coeff_save, V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
- cvec_zeroi16(s->eq_buf, V29_EQUALIZER_MASK);
- s->eq_delta = 32768.0f*EQUALIZER_DELTA/(V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
-#else
- cvec_copyf(s->eq_coeff, s->eq_coeff_save, V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
- cvec_zerof(s->eq_buf, V29_EQUALIZER_MASK);
- s->eq_delta = EQUALIZER_DELTA/(V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
+ cvec_copyi16(s->eq_coeff, s->eq_coeff_save, V29_EQUALIZER_LEN);
+ cvec_zeroi16(s->eq_buf, V29_EQUALIZER_LEN);
+ s->eq_delta = 32768.0f*EQUALIZER_DELTA/V29_EQUALIZER_LEN;
+#else
+ cvec_copyf(s->eq_coeff, s->eq_coeff_save, V29_EQUALIZER_LEN);
+ cvec_zerof(s->eq_buf, V29_EQUALIZER_LEN);
+ s->eq_delta = EQUALIZER_DELTA/V29_EQUALIZER_LEN;
#endif
s->eq_put_step = RX_PULSESHAPER_COEFF_SETS*10/(3*2) - 1;
@@ -211,15 +213,15 @@
{
/* Start with an equalizer based on everything being perfect */
#if defined(SPANDSP_USE_FIXED_POINT)
- cvec_zeroi16(s->eq_coeff, V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
- s->eq_coeff[V29_EQUALIZER_PRE_LEN] = complex_seti16(3*FP_FACTOR, 0*FP_FACTOR);
- cvec_zeroi16(s->eq_buf, V29_EQUALIZER_MASK);
- s->eq_delta = 32768.0f*EQUALIZER_DELTA/(V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
-#else
- cvec_zerof(s->eq_coeff, V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
- s->eq_coeff[V29_EQUALIZER_PRE_LEN] = complex_setf(3.0f, 0.0f);
- cvec_zerof(s->eq_buf, V29_EQUALIZER_MASK);
- s->eq_delta = EQUALIZER_DELTA/(V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
+ cvec_zeroi16(s->eq_coeff, V29_EQUALIZER_LEN);
+ s->eq_coeff[V29_EQUALIZER_POST_LEN] = complex_seti16(3*FP_FACTOR, 0*FP_FACTOR);
+ cvec_zeroi16(s->eq_buf, V29_EQUALIZER_LEN);
+ s->eq_delta = 32768.0f*EQUALIZER_DELTA/V29_EQUALIZER_LEN;
+#else
+ cvec_zerof(s->eq_coeff, V29_EQUALIZER_LEN);
+ s->eq_coeff[V29_EQUALIZER_POST_LEN] = complex_setf(3.0f, 0.0f);
+ cvec_zerof(s->eq_buf, V29_EQUALIZER_LEN);
+ s->eq_delta = EQUALIZER_DELTA/V29_EQUALIZER_LEN;
#endif
s->eq_put_step = RX_PULSESHAPER_COEFF_SETS*10/(3*2) - 1;
@@ -232,8 +234,8 @@
{
complexi16_t z;
- z.re = ((int32_t) x->re*(int32_t) y->re - (int32_t) x->im*(int32_t) y->im) >> 12;
- z.im = ((int32_t) x->re*(int32_t) y->im + (int32_t) x->im*(int32_t) y->re) >> 12;
+ z.re = ((int32_t) x->re*(int32_t) y->re - (int32_t) x->im*(int32_t) y->im) >> FP_SHIFT_FACTOR;
+ z.im = ((int32_t) x->re*(int32_t) y->im + (int32_t) x->im*(int32_t) y->re) >> FP_SHIFT_FACTOR;
return z;
}
/*- End of function --------------------------------------------------------*/
@@ -245,36 +247,19 @@
static __inline__ complexf_t equalizer_get(v29_rx_state_t *s)
#endif
{
- int i;
- int p;
#if defined(SPANDSP_USE_FIXED_POINT)
+ complexi32_t zz;
complexi16_t z;
- complexi16_t z1;
-#else
- complexf_t z;
- complexf_t z1;
-#endif
/* Get the next equalized value. */
- p = s->eq_step - 1;
-#if defined(SPANDSP_USE_FIXED_POINT)
- z = complex_seti16(0, 0);
- for (i = 0; i < V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN; i++)
- {
- p = (p - 1) & V29_EQUALIZER_MASK;
- z1 = complex_mul_q4_12(&s->eq_coeff[i], &s->eq_buf[p]);
- z = complex_addi16(&z, &z1);
- }
+ zz = cvec_circular_dot_prodi16(s->eq_buf, s->eq_coeff, V29_EQUALIZER_LEN, s->eq_step);
+ z.re = zz.re >> FP_SHIFT_FACTOR;
+ z.im = zz.im >> FP_SHIFT_FACTOR;
+ return z;
#else
- z = complex_setf(0.0f, 0.0f);
- for (i = 0; i < V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN; i++)
- {
- p = (p - 1) & V29_EQUALIZER_MASK;
- z1 = complex_mulf(&s->eq_coeff[i], &s->eq_buf[p]);
- z = complex_addf(&z, &z1);
- }
+ /* Get the next equalized value. */
+ return cvec_circular_dot_prodf(s->eq_buf, s->eq_coeff, V29_EQUALIZER_LEN, s->eq_step);
#endif
- return z;
}
/*- End of function --------------------------------------------------------*/
@@ -284,45 +269,24 @@
static void tune_equalizer(v29_rx_state_t *s, const complexf_t *z, const complexf_t *target)
#endif
{
- int i;
- int p;
#if defined(SPANDSP_USE_FIXED_POINT)
- complexi16_t ez;
- complexi16_t z1;
-#else
- complexf_t ez;
- complexf_t z1;
-#endif
+ complexi16_t err;
/* Find the x and y mismatch from the exact constellation position. */
-#if defined(SPANDSP_USE_FIXED_POINT)
- ez.re = target->re*FP_FACTOR - z->re;
- ez.im = target->im*FP_FACTOR - z->im;
- ez.re = ((int32_t) ez.re*(int32_t) s->eq_delta) >> 15;
- ez.im = ((int32_t) ez.im*(int32_t) s->eq_delta) >> 15;
-#else
- ez = complex_subf(target, z);
- ez.re *= s->eq_delta;
- ez.im *= s->eq_delta;
-#endif
+ err.re = target->re*FP_FACTOR - z->re;
+ err.im = target->im*FP_FACTOR - z->im;
+ err.re = ((int32_t) err.re*(int32_t) s->eq_delta) >> 15;
+ err.im = ((int32_t) err.im*(int32_t) s->eq_delta) >> 15;
+ cvec_circular_lmsi16(s->eq_buf, s->eq_coeff, V29_EQUALIZER_LEN, s->eq_step, &err);
+#else
+ complexf_t err;
- p = s->eq_step - 1;
- for (i = 0; i < V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN; i++)
- {
- p = (p - 1) & V29_EQUALIZER_MASK;
-#if defined(SPANDSP_USE_FIXED_POINT)
- z1 = complex_conji16(&s->eq_buf[p]);
- z1 = complex_mul_q4_12(&ez, &z1);
- s->eq_coeff[i] = complex_addi16(&s->eq_coeff[i], &z1);
-#else
- z1 = complex_conjf(&s->eq_buf[p]);
- z1 = complex_mulf(&ez, &z1);
- s->eq_coeff[i] = complex_addf(&s->eq_coeff[i], &z1);
- /* Leak a little to tame uncontrolled wandering */
- s->eq_coeff[i].re *= 0.9999f;
- s->eq_coeff[i].im *= 0.9999f;
+ /* Find the x and y mismatch from the exact constellation position. */
+ err = complex_subf(target, z);
+ err.re *= s->eq_delta;
+ err.im *= s->eq_delta;
+ cvec_circular_lmsf(s->eq_buf, s->eq_coeff, V29_EQUALIZER_LEN, s->eq_step, &err);
#endif
- }
}
/*- End of function --------------------------------------------------------*/
@@ -597,7 +561,8 @@
/* Add a sample to the equalizer's circular buffer, but don't calculate anything
at this time. */
s->eq_buf[s->eq_step] = *sample;
- s->eq_step = (s->eq_step + 1) & V29_EQUALIZER_MASK;
+ if (++s->eq_step >= V29_EQUALIZER_LEN)
+ s->eq_step = 0;
/* On alternate insertions we have a whole baud, and must process it. */
if ((s->baud_half ^= 1))
@@ -687,7 +652,7 @@
p = angle*2.0f*3.14159f/(65536.0f*65536.0f);
#if defined(SPANDSP_USE_FIXED_POINT)
zz = complex_setf(cosf(p), -sinf(p));
- for (i = 0; i <= V29_EQUALIZER_MASK; i++)
+ for (i = 0; i < V29_EQUALIZER_LEN; i++)
{
z1 = complex_setf(s->eq_buf[i].re, s->eq_buf[i].im);
z1 = complex_mulf(&z1, &zz);
@@ -696,7 +661,7 @@
}
#else
zz = complex_setf(cosf(p), -sinf(p));
- for (i = 0; i <= V29_EQUALIZER_MASK; i++)
+ for (i = 0; i < V29_EQUALIZER_LEN; i++)
s->eq_buf[i] = complex_mulf(&s->eq_buf[i], &zz);
#endif
s->carrier_phase += angle;
@@ -860,7 +825,6 @@
int v29_rx(v29_rx_state_t *s, const int16_t amp[], int len)
{
int i;
- int j;
int step;
int16_t x;
int32_t diff;
@@ -879,8 +843,7 @@
for (i = 0; i < len; i++)
{
- s->rrc_filter[s->rrc_filter_step] =
- s->rrc_filter[s->rrc_filter_step + V29_RX_FILTER_STEPS] = amp[i];
+ s->rrc_filter[s->rrc_filter_step] = amp[i];
if (++s->rrc_filter_step >= V29_RX_FILTER_STEPS)
s->rrc_filter_step = 0;
@@ -956,25 +919,21 @@
if (step < 0)
step += RX_PULSESHAPER_COEFF_SETS;
#if defined(SPANDSP_USE_FIXED_POINT)
- v = (int32_t) rx_pulseshaper[step][0].re*(int32_t) s->rrc_filter[s->rrc_filter_step];
- for (j = 1; j < V29_RX_FILTER_STEPS; j++)
- v += (int32_t) rx_pulseshaper[step][j].re*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
+ v = vec_circular_dot_prodi16(s->rrc_filter, rx_pulseshaper_re[step], V29_RX_FILTER_STEPS, s->rrc_filter_step);
sample.re = (v*s->agc_scaling) >> 15;
#else
- v = rx_pulseshaper[step][0].re*s->rrc_filter[s->rrc_filter_step];
- for (j = 1; j < V29_RX_FILTER_STEPS; j++)
- v += rx_pulseshaper[step][j].re*s->rrc_filter[j + s->rrc_filter_step];
+ v = vec_circular_dot_prodf(s->rrc_filter, rx_pulseshaper_re[step], V29_RX_FILTER_STEPS, s->rrc_filter_step);
sample.re = v*s->agc_scaling;
#endif
/* Symbol timing synchronisation band edge filters */
#if defined(SPANDSP_USE_FIXED_POINT)
/* Low Nyquist band edge filter */
- v = ((s->symbol_sync_low[0]*SYNC_LOW_BAND_EDGE_COEFF_0) >> 12) + ((s->symbol_sync_low[1]*SYNC_LOW_BAND_EDGE_COEFF_1) >> 12) + sample.re;
+ v = ((s->symbol_sync_low[0]*SYNC_LOW_BAND_EDGE_COEFF_0) >> FP_SHIFT_FACTOR) + ((s->symbol_sync_low[1]*SYNC_LOW_BAND_EDGE_COEFF_1) >> FP_SHIFT_FACTOR) + sample.re;
s->symbol_sync_low[1] = s->symbol_sync_low[0];
s->symbol_sync_low[0] = v;
/* High Nyquist band edge filter */
- v = ((s->symbol_sync_high[0]*SYNC_HIGH_BAND_EDGE_COEFF_0) >> 12) + ((s->symbol_sync_high[1]*SYNC_HIGH_BAND_EDGE_COEFF_1) >> 12) + sample.re;
+ v = ((s->symbol_sync_high[0]*SYNC_HIGH_BAND_EDGE_COEFF_0) >> FP_SHIFT_FACTOR) + ((s->symbol_sync_high[1]*SYNC_HIGH_BAND_EDGE_COEFF_1) >> FP_SHIFT_FACTOR) + sample.re;
s->symbol_sync_high[1] = s->symbol_sync_high[0];
s->symbol_sync_high[0] = v;
#else
@@ -1008,17 +967,13 @@
step = RX_PULSESHAPER_COEFF_SETS - 1;
s->eq_put_step += RX_PULSESHAPER_COEFF_SETS*10/(3*2);
#if defined(SPANDSP_USE_FIXED_POINT)
- v = (int32_t) rx_pulseshaper[step][0].im*(int32_t) s->rrc_filter[s->rrc_filter_step];
- for (j = 1; j < V29_RX_FILTER_STEPS; j++)
- v += (int32_t) rx_pulseshaper[step][j].im*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
+ v = vec_circular_dot_prodi16(s->rrc_filter, rx_pulseshaper_im[step], V29_RX_FILTER_STEPS, s->rrc_filter_step);
sample.im = (v*s->agc_scaling) >> 15;
z = dds_lookup_complexi16(s->carrier_phase);
zz.re = ((int32_t) sample.re*(int32_t) z.re - (int32_t) sample.im*(int32_t) z.im) >> 15;
zz.im = ((int32_t) -sample.re*(int32_t) z.im - (int32_t) sample.im*(int32_t) z.re) >> 15;
#else
- v = rx_pulseshaper[step][0].im*s->rrc_filter[s->rrc_filter_step];
- for (j = 1; j < V29_RX_FILTER_STEPS; j++)
- v += rx_pulseshaper[step][j].im*s->rrc_filter[j + s->rrc_filter_step];
+ v = vec_circular_dot_prodf(s->rrc_filter, rx_pulseshaper_im[step], V29_RX_FILTER_STEPS, s->rrc_filter_step);
sample.im = v*s->agc_scaling;
z = dds_lookup_complexf(s->carrier_phase);
zz.re = sample.re*z.re - sample.im*z.im;
Modified: freeswitch/trunk/libs/spandsp/src/vector_float.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/vector_float.c (original)
+++ freeswitch/trunk/libs/spandsp/src/vector_float.c Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_float.c,v 1.12 2008/09/16 15:21:52 steveu Exp $
+ * $Id: vector_float.c,v 1.14 2008/09/18 13:54:32 steveu Exp $
*/
/*! \file */
@@ -337,22 +337,25 @@
{
int i;
float z;
- __m128 num1, num2, num3, num4;
+ __m128 n1;
+ __m128 n2;
+ __m128 n3;
+ __m128 n4;
z = 0.0f;
if ((i = n & ~3))
{
- num4 = _mm_setzero_ps(); //sets sum to zero
+ n4 = _mm_setzero_ps(); //sets sum to zero
for (i -= 4; i >= 0; i -= 4)
{
- num1 = _mm_loadu_ps(x + i);
- num2 = _mm_loadu_ps(y + i);
- num3 = _mm_mul_ps(num1, num2);
- num4 = _mm_add_ps(num4, num3);
+ n1 = _mm_loadu_ps(x + i);
+ n2 = _mm_loadu_ps(y + i);
+ n3 = _mm_mul_ps(n1, n2);
+ n4 = _mm_add_ps(n4, n3);
}
- num4 = _mm_add_ps(_mm_movehl_ps(num4, num4), num4);
- num4 = _mm_add_ss(_mm_shuffle_ps(num4, num4, 1), num4);
- _mm_store_ss(&z, num4);
+ n4 = _mm_add_ps(_mm_movehl_ps(n4, n4), n4);
+ n4 = _mm_add_ss(_mm_shuffle_ps(n4, n4, 1), n4);
+ _mm_store_ss(&z, n4);
}
/* Now deal with the last 1 to 3 elements, which don't fill in an SSE2 register */
switch (n & 3)
@@ -405,4 +408,34 @@
}
/*- End of function --------------------------------------------------------*/
#endif
+
+float vec_circular_dot_prodf(const float x[], const float y[], int n, int pos)
+{
+ float z;
+
+ z = vec_dot_prodf(&x[pos], &y[0], n - pos);
+ z += vec_dot_prodf(&x[0], &y[n - pos], pos);
+ return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_lmsf(const float x[], float y[], int n, float error)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ {
+ y[i] += x[i]*error;
+ /* Leak a little to tame uncontrolled wandering */
+ y[i] *= 0.9999f;
+ }
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_circular_lmsf(const float x[], float y[], int n, int pos, float error)
+{
+ vec_lmsf(&x[pos], &y[0], n - pos, error);
+ vec_lmsf(&x[0], &y[n - pos], pos, error);
+}
+/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/vector_int.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/vector_int.c (original)
+++ freeswitch/trunk/libs/spandsp/src/vector_int.c Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_int.c,v 1.13 2008/09/16 15:21:52 steveu Exp $
+ * $Id: vector_int.c,v 1.15 2008/09/18 13:54:32 steveu Exp $
*/
/*! \file */
@@ -156,7 +156,33 @@
for (i = 0; i < n; i++)
z += (int32_t) x[i]*(int32_t) y[i];
#endif
- return z;
+ return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+int32_t vec_circular_dot_prodi16(const int16_t x[], const int16_t y[], int n, int pos)
+{
+ int32_t z;
+
+ z = vec_dot_prodi16(&x[pos], &y[0], n - pos);
+ z += vec_dot_prodi16(&x[0], &y[n - pos], pos);
+ return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_lmsi16(const int16_t x[], int16_t y[], int n, int16_t error)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ y[i] += ((int32_t) x[i]*(int32_t) error) >> 15;
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_circular_lmsi16(const int16_t x[], int16_t y[], int n, int pos, int16_t error)
+{
+ vec_lmsi16(&x[pos], &y[0], n - pos, error);
+ vec_lmsi16(&x[0], &y[n - pos], pos, error);
}
/*- End of function --------------------------------------------------------*/
@@ -315,7 +341,7 @@
: "S" (x), "a" (n), "d" (out), [lower] "m" (lower_bound), [upper] "m" (upper_bound)
: "ecx"
);
- return max;
+ return max;
#else
int i;
int16_t min;
Modified: freeswitch/trunk/libs/spandsp/tests/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/Makefile.am (original)
+++ freeswitch/trunk/libs/spandsp/tests/Makefile.am Tue Sep 30 23:59:45 2008
@@ -16,7 +16,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
-## $Id: Makefile.am,v 1.106 2008/09/09 14:05:55 steveu Exp $
+## $Id: Makefile.am,v 1.107 2008/09/18 12:05:35 steveu Exp $
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -41,6 +41,9 @@
bell_mf_tx_tests \
bert_tests \
bit_operations_tests \
+ complex_tests \
+ complex_vector_float_tests \
+ complex_vector_int_tests \
crc_tests \
dc_restore_tests \
dds_tests \
@@ -132,6 +135,15 @@
bit_operations_tests_SOURCES = bit_operations_tests.c
bit_operations_tests_LDADD = $(LIBDIR) -lspandsp
+complex_tests_SOURCES = complex_tests.c
+complex_tests_LDADD = $(LIBDIR) -lspandsp
+
+complex_vector_float_tests_SOURCES = complex_vector_float_tests.c
+complex_vector_float_tests_LDADD = $(LIBDIR) -lspandsp
+
+complex_vector_int_tests_SOURCES = complex_vector_int_tests.c
+complex_vector_int_tests_LDADD = $(LIBDIR) -lspandsp
+
crc_tests_SOURCES = crc_tests.c
crc_tests_LDADD = $(LIBDIR) -lspandsp
Modified: freeswitch/trunk/libs/spandsp/tests/g722_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/g722_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/g722_tests.c Tue Sep 30 23:59:45 2008
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g722_tests.c,v 1.26 2008/05/13 13:17:25 steveu Exp $
+ * $Id: g722_tests.c,v 1.27 2008/09/19 14:02:05 steveu Exp $
*/
/*! \file */
@@ -109,8 +109,10 @@
static const char *encode_test_files[] =
{
- TESTDATA_DIR "T1C1.XMT", TESTDATA_DIR "T2R1.COD",
- TESTDATA_DIR "T1C2.XMT", TESTDATA_DIR "T2R2.COD",
+ TESTDATA_DIR "T1C1.XMT",
+ TESTDATA_DIR "T2R1.COD",
+ TESTDATA_DIR "T1C2.XMT",
+ TESTDATA_DIR "T2R2.COD",
NULL
};
@@ -295,6 +297,7 @@
if (itutests)
{
+#if 1
/* ITU G.722 encode tests, using configuration 1. The QMF is bypassed */
for (file = 0; encode_test_files[file]; file += 2)
{
@@ -341,7 +344,8 @@
}
printf("Test passed\n");
}
-
+#endif
+#if 1
/* ITU G.722 decode tests, using configuration 2. The QMF is bypassed */
/* Run each of the tests for each of the modes - 48kbps, 56kbps and 64kbps. */
for (mode = 1; mode <= 3; mode++)
@@ -404,7 +408,7 @@
printf("Test passed\n");
}
}
-
+#endif
printf("Tests passed.\n");
}
else
Modified: freeswitch/trunk/libs/spandsp/tests/regression_tests.sh
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/regression_tests.sh (original)
+++ freeswitch/trunk/libs/spandsp/tests/regression_tests.sh Tue Sep 30 23:59:45 2008
@@ -17,7 +17,7 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-# $Id: regression_tests.sh,v 1.52 2008/09/02 13:56:10 steveu Exp $
+# $Id: regression_tests.sh,v 1.53 2008/09/18 12:09:51 steveu Exp $
#
ITUTESTS_TIF=../test-data/itu/fax/itutests.tif
@@ -99,6 +99,33 @@
fi
echo bit_operations_tests completed OK
+./complex_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+ echo complex_tests failed!
+ exit $RETVAL
+fi
+echo complex_tests completed OK
+
+./complex_vector_float_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+ echo complex_vector_float_tests failed!
+ exit $RETVAL
+fi
+echo complex_vector_float_tests completed OK
+
+./complex_vector_int_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+ echo complex_vector_int_tests failed!
+ exit $RETVAL
+fi
+echo complex_vector_int_tests completed OK
+
./crc_tests >$STDOUT_DEST 2>$STDERR_DEST
RETVAL=$?
if [ $RETVAL != 0 ]
Modified: freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c Tue Sep 30 23:59:45 2008
@@ -1,7 +1,7 @@
/*
* SpanDSP - a series of DSP components for telephony
*
- * vector_int_tests.c
+ * complex_vector_int_tests.c
*
* Written by Steve Underwood <steveu(a)coppice.org>
*
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_int_tests.c,v 1.9 2008/09/16 15:21:52 steveu Exp $
+ * $Id: vector_int_tests.c,v 1.10 2008/09/18 12:05:35 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -139,10 +139,51 @@
}
/*- End of function --------------------------------------------------------*/
+static int test_vec_circular_dot_prodi16(void)
+{
+ int i;
+ int j;
+ int pos;
+ int len;
+ int32_t za;
+ int32_t zb;
+ int16_t x[99];
+ int16_t y[99];
+
+ /* Verify that we can do circular sample buffer "dot" linear coefficient buffer
+ operations properly, by doing two sub-dot products. */
+ for (i = 0; i < 99; i++)
+ {
+ x[i] = rand();
+ y[i] = rand();
+ }
+
+ len = 95;
+ for (pos = 0; pos < len; pos++)
+ {
+ za = vec_circular_dot_prodi16(x, y, len, pos);
+ zb = 0;
+ for (i = 0; i < len; i++)
+ {
+ j = (pos + i) % len;
+ zb += (int32_t) x[j]*(int32_t) y[i];
+ }
+
+ if (za != zb)
+ {
+ printf("Tests failed\n");
+ exit(2);
+ }
+ }
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
int main(int argc, char *argv[])
{
test_vec_dot_prodi16();
test_vec_min_maxi16();
+ test_vec_circular_dot_prodi16();
printf("Tests passed.\n");
return 0;
1
0
[commit] r9769 - in freeswitch/trunk/libs/spandsp: . src src/spandsp tests
by Freeswitch SVN 01 Oct '08
by Freeswitch SVN 01 Oct '08
01 Oct '08
Author: anthm
Date: Tue Sep 30 23:56:17 2008
New Revision: 9769
Modified:
freeswitch/trunk/libs/spandsp/.update
freeswitch/trunk/libs/spandsp/config-h.in
freeswitch/trunk/libs/spandsp/configure.ac
freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h
freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/version.h
freeswitch/trunk/libs/spandsp/src/t30.c
freeswitch/trunk/libs/spandsp/src/v17rx.c
freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
freeswitch/trunk/libs/spandsp/src/v29rx.c
freeswitch/trunk/libs/spandsp/src/vector_float.c
freeswitch/trunk/libs/spandsp/src/vector_int.c
freeswitch/trunk/libs/spandsp/tests/at_interpreter_tests.c
freeswitch/trunk/libs/spandsp/tests/vector_float_tests.c
freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c
Log:
update to snapshot spandsp-20080916.tar.gz
Modified: freeswitch/trunk/libs/spandsp/.update
==============================================================================
--- freeswitch/trunk/libs/spandsp/.update (original)
+++ freeswitch/trunk/libs/spandsp/.update Tue Sep 30 23:56:17 2008
@@ -1 +1 @@
-Tue Sep 30 23:53:44 EDT 2008
+Tue Sep 30 23:55:26 EDT 2008
Modified: freeswitch/trunk/libs/spandsp/config-h.in
==============================================================================
--- freeswitch/trunk/libs/spandsp/config-h.in (original)
+++ freeswitch/trunk/libs/spandsp/config-h.in Tue Sep 30 23:56:17 2008
@@ -257,6 +257,30 @@
/* Enable fixed point processing, where possible, instead of floating point */
#undef SPANDSP_USE_FIXED_POINT
+/* Use the MMX instruction set (i386 and x86_64 only). */
+#undef SPANDSP_USE_MMX
+
+/* Use the SSE instruction set (i386 and x86_64 only). */
+#undef SPANDSP_USE_SSE
+
+/* Use the SSE2 instruction set (i386 and x86_64 only). */
+#undef SPANDSP_USE_SSE2
+
+/* Use the SSE3 instruction set (i386 and x86_64 only). */
+#undef SPANDSP_USE_SSE3
+
+/* Use the SSE4A instruction set (i386 and x86_64 only). */
+#undef SPANDSP_USE_SSE4A
+
+/* Use the SSE4.1 instruction set (i386 and x86_64 only). */
+#undef SPANDSP_USE_SSE4_1
+
+/* Use the SSE4.2 instruction set (i386 and x86_64 only). */
+#undef SPANDSP_USE_SSE4_2
+
+/* Use the SSE5 instruction set (i386 and x86_64 only). */
+#undef SPANDSP_USE_SSE5
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
Modified: freeswitch/trunk/libs/spandsp/configure.ac
==============================================================================
--- freeswitch/trunk/libs/spandsp/configure.ac (original)
+++ freeswitch/trunk/libs/spandsp/configure.ac Tue Sep 30 23:56:17 2008
@@ -16,7 +16,7 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-# $Id: configure.ac,v 1.57 2008/09/12 14:41:55 steveu Exp $
+# $Id: configure.ac,v 1.59 2008/09/16 15:21:52 steveu Exp $
# @start 1
@@ -121,6 +121,13 @@
AC_ARG_ENABLE(test_data, [ --enable-test-data Build TIFF test files for some ITU test images])
AC_ARG_ENABLE(mmx, [ --enable-mmx Enable MMX support])
AC_ARG_ENABLE(sse, [ --enable-sse Enable SSE support])
+AC_ARG_ENABLE(sse2, [ --enable-sse2 Enable SSE2 support])
+AC_ARG_ENABLE(sse3, [ --enable-sse3 Enable SSE3 support])
+AC_ARG_ENABLE(sse3, [ --enable-sse3 Enable SSE3 support])
+AC_ARG_ENABLE(sse4_1, [ --enable-sse4-1 Enable SSE4.1 support])
+AC_ARG_ENABLE(sse4_2, [ --enable-sse4-2 Enable SSE4.2 support])
+AC_ARG_ENABLE(sse4a, [ --enable-sse4a Enable SSE4A support])
+AC_ARG_ENABLE(sse5, [ --enable-sse5 Enable SSE5 support])
AC_ARG_ENABLE(fixed_point, [ --enable-fixed-point Enable fixed point support])
AC_FUNC_ERROR_AT_LINE
@@ -285,6 +292,24 @@
case "${ax_cv_c_compiler_vendor}" in
gnu)
COMP_VENDOR_CFLAGS="-std=gnu99 -ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
+ if test "$enable_sse5" = "yes" ; then
+ COMP_VENDOR_CFLAGS="-msse5 $COMP_VENDOR_CFLAGS"
+ fi
+ if test "$enable_sse4a" = "yes" ; then
+ COMP_VENDOR_CFLAGS="-msse4a $COMP_VENDOR_CFLAGS"
+ fi
+ if test "$enable_sse4_2" = "yes" ; then
+ COMP_VENDOR_CFLAGS="-msse42 $COMP_VENDOR_CFLAGS"
+ fi
+ if test "$enable_sse4_1" = "yes" ; then
+ COMP_VENDOR_CFLAGS="-msse41 $COMP_VENDOR_CFLAGS"
+ fi
+ if test "$enable_sse3" = "yes" ; then
+ COMP_VENDOR_CFLAGS="-msse3 $COMP_VENDOR_CFLAGS"
+ fi
+ if test "$enable_sse2" = "yes" ; then
+ COMP_VENDOR_CFLAGS="-msse2 $COMP_VENDOR_CFLAGS"
+ fi
if test "$enable_sse" = "yes" ; then
COMP_VENDOR_CFLAGS="-msse $COMP_VENDOR_CFLAGS"
fi
@@ -302,6 +327,12 @@
;;
sun)
COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -errwarn=%all -xvpara"
+ if test "$enable_sse3" = "yes" ; then
+ COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
+ fi
+ if test "$enable_sse2" = "yes" ; then
+ COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
+ fi
if test "$enable_sse" = "yes" ; then
COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
fi
@@ -323,6 +354,12 @@
AM_CONDITIONAL([COND_TESTDATA], [test "$enable_test_data" = yes])
AM_CONDITIONAL([COND_MMX], [test "$enable_mmx" = yes])
AM_CONDITIONAL([COND_SSE], [test "$enable_sse" = yes])
+AM_CONDITIONAL([COND_SSE2], [test "$enable_sse2" = yes])
+AM_CONDITIONAL([COND_SSE3], [test "$enable_sse3" = yes])
+AM_CONDITIONAL([COND_SSE4_1], [test "$enable_sse4_1" = yes])
+AM_CONDITIONAL([COND_SSE4_2], [test "$enable_sse4_2" = yes])
+AM_CONDITIONAL([COND_SSE4A], [test "$enable_sse4a" = yes])
+AM_CONDITIONAL([COND_SSE5], [test "$enable_sse5" = yes])
if test "$enable_fixed_point" = "yes" ; then
AC_DEFINE([SPANDSP_USE_FIXED_POINT], [1], [Enable fixed point processing, where possible, instead of floating point])
SPANDSP_USE_FIXED_POINT="#define SPANDSP_USE_FIXED_POINT 1"
@@ -336,6 +373,58 @@
[AC_DEFINE([SPANDSP_MISALIGNED_ACCESS_FAILS], [1], [Do not expect a misaligned memory access to work correctly])
SPANDSP_MISALIGNED_ACCESS_FAILS="#define SPANDSP_MISALIGNED_ACCESS_FAILS 1"],
[SPANDSP_MISALIGNED_ACCESS_FAILS="#undef SPANDSP_MISALIGNED_ACCESS_FAILS"])
+if test "$enable_mmx" = "yes" ; then
+ AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
+fi
+if test "$enable_sse" = "yes" ; then
+ AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
+fi
+if test "$enable_sse2" = "yes" ; then
+ AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
+fi
+if test "$enable_sse3" = "yes" ; then
+ AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
+fi
+if test "$enable_sse4_1" = "yes" ; then
+ AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
+fi
+if test "$enable_sse4_2" = "yes" ; then
+ AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE4_2], [1], [Use the SSE4.2 instruction set (i386 and x86_64 only).])
+fi
+if test "$enable_sse4a" = "yes" ; then
+ AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE4_2], [1], [Use the SSE4.2 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE4A], [1], [Use the SSE4A instruction set (i386 and x86_64 only).])
+fi
+if test "$enable_sse5" = "yes" ; then
+ AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE4_2], [1], [Use the SSE4.2 instruction set (i386 and x86_64 only).])
+ AC_DEFINE([SPANDSP_USE_SSE5], [1], [Use the SSE5 instruction set (i386 and x86_64 only).])
+fi
AC_SUBST(CC_FOR_BUILD)
AC_SUBST(CPPFLAGS_FOR_BUILD)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: at_interpreter.h,v 1.18 2008/06/11 17:52:30 steveu Exp $
+ * $Id: at_interpreter.h,v 1.19 2008/09/16 12:45:50 steveu Exp $
*/
/*! \file */
@@ -204,6 +204,7 @@
int rings_indicated;
int do_hangup;
int silent_dial;
+ int command_dial;
int ok_is_pending;
int dte_is_waiting;
/*! \brief TRUE if a carrier is presnt. Otherwise FALSE. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17rx.h,v 1.53 2008/09/08 12:54:32 steveu Exp $
+ * $Id: v17rx.h,v 1.54 2008/09/16 13:02:05 steveu Exp $
*/
/*! \file */
@@ -290,10 +290,17 @@
int32_t carrier_phase_rate;
/*! \brief The carrier update rate saved for reuse when using short training. */
int32_t carrier_phase_rate_save;
+#if defined(SPANDSP_USE_FIXED_POINTx)
+ /*! \brief The proportional part of the carrier tracking filter. */
+ float carrier_track_p;
+ /*! \brief The integral part of the carrier tracking filter. */
+ float carrier_track_i;
+#else
/*! \brief The proportional part of the carrier tracking filter. */
float carrier_track_p;
/*! \brief The integral part of the carrier tracking filter. */
float carrier_track_i;
+#endif
/*! \brief A power meter, to measure the HPF'ed signal power in the channel. */
power_meter_t power;
@@ -301,10 +308,6 @@
int32_t carrier_on_power;
/*! \brief The power meter level at which carrier off is declared. */
int32_t carrier_off_power;
- /*! \brief The scaling factor accessed by the AGC algorithm. */
- float agc_scaling;
- /*! \brief The previous value of agc_scaling, needed to reuse old training. */
- float agc_scaling_save;
/*! \brief Current read offset into the equalizer buffer. */
int eq_step;
@@ -317,6 +320,11 @@
int baud_half;
#if defined(SPANDSP_USE_FIXED_POINTx)
+ /*! \brief The scaling factor accessed by the AGC algorithm. */
+ float agc_scaling;
+ /*! \brief The previous value of agc_scaling, needed to reuse old training. */
+ float agc_scaling_save;
+
/*! \brief The current delta factor for updating the equalizer coefficients. */
float eq_delta;
/*! \brief The adaptive equalizer coefficients. */
@@ -335,6 +343,11 @@
/*! Baud phase for symbol sync. */
int32_t baud_phase;
#else
+ /*! \brief The scaling factor accessed by the AGC algorithm. */
+ float agc_scaling;
+ /*! \brief The previous value of agc_scaling, needed to reuse old training. */
+ float agc_scaling_save;
+
/*! \brief The current delta factor for updating the equalizer coefficients. */
float eq_delta;
/*! \brief The adaptive equalizer coefficients. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_rx.h,v 1.49 2008/09/13 14:59:31 steveu Exp $
+ * $Id: v27ter_rx.h,v 1.51 2008/09/16 14:12:23 steveu Exp $
*/
/*! \file */
@@ -100,10 +100,12 @@
/*! \brief A counter for the number of consecutive bits of repeating pattern through
the scrambler. */
int scrambler_pattern_count;
- /*! \brief The section of the training data we are currently in. */
- int training_stage;
/*! \brief The current step in the table of BC constellation positions. */
int training_bc;
+ /*! \brief TRUE if the previous trained values are to be reused. */
+ int old_train;
+ /*! \brief The section of the training data we are currently in. */
+ int training_stage;
/*! \brief A count of how far through the current training step we are. */
int training_count;
/*! \brief A measure of how much mismatch there is between the real constellation,
@@ -119,8 +121,10 @@
int low_samples;
/*! \brief A highest magnitude sample seen. */
int16_t high_sample;
- /*! \brief TRUE if the previous trained values are to be reused. */
- int old_train;
+
+ /*! \brief The position of the current symbol in the constellation, used for
+ differential decoding. */
+ int constellation_state;
/*! \brief The current phase of the carrier (i.e. the DDS parameter). */
uint32_t carrier_phase;
@@ -147,11 +151,7 @@
/*! \brief The power meter level at which carrier off is declared. */
int32_t carrier_off_power;
- /*! \brief The position of the current symbol in the constellation, used for
- differential decoding. */
- int constellation_state;
-
- /*! \brief Current offset into the equalizer buffer. */
+ /*! \brief Current read offset into the equalizer buffer. */
int eq_step;
/*! \brief Current write offset into the equalizer buffer. */
int eq_put_step;
@@ -161,20 +161,20 @@
/*! \brief The current half of the baud. */
int baud_half;
-#if defined(SPANDSP_USE_FIXED_POINTx)
+#if defined(SPANDSP_USE_FIXED_POINT)
/*! \brief The scaling factor accessed by the AGC algorithm. */
- float agc_scaling;
+ int16_t agc_scaling;
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
- float agc_scaling_save;
+ int16_t agc_scaling_save;
/*! \brief The current delta factor for updating the equalizer coefficients. */
float eq_delta;
/*! \brief The adaptive equalizer coefficients. */
- complexi16_t eq_coeff[V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN];
+ /*complexi16_t*/ complexf_t eq_coeff[V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN];
/*! \brief A saved set of adaptive equalizer coefficients for use after restarts. */
- complexi16_t eq_coeff_save[V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN];
+ /*complexi16_t*/ complexf_t eq_coeff_save[V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN];
/*! \brief The equalizer signal buffer. */
- complexi16_t eq_buf[V27TER_EQUALIZER_MASK + 1];
+ /*complexi16_t*/ complexf_t eq_buf[V27TER_EQUALIZER_MASK + 1];
#else
/*! \brief The scaling factor accessed by the AGC algorithm. */
float agc_scaling;
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29rx.h,v 1.60 2008/09/13 14:10:31 steveu Exp $
+ * $Id: v29rx.h,v 1.62 2008/09/16 14:12:23 steveu Exp $
*/
/*! \file */
@@ -168,10 +168,12 @@
unsigned int scramble_reg;
/*! \brief The register for the training scrambler. */
uint8_t training_scramble_reg;
- /*! \brief The section of the training data we are currently in. */
- int training_stage;
/*! \brief The current step in the table of CD constellation positions. */
int training_cd;
+ /*! \brief TRUE if the previous trained values are to be reused. */
+ int old_train;
+ /*! \brief The section of the training data we are currently in. */
+ int training_stage;
/*! \brief A count of how far through the current training step we are. */
int training_count;
/*! \brief A measure of how much mismatch there is between the real constellation,
@@ -187,8 +189,10 @@
int low_samples;
/*! \brief A highest magnitude sample seen. */
int16_t high_sample;
- /*! \brief TRUE if the previous trained values are to be reused. */
- int old_train;
+
+ /*! \brief The position of the current symbol in the constellation, used for
+ differential decoding. */
+ int constellation_state;
/*! \brief The current phase of the carrier (i.e. the DDS parameter). */
uint32_t carrier_phase;
@@ -215,11 +219,7 @@
/*! \brief The power meter level at which carrier off is declared. */
int32_t carrier_off_power;
- /*! \brief The position of the current symbol in the constellation, used for
- differential decoding. */
- int constellation_state;
-
- /*! \brief Current offset into the equalizer buffer. */
+ /*! \brief Current read offset into the equalizer buffer. */
int eq_step;
/*! \brief Current write offset into the equalizer buffer. */
int eq_put_step;
@@ -231,9 +231,9 @@
#if defined(SPANDSP_USE_FIXED_POINT)
/*! \brief The scaling factor accessed by the AGC algorithm. */
- int32_t agc_scaling;
+ int16_t agc_scaling;
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
- int32_t agc_scaling_save;
+ int16_t agc_scaling_save;
/*! \brief The current delta factor for updating the equalizer coefficients. */
int16_t eq_delta;
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/version.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/version.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/version.h Tue Sep 30 23:56:17 2008
@@ -30,8 +30,8 @@
/* The date and time of the version are in UTC form. */
-#define SPANDSP_RELEASE_DATE 20080913
-#define SPANDSP_RELEASE_TIME 155039
+#define SPANDSP_RELEASE_DATE 20080916
+#define SPANDSP_RELEASE_TIME 152844
#endif
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/t30.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30.c Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30.c,v 1.266 2008/09/11 15:13:42 steveu Exp $
+ * $Id: t30.c,v 1.267 2008/09/16 12:45:01 steveu Exp $
*/
/*! \file */
@@ -682,7 +682,7 @@
}
/*- End of function --------------------------------------------------------*/
-static int send_rr(t30_state_t *s)
+static void send_rr(t30_state_t *s)
{
if (s->current_status != T30_ERR_TX_T5EXP)
send_simple_frame(s, T30_RR);
Modified: freeswitch/trunk/libs/spandsp/src/v17rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17rx.c Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17rx.c,v 1.116 2008/09/07 12:45:17 steveu Exp $
+ * $Id: v17rx.c,v 1.118 2008/09/16 14:12:23 steveu Exp $
*/
/*! \file */
@@ -133,13 +133,6 @@
}
/*- End of function --------------------------------------------------------*/
-int v17_rx_equalizer_state(v17_rx_state_t *s, complexf_t **coeffs)
-{
- *coeffs = s->eq_coeff;
- return V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN;
-}
-/*- End of function --------------------------------------------------------*/
-
static void report_status_change(v17_rx_state_t *s, int status)
{
if (s->status_handler)
@@ -149,37 +142,69 @@
}
/*- End of function --------------------------------------------------------*/
+#if defined(SPANDSP_USE_FIXED_POINTx)
+int v17_rx_equalizer_state(v17_rx_state_t *s, complexi16_t **coeffs)
+#else
+int v17_rx_equalizer_state(v17_rx_state_t *s, complexf_t **coeffs)
+#endif
+{
+ *coeffs = s->eq_coeff;
+ return V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN;
+}
+/*- End of function --------------------------------------------------------*/
+
static void equalizer_save(v17_rx_state_t *s)
{
+#if defined(SPANDSP_USE_FIXED_POINTx)
+ cvec_copyi16(s->eq_coeff_save, s->eq_coeff, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+#else
cvec_copyf(s->eq_coeff_save, s->eq_coeff, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+#endif
}
/*- End of function --------------------------------------------------------*/
static void equalizer_restore(v17_rx_state_t *s)
{
+#if defined(SPANDSP_USE_FIXED_POINTx)
+ cvec_copyi16(s->eq_coeff, s->eq_coeff_save, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+ cvec_zeroi16(s->eq_buf, V17_EQUALIZER_MASK);
+ s->eq_delta = 32768.0f*EQUALIZER_SLOW_ADAPT_RATIO*EQUALIZER_DELTA/(V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+#else
cvec_copyf(s->eq_coeff, s->eq_coeff_save, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
cvec_zerof(s->eq_buf, V17_EQUALIZER_MASK);
+ s->eq_delta = EQUALIZER_SLOW_ADAPT_RATIO*EQUALIZER_DELTA/(V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+#endif
s->eq_put_step = RX_PULSESHAPER_COEFF_SETS*10/(3*2) - 1;
s->eq_step = 0;
- s->eq_delta = EQUALIZER_SLOW_ADAPT_RATIO*EQUALIZER_DELTA/(V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
}
/*- End of function --------------------------------------------------------*/
static void equalizer_reset(v17_rx_state_t *s)
{
/* Start with an equalizer based on everything being perfect */
+#if defined(SPANDSP_USE_FIXED_POINTx)
+ cvec_zeroi16(s->eq_coeff, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+ s->eq_coeff[V17_EQUALIZER_PRE_LEN] = complex_seti16(3*FP_FACTOR, 0);
+ cvec_zeroi16(s->eq_buf, V17_EQUALIZER_MASK);
+ s->eq_delta = 32768.0f*EQUALIZER_DELTA/(V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+#else
cvec_zerof(s->eq_coeff, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
s->eq_coeff[V17_EQUALIZER_PRE_LEN] = complex_setf(3.0f, 0.0f);
cvec_zerof(s->eq_buf, V17_EQUALIZER_MASK);
+ s->eq_delta = EQUALIZER_DELTA/(V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+#endif
s->eq_put_step = RX_PULSESHAPER_COEFF_SETS*10/(3*2) - 1;
s->eq_step = 0;
- s->eq_delta = EQUALIZER_DELTA/(V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
}
/*- End of function --------------------------------------------------------*/
+#if defined(SPANDSP_USE_FIXED_POINTx)
+static __inline__ complexi16_t equalizer_get(v17_rx_state_t *s)
+#else
static __inline__ complexf_t equalizer_get(v17_rx_state_t *s)
+#endif
{
int i;
int p;
@@ -199,7 +224,11 @@
}
/*- End of function --------------------------------------------------------*/
+#if defined(SPANDSP_USE_FIXED_POINTx)
+static void tune_equalizer(v17_rx_state_t *s, const complexi16_t *z, const complexi16_t *target)
+#else
static void tune_equalizer(v17_rx_state_t *s, const complexf_t *z, const complexf_t *target)
+#endif
{
int i;
int p;
@@ -1080,7 +1109,11 @@
process_half_baud(s, &zz);
#endif
}
- dds_advancef(&(s->carrier_phase), s->carrier_phase_rate);
+#if defined(SPANDSP_USE_FIXED_POINT)
+ dds_advance(&s->carrier_phase, s->carrier_phase_rate);
+#else
+ dds_advancef(&s->carrier_phase, s->carrier_phase_rate);
+#endif
}
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_rx.c Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_rx.c,v 1.102 2008/09/13 14:59:30 steveu Exp $
+ * $Id: v27ter_rx.c,v 1.104 2008/09/16 14:12:23 steveu Exp $
*/
/*! \file */
@@ -31,10 +31,10 @@
#include <config.h>
#endif
+#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
#include <stdio.h>
-#include <stdlib.h>
#include "floating_fudge.h"
#if defined(HAVE_TGMATH_H)
#include <tgmath.h>
@@ -71,20 +71,20 @@
signal to a static constellation, even though dealing with differences is all
that is necessary. */
-#define CARRIER_NOMINAL_FREQ 1800.0f
-#define EQUALIZER_DELTA 0.25f
+#define CARRIER_NOMINAL_FREQ 1800.0f
+#define EQUALIZER_DELTA 0.25f
#if defined(SPANDSP_USE_FIXED_POINT)
-#define FP_FACTOR 4096
-#define FP_SHIFT_FACTOR 12
+#define FP_FACTOR 4096
+#define FP_SHIFT_FACTOR 12
#endif
/* Segments of the training sequence */
/* V.27ter defines a long and a short sequence. FAX doesn't use the
short sequence, so it is not implemented here. */
-#define V27TER_TRAINING_SEG_3_LEN 50
-#define V27TER_TRAINING_SEG_5_LEN 1074
-#define V27TER_TRAINING_SEG_6_LEN 8
+#define V27TER_TRAINING_SEG_3_LEN 50
+#define V27TER_TRAINING_SEG_5_LEN 1074
+#define V27TER_TRAINING_SEG_6_LEN 8
enum
{
@@ -152,13 +152,6 @@
}
/*- End of function --------------------------------------------------------*/
-int v27ter_rx_equalizer_state(v27ter_rx_state_t *s, complexf_t **coeffs)
-{
- *coeffs = s->eq_coeff;
- return V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN;
-}
-/*- End of function --------------------------------------------------------*/
-
static void report_status_change(v27ter_rx_state_t *s, int status)
{
if (s->status_handler)
@@ -168,6 +161,17 @@
}
/*- End of function --------------------------------------------------------*/
+#if defined(SPANDSP_USE_FIXED_POINTx)
+int v27ter_rx_equalizer_state(v27ter_rx_state_t *s, complexi16_t **coeffs)
+#else
+int v27ter_rx_equalizer_state(v27ter_rx_state_t *s, complexf_t **coeffs)
+#endif
+{
+ *coeffs = s->eq_coeff;
+ return V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN;
+}
+/*- End of function --------------------------------------------------------*/
+
static void equalizer_save(v27ter_rx_state_t *s)
{
#if defined(SPANDSP_USE_FIXED_POINTx)
@@ -183,14 +187,15 @@
#if defined(SPANDSP_USE_FIXED_POINTx)
cvec_copyi16(s->eq_coeff, s->eq_coeff_save, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
cvec_zeroi16(s->eq_buf, V27TER_EQUALIZER_MASK);
+ s->eq_delta = 32768.0f*EQUALIZER_DELTA/(V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
#else
cvec_copyf(s->eq_coeff, s->eq_coeff_save, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
cvec_zerof(s->eq_buf, V27TER_EQUALIZER_MASK);
+ s->eq_delta = EQUALIZER_DELTA/(V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
#endif
s->eq_put_step = (s->bit_rate == 4800) ? RX_PULSESHAPER_4800_COEFF_SETS*5/2 : RX_PULSESHAPER_2400_COEFF_SETS*20/(3*2);
s->eq_step = 0;
- s->eq_delta = EQUALIZER_DELTA/(V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
}
/*- End of function --------------------------------------------------------*/
@@ -201,15 +206,16 @@
cvec_zeroi16(s->eq_coeff, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
s->eq_coeff[V27TER_EQUALIZER_PRE_LEN] = complex_seti16(1.414f*FP_FACTOR, 0);
cvec_zeroi16(s->eq_buf, V27TER_EQUALIZER_MASK);
+ s->eq_delta = 32768.0f*EQUALIZER_DELTA/(V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
#else
cvec_zerof(s->eq_coeff, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
s->eq_coeff[V27TER_EQUALIZER_PRE_LEN] = complex_setf(1.414f, 0.0f);
cvec_zerof(s->eq_buf, V27TER_EQUALIZER_MASK);
+ s->eq_delta = EQUALIZER_DELTA/(V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
#endif
s->eq_put_step = (s->bit_rate == 4800) ? RX_PULSESHAPER_4800_COEFF_SETS*5/2 : RX_PULSESHAPER_2400_COEFF_SETS*20/(3*2);
s->eq_step = 0;
- s->eq_delta = EQUALIZER_DELTA/(V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
}
/*- End of function --------------------------------------------------------*/
@@ -313,12 +319,65 @@
/*- End of function --------------------------------------------------------*/
#if defined(SPANDSP_USE_FIXED_POINTx)
+static __inline__ int find_quadrant(const complexi16_t *z)
+#else
+static __inline__ int find_quadrant(const complexf_t *z)
+#endif
+{
+ int b1;
+ int b2;
+
+ /* Split the space along the two diagonals. */
+ b1 = (z->im > z->re);
+ b2 = (z->im < -z->re);
+ return (b2 << 1) | (b1 ^ b2);
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(SPANDSP_USE_FIXED_POINTx)
+static __inline__ int find_octant(complexi16_t *z)
+#else
+static __inline__ int find_octant(complexf_t *z)
+#endif
+{
+ float abs_re;
+ float abs_im;
+ int b1;
+ int b2;
+ int bits;
+
+ /* Are we near an axis or a diagonal? */
+ abs_re = fabsf(z->re);
+ abs_im = fabsf(z->im);
+ if (abs_im > abs_re*0.4142136f && abs_im < abs_re*2.4142136f)
+ {
+ /* Split the space along the two axes. */
+ b1 = (z->re < 0.0f);
+ b2 = (z->im < 0.0f);
+ bits = (b2 << 2) | ((b1 ^ b2) << 1) | 1;
+ }
+ else
+ {
+ /* Split the space along the two diagonals. */
+ b1 = (z->im > z->re);
+ b2 = (z->im < -z->re);
+ bits = (b2 << 2) | ((b1 ^ b2) << 1);
+ }
+ return bits;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(SPANDSP_USE_FIXED_POINTx)
static __inline__ void track_carrier(v27ter_rx_state_t *s, const complexi16_t *z, const complexi16_t *target)
#else
static __inline__ void track_carrier(v27ter_rx_state_t *s, const complexf_t *z, const complexf_t *target)
#endif
{
+#if defined(SPANDSP_USE_FIXED_POINTx)
+ int32_t error;
+#else
float error;
+#endif
/* For small errors the imaginary part of the difference between the actual and the target
positions is proportional to the phase error, for any particular target. However, the
@@ -395,55 +454,6 @@
/*- End of function --------------------------------------------------------*/
#if defined(SPANDSP_USE_FIXED_POINTx)
-static __inline__ int find_quadrant(const complexi16_t *z)
-#else
-static __inline__ int find_quadrant(const complexf_t *z)
-#endif
-{
- int b1;
- int b2;
-
- /* Split the space along the two diagonals. */
- b1 = (z->im > z->re);
- b2 = (z->im < -z->re);
- return (b2 << 1) | (b1 ^ b2);
-}
-/*- End of function --------------------------------------------------------*/
-
-#if defined(SPANDSP_USE_FIXED_POINTx)
-static __inline__ int find_octant(complexi16_t *z)
-#else
-static __inline__ int find_octant(complexf_t *z)
-#endif
-{
- float abs_re;
- float abs_im;
- int b1;
- int b2;
- int bits;
-
- /* Are we near an axis or a diagonal? */
- abs_re = fabsf(z->re);
- abs_im = fabsf(z->im);
- if (abs_im > abs_re*0.4142136f && abs_im < abs_re*2.4142136f)
- {
- /* Split the space along the two axes. */
- b1 = (z->re < 0.0f);
- b2 = (z->im < 0.0f);
- bits = (b2 << 2) | ((b1 ^ b2) << 1) | 1;
- }
- else
- {
- /* Split the space along the two diagonals. */
- b1 = (z->im > z->re);
- b2 = (z->im < -z->re);
- bits = (b2 << 2) | ((b1 ^ b2) << 1);
- }
- return bits;
-}
-/*- End of function --------------------------------------------------------*/
-
-#if defined(SPANDSP_USE_FIXED_POINTx)
static void decode_baud(v27ter_rx_state_t *s, complexi16_t *z)
#else
static void decode_baud(v27ter_rx_state_t *s, complexf_t *z)
@@ -460,25 +470,23 @@
int nearest;
int raw_bits;
- switch (s->bit_rate)
+ if (s->bit_rate == 2400)
{
- case 4800:
- default:
- nearest = find_octant(z);
- raw_bits = phase_steps_4800[(nearest - s->constellation_state) & 7];
- put_bit(s, raw_bits);
- put_bit(s, raw_bits >> 1);
- put_bit(s, raw_bits >> 2);
- s->constellation_state = nearest;
- break;
- case 2400:
nearest = find_quadrant(z);
raw_bits = phase_steps_2400[(nearest - s->constellation_state) & 3];
put_bit(s, raw_bits);
put_bit(s, raw_bits >> 1);
s->constellation_state = nearest;
nearest <<= 1;
- break;
+ }
+ else
+ {
+ nearest = find_octant(z);
+ raw_bits = phase_steps_4800[(nearest - s->constellation_state) & 7];
+ put_bit(s, raw_bits);
+ put_bit(s, raw_bits >> 1);
+ put_bit(s, raw_bits >> 2);
+ s->constellation_state = nearest;
}
track_carrier(s, z, &v27ter_constellation[nearest]);
if (--s->eq_skip <= 0)
@@ -526,7 +534,7 @@
}
/*- End of function --------------------------------------------------------*/
-#if defined(SPANDSP_USE_FIXED_POINTx)
+#if defined(SPANDSP_USE_FIXED_POINT)
static __inline__ void process_half_baud(v27ter_rx_state_t *s, const complexi16_t *sample)
#else
static __inline__ void process_half_baud(v27ter_rx_state_t *s, const complexf_t *sample)
@@ -546,7 +554,12 @@
/* Add a sample to the equalizer's circular buffer, but don't calculate anything
at this time. */
+#if defined(SPANDSP_USE_FIXED_POINT)
+ s->eq_buf[s->eq_step].re = sample->re/(float) FP_FACTOR;
+ s->eq_buf[s->eq_step].im = sample->im/(float) FP_FACTOR;
+#else
s->eq_buf[s->eq_step] = *sample;
+#endif
s->eq_step = (s->eq_step + 1) & V27TER_EQUALIZER_MASK;
/* On alternate insertions we have a whole baud, and must process it. */
@@ -765,16 +778,15 @@
int step;
int16_t x;
int32_t diff;
- complexf_t z;
#if defined(SPANDSP_USE_FIXED_POINT)
- complexi_t zi;
-#endif
-#if defined(SPANDSP_USE_FIXED_POINTx)
- complexi16_t sample;
+ complexi16_t z;
complexi16_t zz;
+ complexi16_t sample;
+ complexi32_t zi;
#else
- complexf_t sample;
+ complexf_t z;
complexf_t zz;
+ complexf_t sample;
#endif
int32_t power;
@@ -832,8 +844,7 @@
continue;
}
#if defined(IAXMODEM_STUFF)
- /* Carrier has dropped, but the put_bit is
- pending the signal_present delay. */
+ /* Carrier has dropped, but the put_bit is pending the signal_present delay. */
s->carrier_drop_pending = TRUE;
#endif
}
@@ -861,8 +872,8 @@
if (s->training_stage == TRAINING_STAGE_SYMBOL_ACQUISITION)
{
/* Only AGC during the initial training */
-#if defined(SPANDSP_USE_FIXED_POINTx)
- s->agc_scaling = (float) FP_FACTOR*(1.0f/RX_PULSESHAPER_4800_GAIN)*1.414f/sqrtf(power);
+#if defined(SPANDSP_USE_FIXED_POINT)
+ s->agc_scaling = (float) FP_FACTOR*32768.0f*(1.0f/RX_PULSESHAPER_4800_GAIN)*1.414f/sqrtf(power);
#else
s->agc_scaling = (1.0f/RX_PULSESHAPER_4800_GAIN)*1.414f/sqrtf(power);
#endif
@@ -883,8 +894,11 @@
zi.re += (int32_t) rx_pulseshaper_4800[step][j].re*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
zi.im += (int32_t) rx_pulseshaper_4800[step][j].im*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
}
- sample.re = zi.re*s->agc_scaling;
- sample.im = zi.im*s->agc_scaling;
+ sample.re = ((int32_t) zi.re*(int32_t) s->agc_scaling) >> 15;
+ sample.im = ((int32_t) zi.im*(int32_t) s->agc_scaling) >> 15;
+ z = dds_lookup_complexi16(s->carrier_phase);
+ zz.re = ((int32_t) sample.re*(int32_t) z.re - (int32_t) sample.im*(int32_t) z.im) >> 15;
+ zz.im = ((int32_t) -sample.re*(int32_t) z.im - (int32_t) sample.im*(int32_t) z.re) >> 15;
#else
zz.re = rx_pulseshaper_4800[step][0].re*s->rrc_filter[s->rrc_filter_step];
zz.im = rx_pulseshaper_4800[step][0].im*s->rrc_filter[s->rrc_filter_step];
@@ -895,16 +909,17 @@
}
sample.re = zz.re*s->agc_scaling;
sample.im = zz.im*s->agc_scaling;
-#endif
- /* Shift to baseband - since this is done in a full complex form, the
- result is clean, and requires no further filtering, apart from the
- equalizer. */
z = dds_lookup_complexf(s->carrier_phase);
zz.re = sample.re*z.re - sample.im*z.im;
zz.im = -sample.re*z.im - sample.im*z.re;
+#endif
process_half_baud(s, &zz);
}
- dds_advancef(&(s->carrier_phase), s->carrier_phase_rate);
+#if defined(SPANDSP_USE_FIXED_POINT)
+ dds_advance(&s->carrier_phase, s->carrier_phase_rate);
+#else
+ dds_advancef(&s->carrier_phase, s->carrier_phase_rate);
+#endif
}
}
else
@@ -990,8 +1005,8 @@
if (s->training_stage == TRAINING_STAGE_SYMBOL_ACQUISITION)
{
/* Only AGC during the initial training */
-#if defined(SPANDSP_USE_FIXED_POINTx)
- s->agc_scaling = (float) FP_FACTOR*(1.0f/RX_PULSESHAPER_2400_GAIN)*1.414f/sqrtf(power);
+#if defined(SPANDSP_USE_FIXED_POINT)
+ s->agc_scaling = (float) FP_FACTOR*32768.0f*(1.0f/RX_PULSESHAPER_2400_GAIN)*1.414f/sqrtf(power);
#else
s->agc_scaling = (1.0f/RX_PULSESHAPER_2400_GAIN)*1.414f/sqrtf(power);
#endif
@@ -1012,8 +1027,11 @@
zi.re += (int32_t) rx_pulseshaper_2400[step][j].re*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
zi.im += (int32_t) rx_pulseshaper_2400[step][j].im*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
}
- sample.re = zi.re*s->agc_scaling;
- sample.im = zi.im*s->agc_scaling;
+ sample.re = ((int32_t) zi.re*(int32_t) s->agc_scaling) >> 15;
+ sample.im = ((int32_t) zi.im*(int32_t) s->agc_scaling) >> 15;
+ z = dds_lookup_complexi16(s->carrier_phase);
+ zz.re = ((int32_t) sample.re*(int32_t) z.re - (int32_t) sample.im*(int32_t) z.im) >> 15;
+ zz.im = ((int32_t) -sample.re*(int32_t) z.im - (int32_t) sample.im*(int32_t) z.re) >> 15;
#else
zz.re = rx_pulseshaper_2400[step][0].re*s->rrc_filter[s->rrc_filter_step];
zz.im = rx_pulseshaper_2400[step][0].im*s->rrc_filter[s->rrc_filter_step];
@@ -1024,16 +1042,17 @@
}
sample.re = zz.re*s->agc_scaling;
sample.im = zz.im*s->agc_scaling;
-#endif
- /* Shift to baseband - since this is done in a full complex form, the
- result is clean, and requires no further filtering apart from the
- equalizer. */
z = dds_lookup_complexf(s->carrier_phase);
zz.re = sample.re*z.re - sample.im*z.im;
zz.im = -sample.re*z.im - sample.im*z.re;
+#endif
process_half_baud(s, &zz);
}
- dds_advancef(&(s->carrier_phase), s->carrier_phase_rate);
+#if defined(SPANDSP_USE_FIXED_POINT)
+ dds_advance(&s->carrier_phase, s->carrier_phase_rate);
+#else
+ dds_advancef(&s->carrier_phase, s->carrier_phase_rate);
+#endif
}
}
return 0;
@@ -1103,7 +1122,7 @@
{
s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
#if defined(SPANDSP_USE_FIXED_POINTx)
- s->agc_scaling = (float) FP_FACTOR*0.005f/RX_PULSESHAPER_4800_GAIN;
+ s->agc_scaling = (float) FP_FACTOR*32768.0f*0.005f/RX_PULSESHAPER_4800_GAIN;
#else
s->agc_scaling = 0.005f/RX_PULSESHAPER_4800_GAIN;
#endif
Modified: freeswitch/trunk/libs/spandsp/src/v29rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29rx.c Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29rx.c,v 1.138 2008/09/13 15:48:04 steveu Exp $
+ * $Id: v29rx.c,v 1.140 2008/09/16 14:12:23 steveu Exp $
*/
/*! \file */
@@ -65,19 +65,19 @@
#include "v29rx_floating_rrc.h"
#endif
-#define CARRIER_NOMINAL_FREQ 1700.0f
-#define BAUD_RATE 2400
-#define EQUALIZER_DELTA 0.21f
+#define CARRIER_NOMINAL_FREQ 1700.0f
+#define BAUD_RATE 2400
+#define EQUALIZER_DELTA 0.21f
#if defined(SPANDSP_USE_FIXED_POINT)
-#define FP_FACTOR 4096
-#define FP_SHIFT_FACTOR 12
+#define FP_FACTOR 4096
+#define FP_SHIFT_FACTOR 12
#endif
/* Segments of the training sequence */
-#define V29_TRAINING_SEG_2_LEN 128
-#define V29_TRAINING_SEG_3_LEN 384
-#define V29_TRAINING_SEG_4_LEN 48
+#define V29_TRAINING_SEG_2_LEN 128
+#define V29_TRAINING_SEG_3_LEN 384
+#define V29_TRAINING_SEG_4_LEN 48
enum
{
@@ -146,6 +146,12 @@
}
/*- End of function --------------------------------------------------------*/
+float v29_rx_signal_power(v29_rx_state_t *s)
+{
+ return power_meter_current_dbm0(&s->power);
+}
+/*- End of function --------------------------------------------------------*/
+
void v29_rx_signal_cutoff(v29_rx_state_t *s, float cutoff)
{
/* The 0.4 factor allows for the gain of the DC blocker */
@@ -154,9 +160,12 @@
}
/*- End of function --------------------------------------------------------*/
-float v29_rx_signal_power(v29_rx_state_t *s)
+static void report_status_change(v29_rx_state_t *s, int status)
{
- return power_meter_current_dbm0(&s->power);
+ if (s->status_handler)
+ s->status_handler(s->status_user_data, status);
+ else if (s->put_bit)
+ s->put_bit(s->put_bit_user_data, status);
}
/*- End of function --------------------------------------------------------*/
@@ -171,15 +180,6 @@
}
/*- End of function --------------------------------------------------------*/
-static void report_status_change(v29_rx_state_t *s, int status)
-{
- if (s->status_handler)
- s->status_handler(s->status_user_data, status);
- else if (s->put_bit)
- s->put_bit(s->put_bit_user_data, status);
-}
-/*- End of function --------------------------------------------------------*/
-
static void equalizer_save(v29_rx_state_t *s)
{
#if defined(SPANDSP_USE_FIXED_POINT)
@@ -519,7 +519,7 @@
v = (((s->symbol_sync_low[1] >> 5)*(s->symbol_sync_high[1] >> 4)) >> 15)*SYNC_CROSS_CORR_COEFF_A
+ (((s->symbol_sync_low[0] >> 5)*(s->symbol_sync_high[1] >> 4)) >> 15)*SYNC_CROSS_CORR_COEFF_B
+ (((s->symbol_sync_low[1] >> 5)*(s->symbol_sync_high[0] >> 4)) >> 15)*SYNC_CROSS_CORR_COEFF_C;
- /* Filter away any DC component */
+ /* Filter away any DC component */
p = v - s->symbol_sync_dc_filter[1];
s->symbol_sync_dc_filter[1] = s->symbol_sync_dc_filter[0];
s->symbol_sync_dc_filter[0] = v;
@@ -541,7 +541,7 @@
v = s->symbol_sync_low[1]*s->symbol_sync_high[1]*SYNC_CROSS_CORR_COEFF_A
+ s->symbol_sync_low[0]*s->symbol_sync_high[1]*SYNC_CROSS_CORR_COEFF_B
+ s->symbol_sync_low[1]*s->symbol_sync_high[0]*SYNC_CROSS_CORR_COEFF_C;
- /* Filter away any DC component */
+ /* Filter away any DC component */
p = v - s->symbol_sync_dc_filter[1];
s->symbol_sync_dc_filter[1] = s->symbol_sync_dc_filter[0];
s->symbol_sync_dc_filter[0] = v;
@@ -1026,7 +1026,11 @@
#endif
process_half_baud(s, &zz);
}
- dds_advancef(&(s->carrier_phase), s->carrier_phase_rate);
+#if defined(SPANDSP_USE_FIXED_POINT)
+ dds_advance(&s->carrier_phase, s->carrier_phase_rate);
+#else
+ dds_advancef(&s->carrier_phase, s->carrier_phase_rate);
+#endif
}
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/vector_float.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/vector_float.c (original)
+++ freeswitch/trunk/libs/spandsp/src/vector_float.c Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_float.c,v 1.11 2008/07/02 14:48:26 steveu Exp $
+ * $Id: vector_float.c,v 1.12 2008/09/16 15:21:52 steveu Exp $
*/
/*! \file */
@@ -44,6 +44,32 @@
#endif
#include <assert.h>
+#if defined(SPANDSP_USE_MMX)
+#include <mmintrin.h>
+#endif
+#if defined(SPANDSP_USE_SSE)
+#include <xmmintrin.h>
+#endif
+#if defined(SPANDSP_USE_SSE2)
+#include <emmintrin.h>
+#endif
+#if defined(SPANDSP_USE_SSE3)
+#include <pmmintrin.h>
+#include <tmmintrin.h>
+#endif
+#if defined(SPANDSP_USE_SSE4_1)
+#include <smmintrin.h>
+#endif
+#if defined(SPANDSP_USE_SSE4_2)
+#include <nmmintrin.h>
+#endif
+#if defined(SPANDSP_USE_SSE4A)
+#include <ammintrin.h>
+#endif
+#if defined(SPANDSP_USE_SSE5)
+#include <bmmintrin.h>
+#endif
+
#include "spandsp/telephony.h"
#include "spandsp/vector_float.h"
@@ -100,7 +126,7 @@
int i;
for (i = 0; i < n; i++)
- z[i] = 0.0;
+ z[i] = 0.0L;
}
/*- End of function --------------------------------------------------------*/
#endif
@@ -306,6 +332,41 @@
/*- End of function --------------------------------------------------------*/
#endif
+#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
+float vec_dot_prodf(const float x[], const float y[], int n)
+{
+ int i;
+ float z;
+ __m128 num1, num2, num3, num4;
+
+ z = 0.0f;
+ if ((i = n & ~3))
+ {
+ num4 = _mm_setzero_ps(); //sets sum to zero
+ for (i -= 4; i >= 0; i -= 4)
+ {
+ num1 = _mm_loadu_ps(x + i);
+ num2 = _mm_loadu_ps(y + i);
+ num3 = _mm_mul_ps(num1, num2);
+ num4 = _mm_add_ps(num4, num3);
+ }
+ num4 = _mm_add_ps(_mm_movehl_ps(num4, num4), num4);
+ num4 = _mm_add_ss(_mm_shuffle_ps(num4, num4, 1), num4);
+ _mm_store_ss(&z, num4);
+ }
+ /* Now deal with the last 1 to 3 elements, which don't fill in an SSE2 register */
+ switch (n & 3)
+ {
+ case 3:
+ z += x[n - 3]*y[n - 3];
+ case 2:
+ z += x[n - 2]*y[n - 2];
+ case 1:
+ z += x[n - 1]*y[n - 1];
+ }
+ return z;
+}
+#else
float vec_dot_prodf(const float x[], const float y[], int n)
{
int i;
@@ -317,6 +378,7 @@
return z;
}
/*- End of function --------------------------------------------------------*/
+#endif
double vec_dot_prod(const double x[], const double y[], int n)
{
@@ -336,7 +398,7 @@
int i;
long double z;
- z = 0.0;
+ z = 0.0L;
for (i = 0; i < n; i++)
z += x[i]*y[i];
return z;
Modified: freeswitch/trunk/libs/spandsp/src/vector_int.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/vector_int.c (original)
+++ freeswitch/trunk/libs/spandsp/src/vector_int.c Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_int.c,v 1.12 2008/09/01 16:07:34 steveu Exp $
+ * $Id: vector_int.c,v 1.13 2008/09/16 15:21:52 steveu Exp $
*/
/*! \file */
@@ -51,7 +51,7 @@
{
int32_t z;
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
__asm__ __volatile__(
" emms;\n"
" pxor %%mm0,%%mm0;\n"
@@ -162,7 +162,7 @@
int32_t vec_min_maxi16(const int16_t x[], int n, int16_t out[])
{
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
static const int32_t lower_bound = 0x80008000;
static const int32_t upper_bound = 0x7FFF7FFF;
int32_t max;
Modified: freeswitch/trunk/libs/spandsp/tests/at_interpreter_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/at_interpreter_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/at_interpreter_tests.c Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: at_interpreter_tests.c,v 1.18 2008/08/17 16:25:52 steveu Exp $
+ * $Id: at_interpreter_tests.c,v 1.19 2008/09/16 12:45:25 steveu Exp $
*/
/*! \file */
@@ -350,7 +350,7 @@
{"AT+VTX\r", "\r\nOK\r\n"}, /* V.253 10.1.6 - Transmit data state */
{"AT+WS46\r", "\r\nOK\r\n"}, /* 3GPP TS 27.007 5.9 - PCCA STD-101 [17] select wireless network */
{"ATA\r", "\r\nERROR\r\n"}, /* V.250 6.3.5 - Answer */
- {"ATDT -1234567890ABCDPSTW*#+,!@\r", ""}, /* V.250 6.3.1 - Dial */
+ {"ATDT -1234567890ABCDPSTW*#+,!@\r;", ""}, /* V.250 6.3.1 - Dial */
{"ATE1\r", "\r\nOK\r\n"}, /* V.250 6.2.4 - Command echo */
{"ATE0\r", "ATE0\r\r\nOK\r\n"}, /* V.250 6.2.4 - Command echo */
{"ATH\r", "\r\nOK\r\n"}, /* V.250 6.3.6 - Hook control */
Modified: freeswitch/trunk/libs/spandsp/tests/vector_float_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/vector_float_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/vector_float_tests.c Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_float_tests.c,v 1.9 2008/05/13 13:17:27 steveu Exp $
+ * $Id: vector_float_tests.c,v 1.10 2008/09/16 15:21:52 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -49,26 +49,82 @@
}
/*- End of function --------------------------------------------------------*/
-int main(int argc, char *argv[])
+static int test_vec_dot_prod(void)
{
int i;
double x[100];
double y[100];
double zsa;
double zsb;
+ double ratio;
for (i = 0; i < 99; i++)
{
x[i] = rand();
y[i] = rand();
}
- zsa = vec_dot_prod(x, y, 99);
- zsb = vec_dot_prod_dumb(x, y, 99);
- if (zsa != zsb)
+ for (i = 1; i < 99; i++)
{
- printf("Tests failed\n");
- exit(2);
+ zsa = vec_dot_prod(x, y, i);
+ zsb = vec_dot_prod_dumb(x, y, i);
+ ratio = zsa/zsb;
+ if (ratio < 0.9999 || ratio > 1.0001)
+ {
+ printf("vec_dot_prod() - %f %f\n", zsa, zsb);
+ printf("Tests failed\n");
+ exit(2);
+ }
}
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static float vec_dot_prodf_dumb(const float x[], const float y[], int n)
+{
+ int i;
+ float z;
+
+ z = 0.0;
+ for (i = 0; i < n; i++)
+ z += x[i]*y[i];
+ return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int test_vec_dot_prodf(void)
+{
+ int i;
+ float x[100];
+ float y[100];
+ float zsa;
+ float zsb;
+ float ratio;
+
+ for (i = 0; i < 99; i++)
+ {
+ x[i] = rand();
+ y[i] = rand();
+ }
+ for (i = 1; i < 99; i++)
+ {
+ zsa = vec_dot_prodf(x, y, i);
+ zsb = vec_dot_prodf_dumb(x, y, i);
+ ratio = zsa/zsb;
+ if (ratio < 0.9999f || ratio > 1.0001f)
+ {
+ printf("vec_dot_prodf() - %e %e\n", zsa, zsb);
+ printf("Tests failed\n");
+ exit(2);
+ }
+ }
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+ test_vec_dot_prod();
+ test_vec_dot_prodf();
printf("Tests passed.\n");
return 0;
Modified: freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c Tue Sep 30 23:56:17 2008
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_int_tests.c,v 1.8 2008/05/13 13:17:27 steveu Exp $
+ * $Id: vector_int_tests.c,v 1.9 2008/09/16 15:21:52 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -44,8 +44,36 @@
z = 0;
for (i = 0; i < n; i++)
- z += x[i]*y[i];
- return z;
+ z += (int32_t) x[i]*(int32_t) y[i];
+ return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int test_vec_dot_prodi16(void)
+{
+ int i;
+ int32_t za;
+ int32_t zb;
+ int16_t x[99];
+ int16_t y[99];
+
+ for (i = 0; i < 99; i++)
+ {
+ x[i] = rand();
+ y[i] = rand();
+ }
+
+ for (i = 1; i < 99; i++)
+ {
+ za = vec_dot_prodi16(x, y, i);
+ zb = vec_dot_prodi16_dumb(x, y, i);
+ if (za != zb)
+ {
+ printf("Tests failed\n");
+ exit(2);
+ }
+ }
+ return 0;
}
/*- End of function --------------------------------------------------------*/
@@ -79,7 +107,7 @@
}
/*- End of function --------------------------------------------------------*/
-int main(int argc, char *argv[])
+static int test_vec_min_maxi16(void)
{
int i;
int32_t za;
@@ -95,14 +123,6 @@
y[i] = rand();
}
- za = vec_dot_prodi16(x, y, 99);
- zb = vec_dot_prodi16_dumb(x, y, 99);
- if (za != zb)
- {
- printf("Tests failed\n");
- exit(2);
- }
-
x[42] = -32768;
za = vec_min_maxi16_dumb(x, 99, outa);
zb = vec_min_maxi16(x, 99, outb);
@@ -115,6 +135,15 @@
printf("Tests failed\n");
exit(2);
}
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+ test_vec_dot_prodi16();
+ test_vec_min_maxi16();
+
printf("Tests passed.\n");
return 0;
}
1
0
[commit] r9768 - in freeswitch/trunk/libs/spandsp: . spandsp src src/spandsp tests
by Freeswitch SVN 01 Oct '08
by Freeswitch SVN 01 Oct '08
01 Oct '08
Author: anthm
Date: Tue Sep 30 23:54:17 2008
New Revision: 9768
Modified:
freeswitch/trunk/libs/spandsp/.update
freeswitch/trunk/libs/spandsp/config-h.in
freeswitch/trunk/libs/spandsp/configure.ac
freeswitch/trunk/libs/spandsp/spandsp/tsb85.xml
freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/version.h
freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
freeswitch/trunk/libs/spandsp/src/v29rx.c
freeswitch/trunk/libs/spandsp/tests/fax_tester.c
freeswitch/trunk/libs/spandsp/tests/fax_tester.h
freeswitch/trunk/libs/spandsp/tests/t31_tests.c
freeswitch/trunk/libs/spandsp/tests/tsb85_tests.c
Log:
update to snapshot spandsp-20080913.tar.gz
Modified: freeswitch/trunk/libs/spandsp/.update
==============================================================================
--- freeswitch/trunk/libs/spandsp/.update (original)
+++ freeswitch/trunk/libs/spandsp/.update Tue Sep 30 23:54:17 2008
@@ -1 +1 @@
-Tue Sep 30 23:52:21 EDT 2008
+Tue Sep 30 23:53:44 EDT 2008
Modified: freeswitch/trunk/libs/spandsp/config-h.in
==============================================================================
--- freeswitch/trunk/libs/spandsp/config-h.in (original)
+++ freeswitch/trunk/libs/spandsp/config-h.in Tue Sep 30 23:54:17 2008
@@ -212,9 +212,6 @@
/* Define to 1 if you have the <tiffio.h> header file. */
#undef HAVE_TIFFIO_H
-/* Define to 1 if you have the <unicall.h> header file. */
-#undef HAVE_UNICALL_H
-
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
Modified: freeswitch/trunk/libs/spandsp/configure.ac
==============================================================================
--- freeswitch/trunk/libs/spandsp/configure.ac (original)
+++ freeswitch/trunk/libs/spandsp/configure.ac Tue Sep 30 23:54:17 2008
@@ -16,7 +16,7 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-# $Id: configure.ac,v 1.56 2008/07/10 12:44:54 steveu Exp $
+# $Id: configure.ac,v 1.57 2008/09/12 14:41:55 steveu Exp $
# @start 1
@@ -180,7 +180,6 @@
AC_CHECK_HEADERS([fftw3.h], , [AC_CHECK_HEADERS([fftw.h])])
AC_CHECK_HEADERS([tiffio.h])
AC_CHECK_HEADERS([pthread.h])
-AC_CHECK_HEADERS([unicall.h])
if test "${build}" == "${host}"
then
AC_CHECK_HEADERS([X11/X.h])
@@ -273,7 +272,6 @@
AC_CHECK_LIB([fftw3], [fftw_plan_dft_1d], TESTLIBS="$TESTLIBS -lfftw3", [AC_CHECK_LIB([fftw], [fftw_create_plan], TESTLIBS="$TESTLIBS -lfftw")])
AC_CHECK_LIB([pthread], [pthread_attr_init], TESTLIBS="$TESTLIBS -lpthread")
AC_CHECK_LIB([dl], [dlopen], TESTLIBS="$TESTLIBS -ldl")
- AC_CHECK_LIB([unicall], [uc_start], TESTLIBS="$TESTLIBS -lunicall",, -ltiff -ldl)
AC_CHECK_LIB([Xft], [XftFontOpen], TESTLIBS="$TESTLIBS -lXft",, $TESTLIBS)
AC_CHECK_LIB([Xext], [XextCreateExtension], TESTLIBS="$TESTLIBS -lXext",, $TESTLIBS)
AC_CHECK_LIB([X11], [XOpenDisplay], TESTLIBS="$TESTLIBS -lX11",, $TESTLIBS)
Modified: freeswitch/trunk/libs/spandsp/spandsp/tsb85.xml
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp/tsb85.xml (original)
+++ freeswitch/trunk/libs/spandsp/spandsp/tsb85.xml Tue Sep 30 23:54:17 2008
@@ -1,7 +1,10 @@
<?xml version="1.0"?>
<!DOCTYPE fax-tests SYSTEM "./fax-tests.dtd">
<fax-tests>
-<!-- $Id: tsb85.xml,v 1.20 2008/09/11 15:13:42 steveu Exp $ -->
+<!-- $Id: tsb85.xml,v 1.21 2008/09/12 14:41:55 steveu Exp $ -->
+<config>
+ <path type="IMAGE" value="../test-data/etsi/fax"/>
+</config>
<messages>
<!-- TCF = 2700 bytes at 14400, 2250 at 12000, 1800 at 9600, 1350 at 7200, 900 at 4800 or 450 at 2400 -->
<!-- Bad TCF == 10101010.... -->
@@ -1330,25 +1333,26 @@
<step dir="R" type="HDLC" modem="V.21" tag="CFR" value="FF C8 21"/>
<step dir="R" type="SILENCE"/>
+ <!-- First page -->
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
+ <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
+ <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
@@ -1356,19 +1360,19 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="100"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" block="1" crc_error="356"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-MPS" value="FF C8 7D 72 00 80 6B"/>
+ <step dir="T" type="HDLC" tag="PPS-MPS" value="FF C8 7D 72 00 80 3B"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 FF FF FF FF"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" block="1"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1378,6 +1382,7 @@
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
<step dir="R" type="SILENCE"/>
+ <!-- Second page -->
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="214"/>
@@ -1412,39 +1417,6 @@
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
- <step dir="T" type="POSTAMBLE"/>
- <step type="WAIT" value="75"/>
- <step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-EOP" value="FF C8 7D 74 40 00 6B"/>
- <step dir="T" type="POSTAMBLE"/>
-
- <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
- <step dir="R" type="SILENCE"/>
-
- <step type="WAIT" value="75"/>
- <step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
- <step dir="T" type="POSTAMBLE"/>
- <step type="WAIT" value="75"/>
- <step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-EOP" value="FF C8 7D 74 40 00 6B"/>
- <step dir="T" type="POSTAMBLE"/>
-
- <possible-step>
- <step dir="R" type="HDLC" modem="V.21" tag="RNR" value="FF C8 37"/>
- <step dir="R" type="SILENCE"/>
-
- <step type="WAIT" value="75"/>
- <step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="RR" value="FF C8 76"/>
- <step dir="T" type="POSTAMBLE"/>
- </possible-step>
-
- <step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
-
- <step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DCN" value="FF C8 5F"/>
<step dir="T" type="POSTAMBLE"/>
@@ -1629,7 +1601,7 @@
<step dir="T" type="POSTAMBLE"/>
</possible-step>
- <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
@@ -1651,7 +1623,7 @@
<step dir="T" type="POSTAMBLE"/>
</possible-step>
- <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
@@ -1673,7 +1645,7 @@
<step dir="T" type="POSTAMBLE"/>
</possible-step>
- <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
@@ -1695,7 +1667,7 @@
<step dir="T" type="POSTAMBLE"/>
</possible-step>
- <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
@@ -1759,7 +1731,7 @@
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
+ <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
<step dir="T" type="POSTAMBLE"/>
<possible-step>
@@ -1781,7 +1753,7 @@
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
+ <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
<step dir="T" type="POSTAMBLE"/>
<possible-step>
@@ -1794,7 +1766,7 @@
<step dir="T" type="POSTAMBLE"/>
</possible-step>
- <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
@@ -1803,7 +1775,7 @@
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
+ <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
<step dir="T" type="POSTAMBLE"/>
<possible-step>
@@ -1816,7 +1788,7 @@
<step dir="T" type="POSTAMBLE"/>
</possible-step>
- <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
@@ -1825,7 +1797,7 @@
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
+ <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
<step dir="T" type="POSTAMBLE"/>
<possible-step>
@@ -1838,7 +1810,7 @@
<step dir="T" type="POSTAMBLE"/>
</possible-step>
- <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
@@ -1847,7 +1819,7 @@
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 6B"/>
+ <step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 FF"/>
<step dir="T" type="POSTAMBLE"/>
<possible-step>
@@ -1860,7 +1832,7 @@
<step dir="T" type="POSTAMBLE"/>
</possible-step>
- <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 FF FF FF FF FF"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h Tue Sep 30 23:54:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_rx.h,v 1.48 2008/09/08 12:54:32 steveu Exp $
+ * $Id: v27ter_rx.h,v 1.49 2008/09/13 14:59:31 steveu Exp $
*/
/*! \file */
@@ -128,10 +128,17 @@
int32_t carrier_phase_rate;
/*! \brief The carrier update rate saved for reuse when using short training. */
int32_t carrier_phase_rate_save;
+#if defined(SPANDSP_USE_FIXED_POINTx)
+ /*! \brief The proportional part of the carrier tracking filter. */
+ float carrier_track_p;
+ /*! \brief The integral part of the carrier tracking filter. */
+ float carrier_track_i;
+#else
/*! \brief The proportional part of the carrier tracking filter. */
float carrier_track_p;
/*! \brief The integral part of the carrier tracking filter. */
float carrier_track_i;
+#endif
/*! \brief A power meter, to measure the HPF'ed signal power in the channel. */
power_meter_t power;
@@ -139,10 +146,6 @@
int32_t carrier_on_power;
/*! \brief The power meter level at which carrier off is declared. */
int32_t carrier_off_power;
- /*! \brief The scaling factor accessed by the AGC algorithm. */
- float agc_scaling;
- /*! \brief The previous value of agc_scaling, needed to reuse old training. */
- float agc_scaling_save;
/*! \brief The position of the current symbol in the constellation, used for
differential decoding. */
@@ -159,6 +162,11 @@
int baud_half;
#if defined(SPANDSP_USE_FIXED_POINTx)
+ /*! \brief The scaling factor accessed by the AGC algorithm. */
+ float agc_scaling;
+ /*! \brief The previous value of agc_scaling, needed to reuse old training. */
+ float agc_scaling_save;
+
/*! \brief The current delta factor for updating the equalizer coefficients. */
float eq_delta;
/*! \brief The adaptive equalizer coefficients. */
@@ -168,6 +176,11 @@
/*! \brief The equalizer signal buffer. */
complexi16_t eq_buf[V27TER_EQUALIZER_MASK + 1];
#else
+ /*! \brief The scaling factor accessed by the AGC algorithm. */
+ float agc_scaling;
+ /*! \brief The previous value of agc_scaling, needed to reuse old training. */
+ float agc_scaling_save;
+
/*! \brief The current delta factor for updating the equalizer coefficients. */
float eq_delta;
/*! \brief The adaptive equalizer coefficients. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h Tue Sep 30 23:54:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29rx.h,v 1.59 2008/09/08 12:45:02 steveu Exp $
+ * $Id: v29rx.h,v 1.60 2008/09/13 14:10:31 steveu Exp $
*/
/*! \file */
@@ -196,10 +196,17 @@
int32_t carrier_phase_rate;
/*! \brief The carrier update rate saved for reuse when using short training. */
int32_t carrier_phase_rate_save;
+#if defined(SPANDSP_USE_FIXED_POINT)
+ /*! \brief The proportional part of the carrier tracking filter. */
+ int32_t carrier_track_p;
+ /*! \brief The integral part of the carrier tracking filter. */
+ int32_t carrier_track_i;
+#else
/*! \brief The proportional part of the carrier tracking filter. */
float carrier_track_p;
/*! \brief The integral part of the carrier tracking filter. */
float carrier_track_i;
+#endif
/*! \brief A power meter, to measure the HPF'ed signal power in the channel. */
power_meter_t power;
@@ -207,10 +214,6 @@
int32_t carrier_on_power;
/*! \brief The power meter level at which carrier off is declared. */
int32_t carrier_off_power;
- /*! \brief The scaling factor accessed by the AGC algorithm. */
- float agc_scaling;
- /*! \brief The previous value of agc_scaling, needed to reuse old training. */
- float agc_scaling_save;
/*! \brief The position of the current symbol in the constellation, used for
differential decoding. */
@@ -227,6 +230,11 @@
int baud_half;
#if defined(SPANDSP_USE_FIXED_POINT)
+ /*! \brief The scaling factor accessed by the AGC algorithm. */
+ int32_t agc_scaling;
+ /*! \brief The previous value of agc_scaling, needed to reuse old training. */
+ int32_t agc_scaling_save;
+
/*! \brief The current delta factor for updating the equalizer coefficients. */
int16_t eq_delta;
/*! \brief The adaptive equalizer coefficients. */
@@ -245,6 +253,11 @@
/*! Baud phase for symbol sync. */
int32_t baud_phase;
#else
+ /*! \brief The scaling factor accessed by the AGC algorithm. */
+ float agc_scaling;
+ /*! \brief The previous value of agc_scaling, needed to reuse old training. */
+ float agc_scaling_save;
+
/*! \brief The current delta factor for updating the equalizer coefficients. */
float eq_delta;
/*! \brief The adaptive equalizer coefficients. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/version.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/version.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/version.h Tue Sep 30 23:54:17 2008
@@ -30,8 +30,8 @@
/* The date and time of the version are in UTC form. */
-#define SPANDSP_RELEASE_DATE 20080911
-#define SPANDSP_RELEASE_TIME 151652
+#define SPANDSP_RELEASE_DATE 20080913
+#define SPANDSP_RELEASE_TIME 155039
#endif
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_rx.c Tue Sep 30 23:54:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_rx.c,v 1.101 2008/09/08 13:13:29 steveu Exp $
+ * $Id: v27ter_rx.c,v 1.102 2008/09/13 14:59:30 steveu Exp $
*/
/*! \file */
@@ -323,16 +323,17 @@
/* For small errors the imaginary part of the difference between the actual and the target
positions is proportional to the phase error, for any particular target. However, the
different amplitudes of the various target positions scale things. */
-#if defined(SPANDSP_USE_FIXED_POINTx)
error = z->im*target->re - z->re*target->im;
+
+#if defined(SPANDSP_USE_FIXED_POINTx)
error /= (float) FP_FACTOR;
+ s->carrier_phase_rate += (int32_t) (s->carrier_track_i*error);
+ s->carrier_phase += (int32_t) (s->carrier_track_p*error);
#else
- error = z->im*target->re - z->re*target->im;
-#endif
-
s->carrier_phase_rate += (int32_t) (s->carrier_track_i*error);
s->carrier_phase += (int32_t) (s->carrier_track_p*error);
//span_log(&s->logging, SPAN_LOG_FLOW, "Im = %15.5f f = %15.5f\n", error, dds_frequencyf(s->carrier_phase_rate));
+#endif
}
/*- End of function --------------------------------------------------------*/
@@ -676,8 +677,13 @@
s->constellation_state = (s->bit_rate == 4800) ? 4 : 2;
s->training_count = 0;
s->training_stage = TRAINING_STAGE_TEST_ONES;
+#if defined(SPANDSP_USE_FIXED_POINTx)
+ s->carrier_track_i = 400;
+ s->carrier_track_p = 1000000;
+#else
s->carrier_track_i = 400.0f;
s->carrier_track_p = 1000000.0f;
+#endif
}
break;
case TRAINING_STAGE_TEST_ONES:
@@ -1076,8 +1082,13 @@
#endif
s->carrier_phase = 0;
+#if defined(SPANDSP_USE_FIXED_POINTx)
+ s->carrier_track_i = 200000;
+ s->carrier_track_p = 10000000;
+#else
s->carrier_track_i = 200000.0f;
s->carrier_track_p = 10000000.0f;
+#endif
power_meter_init(&(s->power), 4);
s->constellation_state = 0;
Modified: freeswitch/trunk/libs/spandsp/src/v29rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29rx.c Tue Sep 30 23:54:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29rx.c,v 1.135 2008/09/09 16:13:12 steveu Exp $
+ * $Id: v29rx.c,v 1.138 2008/09/13 15:48:04 steveu Exp $
*/
/*! \file */
@@ -362,7 +362,11 @@
static __inline__ void track_carrier(v29_rx_state_t *s, const complexf_t *z, const complexf_t *target)
#endif
{
+#if defined(SPANDSP_USE_FIXED_POINT)
+ int32_t error;
+#else
float error;
+#endif
/* The initial coarse carrier frequency and phase estimation should have
got us in the right ballpark. Now we need to fine tune fairly quickly,
@@ -377,19 +381,19 @@
different amplitudes of the various target positions scale things. This isn't all bad,
as the angular error for the larger amplitude constellation points is probably
a more reliable indicator, and we are weighting it as such. */
-#if defined(SPANDSP_USE_FIXED_POINT)
error = z->im*target->re - z->re*target->im;
- error /= (float) FP_FACTOR;
-#else
- error = z->im*target->re - z->re*target->im;
-#endif
/* Use a proportional-integral approach to tracking the carrier. The PI
parameters are coarser at first, until we get precisely on target. Then,
the filter will be damped more to keep us on target. */
+#if defined(SPANDSP_USE_FIXED_POINT)
+ s->carrier_phase_rate += ((s->carrier_track_i*error) >> FP_SHIFT_FACTOR);
+ s->carrier_phase += ((s->carrier_track_p*error) >> FP_SHIFT_FACTOR);
+#else
s->carrier_phase_rate += (int32_t) (s->carrier_track_i*error);
s->carrier_phase += (int32_t) (s->carrier_track_p*error);
//span_log(&s->logging, SPAN_LOG_FLOW, "Im = %15.5f f = %15.5f\n", error, dds_frequencyf(s->carrier_phase_rate));
+#endif
}
/*- End of function --------------------------------------------------------*/
@@ -521,7 +525,7 @@
s->symbol_sync_dc_filter[0] = v;
/* A little integration will now filter away much of the noise */
s->baud_phase -= p;
- if (abs(s->baud_phase) > 50*FP_FACTOR)
+ if (abs(s->baud_phase) > 100*FP_FACTOR)
{
if (s->baud_phase > 0)
i = (s->baud_phase > 1000*FP_FACTOR) ? 5 : 1;
@@ -543,7 +547,7 @@
s->symbol_sync_dc_filter[0] = v;
/* A little integration will now filter away much of the noise */
s->baud_phase -= p;
- if (fabsf(s->baud_phase) > 50.0f)
+ if (fabsf(s->baud_phase) > 100.0f)
{
if (s->baud_phase > 0.0f)
i = (s->baud_phase > 1000.0f) ? 5 : 1;
@@ -620,8 +624,13 @@
s->training_stage = TRAINING_STAGE_LOG_PHASE;
s->angles[0] =
s->start_angles[0] = arctan2(z.im, z.re);
+#if defined(SPANDSP_USE_FIXED_POINT)
+ if (s->agc_scaling_save == 0)
+ s->agc_scaling_save = s->agc_scaling;
+#else
if (s->agc_scaling_save == 0.0f)
s->agc_scaling_save = s->agc_scaling;
+#endif
}
break;
case TRAINING_STAGE_LOG_PHASE:
@@ -664,7 +673,11 @@
{
span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
/* Park this modem */
+#if defined(SPANDSP_USE_FIXED_POINT)
+ s->agc_scaling_save = 0;
+#else
s->agc_scaling_save = 0.0f;
+#endif
s->training_stage = TRAINING_STAGE_PARKED;
report_status_change(s, SIG_STATUS_TRAINING_FAILED);
break;
@@ -700,7 +713,11 @@
of a real training sequence. */
span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
/* Park this modem */
+#if defined(SPANDSP_USE_FIXED_POINT)
+ s->agc_scaling_save = 0;
+#else
s->agc_scaling_save = 0.0f;
+#endif
s->training_stage = TRAINING_STAGE_PARKED;
report_status_change(s, SIG_STATUS_TRAINING_FAILED);
}
@@ -717,8 +734,13 @@
{
s->training_stage = TRAINING_STAGE_TRAIN_ON_CDCD_AND_TEST;
s->training_error = 0.0f;
+#if defined(SPANDSP_USE_FIXED_POINT)
+ s->carrier_track_i = 200;
+ s->carrier_track_p = 1000000;
+#else
s->carrier_track_i = 200.0f;
s->carrier_track_p = 1000000.0f;
+#endif
}
break;
case TRAINING_STAGE_TRAIN_ON_CDCD_AND_TEST:
@@ -755,7 +777,11 @@
{
span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (convergence failed)\n");
/* Park this modem */
+#if defined(SPANDSP_USE_FIXED_POINT)
+ s->agc_scaling_save = 0;
+#else
s->agc_scaling_save = 0.0f;
+#endif
s->training_stage = TRAINING_STAGE_PARKED;
report_status_change(s, SIG_STATUS_TRAINING_FAILED);
}
@@ -799,7 +825,11 @@
/* Training has failed */
span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (constellation mismatch %f)\n", s->training_error);
/* Park this modem */
+#if defined(SPANDSP_USE_FIXED_POINT)
+ s->agc_scaling_save = 0;
+#else
s->agc_scaling_save = 0.0f;
+#endif
s->training_stage = TRAINING_STAGE_PARKED;
report_status_change(s, SIG_STATUS_TRAINING_FAILED);
}
@@ -839,7 +869,6 @@
complexi16_t zz;
complexi16_t sample;
int32_t v;
- float y;
#else
complexf_t z;
complexf_t zz;
@@ -930,8 +959,7 @@
v = (int32_t) rx_pulseshaper[step][0].re*(int32_t) s->rrc_filter[s->rrc_filter_step];
for (j = 1; j < V29_RX_FILTER_STEPS; j++)
v += (int32_t) rx_pulseshaper[step][j].re*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
- y = v*s->agc_scaling;
- sample.re = y;
+ sample.re = (v*s->agc_scaling) >> 15;
#else
v = rx_pulseshaper[step][0].re*s->rrc_filter[s->rrc_filter_step];
for (j = 1; j < V29_RX_FILTER_STEPS; j++)
@@ -965,8 +993,8 @@
{
/* Only AGC until we have locked down the setting. */
#if defined(SPANDSP_USE_FIXED_POINT)
- if (s->agc_scaling_save == 0.0f)
- s->agc_scaling = (float) FP_FACTOR*(1.0f/RX_PULSESHAPER_GAIN)*5.0f*0.25f/sqrtf(power);
+ if (s->agc_scaling_save == 0)
+ s->agc_scaling = (float) FP_FACTOR*32768.0f*(1.0f/RX_PULSESHAPER_GAIN)*5.0f*0.25f/sqrtf(power);
#else
if (s->agc_scaling_save == 0.0f)
s->agc_scaling = (1.0f/RX_PULSESHAPER_GAIN)*5.0f*0.25f/sqrtf(power);
@@ -983,7 +1011,7 @@
v = (int32_t) rx_pulseshaper[step][0].im*(int32_t) s->rrc_filter[s->rrc_filter_step];
for (j = 1; j < V29_RX_FILTER_STEPS; j++)
v += (int32_t) rx_pulseshaper[step][j].im*(int32_t) s->rrc_filter[j + s->rrc_filter_step];
- sample.im = v*s->agc_scaling;
+ sample.im = (v*s->agc_scaling) >> 15;
z = dds_lookup_complexi16(s->carrier_phase);
zz.re = ((int32_t) sample.re*(int32_t) z.re - (int32_t) sample.im*(int32_t) z.im) >> 15;
zz.im = ((int32_t) -sample.re*(int32_t) z.im - (int32_t) sample.im*(int32_t) z.re) >> 15;
@@ -1070,16 +1098,22 @@
else
{
s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
- s->agc_scaling_save = 0.0f;
#if defined(SPANDSP_USE_FIXED_POINT)
- s->agc_scaling = (float) FP_FACTOR*0.0017f/RX_PULSESHAPER_GAIN;
+ s->agc_scaling_save = 0;
+ s->agc_scaling = (float) FP_FACTOR*32768.0f*0.0017f/RX_PULSESHAPER_GAIN;
#else
+ s->agc_scaling_save = 0.0f;
s->agc_scaling = 0.0017f/RX_PULSESHAPER_GAIN;
#endif
equalizer_reset(s);
}
+#if defined(SPANDSP_USE_FIXED_POINT)
+ s->carrier_track_i = 8000;
+ s->carrier_track_p = 8000000;
+#else
s->carrier_track_i = 8000.0f;
s->carrier_track_p = 8000000.0f;
+#endif
s->last_sample = 0;
s->eq_skip = 0;
Modified: freeswitch/trunk/libs/spandsp/tests/fax_tester.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/fax_tester.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/fax_tester.c Tue Sep 30 23:54:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax_tester.c,v 1.16 2008/09/09 14:05:55 steveu Exp $
+ * $Id: fax_tester.c,v 1.17 2008/09/12 14:41:55 steveu Exp $
*/
/*! \file */
@@ -217,10 +217,16 @@
}
/*- End of function --------------------------------------------------------*/
-void faxtester_set_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len, int frame_size, int crc_hit)
+void faxtester_set_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len, int block, int frame_size, int crc_hit)
{
+ int start;
+
+ start = 256*frame_size*block;
+ if (len > start + 256*frame_size)
+ len = start + 256*frame_size;
+
s->ecm_frame_size = frame_size;
- s->image_ptr = 0;
+ s->image_ptr = start;
s->image_bit_ptr = 8;
s->image_len = len;
s->image_buffer = buf;
Modified: freeswitch/trunk/libs/spandsp/tests/fax_tester.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/fax_tester.h (original)
+++ freeswitch/trunk/libs/spandsp/tests/fax_tester.h Tue Sep 30 23:54:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax_tester.h,v 1.8 2008/08/13 00:11:30 steveu Exp $
+ * $Id: fax_tester.h,v 1.9 2008/09/12 14:41:55 steveu Exp $
*/
/*! \file */
@@ -179,7 +179,7 @@
void faxtester_set_non_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len);
-void faxtester_set_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len, int frame_size, int crc_hit);
+void faxtester_set_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len, int block, int frame_size, int crc_hit);
/*! Initialise a FAX context.
\brief Initialise a FAX context.
Modified: freeswitch/trunk/libs/spandsp/tests/t31_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t31_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t31_tests.c Tue Sep 30 23:54:17 2008
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t31_tests.c,v 1.62 2008/08/29 09:28:13 steveu Exp $
+ * $Id: t31_tests.c,v 1.63 2008/09/13 14:32:53 steveu Exp $
*/
/*! \file */
@@ -35,6 +35,10 @@
#include "config.h"
#endif
+#if defined(HAVE_FL_FL_H) && defined(HAVE_FL_FL_CARTESIAN_H) && defined(HAVE_FL_FL_AUDIO_METER_H)
+#define ENABLE_GUI
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
Modified: freeswitch/trunk/libs/spandsp/tests/tsb85_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/tsb85_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/tsb85_tests.c Tue Sep 30 23:54:17 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tsb85_tests.c,v 1.23 2008/09/10 16:55:15 steveu Exp $
+ * $Id: tsb85_tests.c,v 1.24 2008/09/12 14:41:55 steveu Exp $
*/
/*! \file */
@@ -84,6 +84,8 @@
uint8_t awaited[1000];
int awaited_len = 0;
+char image_path[1024];
+
t30_exchanged_info_t expected_rx_info;
char next_tx_file[1000];
@@ -629,15 +631,18 @@
xmlChar *timeout;
xmlChar *min_bits;
xmlChar *frame_size;
+ xmlChar *block;
xmlChar *compression;
uint8_t buf[1000];
uint8_t mask[1000];
+ char path[1024];
int i;
int j;
int hdlc;
int short_train;
int min_row_bits;
int ecm_frame_size;
+ int ecm_block;
int compression_type;
int timer;
int len;
@@ -678,6 +683,7 @@
timeout = xmlGetProp(s->cur, (const xmlChar *) "timeout");
min_bits = xmlGetProp(s->cur, (const xmlChar *) "min_bits");
frame_size = xmlGetProp(s->cur, (const xmlChar *) "frame_size");
+ block = xmlGetProp(s->cur, (const xmlChar *) "block");
compression = xmlGetProp(s->cur, (const xmlChar *) "compression");
s->cur = s->cur->next;
@@ -878,7 +884,7 @@
}
else if (strcasecmp((const char *) tag, "TXFILE") == 0)
{
- strcpy(next_tx_file, (const char *) value);
+ sprintf(next_tx_file, "%s/%s", image_path, (const char *) value);
printf("Push '%s'\n", next_tx_file);
}
return 0;
@@ -893,7 +899,10 @@
/* Avoid libtiff 3.8.2 and earlier bug on complex 2D lines. */
t30_set_rx_encoding(t30, T4_COMPRESSION_ITU_T4_1D);
if (value)
- t30_set_tx_file(t30, (const char *) value, -1, -1);
+ {
+ sprintf(path, "%s/%s", image_path, (const char *) value);
+ t30_set_tx_file(t30, path, -1, -1);
+ }
return 0;
}
else if (strcasecmp((const char *) type, "ANSWER") == 0)
@@ -905,7 +914,10 @@
/* Avoid libtiff 3.8.2 and earlier bug on complex 2D lines. */
t30_set_rx_encoding(t30, T4_COMPRESSION_ITU_T4_1D);
if (value)
- t30_set_tx_file(t30, (const char *) value, -1, -1);
+ {
+ sprintf(path, "%s/%s", image_path, (const char *) value);
+ t30_set_tx_file(t30, path, -1, -1);
+ }
return 0;
}
else if (strcasecmp((const char *) type, "CNG") == 0)
@@ -966,11 +978,9 @@
else if (strcasecmp((const char *) type, "MSG") == 0)
{
/* A non-ECM page */
- if (min_bits)
- min_row_bits = atoi((const char *) min_bits);
- else
- min_row_bits = 0;
- if (t4_tx_init(&t4_state, (const char *) value, -1, -1) == NULL)
+ min_row_bits = (min_bits) ? atoi((const char *) min_bits) : 0;
+ sprintf(path, "%s/%s", image_path, (const char *) value);
+ if (t4_tx_init(&t4_state, path, -1, -1) == NULL)
{
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to init T.4 send\n");
exit(2);
@@ -1003,22 +1013,12 @@
}
else if (strcasecmp((const char *) type, "PP") == 0)
{
- if (min_bits)
- min_row_bits = atoi((const char *) min_bits);
- else
- min_row_bits = 0;
- /*endif*/
- if (frame_size)
- ecm_frame_size = atoi((const char *) frame_size);
- else
- ecm_frame_size = 64;
- /*endif*/
- if (crc_error)
- i = atoi((const char *) crc_error);
- else
- i = -1;
- /*endif*/
- if (t4_tx_init(&t4_state, (const char *) value, -1, -1) == NULL)
+ min_row_bits = (min_bits) ? atoi((const char *) min_bits) : 0;
+ ecm_block = (block) ? atoi((const char *) block) : 0;
+ ecm_frame_size = (frame_size) ? atoi((const char *) frame_size) : 64;
+ i = (crc_error) ? atoi((const char *) crc_error) : -1;
+ sprintf(path, "%s/%s", image_path, (const char *) value);
+ if (t4_tx_init(&t4_state, path, -1, -1) == NULL)
{
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to init T.4 send\n");
exit(2);
@@ -1049,7 +1049,7 @@
/*endif*/
t4_tx_end(&t4_state);
span_log(&s->logging, SPAN_LOG_FLOW, "ECM image is %d bytes\n", len);
- faxtester_set_ecm_image_buffer(s, image, len, ecm_frame_size, i);
+ faxtester_set_ecm_image_buffer(s, image, len, ecm_block, ecm_frame_size, i);
}
else
{
@@ -1149,6 +1149,36 @@
}
/*- End of function --------------------------------------------------------*/
+static int parse_config(faxtester_state_t *s, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
+{
+ xmlChar *x;
+ xmlChar *y;
+
+ while (cur)
+ {
+ if (xmlStrcmp(cur->name, (const xmlChar *) "path") == 0)
+ {
+ if ((x = xmlGetProp(cur, (const xmlChar *) "type"))
+ &&
+ (y = xmlGetProp(cur, (const xmlChar *) "value")))
+ {
+ if (strcasecmp((const char *) x, "IMAGE") == 0)
+ {
+ span_log(&s->logging, SPAN_LOG_FLOW, "Found '%s' '%s'\n", (char *) x, (char *) y);
+ strcpy(image_path, (const char *) y);
+ }
+ /*endif*/
+ }
+ /*endif*/
+ }
+ /*endif*/
+ cur = cur->next;
+ }
+ /*endwhile*/
+ return -1;
+}
+/*- End of function --------------------------------------------------------*/
+
static int parse_test_group(faxtester_state_t *s, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, const char *test)
{
xmlChar *x;
@@ -1225,6 +1255,11 @@
/*endif*/
while (cur)
{
+ if (xmlStrcmp(cur->name, (const xmlChar *) "config") == 0)
+ {
+ parse_config(s, doc, ns, cur->xmlChildrenNode);
+ }
+ /*endif*/
if (xmlStrcmp(cur->name, (const xmlChar *) "test-group") == 0)
{
if (parse_test_group(s, doc, ns, cur->xmlChildrenNode, test) == 0)
@@ -1254,6 +1289,7 @@
if (argc > 1)
test_name = argv[1];
+ strcpy(image_path, ".");
faxtester_init(&state, TRUE);
memset(&expected_rx_info, 0, sizeof(expected_rx_info));
span_log_set_level(&state.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME | SPAN_LOG_FLOW);
1
0
[commit] r9767 - in freeswitch/trunk/libs/spandsp: . spandsp src src/spandsp test-data/etsi/fax tests
by Freeswitch SVN 01 Oct '08
by Freeswitch SVN 01 Oct '08
01 Oct '08
Author: anthm
Date: Tue Sep 30 23:52:36 2008
New Revision: 9767
Modified:
freeswitch/trunk/libs/spandsp/.update
freeswitch/trunk/libs/spandsp/spandsp/tones.dtd
freeswitch/trunk/libs/spandsp/spandsp/tsb85.xml
freeswitch/trunk/libs/spandsp/src/dds_int.c
freeswitch/trunk/libs/spandsp/src/spandsp/dds.h
freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h
freeswitch/trunk/libs/spandsp/src/spandsp/version.h
freeswitch/trunk/libs/spandsp/src/t30.c
freeswitch/trunk/libs/spandsp/src/tone_generate.c
freeswitch/trunk/libs/spandsp/test-data/etsi/fax/Makefile.am
freeswitch/trunk/libs/spandsp/test-data/etsi/fax/generate_etsi_300_242_pages.c
freeswitch/trunk/libs/spandsp/tests/tone_generate_tests.c
freeswitch/trunk/libs/spandsp/tests/tsb85_tests.c
freeswitch/trunk/libs/spandsp/tests/tsb85_tests.sh
Log:
update to snapshot spandsp-20080911.tar.gz
Modified: freeswitch/trunk/libs/spandsp/.update
==============================================================================
--- freeswitch/trunk/libs/spandsp/.update (original)
+++ freeswitch/trunk/libs/spandsp/.update Tue Sep 30 23:52:36 2008
@@ -1 +1 @@
-Wed Sep 3 14:32:49 CDT 2008
+Tue Sep 30 23:52:21 EDT 2008
Modified: freeswitch/trunk/libs/spandsp/spandsp/tones.dtd
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp/tones.dtd (original)
+++ freeswitch/trunk/libs/spandsp/spandsp/tones.dtd Tue Sep 30 23:52:36 2008
@@ -35,7 +35,6 @@
<!ELEMENT call-waiting-tone (step)* >
<!ATTLIST call-waiting-tone
domain CDATA #IMPLIED
- type CDATA #IMPLIED
>
<!ELEMENT pay-tone (step)* >
<!ATTLIST pay-tone
@@ -191,5 +190,4 @@
level CDATA #IMPLIED
length CDATA #IMPLIED
recorded-announcement CDATA #IMPLIED
- recognition-length CDATA #IMPLIED
>
Modified: freeswitch/trunk/libs/spandsp/spandsp/tsb85.xml
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp/tsb85.xml (original)
+++ freeswitch/trunk/libs/spandsp/spandsp/tsb85.xml Tue Sep 30 23:52:36 2008
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE fax-tests SYSTEM "./fax-tests.dtd">
<fax-tests>
-<!-- $Id: tsb85.xml,v 1.18 2008/09/09 15:30:43 steveu Exp $ -->
+<!-- $Id: tsb85.xml,v 1.20 2008/09/11 15:13:42 steveu Exp $ -->
<messages>
<!-- TCF = 2700 bytes at 14400, 2250 at 12000, 1800 at 9600, 1350 at 7200, 900 at 4800 or 450 at 2400 -->
<!-- Bad TCF == 10101010.... -->
@@ -11,19 +11,15 @@
<!-- synchronisation sequence == 250ms of zeros. = 450 bytes at 14400, 375 at 12000, 300 at 9600, 225 at 7200, 150 at 4800 or 75 at 2400 -->
<!-- fast HDLC inter-frame flag sequence == 1 flag byte -->
<!-- fast HDLC end flag sequence == 10 flag bytes -->
- <message type="CSI" fif="30 31 32 33 34 35 36 37 38 39 2B 20 20 20 20 20 20 20 20 20"/>
- <message type="TSI" fif="30 31 32 33 34 35 36 37 38 39 2B 20 20 20 20 20 20 20 20 20"/>
- <message type="CIG" fif="30 31 32 33 34 35 36 37 38 39 2B 20 20 20 20 20 20 20 20 20"/>
- <message type="PWD" fif="30 31 32 33 34 35 36 37 38 39 2B 20 20 20 20 20 20 20 20 20"/>
- <message type="SUB" fif="30 31 32 33 34 35 36 37 38 39 2B 20 20 20 20 20 20 20 20 20"/>
- <message type="SEP" fif="30 31 32 33 34 35 36 37 38 39 2B 20 20 20 20 20 20 20 20 20"/>
- <message type="NSF" fif="B5 FF FF"/>
- <message type="NSF" fif="B5 FF FF"/>
- <message type="NSF" fif="B5 FF FF"/>
+ <!-- STAIRSTEP image is 1728x1728 pixels. Its is about 15k, so an average of 68.2 bits per row. To
+ cook it as a 31k page requires a min_bits of 141. To cook it as a 63k page requires a min_bits of
+ 286. To cook it as a 64k page requires a min_bits of 291 -->
</messages>
<test-group name="Annex A - Receive test procedures">
<test name="MRGN01">
+ <!-- Tester calls DUT and sends 2 WHITE pages. DUT should send CSI for this test procedure. -->
<step type="CALL"/>
+ <step dir="T" type="SET" tag="IDENT" value="+0123456789"/>
<!--<step dir="T" type="CNG"/>-->
@@ -31,14 +27,17 @@
<check name="MRGN01M01" desc="receipt of CED"/>
<check name="MRGN01M02" desc="CED is 2.6s to 4s"/>
</step>
- <!--<step dir="R" type="NSF/CSI/DIS">-->
- <step dir="R" type="HDLC" modem="V.21" tag="DIS" value="FF C8 01 ..." timeout="60000">
- <check name="MRGN01M03" desc="receipt of DIS"/>
- <check name="MRGN01M04" desc="CED to DIS silence is 55ms to 95ms"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="NSF" value="FF C0 04 ..." timeout="60000">
<check name="MRGN01M05" desc="preamble is 850ms to 1150ms"/>
- <check name="MRGN01M06" desc="CSI received"/>
<check name="MRGN01M07" desc="NSF and CSI framing"/>
+ </step>
+ <step dir="R" type="HDLC" modem="V.21" tag="CSI" value="FF C0 02 9C 1C EC 6C AC 2C CC 4C 8C 0C D4 04 04 04 04 04 04 04 04 04">
+ <check name="MRGN01M06" desc="CSI received"/>
<check name="MRGN01M08" desc="CSI FIF content"/>
+ </step>
+ <step dir="R" type="HDLC" modem="V.21" tag="DIS" value="FF C8 01 ...">
+ <check name="MRGN01M03" desc="receipt of DIS"/>
+ <check name="MRGN01M04" desc="CED to DIS silence is 55ms to 95ms"/>
<check name="MRGN01M09" desc="DIS framing"/>
<check name="MRGN01M10" desc="DIS FIF content"/>
</step>
@@ -59,7 +58,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MPS" value="FF C8 72"/>
@@ -71,7 +70,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -92,6 +91,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN02">
+ <!-- Tester calls DUT and sends DIAG_1 and DIAG_2 pages. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -111,7 +111,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-diago1.tif">
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_diago1.tif">
<check name="MRGN02M01" desc="decoding of all A4 one dimensional encoding codes"/>
</step>
<step type="WAIT" value="75"/>
@@ -123,7 +123,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-diago2.tif">
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_diago2.tif">
<check name="MRGN02M01" desc="decoding of all A4 one dimensional encoding codes"/>
</step>
<step type="WAIT" value="75"/>
@@ -140,6 +140,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN03">
+ <!-- Tester calls DUT and sends DURATION_1 and DURATION_2 pages. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -159,7 +160,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-duration1.tif">
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_duration1.tif">
<check name="MRGN02M01" desc="Accept 4.9s long scan line"/>
</step>
<step type="WAIT" value="75"/>
@@ -171,7 +172,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-duration2.tif">
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_duration2.tif">
<check name="MRGN02M02" desc="Reject 5.1s long scan line"/>
</step>
<step type="WAIT" value="75"/>
@@ -195,6 +196,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN04">
+ <!-- Tester calls DUT and sends 4.9% ERROR page and one 15.1% ERROR page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -214,7 +216,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-error.tif" bad_rows="
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_error.tif" bad_rows="
79, 85, 105, 111, 133, 137, 157, 163, 183, 189, 209, 215, 235, 248, 261, 267,
287, 293, 313"/>
<step type="WAIT" value="75"/>
@@ -228,7 +230,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-error.tif" bad_rows="
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_error.tif" bad_rows="
79, 85, 105, 111, 133, 137, 157, 163, 183, 189, 209, 215, 235, 248, 261, 267,
287, 293, 313, 73, 76, 88, 91, 94, 99, 102, 117, 120, 125, 128, 143, 146,
151, 154, 169, 172, 177, 180, 195, 198, 203, 206, 221, 224, 229, 232, 247, 250,
@@ -249,6 +251,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN05">
+ <!-- Tester calls DUT and sends 1 IMPRESS page using a low signal intensity. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -268,7 +271,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-impress.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_impress.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -296,6 +299,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN06a">
+ <!-- Tester calls DUT and sends 2 WHITE pages. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -318,7 +322,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="55"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="55"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MPS" value="FF C8 72"/>
@@ -328,7 +332,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="55"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="55"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -343,6 +347,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN06b">
+ <!-- Tester calls DUT and sends 2 WHITE pages. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -365,7 +370,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="5000"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="5000"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MPS" value="FF C8 72"/>
@@ -375,7 +380,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="5000"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="5000"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -390,6 +395,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN07">
+ <!-- Tester calls DUT and sends 1 WHITE page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -421,7 +427,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -436,6 +442,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN08">
+ <!-- Tester calls DUT and sends 1 WHITE page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -471,7 +478,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -486,7 +493,8 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN09">
- <step type="CALL" value="a4-white.tif"/>
+ <!-- Tester calls DUT and sends 2 WHITE pages. -->
+ <step type="CALL" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CED"/>
<step dir="R" type="HDLC" modem="V.21" tag="DIS" value="FF C8 01 ..." timeout="60000"/>
@@ -503,7 +511,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOM" value="FF C8 71"/>
@@ -512,7 +520,7 @@
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
<step dir="R" type="SILENCE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DIS" value="FF C8 01 ..." timeout="60000">
+ <step dir="R" type="HDLC" modem="V.21" tag="DIS" value="FF C8 01 ..." timeout="10000">
<check name="MRGN09M01" desc="Device goes to phase B after receiving EOM"/>
<check name="MRGN09M02" desc="T2 elapses after MCF response to EOM. MCF to DIS interval must be between 5.0s and 7.0s"/>
</step>
@@ -529,7 +537,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -544,6 +552,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN10">
+ <!-- Tester calls DUT and sends 1 WHITE page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -567,7 +576,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -582,6 +591,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN11">
+ <!-- Tester calls DUT and sends 1 WHITE page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -623,7 +633,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -638,6 +648,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN12">
+ <!-- Tester calls DUT and sends 1 WHITE page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -675,7 +686,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -690,6 +701,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN13">
+ <!-- Tester calls DUT and sends 1 WHITE page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -727,7 +739,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -742,6 +754,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN14">
+ <!-- Tester calls DUT and sends 1 WHITE page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -768,7 +781,7 @@
<step dir="T" type="TCF" modem="V.27ter/4800" value="900"/>
<!-- dir="R" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58 | nothing"> -->
- <step type="WAIT" value="5000">
+ <step type="WAIT" value="3450">
<check name="MRGN14M01" desc="One bad FCS DCS command after CFR"/>
</step>
@@ -783,7 +796,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -797,6 +810,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN15">
+ <!-- Tester calls DUT and sends 1 WHITE page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -836,7 +850,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -851,6 +865,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGN16">
+ <!-- Tester calls DUT and sends 2 WHITE pages separately. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -870,7 +885,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOM" value="FF C8 71"/>
@@ -911,7 +926,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MPS" value="FF C8 72"/>
@@ -939,7 +954,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -984,7 +999,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOM" value="FF C8 71" crc_error="0"/>
@@ -1025,7 +1040,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MPS" value="FF C8 72" crc_error="0"/>
@@ -1053,7 +1068,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74" crc_error="0"/>
@@ -1088,6 +1103,7 @@
</test-group>
<test-group name="Annex B - Capability receive test procedures">
<test name="ORGC01">
+ <!-- Tester calls DUT and sends DIAG_1 and DIAG_2 pages. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -1107,7 +1123,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-diago1.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_diago1.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MPS" value="FF C8 72"/>
@@ -1117,7 +1133,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-diago2.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_diago2.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -1132,6 +1148,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="ORGC02">
+ <!-- Tester calls DUT and sends 2 WHITE pages. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -1151,7 +1168,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MPS" value="FF C8 72"/>
@@ -1161,7 +1178,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -1176,6 +1193,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="ORGC03">
+ <!-- Tester calls DUT and sends 1 IMPRESS page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -1195,7 +1213,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-impress.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_impress.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -1212,6 +1230,7 @@
</test-group>
<test-group name="Annex C - ECM receive test procedures">
<test name="OREN01">
+ <!-- Tester calls DUT and sends one 31k byte STAIRSTEP page and one 15k byte STAIRSTEP page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -1232,7 +1251,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-white.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1244,7 +1263,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-white.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1266,7 +1285,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-white.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_white.tif"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1292,6 +1311,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="OREN02">
+ <!-- Tester calls DUT and sends one 31k byte STAIRSTEP page and one 15k byte STAIRSTEP page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -1312,7 +1332,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1324,7 +1344,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="a4-stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1336,7 +1356,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="100"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="100"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1348,7 +1368,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="a4-stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1360,7 +1380,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="214"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="214"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1372,7 +1392,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="a4-stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1393,7 +1413,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1405,7 +1425,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.17/14400"/>
- <step dir="T" type="PP" value="a4-stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1430,6 +1450,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="OREN03">
+ <!-- Tester calls DUT and sends one 15k byte STAIRSTEP page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -1448,7 +1469,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1470,7 +1491,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1492,7 +1513,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1514,7 +1535,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1544,7 +1565,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1570,6 +1591,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="OREN04">
+ <!-- Tester calls DUT and sends one 31k byte STAIRSTEP page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -1590,7 +1612,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1612,7 +1634,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1634,7 +1656,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1656,7 +1678,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1686,7 +1708,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1712,6 +1734,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="OREN05">
+ <!-- Tester calls DUT and sends one 31k byte STAIRSTEP page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -1732,7 +1755,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1754,7 +1777,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1776,7 +1799,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1798,7 +1821,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1820,7 +1843,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="141" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1854,6 +1877,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="OREN06">
+ <!-- Tester calls DUT and sends two 15k byte STAIRSTEP pages. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -1874,7 +1898,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1896,7 +1920,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1918,7 +1942,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1940,7 +1964,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1970,7 +1994,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -1996,6 +2020,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="OREN07">
+ <!-- Tester calls DUT and sends one 15k byte STAIRSTEP page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -2015,7 +2040,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -2037,7 +2062,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -2059,7 +2084,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -2081,7 +2106,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif" crc_error="0"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -2115,6 +2140,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="OREN08">
+ <!-- Tester calls DUT and sends two 15k byte STAIRSTEP pages. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -2135,7 +2161,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -2157,7 +2183,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -2183,6 +2209,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="OREN09">
+ <!-- Tester calls DUT and sends one 64k byte STAIRSTEP page and one 63k byte STAIRSTEP page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -2193,7 +2220,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DCS" value="FF C8 41 00 50 1F 30"/>
+ <step dir="T" type="HDLC" tag="DCS" value="FF C8 41 00 50 0F 20"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="TCF" modem="V.27ter/4800" value="900"/>
@@ -2203,11 +2230,11 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-impress.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="302" frame_size="256"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-MPS" value="FF C8 7D 72 00 00 6B"/>
+ <step dir="T" type="HDLC" tag="PPS-MPS" value="FF C8 7D 72 00 00 FF"/>
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
@@ -2215,11 +2242,11 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-stairstep.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" min_bits="293" frame_size="256"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-EOP" value="FF C8 7D 74 00 00 6B"/>
+ <step dir="T" type="HDLC" tag="PPS-EOP" value="FF C8 7D 74 00 00 EF"/>
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
@@ -2231,6 +2258,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="OREN10">
+ <!-- Tester calls DUT and sends 1 IMPRESS page. -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
@@ -2241,7 +2269,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DCS" value="FF C8 41 00 50 1F 30"/>
+ <step dir="T" type="HDLC" tag="DCS" value="FF C8 41 00 50 0F 22"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="TCF" modem="V.27ter/4800" value="900"/>
@@ -2251,11 +2279,11 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.27ter/4800"/>
- <step dir="T" type="PP" value="a4-impress.tif"/>
+ <step dir="T" type="PP" value="etsi_300_242_a4_impress.tif" frame_size="256" compression="T.6"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="PPS-EOP" value="FF C8 7D 74 00 00 6B"/>
+ <step dir="T" type="HDLC" tag="PPS-EOP" value="FF C8 7D 74 00 00 D2"/>
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
@@ -2269,6 +2297,7 @@
</test-group>
<test-group name="Annex D - Exception receive test procedures">
<test name="MRGX01">
+ <!-- Tester calls DUT -->
<step type="CALL"/>
<step dir="R" type="CED"/>
@@ -2278,6 +2307,7 @@
<step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
</test>
<test name="MRGX02">
+ <!-- Tester calls DUT -->
<step type="CALL"/>
<step dir="R" type="CED"/>
@@ -2290,6 +2320,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGX03">
+ <!-- Tester calls DUT -->
<step type="CALL"/>
<step dir="R" type="CED"/>
@@ -2298,7 +2329,7 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="TCF" modem="V.27ter/4800" value="900"/>
@@ -2308,15 +2339,21 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="TCF" modem="V.27ter/4800" value="900"/>
<step dir="R" type="HDLC" modem="V.21" tag="CFR" value="FF C8 21"/>
<step dir="R" type="SILENCE"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DCN" value="FF C8 5F"/>
+ <step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGX04">
+ <!-- Tester calls DUT -->
<step type="CALL"/>
<step dir="R" type="CED"/>
@@ -2341,6 +2378,7 @@
<step dir="T" type="TCF" modem="V.27ter/4800" value="900"/>
</test>
<test name="MRGX05">
+ <!-- Tester calls DUT -->
<step type="CALL"/>
<step dir="R" type="CED"/>
@@ -2358,7 +2396,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MPS" value="FF C8 72"/>
@@ -2367,7 +2405,7 @@
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
<step dir="R" type="SILENCE"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="3000"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MPS" value="FF C8 72"/>
<step dir="T" type="POSTAMBLE"/>
@@ -2376,6 +2414,7 @@
<step dir="R" type="SILENCE"/>
</test>
<test name="MRGX06">
+ <!-- Tester calls DUT -->
<step type="CALL"/>
<step dir="R" type="CED"/>
@@ -2393,7 +2432,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MPS" value="FF C8 72"/>
@@ -2408,6 +2447,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGX07">
+ <!-- Tester calls DUT -->
<step type="CALL"/>
<step dir="R" type="CED"/>
@@ -2425,7 +2465,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -2440,6 +2480,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGX08">
+ <!-- Tester calls DUT -->
<step type="CALL"/>
<step dir="R" type="CED"/>
@@ -2457,7 +2498,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -2472,6 +2513,7 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MRGX09">
+ <!-- Tester calls DUT -->
<step type="CALL"/>
<step dir="R" type="CED"/>
@@ -2527,7 +2569,7 @@
<step type="WAIT" value="75"/>
<!-- UNKNOWN_BCS_1 -->
- <step dir="T" type="HDLC" tag="GARBAGE" value="FF C0 00"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="GARBAGE" value="FF C0 00"/>
<step dir="T" type="POSTAMBLE"/>
<step dir="T" type="HDLC" tag="DCS" value="FF C8 41 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
@@ -2538,7 +2580,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -2578,7 +2620,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -2611,7 +2653,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<!-- UNKNOWN_BCS_2 -->
<step dir="T" type="PREAMBLE" modem="V.21" value="37"/>
@@ -2657,7 +2699,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<!-- UNKNOWN_BCS_3 -->
<step dir="T" type="PREAMBLE" modem="V.21" value="37"/>
@@ -2692,7 +2734,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<!-- UNKNOWN_BCS_4 -->
<step dir="T" type="PREAMBLE" modem="V.21" value="43"/>
@@ -2717,7 +2759,13 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="CALLER_SET_GROUP"/>
+ <!-- CALLER_SET_GROUP -->
+ <step dir="T" type="PREAMBLE" modem="V.21" value="43"/>
+ <step dir="T" type="HDLC" tag="TSI" value="FF C0 42 9C 1C EC 6C AC 2C CC 4C 8C 0C D4 04 04 04 04 04 04 04 04 04 ..."/>
+ <step dir="T" type="PREAMBLE" value="29"/>
+ <step dir="T" type="HDLC" tag="DCS" value="FF C8 41 00 50 10 01 01 11 01 01 00"/>
+ <step dir="T" type="POSTAMBLE" value="5"/>
+
<step type="WAIT" value="75"/>
<step dir="T" type="TCF" modem="V.27ter/4800" value="900"/>
@@ -2725,7 +2773,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -2772,8 +2820,8 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="HDLC" modem="V.21" tag="NSC" value="FF C0 84 ..."/>
- <step dir="R" type="HDLC" modem="V.21" tag="CIG" value="FF C0 82 9C 1C EC 6C AC 2C CC 4C 8C 0C D4 04 04 04 04 04 04 04 04 04"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DTC" value="FF C8 81 ..."/>
+ <step dir="R" type="HDLC" tag="CIG" value="FF C0 82 9C 1C EC 6C AC 2C CC 4C 8C 0C D4 04 04 04 04 04 04 04 04 04"/>
+ <step dir="R" type="HDLC" tag="DTC" value="FF C8 81 ..."/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
@@ -2787,7 +2835,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/2400" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/2400" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MPS" value="FF C8 72"/>
@@ -2797,7 +2845,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/2400" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
@@ -2824,8 +2872,11 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 80 11 01 01 01 40"/>
+ <step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PWD" value="FF C0 83 ..."/>
+ <step dir="R" type="HDLC" modem="V.21" tag="NSC" value="FF C0 84 ..."/>
+ <step dir="R" type="HDLC" modem="V.21" tag="CIG" value="FF C0 82 9C 1C EC 6C AC 2C CC 4C 8C 0C D4 04 04 04 04 04 04 04 04 04"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PWD" value="FF C0 83 0C 8C 4C CC 2C AC 6C EC 1C 9C D4 04 04 04 04 04 04 04 04 04"/>
<step dir="R" type="HDLC" tag="DTC" value="FF C8 81 ..."/>
<step dir="R" type="SILENCE"/>
@@ -2834,39 +2885,41 @@
<step dir="T" type="HDLC" tag="DCS" value="FF C8 41 00 00 00"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="TCF" modem="V.27ter/4800" value="900"/>
+ <step dir="T" type="TCF" modem="V.27ter/2400" value="900"/>
- <step dir="R" type="HDLC" modem="V.21" tag="CFR" value="FF C8 21"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="CFR+" value="FF C8 A1"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/2400" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MPS" value="FF C8 72"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MCF+" value="FF C8 B1"/>
+ <step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/2400" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOP" value="FF C8 74"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MCF+" value="FF C8 B1"/>
+ <step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DCN" value="FF C8 5F"/>
+ <step dir="T" type="HDLC" tag="DCN+" value="FF C8 DF"/>
<step dir="T" type="POSTAMBLE"/>
</test>
</test-group>
<test-group name="Annex F - Transmit test procedures">
<test name="MTGN01">
<!-- DUT calls tester and sends 1 IMPRESS and 1 WHITE page. DUT should send CNG and TSI. -->
- <step type="ANSWER" value="a4-impress-white.tif"/>
+ <step type="ANSWER" value="etsi_300_242_a4_impress_white.tif"/>
<step dir="T" type="SET" tag="IDENT" value="+0123456789"/>
<step dir="R" type="CNG"/>
@@ -2877,7 +2930,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="TSI+" value="FF C0 C2 ..."/>
+ <step dir="R" type="HDLC" modem="V.21" tag="TSI+" value="FF C0 C2 9C 1C EC 6C AC 2C CC 4C 8C 0C D4 04 04 04 04 04 04 04 04 04 ..."/>
<step dir="R" type="HDLC" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
@@ -2886,8 +2939,8 @@
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" value="a4-impress.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="MSG" modem="V.27ter/4800" timeout="180000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -2895,17 +2948,20 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN02">
- <step type="ANSWER"/>
+ <!-- The DUT is first set up to attempt this transmission using R8x7.7 l/mm. DUT calls tester
+ and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
+ <step dir="T" type="SET" tag="IDENT" value="+0123456789"/>
<step dir="R" type="CNG"/>
@@ -2915,8 +2971,8 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="TSI" value="FF C0 42 ..."/>
- <step dir="R" type="HDLC" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="TSI+" value="FF C0 C2 9C 1C EC 6C AC 2C CC 4C 8C 0C D4 04 04 04 04 04 04 04 04 04 ..."/>
+ <step dir="R" type="HDLC" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -2925,17 +2981,18 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN03">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -2945,7 +3002,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800"/>
<step type="WAIT" value="75"/>
@@ -2954,27 +3011,28 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN04">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 40 20"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -2983,28 +3041,29 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN05">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 40 02"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 02"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -3012,17 +3071,19 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN06">
- <step type="ANSWER"/>
+ <!-- The DUT is configured to attempt this transmission using ECM. DUT calls tester
+ and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3032,7 +3093,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3041,17 +3102,18 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN07">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3061,10 +3123,11 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 00 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN08">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
@@ -3074,7 +3137,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3083,7 +3146,7 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -3091,17 +3154,18 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN09">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3111,7 +3175,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3119,7 +3183,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3128,17 +3192,18 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN10">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3148,21 +3213,23 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58 | nothing"/>
+ <!--<step dir="R" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58 | nothing"/>-->
+ <step type="WAIT" value="3500"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58 | nothing"/>
+ <!--<step dir="R" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58 | nothing"/>-->
+ <step type="WAIT" value="3500"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3171,17 +3238,18 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN11">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3191,30 +3259,31 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="10000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="10000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.29/9600" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN12">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3224,34 +3293,43 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="10000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21" crc_error="0"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.29/9600" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN13">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3261,54 +3339,57 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="60000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.29/9600" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN14">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages separately. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
+ <step dir="T" type="SET" tag="TXFILE" value="etsi_300_242_a4_white.tif"/>
+
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -3317,10 +3398,10 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3329,27 +3410,28 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN15">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages separately. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3357,34 +3439,36 @@
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
+ <step dir="T" type="SET" tag="TXFILE" value="etsi_300_242_a4_white.tif"/>
+
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="5000"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3393,27 +3477,28 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN16">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages separately. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..." timeout="10000"/>
<step dir="R" type="TCF" modem="V.27ter/4800"/>
<step type="WAIT" value="75"/>
@@ -3421,22 +3506,24 @@
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
+ <step dir="T" type="SET" tag="TXFILE" value="etsi_300_242_a4_white.tif"/>
+
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -3445,10 +3532,10 @@
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3457,17 +3544,18 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN17">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
@@ -3477,7 +3565,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3486,9 +3574,9 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -3496,17 +3584,18 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN18">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
@@ -3516,7 +3605,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3525,21 +3614,21 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -3547,17 +3636,18 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN19">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
@@ -3567,8 +3657,8 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -3576,21 +3666,21 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
+ <step dir="T" type="HDLC" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
+ <step dir="T" type="HDLC" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -3598,17 +3688,18 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="POSTAMBLE"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN20">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3618,7 +3709,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3627,19 +3718,20 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN21">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3649,7 +3741,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3658,31 +3750,32 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31" crc_error="0"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN22">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3692,8 +3785,8 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -3701,31 +3794,32 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN23">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages separately. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3735,7 +3829,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3743,12 +3837,14 @@
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
+ <step dir="T" type="SET" tag="TXFILE" value="etsi_300_242_a4_white.tif"/>
+
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="RTP"/>
+ <step dir="T" type="HDLC" tag="RTP" value="FF C8 33"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="2000"/>
@@ -3756,7 +3852,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3765,17 +3861,18 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN24">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
@@ -3785,7 +3882,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3794,33 +3891,34 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="RTP"/>
+ <step dir="T" type="HDLC" tag="RTP" value="FF C8 33"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/2400" timeout="60000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.27ter/2400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN25">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3830,7 +3928,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3839,22 +3937,18 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
-
- <step type="WAIT" value="75"/>
- <step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="RTP"/>
- <step dir="T" type="POSTAMBLE"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="HDLC" tag="RTP" value="FF C8 33"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN26">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages separately. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3864,28 +3958,30 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="T" type="SET" tag="TXFILE" value="etsi_300_242_a4_white.tif"/>
+
+ <step dir="R" type="MSG" modem="V.29/9600" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="RTN"/>
+ <step dir="T" type="HDLC" tag="RTN" value="FF C8 32"/>
<step dir="T" type="POSTAMBLE"/>
- <step type="WAIT" value="2000"/>
+ <step type="WAIT" value="7000"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3894,62 +3990,73 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN27">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="60000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="MSG" modem="V.29/9600" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="RTN"/>
+ <step dir="T" type="HDLC" tag="RTN" value="FF C8 32"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/7200" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <!-- This assumes the FAX entity retransmits the page which was RTN'ed -->
+ <step dir="R" type="MSG" modem="V.29/7200" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="MSG" modem="V.29/7200" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGN28">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3959,8 +4066,8 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -3968,19 +4075,20 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="RTN"/>
+ <step dir="T" type="HDLC" tag="RTN" value="FF C8 32"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
</test-group>
<test-group name="Annex G - Capability transmit tests">
<test name="OTGC01">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 IMPRESS and 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_impress_white.tif"/>
<step dir="R" type="CNG"/>
@@ -3990,7 +4098,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 00 50 00"/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -3998,8 +4106,8 @@
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="MSG" modem="V.27ter/4800" timeout="180000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -4007,36 +4115,37 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="OTGC02">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 IMPRESS and 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_impress_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 40 10"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 10"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" value="a4-impress.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="MSG" modem="V.27ter/4800" timeout="180000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -4044,17 +4153,18 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="OTGC03">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 IMPRESS and 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_impress_white.tif"/>
<step dir="R" type="CNG"/>
@@ -4064,34 +4174,35 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="60000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" value="a4-impress.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="MSG" modem="V.29/9600" timeout="180000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.29/9600" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="OTGC04">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 IMPRESS and 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_impress_white.tif"/>
<step dir="R" type="CNG"/>
@@ -4101,42 +4212,43 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="FTT" value="FF C8 22"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/7200" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" value="a4-impress.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="MSG" modem="V.29/7200" timeout="120000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.29/7200" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="OTGC05">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 IMPRESS and 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_impress_white.tif"/>
<step dir="R" type="CNG"/>
@@ -4146,34 +4258,35 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 76 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="120000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="OTGC06">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 IMPRESS and 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_impress_white.tif"/>
<step dir="R" type="CNG"/>
@@ -4183,34 +4296,35 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 76 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" value="a4-impress.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="120000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="OTGC07">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 IMPRESS and 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_impress_white.tif"/>
<step dir="R" type="CNG"/>
@@ -4220,357 +4334,973 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 76 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="FTT" value="FF C8 22"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/12000" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="FTT" value="FF C8 22"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/9600" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" value="a4-impress.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="MSG" modem="V.17/9600" timeout="120000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.17/9600" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="OTGC08">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 IMPRESS and 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_impress_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 76 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="FTT" value="FF C8 22"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/12000" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="FTT" value="FF C8 22"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/9600" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="FTT" value="FF C8 22"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="MSG" modem="V.29/9600" timeout="180000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.29/9600" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
- <test name="OTGC09">
- <step type="ANSWER"/>
+ <test name="OTGC09-01">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 76 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="60000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
- <test name="OTGC10">
- <step type="ANSWER"/>
+ <test name="OTGC09-02">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 75 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
-
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="60000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="FTT" value="FF C8 22"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="RTP"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+ <test name="OTGC09-03">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 74 10"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="60000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
- <test name="OTGC11">
- <step type="ANSWER"/>
+ <test name="OTGC09-04">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 74 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="60000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" value="a4-impress.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
-</test-group>
-<test-group name="Annex H - ECM transmit test procedures">
- <test name="OTEN01">
- <step type="ANSWER"/>
+ <test name="OTGC09-05">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 1F 20"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 74 A0"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="60000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+ <test name="OTGC09-06">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
+
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 74 50"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="60000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+ <test name="OTGC09-07">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
+
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 74 51 01 C0"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="60000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+ <test name="OTGC09-08">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
+
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 74 51 01 A0"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="60000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+ <test name="OTGC09-09">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
+
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 74 00 01 01 88"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="60000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+ <test name="OTGC09-10">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
+
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 74 00 01 01 28"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="60000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+ <test name="OTGC09-11">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
+
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 74 00 01 01 30"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="60000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+ <test name="OTGC09-12">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
+
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 74 00 01 01 50"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="60000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/14400" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+ <test name="OTGC10">
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
+
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 76 20"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="10000"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/14400" timeout="10000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="FTT" value="FF C8 22"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/12000" timeout="10000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/12000" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RTP" value="FF C8 33"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/9600" timeout="10000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.17/9600" timeout="10000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.17/9600" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+ <test name="OTGC11">
+ <!-- DUT calls tester and sends 1 IMPRESS page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_impress.tif"/>
+
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="MSG" modem="V.27ter/4800" timeout="180000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+</test-group>
+<test-group name="Annex H - ECM transmit test procedures">
+ <test name="OTEN01">
+ <!-- DUT calls tester and sends 1 IMPRESS and 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_impress_white.tif"/>
+
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 1F 20"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="180000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-NULL+" value="FF C8 FD 00 ..."/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="180000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-MPS+" value="FF C8 FD F2 ..."/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+ <test name="OTEN02">
+ <!-- DUT calls tester and sends 1 IMPRESS and 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_impress_white.tif"/>
+
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 1F 20"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="180000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-NULL+" value="FF C8 FD 00 ..."/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-NULL+" value="FF C8 FD 00 ..."/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-MPS+" value="FF C8 FD F2 ..."/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-MPS+" value="FF C8 FD F2 ..."/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="PP" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
+ </test>
+ <test name="OTEN03">
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
+
+ <step dir="R" type="CNG"/>
+
+ <step dir="T" type="CED"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 11 20"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
+
+ <step type="WAIT" value="500"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
+
+ <step type="WAIT" value="500"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
+
+ <step type="WAIT" value="500"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
+
+ <step type="WAIT" value="500"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
+
+ <step type="WAIT" value="500"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
+
+ <step type="WAIT" value="500"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
+
+ <step type="WAIT" value="500"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
+
+ <step type="WAIT" value="500"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" mode="V.21" tag="PPS-NULL" value="FF C8 7D 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" mode="V.21" tag="PPS-MPS" value="FF C8 7D 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
- </test>
- <test name="OTEN02">
- <step type="ANSWER"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
- <step dir="R" type="CNG"/>
+ <step type="WAIT" value="500"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="POSTAMBLE"/>
- <step dir="T" type="CED"/>
- <step type="WAIT" value="75"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
+
+ <step type="WAIT" value="500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 1F 20"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-impress.tif" timeout="60000"/>
- <step dir="R" type="HDLC" mode="V.21" tag="PPS-NULL" value="FF C8 7D 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-impress.tif" timeout="60000"/>
- <step dir="R" type="HDLC" mode="V.21" tag="PPS-NULL" value="FF C8 7D 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-impress.tif" timeout="60000"/>
- <step dir="R" type="HDLC" mode="V.21" tag="PPS-MPS" value="FF C8 7D 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" mode="V.21" tag="PPS-MPS" value="FF C8 7D 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
+
+ <step type="WAIT" value="500"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="RR+" value="FF C8 F6"/>
+
+ <step type="WAIT" value="500"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
- <test name="OTEN03">
- <step type="ANSWER"/>
+ <test name="OTEN04">
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -4580,88 +5310,96 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 1F 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
+ <step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
+ <step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="RR" value="FF C8 76"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
+ <step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="RNR" value="FF C8 37"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
- </test>
- <test name="OTEN04">
- <step type="ANSWER"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
+ <step dir="R" type="SILENCE"/>
- <step dir="R" type="CNG"/>
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
+ <step dir="R" type="SILENCE"/>
- <step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 1F 20"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="CTC" value="FF C8 C8"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="CTR" value="FF C8 23"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOR-EOP" value="FF C8 73 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOR-EOP+" value="FF C8 F3 F4 ..."/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
@@ -4669,11 +5407,12 @@
<step dir="T" type="HDLC" tag="ERR" value="FF C8 38"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
<step dir="R" type="SILENCE"/>
</test>
<test name="OTEN05">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -4683,7 +5422,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 1F 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step dir="R" type="SILENCE"/>
@@ -4692,43 +5431,43 @@
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
+ <step dir="T" type="HDLC" modem="V.21" tag="PPR" value="FF C8 3D 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="CTC" value="FF C8 48"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="CTC+" value="FF C8 C8"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
@@ -4736,66 +5475,73 @@
<step dir="T" type="HDLC" tag="CTR" value="FF C8 23"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="OTEN06">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 IMPRESS page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_impress.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 1F 20"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 11 22"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="PP" modem="V.27ter/4800" value="a4-impress.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP" value="FF C8 7D 74"/>
+ <step dir="R" type="PP" modem="V.27ter/4800" value="etsi_300_242_a4_impress.tif" timeout="180000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="PPS-EOP+" value="FF C8 FD F4 ..."/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="MCF" value="FF C8 31"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
</test-group>
<test-group name="Annex I - Exception transmit test procedures">
<test name="MTGX01">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and is prepared to send 1 WHITE page. Tester sends CED/DIS
+ 29999ms after going off hook -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
+ <step type="WAIT" value="29999"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
</test>
<test name="MTGX02">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and is prepared to send 1 WHITE page. Tester sends CED/DIS
+ 40001ms after going off hook -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
+ <step type="WAIT" value="140001"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -4808,18 +5554,19 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MTGX03">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and is prepared to send 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="60000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -4827,26 +5574,29 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MTGX04">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and is prepared to send 2 WHITE pages separately. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="T" type="SET" tag="TXFILE" value="etsi_300_242_a4_white.tif"/>
+
+ <step dir="R" type="MSG" modem="V.29/9600" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -4854,7 +5604,8 @@
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MTGX05">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and attempts to send 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
@@ -4864,8 +5615,8 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
@@ -4873,15 +5624,16 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DCN" value="FF C8 5F"/>
+ <step dir="T" type="HDLC" tag="DCN+" value="FF C8 DF"/>
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MTGX06">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -4891,7 +5643,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
<step type="WAIT" value="75"/>
@@ -4900,59 +5652,70 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DCN" value="FF C8 5F"/>
+ <step dir="T" type="HDLC" tag="DCN+" value="FF C8 DF"/>
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="MTGX07">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGX08">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages separately. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="T" type="SET" tag="TXFILE" value="etsi_300_242_a4_white.tif"/>
+
+ <step dir="R" type="MSG" modem="V.29/9600" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGX09">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
@@ -4962,7 +5725,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800"/>
<step type="WAIT" value="75"/>
@@ -4971,13 +5734,17 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGX10">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -4987,7 +5754,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800"/>
<step type="WAIT" value="75"/>
@@ -4996,39 +5763,43 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGX11">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="FTT" value="FF C8 22"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/7200"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="FTT" value="FF C8 22"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800"/>
<step type="WAIT" value="75"/>
@@ -5036,127 +5807,141 @@
<step dir="T" type="HDLC" tag="FTT" value="FF C8 22"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/2400"/>
+
+ <step type="WAIT" value="75"/>
+ <step dir="T" type="PREAMBLE" modem="V.21"/>
+ <step dir="T" type="HDLC" tag="FTT" value="FF C8 22"/>
+ <step dir="T" type="POSTAMBLE"/>
+
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGX12">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGX13">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="60000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGX14">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages separately. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
- <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
+ <step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 72 20"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.29/9600" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="T" type="SET" tag="TXFILE" value="etsi_300_242_a4_white.tif"/>
+
+ <step dir="R" type="MSG" modem="V.29/9600" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOM" value="FF C8 71"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOM+" value="FF C8 F1"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGX15">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 2 WHITE pages. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
@@ -5166,7 +5951,7 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
<step dir="R" type="TCF" modem="V.27ter/4800"/>
<step type="WAIT" value="75"/>
@@ -5175,31 +5960,32 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="MPS+" value="FF C8 F2"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGX16">
- <step type="ANSWER"/>
+ <!-- DUT calls tester and sends 1 WHITE page. -->
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -5209,65 +5995,66 @@
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCS" value="FF C8 41 00 50 00"/>
- <step dir="R" type="TCF" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCS+" value="FF C8 C1 ..."/>
+ <step dir="R" type="TCF" modem="V.27ter/4800" timeout="10000"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" value="a4-white.tif" timeout="60000"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="MSG" modem="V.27ter/4800" timeout="60000"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="EOP" value="FF C8 74"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="EOP+" value="FF C8 F4"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" modem="V.21" tag="CRP" value="FF C8 58"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="HDLC" modem="V.21" tag="DCN" value="FF C8 5F"/>
+ <step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
</test>
<test name="MTGX17">
<!-- DUT calls tester, and is configured to send 1 WHITE page. Tester responds with an unknown frame instead of
the first and second DIS. This is because some DUTs ignore the first frame coming after CED, and wait for
the second one to continue the call. -->
- <step type="ANSWER" value="a4-white.tif"/>
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
<step dir="T" type="CED"/>
+
<step type="WAIT" value="75"/>
<!-- UNKNOWN_BCS_2 -->
<step dir="T" type="PREAMBLE" modem="V.21" value="37"/>
<step dir="T" type="HDLC" tag="GARBAGE" value="FF C8 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="3500"/>
<!-- UNKNOWN_BCS_2 -->
<step dir="T" type="PREAMBLE" modem="V.21" value="37"/>
<step dir="T" type="HDLC" tag="GARBAGE" value="FF C8 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="3500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
- <step type="WAIT" value="75"/>
+ <step type="WAIT" value="3500"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DIS" value="FF C8 01 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
@@ -5279,7 +6066,7 @@
</test>
<test name="MTGX18">
<!-- DUT calls tester, and sends 1 WHITE page -->
- <step type="ANSWER" value="a4-white.tif"/>
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -5322,7 +6109,7 @@
</test>
<test name="MTGX19">
<!-- DUT calls tester, and sends 1 WHITE page -->
- <step type="ANSWER" value="a4-white.tif"/>
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -5358,7 +6145,7 @@
</test>
<test name="MTGX20">
<!-- DUT calls tester, and attempts to send 1 WHITE page -->
- <step type="ANSWER" value="a4-white.tif"/>
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -5391,7 +6178,7 @@
</test>
<test name="MTGX21">
<!-- DUT calls tester, and sends 2 WHITE pages -->
- <step type="ANSWER" value="a4-white-2p.tif"/>
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
@@ -5438,7 +6225,7 @@
</test>
<test name="MTGX22">
<!-- DUT calls tester, and sends 2 WHITE pages -->
- <step type="ANSWER" value="a4-white-2p.tif"/>
+ <step type="ANSWER" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="CNG"/>
@@ -5484,7 +6271,7 @@
</test>
<test name="MTGX23">
<!-- DUT calls tester, and sends 1 WHITE page -->
- <step type="ANSWER" value="a4-white.tif"/>
+ <step type="ANSWER" value="etsi_300_242_a4_white.tif"/>
<step dir="R" type="CNG"/>
@@ -5524,7 +6311,7 @@
<test name="MRGP01">
<!-- DUT has been prepared with 2 WHITE pages, which are available for polling without a password. Tester calls DUT.
DUT should send TSI for this test procedure. -->
- <step type="CALL" value="a4-white-2p.tif"/>
+ <step type="CALL" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="T" type="SET" tag="IDENT" value="1234567890"/>
<!--<step dir="T" type="CNG"/>-->
@@ -5561,7 +6348,7 @@
<step dir="T" type="HDLC" tag="CFR" value="FF C8 21"/>
<step dir="T" type="POSTAMBLE"/>
- <step dir="R" type="MSG" modem="V.27ter/4800" value="a4-white.tif" timeout="60000">
+ <step dir="R" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif" timeout="60000">
<check name="MRGP01M10" desc="Polled, MSG1"/>
</step>
<step dir="R" type="HDLC" modem="V.21" tag="MPS" value="FF C8 72">
@@ -5601,7 +6388,7 @@
</test>
<test name="MRGP02">
<!-- DUT has been prepared with 2 WHITE pages, which are available for polling using a password. Tester calls DUT -->
- <step type="CALL" value="a4-white-2p.tif"/>
+ <step type="CALL" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="T" type="SET" tag="IDENT" value="1234567890"/>
<step dir="R" type="SET" tag="PWD" value="+9876543210"/>
@@ -5677,7 +6464,7 @@
</test>
<test name="MRGP04">
<!-- DUT has been prepared with 2 WHITE pages, which are available for polling using a password. Tester calls DUT -->
- <step type="CALL" value="a4-white-2p.tif"/>
+ <step type="CALL" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="SET" tag="PWD" value="+0123456789"/>
<!--<step dir="T" type="CNG"/>-->
@@ -5720,7 +6507,7 @@
</test>
<test name="MRGP06">
<!-- DUT has been prepared with 2 WHITE pages, which are available for polling without a password. Tester calls DUT -->
- <step type="CALL" value="a4-white-2p.tif"/>
+ <step type="CALL" value="etsi_300_242_a4_white_2p.tif"/>
<!--<step dir="T" type="CNG"/>-->
@@ -5767,7 +6554,7 @@
</test>
<test name="MRGP07">
<!-- DUT has been prepared with 2 WHITE pages, which are available for polling using a password. Tester calls DUT -->
- <step type="CALL" value="a4-white-2p.tif"/>
+ <step type="CALL" value="etsi_300_242_a4_white_2p.tif"/>
<step dir="R" type="SET" tag="PWD" value="+9876543210"/>
<!--<step dir="T" type="CNG"/>-->
@@ -5809,7 +6596,7 @@
<test name="ORGP09">
<!-- DUT has been prepared with 1 WHITE page, which is available for polling without password. Tester calls DUT
Tester sends 1 WHITE page -->
- <step type="CALL" value="a4-white.tif"/>
+ <step type="CALL" value="etsi_300_242_a4_white.tif"/>
<!--<step dir="T" type="CNG"/>-->
@@ -5828,7 +6615,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOM" value="FF C8 71"/>
@@ -5869,7 +6656,7 @@
<test name="ORGP10">
<!-- DUT has been prepared with 1 WHITE page, which is available for polling without password. Tester calls DUT
Tester sends 1 WHITE page -->
- <step type="CALL" value="a4-white.tif"/>
+ <step type="CALL" value="etsi_300_242_a4_white.tif"/>
<!--<step dir="T" type="CNG"/>-->
@@ -5888,7 +6675,7 @@
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
- <step dir="T" type="MSG" modem="V.27ter/4800" value="a4-white.tif"/>
+ <step dir="T" type="MSG" modem="V.27ter/4800" value="etsi_300_242_a4_white.tif"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="EOM" value="FF C8 71"/>
Modified: freeswitch/trunk/libs/spandsp/src/dds_int.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/dds_int.c (original)
+++ freeswitch/trunk/libs/spandsp/src/dds_int.c Tue Sep 30 23:52:36 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: dds_int.c,v 1.10 2008/09/01 16:07:33 steveu Exp $
+ * $Id: dds_int.c,v 1.11 2008/09/11 15:13:42 steveu Exp $
*/
/*! \file */
@@ -252,11 +252,11 @@
}
/*- End of function --------------------------------------------------------*/
-int16_t dds_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase)
+int16_t dds_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
{
int16_t amp;
- amp = (int16_t) ((dds_lookup(*phase_acc + phase)*scale) >> 15);
+ amp = (int16_t) (((int32_t) dds_lookup(*phase_acc + phase)*(int32_t) scale) >> 15);
*phase_acc += phase_rate;
return amp;
}
@@ -278,12 +278,12 @@
}
/*- End of function --------------------------------------------------------*/
-complexi_t dds_complexi_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase)
+complexi_t dds_complexi_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
{
complexi_t amp;
- amp = complex_seti((dds_lookup(*phase_acc + phase + (1 << 30))*scale) >> 15,
- (dds_lookup(*phase_acc + phase)*scale) >> 15);
+ amp = complex_seti(((int32_t) dds_lookup(*phase_acc + phase + (1 << 30))*(int32_t) scale) >> 15,
+ ((int32_t) dds_lookup(*phase_acc + phase)*(int32_t) scale) >> 15);
*phase_acc += phase_rate;
return amp;
}
@@ -305,12 +305,12 @@
}
/*- End of function --------------------------------------------------------*/
-complexi16_t dds_complexi16_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase)
+complexi16_t dds_complexi16_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
{
complexi16_t amp;
- amp = complex_seti16((dds_lookup(*phase_acc + phase + (1 << 30))*scale) >> 15,
- (dds_lookup(*phase_acc + phase)*scale) >> 15);
+ amp = complex_seti16(((int32_t) dds_lookup(*phase_acc + phase + (1 << 30))*(int32_t) scale) >> 15,
+ ((int32_t) dds_lookup(*phase_acc + phase)*(int32_t) scale) >> 15);
*phase_acc += phase_rate;
return amp;
}
@@ -332,12 +332,12 @@
}
/*- End of function --------------------------------------------------------*/
-complexi32_t dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase)
+complexi32_t dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
{
complexi32_t amp;
- amp = complex_seti32((dds_lookup(*phase_acc + phase + (1 << 30))*scale) >> 15,
- (dds_lookup(*phase_acc + phase)*scale) >> 15);
+ amp = complex_seti32(((int32_t) dds_lookup(*phase_acc + phase + (1 << 30))*(int32_t) scale) >> 15,
+ ((int32_t) dds_lookup(*phase_acc + phase)*(int32_t) scale) >> 15);
*phase_acc += phase_rate;
return amp;
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/dds.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/dds.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/dds.h Tue Sep 30 23:52:36 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: dds.h,v 1.20 2008/09/04 14:40:05 steveu Exp $
+ * $Id: dds.h,v 1.21 2008/09/11 15:13:42 steveu Exp $
*/
/*! \file */
@@ -98,7 +98,7 @@
\param phase The phase offset.
\return The signal amplitude, between -32767 and 32767.
*/
-int16_t dds_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase);
+int16_t dds_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
/*! \brief Lookup the complex integer value of a specified phase.
\param phase The phase accumulator value to be looked up.
@@ -120,7 +120,7 @@
\param phase The phase offset.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
*/
-complexi_t dds_complexi_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase);
+complexi_t dds_complexi_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
/*! \brief Generate a complex 16 bit integer tone sample.
\param phase_acc A pointer to a phase accumulator value.
@@ -143,7 +143,7 @@
\param phase The phase offset.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
*/
-complexi16_t dds_complexi16_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase);
+complexi16_t dds_complexi16_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
/*! \brief Generate a complex 32 bit integer tone sample, with modulation.
\param phase_acc A pointer to a phase accumulator value.
@@ -152,7 +152,7 @@
\param phase The phase offset.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
*/
-complexi32_t dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase);
+complexi32_t dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
/*! \brief Generate a complex 32 bit integer tone sample.
\param phase_acc A pointer to a phase accumulator value.
@@ -175,7 +175,7 @@
\param phase The phase offset.
\return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
*/
-complexi32_t dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase);
+complexi32_t dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
/*! \brief Find the phase rate equivalent to a frequency, in Hz.
\param frequency The frequency, in Hz.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h Tue Sep 30 23:52:36 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tone_generate.h,v 1.33 2008/04/17 14:27:01 steveu Exp $
+ * $Id: tone_generate.h,v 1.34 2008/09/11 15:13:42 steveu Exp $
*/
/*! \file */
@@ -48,7 +48,11 @@
typedef struct
{
int32_t phase_rate;
+#if defined(SPANDSP_USE_FIXED_POINT)
+ int16_t gain;
+#else
float gain;
+#endif
} tone_gen_tone_descriptor_t;
/*!
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/version.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/version.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/version.h Tue Sep 30 23:52:36 2008
@@ -30,8 +30,8 @@
/* The date and time of the version are in UTC form. */
-#define SPANDSP_RELEASE_DATE 20080909
-#define SPANDSP_RELEASE_TIME 162813
+#define SPANDSP_RELEASE_DATE 20080911
+#define SPANDSP_RELEASE_TIME 151652
#endif
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/t30.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30.c Tue Sep 30 23:52:36 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30.c,v 1.264 2008/09/09 15:30:43 steveu Exp $
+ * $Id: t30.c,v 1.266 2008/09/11 15:13:42 steveu Exp $
*/
/*! \file */
@@ -682,6 +682,15 @@
}
/*- End of function --------------------------------------------------------*/
+static int send_rr(t30_state_t *s)
+{
+ if (s->current_status != T30_ERR_TX_T5EXP)
+ send_simple_frame(s, T30_RR);
+ else
+ send_dcn(s);
+}
+/*- End of function --------------------------------------------------------*/
+
static int send_first_ecm_frame(t30_state_t *s)
{
s->ecm_current_tx_frame = 0;
@@ -1517,6 +1526,26 @@
}
/*- End of function --------------------------------------------------------*/
+static void return_to_phase_b(t30_state_t *s, int with_fallback)
+{
+ /* This is what we do after things like T30_EOM is exchanged. */
+ if (step_fallback_entry(s) < 0)
+ {
+ /* We have fallen back as far as we can go. Give up. */
+ s->current_fallback = 0;
+ s->current_status = T30_ERR_CANNOT_TRAIN;
+ send_dcn(s);
+ }
+ else
+ {
+ if (s->calling_party)
+ set_state(s, T30_STATE_T);
+ else
+ set_state(s, T30_STATE_R);
+ }
+}
+/*- End of function --------------------------------------------------------*/
+
static int send_dis_or_dtc_sequence(t30_state_t *s, int start)
{
/* (NSF) (CSI) DIS */
@@ -2668,12 +2697,14 @@
break;
case T30_DIS:
/* It appears they didn't see what we sent - retry the TCF */
- if (++s->retries > MAX_MESSAGE_TRIES)
+ if (++s->retries >= MAX_MESSAGE_TRIES)
{
+ span_log(&s->logging, SPAN_LOG_FLOW, "Too many retries. Giving up.\n");
s->current_status = T30_ERR_RETRYDCN;
send_dcn(s);
break;
}
+ span_log(&s->logging, SPAN_LOG_FLOW, "Retry number %d\n", s->retries);
queue_phase(s, T30_PHASE_B_TX);
/* TODO: should we reassess the new DIS message, and possibly adjust the DCS we use? */
send_dcs_sequence(s, TRUE);
@@ -2759,7 +2790,10 @@
static void process_state_f_doc_non_ecm(t30_state_t *s, const uint8_t *msg, int len)
{
/* If we are getting HDLC messages, and we have not moved to the _POST_DOC_NON_ECM
- state, it looks like we didn't see the image data carrier properly. */
+ state, it looks like either:
+ - we didn't see the image data carrier properly, or
+ - they didn't see our T30_CFR, and are repeating the DCS/TCF sequence.
+ - they didn't see out T30_MCF, and are repeating the end of page message. */
switch (msg[2] & 0xFE)
{
case T30_DIS:
@@ -3319,12 +3353,12 @@
s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
t4_tx_end(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
- set_state(s, T30_STATE_R);
if (span_log_test(&s->logging, SPAN_LOG_FLOW))
{
t4_get_transfer_statistics(&s->t4, &stats);
span_log(&s->logging, SPAN_LOG_FLOW, "Success - delivered %d pages\n", stats.pages_transferred);
}
+ return_to_phase_b(s, FALSE);
break;
case T30_EOP:
case T30_PRI_EOP:
@@ -3349,8 +3383,14 @@
case T30_MPS:
case T30_PRI_MPS:
s->retries = 0;
+ t4_tx_end_page(&(s->t4));
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_RTP);
+ if (tx_start_page(s))
+ {
+ /* TODO: recover */
+ break;
+ }
/* Send fresh training, and then the next page */
if (step_fallback_entry(s) < 0)
{
@@ -3367,24 +3407,20 @@
case T30_PRI_EOM:
case T30_EOS:
s->retries = 0;
+ t4_tx_end_page(&(s->t4));
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_RTP);
- if (step_fallback_entry(s) < 0)
- {
- /* We have fallen back as far as we can go. Give up. */
- s->current_fallback = 0;
- s->current_status = T30_ERR_CANNOT_TRAIN;
- send_dcn(s);
- break;
- }
+ t4_tx_end(&(s->t4));
/* TODO: should go back to T, and resend */
- set_state(s, T30_STATE_R);
+ return_to_phase_b(s, TRUE);
break;
case T30_EOP:
case T30_PRI_EOP:
s->retries = 0;
+ t4_tx_end_page(&(s->t4));
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_RTP);
+ t4_tx_end(&(s->t4));
s->current_status = T30_ERR_TX_INVALRSP;
send_dcn(s);
break;
@@ -3410,8 +3446,6 @@
queue_phase(s, T30_PHASE_B_TX);
restart_sending_document(s);
break;
- case T30_EOP:
- case T30_PRI_EOP:
case T30_EOM:
case T30_PRI_EOM:
case T30_EOS:
@@ -3419,6 +3453,14 @@
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_RTN);
s->current_status = T30_ERR_TX_INVALRSP;
+ return_to_phase_b(s, TRUE);
+ break;
+ case T30_EOP:
+ case T30_PRI_EOP:
+ s->retries = 0;
+ if (s->phase_d_handler)
+ s->phase_d_handler(s, s->phase_d_user_data, T30_RTN);
+ s->current_status = T30_ERR_TX_INVALRSP;
send_dcn(s);
break;
}
@@ -3639,12 +3681,12 @@
s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
t4_tx_end(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
- set_state(s, T30_STATE_R);
if (span_log_test(&s->logging, SPAN_LOG_FLOW))
{
t4_get_transfer_statistics(&s->t4, &stats);
span_log(&s->logging, SPAN_LOG_FLOW, "Success - delivered %d pages\n", stats.pages_transferred);
}
+ return_to_phase_b(s, FALSE);
break;
case T30_EOP:
case T30_PRI_EOP:
@@ -3672,7 +3714,7 @@
s->timer_t5 = ms_to_samples(DEFAULT_TIMER_T5);
queue_phase(s, T30_PHASE_D_TX);
set_state(s, T30_STATE_IV_PPS_RNR);
- send_simple_frame(s, T30_RR);
+ send_rr(s);
break;
case T30_DCN:
s->current_status = T30_ERR_TX_BADPG;
@@ -3714,7 +3756,6 @@
}
else
{
-
span_log(&s->logging, SPAN_LOG_FLOW, "Moving on to the next page\n");
switch (s->next_tx_step)
{
@@ -3745,12 +3786,12 @@
s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
t4_tx_end(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
- set_state(s, T30_STATE_R);
if (span_log_test(&s->logging, SPAN_LOG_FLOW))
{
t4_get_transfer_statistics(&s->t4, &stats);
span_log(&s->logging, SPAN_LOG_FLOW, "Success - delivered %d pages\n", stats.pages_transferred);
}
+ return_to_phase_b(s, FALSE);
break;
case T30_EOP:
case T30_PRI_EOP:
@@ -3775,7 +3816,7 @@
s->timer_t5 = ms_to_samples(DEFAULT_TIMER_T5);
queue_phase(s, T30_PHASE_D_TX);
set_state(s, T30_STATE_IV_PPS_RNR);
- send_simple_frame(s, T30_RR);
+ send_rr(s);
break;
case T30_PIP:
s->retries = 0;
@@ -3866,12 +3907,12 @@
s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
t4_tx_end(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
- set_state(s, T30_STATE_R);
if (span_log_test(&s->logging, SPAN_LOG_FLOW))
{
t4_get_transfer_statistics(&s->t4, &stats);
span_log(&s->logging, SPAN_LOG_FLOW, "Success - delivered %d pages\n", stats.pages_transferred);
}
+ return_to_phase_b(s, FALSE);
break;
case T30_EOP:
case T30_PRI_EOP:
@@ -3896,7 +3937,7 @@
s->timer_t5 = ms_to_samples(DEFAULT_TIMER_T5);
queue_phase(s, T30_PHASE_D_TX);
set_state(s, T30_STATE_IV_PPS_RNR);
- send_simple_frame(s, T30_RR);
+ send_rr(s);
break;
case T30_PIP:
s->retries = 0;
@@ -3968,7 +4009,7 @@
s->timer_t5 = ms_to_samples(DEFAULT_TIMER_T5);
queue_phase(s, T30_PHASE_D_TX);
set_state(s, T30_STATE_IV_EOR_RNR);
- send_simple_frame(s, T30_RR);
+ send_rr(s);
break;
case T30_PIN:
s->retries = 0;
@@ -4006,7 +4047,7 @@
s->timer_t5 = ms_to_samples(DEFAULT_TIMER_T5);
queue_phase(s, T30_PHASE_D_TX);
set_state(s, T30_STATE_IV_EOR_RNR);
- send_simple_frame(s, T30_RR);
+ send_rr(s);
break;
case T30_PIN:
s->retries = 0;
@@ -4341,98 +4382,109 @@
static void set_phase(t30_state_t *s, int phase)
{
- if (phase != s->phase)
+ //if (phase = s->phase)
+ // return;
+ span_log(&s->logging, SPAN_LOG_FLOW, "Changing from phase %s to %s\n", phase_names[s->phase], phase_names[phase]);
+ /* We may be killing a receiver before it has declared the end of the
+ signal. Force the signal present indicator to off, because the
+ receiver will never be able to. */
+ if (s->phase != T30_PHASE_A_CED && s->phase != T30_PHASE_A_CNG)
+ s->rx_signal_present = FALSE;
+ s->rx_trained = FALSE;
+ s->rx_frame_received = FALSE;
+ s->phase = phase;
+ switch (phase)
{
- span_log(&s->logging, SPAN_LOG_FLOW, "Changing from phase %s to %s\n", phase_names[s->phase], phase_names[phase]);
- /* We may be killing a receiver before it has declared the end of the
- signal. Force the signal present indicator to off, because the
- receiver will never be able to. */
- if (s->phase != T30_PHASE_A_CED && s->phase != T30_PHASE_A_CNG)
- s->rx_signal_present = FALSE;
- s->rx_trained = FALSE;
- s->rx_frame_received = FALSE;
- s->phase = phase;
- switch (phase)
+ case T30_PHASE_A_CED:
+ if (s->set_rx_type_handler)
+ s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_V21, 300, FALSE, TRUE);
+ if (s->set_tx_type_handler)
+ s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_CED, 0, FALSE, FALSE);
+ break;
+ case T30_PHASE_A_CNG:
+ if (s->set_rx_type_handler)
+ s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_V21, 300, FALSE, TRUE);
+ if (s->set_tx_type_handler)
+ s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_CNG, 0, FALSE, FALSE);
+ break;
+ case T30_PHASE_B_RX:
+ case T30_PHASE_D_RX:
+ if (s->set_rx_type_handler)
+ s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_V21, 300, FALSE, TRUE);
+ if (s->set_tx_type_handler)
+ s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
+ break;
+ case T30_PHASE_B_TX:
+ case T30_PHASE_D_TX:
+ if (!s->far_end_detected && s->timer_t0_t1 > 0)
{
- case T30_PHASE_A_CED:
- if (s->set_rx_type_handler)
- s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_V21, 300, FALSE, TRUE);
- if (s->set_tx_type_handler)
- s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_CED, 0, FALSE, FALSE);
- break;
- case T30_PHASE_A_CNG:
- if (s->set_rx_type_handler)
- s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_V21, 300, FALSE, TRUE);
- if (s->set_tx_type_handler)
- s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_CNG, 0, FALSE, FALSE);
- break;
- case T30_PHASE_B_RX:
- case T30_PHASE_D_RX:
- if (s->set_rx_type_handler)
- s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_V21, 300, FALSE, TRUE);
- if (s->set_tx_type_handler)
- s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
- break;
- case T30_PHASE_B_TX:
- case T30_PHASE_D_TX:
- if (!s->far_end_detected && s->timer_t0_t1 > 0)
- {
- s->timer_t0_t1 = ms_to_samples(DEFAULT_TIMER_T1);
- s->far_end_detected = TRUE;
- }
- if (s->set_rx_type_handler)
- s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
- if (s->set_tx_type_handler)
- s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_V21, 300, FALSE, TRUE);
- break;
- case T30_PHASE_C_NON_ECM_RX:
- if (s->set_rx_type_handler)
- s->set_rx_type_handler(s->set_rx_type_user_data, fallback_sequence[s->current_fallback].modem_type, fallback_sequence[s->current_fallback].bit_rate, s->short_train, FALSE);
- if (s->set_tx_type_handler)
- s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
- break;
- case T30_PHASE_C_NON_ECM_TX:
- /* Pause before switching from anything to phase C */
- /* Always prime the training count for 1.5s of data at the current rate. Its harmless if
- we prime it and are not doing TCF. */
- s->tcf_test_bits = (3*fallback_sequence[s->current_fallback].bit_rate)/2;
- if (s->set_rx_type_handler)
- s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
- if (s->set_tx_type_handler)
- s->set_tx_type_handler(s->set_tx_type_user_data, fallback_sequence[s->current_fallback].modem_type, fallback_sequence[s->current_fallback].bit_rate, s->short_train, FALSE);
- break;
- case T30_PHASE_C_ECM_RX:
- if (s->set_rx_type_handler)
- s->set_rx_type_handler(s->set_rx_type_user_data, fallback_sequence[s->current_fallback].modem_type, fallback_sequence[s->current_fallback].bit_rate, s->short_train, TRUE);
- if (s->set_tx_type_handler)
- s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
- break;
- case T30_PHASE_C_ECM_TX:
- /* Pause before switching from anything to phase C */
- if (s->set_rx_type_handler)
- s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
- if (s->set_tx_type_handler)
- s->set_tx_type_handler(s->set_tx_type_user_data, fallback_sequence[s->current_fallback].modem_type, fallback_sequence[s->current_fallback].bit_rate, s->short_train, TRUE);
- break;
- case T30_PHASE_E:
- /* Send a little silence before ending things, to ensure the
- buffers are all flushed through, and the far end has seen
- the last message we sent. */
- s->tcf_test_bits = 0;
- s->tcf_current_zeros = 0;
- s->tcf_most_zeros = 0;
- if (s->set_rx_type_handler)
- s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
- if (s->set_tx_type_handler)
- s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_PAUSE, 0, FINAL_FLUSH_TIME, FALSE);
- break;
- case T30_PHASE_CALL_FINISHED:
- if (s->set_rx_type_handler)
- s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_DONE, 0, FALSE, FALSE);
- if (s->set_tx_type_handler)
- s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_DONE, 0, FALSE, FALSE);
- break;
+ s->timer_t0_t1 = ms_to_samples(DEFAULT_TIMER_T1);
+ s->far_end_detected = TRUE;
}
+ if (s->set_rx_type_handler)
+ s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
+ if (s->set_tx_type_handler)
+ s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_V21, 300, FALSE, TRUE);
+ break;
+ case T30_PHASE_C_NON_ECM_RX:
+ if (s->set_rx_type_handler)
+ {
+ /* Momentarily stop the receive modem, so the next change is forced to happen. If we don't do this
+ an HDLC message on the slow modem, which has disabled the fast modem, will prevent the same
+ fast modem from restarting. */
+ s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
+ s->set_rx_type_handler(s->set_rx_type_user_data, fallback_sequence[s->current_fallback].modem_type, fallback_sequence[s->current_fallback].bit_rate, s->short_train, FALSE);
+ }
+ if (s->set_tx_type_handler)
+ s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
+ break;
+ case T30_PHASE_C_NON_ECM_TX:
+ /* Pause before switching from anything to phase C */
+ /* Always prime the training count for 1.5s of data at the current rate. Its harmless if
+ we prime it and are not doing TCF. */
+ s->tcf_test_bits = (3*fallback_sequence[s->current_fallback].bit_rate)/2;
+ if (s->set_rx_type_handler)
+ {
+ /* Momentarily stop the receive modem, so the next change is forced to happen. If we don't do this
+ an HDLC message on the slow modem, which has disabled the fast modem, will prevent the same
+ fast modem from restarting. */
+ s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
+ s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
+ }
+ if (s->set_tx_type_handler)
+ s->set_tx_type_handler(s->set_tx_type_user_data, fallback_sequence[s->current_fallback].modem_type, fallback_sequence[s->current_fallback].bit_rate, s->short_train, FALSE);
+ break;
+ case T30_PHASE_C_ECM_RX:
+ if (s->set_rx_type_handler)
+ s->set_rx_type_handler(s->set_rx_type_user_data, fallback_sequence[s->current_fallback].modem_type, fallback_sequence[s->current_fallback].bit_rate, s->short_train, TRUE);
+ if (s->set_tx_type_handler)
+ s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
+ break;
+ case T30_PHASE_C_ECM_TX:
+ /* Pause before switching from anything to phase C */
+ if (s->set_rx_type_handler)
+ s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
+ if (s->set_tx_type_handler)
+ s->set_tx_type_handler(s->set_tx_type_user_data, fallback_sequence[s->current_fallback].modem_type, fallback_sequence[s->current_fallback].bit_rate, s->short_train, TRUE);
+ break;
+ case T30_PHASE_E:
+ /* Send a little silence before ending things, to ensure the
+ buffers are all flushed through, and the far end has seen
+ the last message we sent. */
+ s->tcf_test_bits = 0;
+ s->tcf_current_zeros = 0;
+ s->tcf_most_zeros = 0;
+ if (s->set_rx_type_handler)
+ s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, 0, FALSE, FALSE);
+ if (s->set_tx_type_handler)
+ s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_PAUSE, 0, FINAL_FLUSH_TIME, FALSE);
+ break;
+ case T30_PHASE_CALL_FINISHED:
+ if (s->set_rx_type_handler)
+ s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_DONE, 0, FALSE, FALSE);
+ if (s->set_tx_type_handler)
+ s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_DONE, 0, FALSE, FALSE);
+ break;
}
}
/*- End of function --------------------------------------------------------*/
@@ -4451,6 +4503,30 @@
static void repeat_last_command(t30_state_t *s)
{
s->step = 0;
+ if (++s->retries >= MAX_MESSAGE_TRIES)
+ {
+ span_log(&s->logging, SPAN_LOG_FLOW, "Too many retries. Giving up.\n");
+ switch (s->state)
+ {
+ case T30_STATE_D_POST_TCF:
+ /* Received no response to DCS or TCF */
+ s->current_status = T30_ERR_TX_PHBDEAD;
+ break;
+ case T30_STATE_II_Q:
+ case T30_STATE_IV_PPS_NULL:
+ case T30_STATE_IV_PPS_Q:
+ /* No response after sending a page */
+ s->current_status = T30_ERR_TX_PHDDEAD;
+ break;
+ default:
+ /* Disconnected after permitted retries */
+ s->current_status = T30_ERR_RETRYDCN;
+ break;
+ }
+ send_dcn(s);
+ return;
+ }
+ span_log(&s->logging, SPAN_LOG_FLOW, "Retry number %d\n", s->retries);
switch (s->state)
{
case T30_STATE_R:
@@ -4482,7 +4558,7 @@
case T30_STATE_IV_PPS_RNR:
case T30_STATE_IV_EOR_RNR:
queue_phase(s, T30_PHASE_D_TX);
- send_simple_frame(s, T30_RNR);
+ send_rr(s);
break;
case T30_STATE_D:
queue_phase(s, T30_PHASE_B_TX);
@@ -4693,28 +4769,6 @@
/* There was no response (or only a corrupt response) to a command,
within the T4 timeout period. */
span_log(&s->logging, SPAN_LOG_FLOW, "T4 expired in phase %s, state %d\n", phase_names[s->phase], s->state);
- if (++s->retries > MAX_MESSAGE_TRIES)
- {
- switch (s->state)
- {
- case T30_STATE_D_POST_TCF:
- /* Received no response to DCS or TCF */
- s->current_status = T30_ERR_TX_PHBDEAD;
- break;
- case T30_STATE_II_Q:
- case T30_STATE_IV_PPS_NULL:
- case T30_STATE_IV_PPS_Q:
- /* No response after sending a page */
- s->current_status = T30_ERR_TX_PHDDEAD;
- break;
- default:
- /* Disconnected after permitted retries */
- s->current_status = T30_ERR_RETRYDCN;
- break;
- }
- send_dcn(s);
- return;
- }
/* Of course, things might just be a little late, especially if there are T.38
links in the path. There is no point in simply timing out, and resending,
if we are currently receiving something from the far end - its a half-duplex
@@ -4746,7 +4800,6 @@
/* Give up waiting for the receiver to become ready in error correction mode */
span_log(&s->logging, SPAN_LOG_FLOW, "T5 expired in phase %s, state %d\n", phase_names[s->phase], s->state);
s->current_status = T30_ERR_TX_T5EXP;
- send_dcn(s);
}
/*- End of function --------------------------------------------------------*/
@@ -5605,8 +5658,7 @@
{
if (s->timer_t0_t1 > 0)
{
- s->timer_t0_t1 -= samples;
- if (s->timer_t0_t1 <= 0)
+ if ((s->timer_t0_t1 -= samples) <= 0)
{
if (s->far_end_detected)
timer_t1_expired(s);
@@ -5616,14 +5668,12 @@
}
if (s->timer_t3 > 0)
{
- s->timer_t3 -= samples;
- if (s->timer_t3 <= 0)
+ if ((s->timer_t3 -= samples) <= 0)
timer_t3_expired(s);
}
if (s->timer_t2_t4 > 0)
{
- s->timer_t2_t4 -= samples;
- if (s->timer_t2_t4 <= 0)
+ if ((s->timer_t2_t4 -= samples) <= 0)
{
switch (s->timer_t2_t4_is)
{
@@ -5650,8 +5700,7 @@
}
if (s->timer_t5 > 0)
{
- s->timer_t5 -= samples;
- if (s->timer_t5 <= 0)
+ if ((s->timer_t5 -= samples) <= 0)
timer_t5_expired(s);
}
}
Modified: freeswitch/trunk/libs/spandsp/src/tone_generate.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/tone_generate.c (original)
+++ freeswitch/trunk/libs/spandsp/src/tone_generate.c Tue Sep 30 23:52:36 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tone_generate.c,v 1.43 2008/07/02 14:48:26 steveu Exp $
+ * $Id: tone_generate.c,v 1.46 2008/09/11 15:13:42 steveu Exp $
*/
/*! \file */
@@ -72,15 +72,27 @@
memset(s, 0, sizeof(*s));
if (f1)
{
+#if defined(SPANDSP_USE_FIXED_POINT)
+ s->tone[0].phase_rate = dds_phase_rate((float) f1);
+ if (f2 < 0)
+ s->tone[0].phase_rate = -s->tone[0].phase_rate;
+ s->tone[0].gain = dds_scaling_dbm0((float) l1);
+#else
s->tone[0].phase_rate = dds_phase_ratef((float) f1);
if (f2 < 0)
s->tone[0].phase_rate = -s->tone[0].phase_rate;
s->tone[0].gain = dds_scaling_dbm0f((float) l1);
+#endif
}
if (f2)
{
+#if defined(SPANDSP_USE_FIXED_POINT)
+ s->tone[1].phase_rate = dds_phase_rate((float) abs(f2));
+ s->tone[1].gain = (f2 < 0) ? (float) 32767.0f*l2/100.0f : dds_scaling_dbm0((float) l2);
+#else
s->tone[1].phase_rate = dds_phase_ratef((float) abs(f2));
s->tone[1].gain = (f2 < 0) ? (float) l2/100.0f : dds_scaling_dbm0f((float) l2);
+#endif
}
s->duration[0] = d1*SAMPLE_RATE/1000;
@@ -118,7 +130,11 @@
{
int samples;
int limit;
+#if defined(SPANDSP_USE_FIXED_POINT)
+ int16_t xamp;
+#else
float xamp;
+#endif
int i;
if (s->current_section < 0)
@@ -141,30 +157,49 @@
{
if (s->tone[0].phase_rate < 0)
{
+ /* Modulated tone */
for ( ; samples < limit; samples++)
{
- /* There must be two, and only two tones */
+ /* There must be two, and only two, tones */
+#if defined(SPANDSP_USE_FIXED_POINT)
+ xamp = ((int32_t) dds_mod(&s->phase[0], -s->tone[0].phase_rate, s->tone[0].gain, 0)
+ *(32767 + (int32_t) dds_mod(&s->phase[1], s->tone[1].phase_rate, s->tone[1].gain, 0))) >> 15;
+ amp[samples] = xamp;
+#else
xamp = dds_modf(&s->phase[0], -s->tone[0].phase_rate, s->tone[0].gain, 0)
*(1.0f + dds_modf(&s->phase[1], s->tone[1].phase_rate, s->tone[1].gain, 0));
amp[samples] = (int16_t) lrintf(xamp);
+#endif
}
}
else
{
for ( ; samples < limit; samples++)
{
+#if defined(SPANDSP_USE_FIXED_POINT)
+ xamp = 0;
+#else
xamp = 0.0f;
+#endif
for (i = 0; i < 4; i++)
{
if (s->tone[i].phase_rate == 0)
break;
+#if defined(SPANDSP_USE_FIXED_POINT)
+ xamp += dds_mod(&s->phase[i], s->tone[i].phase_rate, s->tone[i].gain, 0);
+#else
xamp += dds_modf(&s->phase[i], s->tone[i].phase_rate, s->tone[i].gain, 0);
+#endif
}
/* Saturation of the answer is the right thing at this point.
However, we are normally generating well controlled tones,
that cannot clip. So, the overhead of doing saturation is
a waste of valuable time. */
+#if defined(SPANDSP_USE_FIXED_POINT)
+ amp[samples] = xamp;
+#else
amp[samples] = (int16_t) lrintf(xamp);
+#endif
}
}
}
Modified: freeswitch/trunk/libs/spandsp/test-data/etsi/fax/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/spandsp/test-data/etsi/fax/Makefile.am (original)
+++ freeswitch/trunk/libs/spandsp/test-data/etsi/fax/Makefile.am Tue Sep 30 23:52:36 2008
@@ -16,7 +16,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
-## $Id: Makefile.am,v 1.1 2008/07/10 12:44:54 steveu Exp $
+## $Id: Makefile.am,v 1.2 2008/09/10 16:55:15 steveu Exp $
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
@@ -25,13 +25,17 @@
EXTRA_DIST =
-nobase_data_DATA = etsi_300_242_white.tif \
- etsi_300_242_stairstep.tif \
- etsi_300_242_diago1.tif \
- etsi_300_242_diago2.tif \
- etsi_300_242_impress.tif \
- etsi_300_242_error.tif
-
+nobase_data_DATA = etsi_300_242_a4_diago1.tif \
+ etsi_300_242_a4_diago2.tif \
+ etsi_300_242_a4_duration1.tif \
+ etsi_300_242_a4_duration2.tif \
+ etsi_300_242_a4_error.tif \
+ etsi_300_242_a4_impress.tif \
+ etsi_300_242_a4_impress_white.tif \
+ etsi_300_242_a4_stairstep.tif \
+ etsi_300_242_a4_white.tif \
+ etsi_300_242_a4_white_2p.tif
+
noinst_PROGRAMS = generate_etsi_300_242_pages
generate_etsi_300_242_pages_SOURCES = generate_etsi_300_242_pages.c
@@ -46,10 +50,14 @@
.pbm.g3:
${PBM2G3} $*.pbm >$*.g3
-etsi_300_242_white.tif \
-etsi_300_242_stairstep.tif \
-etsi_300_242_diago1.tif \
-etsi_300_242_diago2.tif \
-etsi_300_242_impress.tif \
-etsi_300_242_error.tif: generate_etsi_300_242_pages$(EXEEXT)
+etsi_300_242_a4_diago1.tif \
+etsi_300_242_a4_diago2.tif \
+etsi_300_242_a4_duration1.tif \
+etsi_300_242_a4_duration2.tif \
+etsi_300_242_a4_error.tif \
+etsi_300_242_a4_impress.tif \
+etsi_300_242_a4_impress_white.tif \
+etsi_300_242_a4_stairstep.tif \
+etsi_300_242_a4_white.tif \
+etsi_300_242_a4_white_2p.tif: generate_etsi_300_242_pages$(EXEEXT)
./generate_etsi_300_242_pages$(EXEEXT)
Modified: freeswitch/trunk/libs/spandsp/test-data/etsi/fax/generate_etsi_300_242_pages.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/test-data/etsi/fax/generate_etsi_300_242_pages.c (original)
+++ freeswitch/trunk/libs/spandsp/test-data/etsi/fax/generate_etsi_300_242_pages.c Tue Sep 30 23:52:36 2008
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: generate_etsi_300_242_pages.c,v 1.1 2008/07/10 12:44:54 steveu Exp $
+ * $Id: generate_etsi_300_242_pages.c,v 1.2 2008/09/10 16:55:15 steveu Exp $
*/
/*! \file */
@@ -61,7 +61,7 @@
} sequence[] =
{
{
- "etsi_300_242_white.tif",
+ "etsi_300_242_a4_diago1.tif",
T4_X_RESOLUTION_R8,
T4_Y_RESOLUTION_STANDARD,
T4_WIDTH_R8_A4,
@@ -70,7 +70,7 @@
0
},
{
- "etsi_300_242_stairstep.tif",
+ "etsi_300_242_a4_diago2.tif",
T4_X_RESOLUTION_R8,
T4_Y_RESOLUTION_STANDARD,
T4_WIDTH_R8_A4,
@@ -79,7 +79,7 @@
1
},
{
- "etsi_300_242_diago1.tif",
+ "etsi_300_242_a4_duration1.tif",
T4_X_RESOLUTION_R8,
T4_Y_RESOLUTION_STANDARD,
T4_WIDTH_R8_A4,
@@ -88,7 +88,7 @@
2
},
{
- "etsi_300_242_diago2.tif",
+ "etsi_300_242_a4_duration2.tif",
T4_X_RESOLUTION_R8,
T4_Y_RESOLUTION_STANDARD,
T4_WIDTH_R8_A4,
@@ -97,7 +97,7 @@
3
},
{
- "etsi_300_242_impress.tif",
+ "etsi_300_242_a4_error.tif",
T4_X_RESOLUTION_R8,
T4_Y_RESOLUTION_STANDARD,
T4_WIDTH_R8_A4,
@@ -106,7 +106,7 @@
4
},
{
- "etsi_300_242_duration1.tif",
+ "etsi_300_242_a4_impress.tif",
T4_X_RESOLUTION_R8,
T4_Y_RESOLUTION_STANDARD,
T4_WIDTH_R8_A4,
@@ -115,7 +115,7 @@
5
},
{
- "etsi_300_242_duration2.tif",
+ "etsi_300_242_a4_stairstep.tif",
T4_X_RESOLUTION_R8,
T4_Y_RESOLUTION_STANDARD,
T4_WIDTH_R8_A4,
@@ -124,7 +124,43 @@
6
},
{
- "etsi_300_242_error.tif",
+ "etsi_300_242_a4_white.tif",
+ T4_X_RESOLUTION_R8,
+ T4_Y_RESOLUTION_STANDARD,
+ T4_WIDTH_R8_A4,
+ 1100,
+ COMPRESSION_CCITT_T4,
+ 7
+ },
+ {
+ "etsi_300_242_a4_white_2p.tif",
+ T4_X_RESOLUTION_R8,
+ T4_Y_RESOLUTION_STANDARD,
+ T4_WIDTH_R8_A4,
+ 1100,
+ COMPRESSION_CCITT_T4,
+ 7
+ },
+ { /* Second page of the above file */
+ "",
+ T4_X_RESOLUTION_R8,
+ T4_Y_RESOLUTION_STANDARD,
+ T4_WIDTH_R8_A4,
+ 1100,
+ COMPRESSION_CCITT_T4,
+ 7
+ },
+ {
+ "etsi_300_242_a4_impress_white.tif",
+ T4_X_RESOLUTION_R8,
+ T4_Y_RESOLUTION_STANDARD,
+ T4_WIDTH_R8_A4,
+ 1100,
+ COMPRESSION_CCITT_T4,
+ 5
+ },
+ { /* Second page of the above file */
+ "",
T4_X_RESOLUTION_R8,
T4_Y_RESOLUTION_STANDARD,
T4_WIDTH_R8_A4,
@@ -512,11 +548,16 @@
int i;
int image_length;
+ tiff_file = NULL;
for (i = 0; sequence[i].name; i++)
{
- if ((tiff_file = TIFFOpen(sequence[i].name, "w")) == NULL)
- exit(2);
-
+ if (sequence[i].name[0])
+ {
+ if (tiff_file)
+ TIFFClose(tiff_file);
+ if ((tiff_file = TIFFOpen(sequence[i].name, "w")) == NULL)
+ exit(2);
+ }
/* Prepare the directory entry fully before writing the image, or libtiff complains */
TIFFSetField(tiff_file, TIFFTAG_COMPRESSION, sequence[i].compression);
if (sequence[i].compression == COMPRESSION_CCITT_T4)
@@ -565,37 +606,37 @@
switch (sequence[i].type)
{
case 0:
- /* A white A4 page */
- image_length = create_white_page(tiff_file);
- break;
- case 1:
- /* A stairstep of 64 pixel dashes */
- image_length = create_stairstep_page(tiff_file);
- break;
- case 2:
/* The DIAGO1 page */
image_length = create_diago1_page(tiff_file);
break;
- case 3:
+ case 1:
/* The DIAGO2 page */
image_length = create_diago2_page(tiff_file);
break;
- case 4:
- /* The IMPRESS page */
- image_length = create_impress_page(tiff_file);
- break;
- case 5:
+ case 2:
/* The DURATION1 page */
image_length = create_duration1_page(tiff_file);
break;
- case 6:
+ case 3:
/* The DURATION2 page */
image_length = create_duration2_page(tiff_file);
break;
- case 7:
+ case 4:
/* The ERROR page */
image_length = create_error_page(tiff_file);
break;
+ case 5:
+ /* The IMPRESS page */
+ image_length = create_impress_page(tiff_file);
+ break;
+ case 6:
+ /* A stairstep of 64 pixel dashes */
+ image_length = create_stairstep_page(tiff_file);
+ break;
+ case 7:
+ /* A white A4 page */
+ image_length = create_white_page(tiff_file);
+ break;
}
/* ....then the directory entry, and libtiff is happy. */
TIFFSetField(tiff_file, TIFFTAG_IMAGELENGTH, image_length);
@@ -603,8 +644,9 @@
TIFFSetField(tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_CLEAN);
TIFFWriteDirectory(tiff_file);
- TIFFClose(tiff_file);
}
+ if (tiff_file)
+ TIFFClose(tiff_file);
return 0;
}
/*- End of function --------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/tests/tone_generate_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/tone_generate_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/tone_generate_tests.c Tue Sep 30 23:52:36 2008
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tone_generate_tests.c,v 1.19 2008/08/16 15:24:16 steveu Exp $
+ * $Id: tone_generate_tests.c,v 1.20 2008/09/11 15:13:42 steveu Exp $
*/
/*! \page tone_generate_tests_page Tone generation tests
@@ -60,7 +60,8 @@
fprintf(stderr, " Cannot open wave file '%s'\n", OUTPUT_FILE_NAME);
exit(2);
}
-
+
+ /* Try a tone pair */
make_tone_gen_descriptor(&tone_desc,
440,
-10,
@@ -85,11 +86,37 @@
len);
}
+ /* Try a different tone pair */
make_tone_gen_descriptor(&tone_desc,
350,
-10,
440,
-15,
+ 400,
+ 300,
+ 200,
+ 100,
+ TRUE);
+ tone_gen_init(&tone_state, &tone_desc);
+
+ for (i = 0; i < 1000; i++)
+ {
+ len = tone_gen(&tone_state, amp, 160);
+ printf("Generated %d samples\n", len);
+ if (len <= 0)
+ break;
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ amp,
+ len);
+ }
+
+ /* Try a different tone pair */
+ make_tone_gen_descriptor(&tone_desc,
+ 400,
+ -10,
+ 450,
+ -10,
100,
200,
300,
@@ -108,12 +135,88 @@
amp,
len);
}
-
+
+ /* Try a single tone */
make_tone_gen_descriptor(&tone_desc,
400,
-10,
- 450,
+ 0,
+ 0,
+ 100,
+ 200,
+ 300,
+ 400,
+ TRUE);
+ tone_gen_init(&tone_state, &tone_desc);
+
+ for (i = 0; i < 1000; i++)
+ {
+ len = tone_gen(&tone_state, amp, 160);
+ printf("Generated %d samples\n", len);
+ if (len <= 0)
+ break;
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ amp,
+ len);
+ }
+
+ /* Try a single non-repeating tone */
+ make_tone_gen_descriptor(&tone_desc,
+ 820,
+ -10,
+ 0,
+ 0,
+ 2000,
+ 0,
+ 0,
+ 0,
+ FALSE);
+ tone_gen_init(&tone_state, &tone_desc);
+
+ for (i = 0; i < 1000; i++)
+ {
+ len = tone_gen(&tone_state, amp, 160);
+ printf("Generated %d samples\n", len);
+ if (len <= 0)
+ break;
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ amp,
+ len);
+ }
+
+ /* Try a single non-repeating tone at 0dBm0 */
+ make_tone_gen_descriptor(&tone_desc,
+ 820,
+ 0,
+ 0,
+ 0,
+ 2000,
+ 0,
+ 0,
+ 0,
+ FALSE);
+ tone_gen_init(&tone_state, &tone_desc);
+
+ for (i = 0; i < 1000; i++)
+ {
+ len = tone_gen(&tone_state, amp, 160);
+ printf("Generated %d samples\n", len);
+ if (len <= 0)
+ break;
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ amp,
+ len);
+ }
+
+ /* Try an AM modulated tone at a modest modulation level (25%) */
+ make_tone_gen_descriptor(&tone_desc,
+ 425,
-10,
+ -50,
+ 25,
100,
200,
300,
@@ -133,6 +236,7 @@
len);
}
+ /* Try an AM modulated tone at maximum modulation level (100%) */
make_tone_gen_descriptor(&tone_desc,
425,
-10,
Modified: freeswitch/trunk/libs/spandsp/tests/tsb85_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/tsb85_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/tsb85_tests.c Tue Sep 30 23:52:36 2008
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tsb85_tests.c,v 1.22 2008/09/09 15:30:43 steveu Exp $
+ * $Id: tsb85_tests.c,v 1.23 2008/09/10 16:55:15 steveu Exp $
*/
/*! \file */
@@ -86,6 +86,8 @@
t30_exchanged_info_t expected_rx_info;
+char next_tx_file[1000];
+
static int next_step(faxtester_state_t *s);
static int phase_b_handler(t30_state_t *s, void *user_data, int result)
@@ -317,6 +319,12 @@
i = (intptr_t) user_data;
fprintf(stderr, "%d: Document handler on channel %d - event %d\n", i, i, event);
+ if (next_tx_file[0])
+ {
+ t30_set_tx_file(s, next_tx_file, -1, -1);
+ next_tx_file[0] = '\0';
+ return TRUE;
+ }
return FALSE;
}
/*- End of function --------------------------------------------------------*/
@@ -329,7 +337,9 @@
{
if (msg == NULL)
{
- next_step(s);
+ while (next_step(s) == 0)
+ ;
+ /*endwhile*/
}
else
{
@@ -352,14 +362,20 @@
}
}
if (msg[1] == awaited[1])
- next_step(s);
+ {
+ while (next_step(s) == 0)
+ ;
+ /*endwhile*/
+ }
}
}
/*- End of function --------------------------------------------------------*/
static void faxtester_front_end_step_complete_handler(faxtester_state_t *s, void *user_data)
{
- next_step(s);
+ while (next_step(s) == 0)
+ ;
+ /*endwhile*/
}
/*- End of function --------------------------------------------------------*/
@@ -611,7 +627,9 @@
xmlChar *crc_error;
xmlChar *pattern;
xmlChar *timeout;
- xmlChar *min_time;
+ xmlChar *min_bits;
+ xmlChar *frame_size;
+ xmlChar *compression;
uint8_t buf[1000];
uint8_t mask[1000];
int i;
@@ -619,8 +637,8 @@
int hdlc;
int short_train;
int min_row_bits;
- int compression;
- int compression_step;
+ int ecm_frame_size;
+ int compression_type;
int timer;
int len;
t4_state_t t4_state;
@@ -658,7 +676,9 @@
crc_error = xmlGetProp(s->cur, (const xmlChar *) "crc_error");
pattern = xmlGetProp(s->cur, (const xmlChar *) "pattern");
timeout = xmlGetProp(s->cur, (const xmlChar *) "timeout");
- min_time = xmlGetProp(s->cur, (const xmlChar *) "min_time");
+ min_bits = xmlGetProp(s->cur, (const xmlChar *) "min_bits");
+ frame_size = xmlGetProp(s->cur, (const xmlChar *) "frame_size");
+ compression = xmlGetProp(s->cur, (const xmlChar *) "compression");
s->cur = s->cur->next;
@@ -857,15 +877,21 @@
t30_set_rx_file(t30, output_tiff_file_name, -1);
}
else if (strcasecmp((const char *) tag, "TXFILE") == 0)
- t30_set_tx_file(t30, (const char *) value, -1, -1);
+ {
+ strcpy(next_tx_file, (const char *) value);
+printf("Push '%s'\n", next_tx_file);
+ }
return 0;
}
else if (strcasecmp((const char *) type, "CALL") == 0)
{
fax_init(&fax, FALSE);
fax_prepare();
+ next_tx_file[0] = '\0';
t30 = fax_get_t30_state(&fax);
t30_set_rx_file(t30, output_tiff_file_name, -1);
+ /* Avoid libtiff 3.8.2 and earlier bug on complex 2D lines. */
+ t30_set_rx_encoding(t30, T4_COMPRESSION_ITU_T4_1D);
if (value)
t30_set_tx_file(t30, (const char *) value, -1, -1);
return 0;
@@ -874,7 +900,10 @@
{
fax_init(&fax, TRUE);
fax_prepare();
+ next_tx_file[0] = '\0';
t30 = fax_get_t30_state(&fax);
+ /* Avoid libtiff 3.8.2 and earlier bug on complex 2D lines. */
+ t30_set_rx_encoding(t30, T4_COMPRESSION_ITU_T4_1D);
if (value)
t30_set_tx_file(t30, (const char *) value, -1, -1);
return 0;
@@ -937,8 +966,10 @@
else if (strcasecmp((const char *) type, "MSG") == 0)
{
/* A non-ECM page */
- min_row_bits = 0;
- compression_step = 0;
+ if (min_bits)
+ min_row_bits = atoi((const char *) min_bits);
+ else
+ min_row_bits = 0;
if (t4_tx_init(&t4_state, (const char *) value, -1, -1) == NULL)
{
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to init T.4 send\n");
@@ -946,19 +977,15 @@
}
t4_tx_set_min_row_bits(&t4_state, min_row_bits);
t4_tx_set_header_info(&t4_state, NULL);
- switch (compression_step)
+ compression_type = T4_COMPRESSION_ITU_T4_1D;
+ if (compression)
{
- case 0:
- compression = T4_COMPRESSION_ITU_T4_1D;
- break;
- case 1:
- compression = T4_COMPRESSION_ITU_T4_2D;
- break;
- case 2:
- compression = T4_COMPRESSION_ITU_T6;
- break;
+ if (strcasecmp((const char *) compression, "T.4 2D") == 0)
+ compression_type = T4_COMPRESSION_ITU_T4_2D;
+ else if (strcasecmp((const char *) compression, "T.6") == 0)
+ compression_type = T4_COMPRESSION_ITU_T6;
}
- t4_tx_set_tx_encoding(&t4_state, compression);
+ t4_tx_set_tx_encoding(&t4_state, compression_type);
if (t4_tx_start_page(&t4_state))
{
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to start T.4 send\n");
@@ -971,31 +998,42 @@
corrupt_image(s, image, len, (const char *) bad_rows);
}
t4_tx_end(&t4_state);
+ span_log(&s->logging, SPAN_LOG_FLOW, "Non-ECM image is %d bytes\n", len);
faxtester_set_non_ecm_image_buffer(s, image, len);
}
else if (strcasecmp((const char *) type, "PP") == 0)
{
- compression_step = 0;
+ if (min_bits)
+ min_row_bits = atoi((const char *) min_bits);
+ else
+ min_row_bits = 0;
+ /*endif*/
+ if (frame_size)
+ ecm_frame_size = atoi((const char *) frame_size);
+ else
+ ecm_frame_size = 64;
+ /*endif*/
+ if (crc_error)
+ i = atoi((const char *) crc_error);
+ else
+ i = -1;
+ /*endif*/
if (t4_tx_init(&t4_state, (const char *) value, -1, -1) == NULL)
{
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to init T.4 send\n");
exit(2);
}
- t4_tx_set_min_row_bits(&t4_state, 0);
+ t4_tx_set_min_row_bits(&t4_state, min_row_bits);
t4_tx_set_header_info(&t4_state, NULL);
- switch (compression_step)
+ compression_type = T4_COMPRESSION_ITU_T4_1D;
+ if (compression)
{
- case 0:
- compression = T4_COMPRESSION_ITU_T4_1D;
- break;
- case 1:
- compression = T4_COMPRESSION_ITU_T4_2D;
- break;
- case 2:
- compression = T4_COMPRESSION_ITU_T6;
- break;
+ if (strcasecmp((const char *) compression, "T.4 2D") == 0)
+ compression_type = T4_COMPRESSION_ITU_T4_2D;
+ else if (strcasecmp((const char *) compression, "T.6") == 0)
+ compression_type = T4_COMPRESSION_ITU_T6;
}
- t4_tx_set_tx_encoding(&t4_state, compression);
+ t4_tx_set_tx_encoding(&t4_state, compression_type);
if (t4_tx_start_page(&t4_state))
{
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to start T.4 send\n");
@@ -1010,12 +1048,8 @@
}
/*endif*/
t4_tx_end(&t4_state);
- if (crc_error)
- i = atoi((const char *) crc_error);
- else
- i = -1;
- /*endif*/
- faxtester_set_ecm_image_buffer(s, image, len, 64, i);
+ span_log(&s->logging, SPAN_LOG_FLOW, "ECM image is %d bytes\n", len);
+ faxtester_set_ecm_image_buffer(s, image, len, ecm_frame_size, i);
}
else
{
@@ -1061,6 +1095,7 @@
fax_init(&fax, FALSE);
fax_prepare();
+ next_tx_file[0] = '\0';
while (next_step(s) == 0)
;
@@ -1147,39 +1182,36 @@
xmlDocPtr doc;
xmlNsPtr ns;
xmlNodePtr cur;
-#if 1
xmlValidCtxt valid;
-#endif
ns = NULL;
xmlKeepBlanksDefault(0);
xmlCleanupParser();
if ((doc = xmlParseFile(test_file)) == NULL)
{
- span_log(&s->logging, SPAN_LOG_FLOW, "No document\n");
+ fprintf(stderr, "No document\n");
exit(2);
}
/*endif*/
xmlXIncludeProcess(doc);
-#if 1
if (!xmlValidateDocument(&valid, doc))
{
- span_log(&s->logging, SPAN_LOG_FLOW, "Invalid document\n");
+ fprintf(stderr, "Invalid document\n");
exit(2);
}
/*endif*/
-#endif
+
/* Check the document is of the right kind */
if ((cur = xmlDocGetRootElement(doc)) == NULL)
{
- span_log(&s->logging, SPAN_LOG_FLOW, "Empty document\n");
+ fprintf(stderr, "Empty document\n");
xmlFreeDoc(doc);
exit(2);
}
/*endif*/
if (xmlStrcmp(cur->name, (const xmlChar *) "fax-tests"))
{
- span_log(&s->logging, SPAN_LOG_FLOW, "Document of the wrong type, root node != fax-tests");
+ fprintf(stderr, "Document of the wrong type, root node != fax-tests");
xmlFreeDoc(doc);
exit(2);
}
Modified: freeswitch/trunk/libs/spandsp/tests/tsb85_tests.sh
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/tsb85_tests.sh (original)
+++ freeswitch/trunk/libs/spandsp/tests/tsb85_tests.sh Tue Sep 30 23:52:36 2008
@@ -15,7 +15,7 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-# $Id: tsb85_tests.sh,v 1.4 2008/09/09 15:30:43 steveu Exp $
+# $Id: tsb85_tests.sh,v 1.6 2008/09/11 15:13:42 steveu Exp $
#
run_tsb85_test()
@@ -35,6 +35,12 @@
run_tsb85_test
done
+#MRGN14 fails because ???
+#MRGN16 fails because we don't adequately distinguish between receiving a
+#bad image signal and receiving none at all.
+#MRGN17 fails because we don't adequately distinguish between receiving a
+#bad HDLC message and receiving none at all.
+
#for TEST in MRGN09 MRGN10 MRGN11 MRGN12 MRGN13 MRGN14 MRGN15 MRGN16 MRGN17 ; do
for TEST in MRGN09 MRGN10 MRGN11 MRGN12 MRGN13 MRGN15 ; do
run_tsb85_test
@@ -48,50 +54,62 @@
run_tsb85_test
done
+# MRGX05 is failing because we don't distinguish MPS immediately after MCF from MPS after
+# a corrupt image signal.
+
#for TEST in MRGX01 MRGX02 MRGX03 MRGX04 MRGX05 MRGX06 MRGX07 MRGX08 ; do
-for TEST in MRGX02 MRGX04 MRGX06 MRGX07 MRGX08 ; do
+for TEST in MRGX01 MRGX02 MRGX03 MRGX04 MRGX06 MRGX07 MRGX08 ; do
run_tsb85_test
done
-#for TEST in MRGX09 MRGX10 MRGX11 MRGX12 MRGX13 MRGX14 MRGX15 ; do
-for TEST in MRGX09 MRGX11 ; do
+for TEST in MRGX09 MRGX10 MRGX11 MRGX12 MRGX13 MRGX14 MRGX15 ; do
run_tsb85_test
done
-#for TEST in MTGP01 MTGP02 OTGP03 ; do
-# run_tsb85_test
-#done
+for TEST in MTGP01 MTGP02 OTGP03 ; do
+ run_tsb85_test
+done
-#for TEST in MTGN01 MTGN02 MTGN03 MTGN04 MTGN05 MTGN06 MTGN07 MTGN08 MTGN09 MTGN10 ; do
-# run_tsb85_test
-#done
+for TEST in MTGN01 MTGN02 MTGN03 MTGN04 MTGN05 MTGN06 MTGN07 MTGN08 MTGN09 MTGN10 ; do
+ run_tsb85_test
+done
-#for TEST in MTGN11 MTGN12 MTGN13 MTGN14 MTGN15 MTGN16 MTGN17 MTGN18 MTGN19 MTGN20 ; do
-# run_tsb85_test
-#done
+for TEST in MTGN11 MTGN12 MTGN13 MTGN14 MTGN15 MTGN16 MTGN17 MTGN18 MTGN19 MTGN20 ; do
+ run_tsb85_test
+done
-#for TEST in MTGN21 MTGN22 MTGN23 MTGN24 MTGN25 MTGN26 MTGN27 MTGN28 ; do
-# run_tsb85_test
-#done
+for TEST in MTGN21 MTGN22 MTGN23 MTGN24 MTGN25 MTGN26 MTGN27 MTGN28 ; do
+ run_tsb85_test
+done
-#for TEST in OTGC01 OTGC02 OTGC03 OTGC04 OTGC05 OTGC06 OTGC07 OTGC08 OTGC09 OTGC10 OTGC11 ; do
-# run_tsb85_test
-#done
+for TEST in OTGC01 OTGC02 OTGC03 OTGC04 OTGC05 OTGC06 OTGC07 OTGC08 ; do
+ run_tsb85_test
+done
-#for TEST in OTEN01 OTEN02 OTEN03 OTEN04 OTEN05 OTEN06 ; do
-# run_tsb85_test
-#done
+for TEST in OTGC09-01 OTGC09-02 OTGC09-03 OTGC09-04 OTGC09-05 OTGC09-06 OTGC09-07 OTGC09-08 OTGC09-09 OTGC09-10 OTGC09-11 OTGC09-12 ; do
+ run_tsb85_test
+done
+
+for TEST in OTGC10 OTGC11 ; do
+ run_tsb85_test
+done
+
+for TEST in OTEN01 OTEN02 OTEN03 OTEN04 OTEN05 OTEN06 ; do
+ run_tsb85_test
+done
+
+#MTGX02 fails because ?????
#for TEST in MTGX01 MTGX02 MTGX03 MTGX04 MTGX05 MTGX06 MTGX07 MTGX08 ; do
-# run_tsb85_test
-#done
+for TEST in MTGX01 MTGX03 MTGX04 MTGX05 MTGX06 MTGX07 MTGX08 ; do
+ run_tsb85_test
+done
-#for TEST in MTGX09 MTGX10 MTGX11 MTGX12 MTGX13 MTGX14 MTGX15 MTGX16 ; do
-# run_tsb85_test
-#done
+for TEST in MTGX09 MTGX10 MTGX11 MTGX12 MTGX13 MTGX14 MTGX15 MTGX16 ; do
+ run_tsb85_test
+done
-#for TEST in MTGX17 MTGX18 MTGX19 MTGX20 MTGX21 MTGX22 MTGX23 ; do
-for TEST in MTGX18 MTGX19 MTGX20 MTGX21 MTGX22 MTGX23 ; do
+for TEST in MTGX17 MTGX18 MTGX19 MTGX20 MTGX21 MTGX22 MTGX23 ; do
run_tsb85_test
done
1
0