Tweaks to spandsp
This commit is contained in:
parent
adf5e2f6ec
commit
cb4e31b6cf
|
@ -384,7 +384,7 @@ static void start_tx(adsi_tx_state_t *s)
|
|||
dtmf_tx_init(&s->dtmftx, NULL, NULL);
|
||||
break;
|
||||
case ADSI_STANDARD_TDD:
|
||||
fsk_tx_init(&s->fsktx, &preset_fsk_specs[FSK_WEITBRECHT], async_tx_get_bit, &s->asynctx);
|
||||
fsk_tx_init(&s->fsktx, &preset_fsk_specs[FSK_WEITBRECHT_4545], async_tx_get_bit, &s->asynctx);
|
||||
async_tx_init(&s->asynctx, 5, ASYNC_PARITY_NONE, 2, FALSE, adsi_tdd_get_async_byte, s);
|
||||
/* Schedule an explicit shift at the start of baudot transmission */
|
||||
s->baudot_shift = 2;
|
||||
|
@ -448,7 +448,7 @@ SPAN_DECLARE(adsi_rx_state_t *) adsi_rx_init(adsi_rx_state_t *s,
|
|||
case ADSI_STANDARD_TDD:
|
||||
/* TDD uses 5 bit data, no parity and 1.5 stop bits. We scan for the first stop bit, and
|
||||
ride over the fraction. */
|
||||
fsk_rx_init(&s->fskrx, &preset_fsk_specs[FSK_WEITBRECHT], FSK_FRAME_MODE_5N1_FRAMES, adsi_tdd_put_async_byte, s);
|
||||
fsk_rx_init(&s->fskrx, &preset_fsk_specs[FSK_WEITBRECHT_4545], FSK_FRAME_MODE_5N1_FRAMES, adsi_tdd_put_async_byte, s);
|
||||
break;
|
||||
}
|
||||
s->standard = standard;
|
||||
|
|
|
@ -109,9 +109,10 @@ enum
|
|||
FSK_BELL103CH1,
|
||||
FSK_BELL103CH2,
|
||||
FSK_BELL202,
|
||||
FSK_WEITBRECHT, /* 45.45 baud version, used for TDD (Telecom Device for the Deaf) */
|
||||
FSK_WEITBRECHT50, /* 50 baud version, used for TDD (Telecom Device for the Deaf) */
|
||||
FSK_V21CH1_110 /* 110 bps version of V.21 channel 1, as used by V.18 */
|
||||
FSK_WEITBRECHT_4545, /* 45.45 baud version, used for TDD (Telecom Device for the Deaf) */
|
||||
FSK_WEITBRECHT_50, /* 50 baud version, used for TDD (Telecom Device for the Deaf) */
|
||||
FSK_WEITBRECHT_476, /* 47.6 baud version, used for V.18 probing */
|
||||
FSK_V21CH1_110 /* 110 bps version of V.21 channel 1, as used by V.18 */
|
||||
};
|
||||
|
||||
enum
|
||||
|
|
|
@ -212,6 +212,14 @@ ImageLayer(34732) LONG
|
|||
#define COMPRESSION_T43 10
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
T4_IMAGE_FORMAT_OK = 0,
|
||||
T4_IMAGE_FORMAT_INCOMPATIBLE = -1,
|
||||
T4_IMAGE_FORMAT_NOSIZESUPPORT = -2,
|
||||
T4_IMAGE_FORMAT_NORESSUPPORT = -3
|
||||
} t4_image_format_status_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -267,7 +275,7 @@ SPAN_DECLARE(int) t4_tx_get_bit(t4_tx_state_t *s);
|
|||
indicates that the end of the document has been reached. */
|
||||
SPAN_DECLARE(int) t4_tx_get(t4_tx_state_t *s, uint8_t buf[], size_t max_len);
|
||||
|
||||
/*! \brief Set the encoding for the encoded data.
|
||||
/*! \brief Set the compression for the encoded data.
|
||||
\param s The T.4 context.
|
||||
\param encoding The encoding.
|
||||
\return 0 for success, otherwise -1. */
|
||||
|
|
|
@ -973,25 +973,25 @@ SPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,
|
|||
{
|
||||
case V18_MODE_5BIT_45:
|
||||
s->repeat_shifts = mode & 0x100;
|
||||
fsk_tx_init(&s->fsk_tx, &preset_fsk_specs[FSK_WEITBRECHT], async_tx_get_bit, &s->async_tx);
|
||||
fsk_tx_init(&s->fsk_tx, &preset_fsk_specs[FSK_WEITBRECHT_4545], async_tx_get_bit, &s->async_tx);
|
||||
async_tx_init(&s->async_tx, 5, ASYNC_PARITY_NONE, 2, FALSE, v18_tdd_get_async_byte, s);
|
||||
/* Schedule an explicit shift at the start of baudot transmission */
|
||||
s->baudot_tx_shift = 2;
|
||||
/* TDD uses 5 bit data, no parity and 1.5 stop bits. We scan for the first stop bit, and
|
||||
ride over the fraction. */
|
||||
fsk_rx_init(&s->fsk_rx, &preset_fsk_specs[FSK_WEITBRECHT], FSK_FRAME_MODE_5N1_FRAMES, v18_tdd_put_async_byte, s);
|
||||
fsk_rx_init(&s->fsk_rx, &preset_fsk_specs[FSK_WEITBRECHT_4545], FSK_FRAME_MODE_5N1_FRAMES, v18_tdd_put_async_byte, s);
|
||||
s->baudot_rx_shift = 0;
|
||||
s->next_byte = (uint8_t) 0xFF;
|
||||
break;
|
||||
case V18_MODE_5BIT_50:
|
||||
s->repeat_shifts = mode & 0x100;
|
||||
fsk_tx_init(&s->fsk_tx, &preset_fsk_specs[FSK_WEITBRECHT50], async_tx_get_bit, &s->async_tx);
|
||||
fsk_tx_init(&s->fsk_tx, &preset_fsk_specs[FSK_WEITBRECHT_50], async_tx_get_bit, &s->async_tx);
|
||||
async_tx_init(&s->async_tx, 5, ASYNC_PARITY_NONE, 2, FALSE, v18_tdd_get_async_byte, s);
|
||||
/* Schedule an explicit shift at the start of baudot transmission */
|
||||
s->baudot_tx_shift = 2;
|
||||
/* TDD uses 5 bit data, no parity and 1.5 stop bits. We scan for the first stop bit, and
|
||||
ride over the fraction. */
|
||||
fsk_rx_init(&s->fsk_rx, &preset_fsk_specs[FSK_WEITBRECHT50], FSK_FRAME_MODE_5N1_FRAMES, v18_tdd_put_async_byte, s);
|
||||
fsk_rx_init(&s->fsk_rx, &preset_fsk_specs[FSK_WEITBRECHT_50], FSK_FRAME_MODE_5N1_FRAMES, v18_tdd_put_async_byte, s);
|
||||
s->baudot_rx_shift = 0;
|
||||
s->next_byte = (uint8_t) 0xFF;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue