From 71dd24d1994fffdb0c33f6de07ef7959e643bff5 Mon Sep 17 00:00:00 2001 From: Steve Underwood Date: Sun, 9 Sep 2012 01:08:15 +0800 Subject: [PATCH] Some tweaks to spandsp --- libs/spandsp/src/fax_modems.c | 1 - libs/spandsp/src/t38_gateway.c | 1 + libs/spandsp/tests/t31_tests.c | 2 +- libs/spandsp/tests/t4_tests.c | 6 +++--- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/spandsp/src/fax_modems.c b/libs/spandsp/src/fax_modems.c index d2510a4909..f1658ccf56 100644 --- a/libs/spandsp/src/fax_modems.c +++ b/libs/spandsp/src/fax_modems.c @@ -262,7 +262,6 @@ SPAN_DECLARE(void) fax_modems_start_slow_modem(fax_modems_state_t *s, int which) case FAX_MODEM_V21_RX: fsk_rx_init(&s->v21_rx, &preset_fsk_specs[FSK_V21CH2], FSK_FRAME_MODE_SYNC, (put_bit_func_t) hdlc_rx_put_bit, &s->hdlc_rx); fsk_rx_signal_cutoff(&s->v21_rx, -39.09f); - //fax_modems_set_rx_handler(s, (span_rx_handler_t) &fsk_rx, &s->v21_rx, (span_rx_fillin_handler_t) &fsk_rx_fillin, &s->v21_rx); s->rx_frame_received = FALSE; break; case FAX_MODEM_V21_TX: diff --git a/libs/spandsp/src/t38_gateway.c b/libs/spandsp/src/t38_gateway.c index e3993609cc..3572b36c1e 100644 --- a/libs/spandsp/src/t38_gateway.c +++ b/libs/spandsp/src/t38_gateway.c @@ -1977,6 +1977,7 @@ static int restart_rx_modem(t38_gateway_state_t *s) fax_modems_start_fast_modem(t, s->core.fast_rx_modem, s->core.fast_bit_rate, s->core.short_train, FALSE); s->core.fast_rx_active = s->core.fast_rx_modem; break; + case FAX_MODEM_V21_RX: default: //fax_modems_start_slow_modem(t, FAX_MODEM_V21_RX); fax_modems_set_rx_handler(t, (span_rx_handler_t) &fsk_rx, &t->v21_rx, (span_rx_fillin_handler_t) &fsk_rx_fillin, &t->v21_rx); diff --git a/libs/spandsp/tests/t31_tests.c b/libs/spandsp/tests/t31_tests.c index a5a1293167..82e1597dd0 100644 --- a/libs/spandsp/tests/t31_tests.c +++ b/libs/spandsp/tests/t31_tests.c @@ -120,7 +120,7 @@ static const struct command_response_s fax_send_test_seq[] = // EXCHANGE("\xFF\x03\x43\x32\x32\x32\x32\x32\x32\x32\x32\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x10\x03", "\r\nCONNECT\r\n"), // - EXCHANGE("\xFF\x13\x83\x01\xC6\x80\x80\x80\x80\x01\xFD\x13\x10\x03", "\r\nOK\r\n"), + EXCHANGE("\xFF\x13\x83\x01\xC6\x80\x80\x80\x80\x01\x10\x03", "\r\nOK\r\n"), //Do a wait for timed silence at this point, or there won't be one in the tests EXCHANGE("AT+FRS=7\r", "\r\nOK\r\n"), //EXCHANGE("AT+FTS=8;+FTM=96\r", "\r\nCONNECT\r\n"), diff --git a/libs/spandsp/tests/t4_tests.c b/libs/spandsp/tests/t4_tests.c index b53c8f65be..db9581aaee 100644 --- a/libs/spandsp/tests/t4_tests.c +++ b/libs/spandsp/tests/t4_tests.c @@ -484,7 +484,7 @@ int main(int argc, char *argv[]) } end_of_page = t4_rx_put(&receive_state, block, i); } - else if (strlen(buf) > 2 && sscanf(buf, "T.30 Rx: %x %x", (unsigned int *) &bit, (unsigned int *) &bit) == 2) + else if (strlen(buf) > 2 && sscanf(buf, "T.30 Rx: %x %x %x %x", (unsigned int *) &bit, (unsigned int *) &bit, (unsigned int *) &bit, (unsigned int *) &pkt_no) == 4) { /* Useful for breaking up ECM logs */ if (pkt_no != last_pkt_no + 1) @@ -575,7 +575,7 @@ int main(int argc, char *argv[]) if (compression < 0 || (block_size == 0 && compression_step >= 3)) break; } - t4_tx_set_tx_encoding(&send_state, compression); + t4_tx_set_tx_encoding(&send_state, compression, T4_COMPRESSION_NONE); t4_rx_set_rx_encoding(&receive_state, compression); rows_read = 0; @@ -716,7 +716,7 @@ int main(int argc, char *argv[]) compression = compression_sequence[compression_step++]; } } - t4_tx_set_tx_encoding(&send_state, compression); + t4_tx_set_tx_encoding(&send_state, compression, T4_COMPRESSION_NONE); t4_rx_set_rx_encoding(&receive_state, compression); if (t4_tx_start_page(&send_state))