forked from Mirrors/freeswitch
Further changes to polish the long training/short training issues that spoilt
T.38 gateway operation with some FAX machines
This commit is contained in:
parent
2a1a3867d1
commit
eed8ea1b82
@ -1627,6 +1627,7 @@ static void non_ecm_rx_status(void *user_data, int status)
|
||||
s->audio.modems.rx_trained = TRUE;
|
||||
s->core.timed_mode = TIMED_MODE_IDLE;
|
||||
s->core.samples_to_timeout = 0;
|
||||
s->core.short_train = TRUE;
|
||||
to_t38_buffer_init(&s->core.to_t38);
|
||||
break;
|
||||
case SIG_STATUS_CARRIER_UP:
|
||||
@ -1792,6 +1793,7 @@ static void hdlc_rx_status(hdlc_rx_state_t *t, int status)
|
||||
/* The modem is now trained. */
|
||||
s->audio.modems.rx_signal_present = TRUE;
|
||||
s->audio.modems.rx_trained = TRUE;
|
||||
s->core.short_train = TRUE;
|
||||
/* Behave like HDLC preamble has been announced. */
|
||||
t->framing_ok_announced = TRUE;
|
||||
to_t38_buffer_init(&s->core.to_t38);
|
||||
|
@ -1358,12 +1358,12 @@ SPAN_DECLARE(int) v17_rx_restart(v17_rx_state_t *s, int bit_rate, int short_trai
|
||||
s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
|
||||
equalizer_reset(s);
|
||||
#if defined(SPANDSP_USE_FIXED_POINTx)
|
||||
//s->agc_scaling_save = 0;
|
||||
s->agc_scaling_save = 0;
|
||||
s->agc_scaling = (float) FP_FACTOR*32768.0f*0.0017f/RX_PULSESHAPER_GAIN;
|
||||
s->carrier_track_i = 5000;
|
||||
s->carrier_track_p = 40000;
|
||||
#else
|
||||
//s->agc_scaling_save = 0.0f;
|
||||
s->agc_scaling_save = 0.0f;
|
||||
s->agc_scaling = 0.0017f/RX_PULSESHAPER_GAIN;
|
||||
s->carrier_track_i = 5000.0f;
|
||||
s->carrier_track_p = 40000.0f;
|
||||
@ -1371,6 +1371,7 @@ SPAN_DECLARE(int) v17_rx_restart(v17_rx_state_t *s, int bit_rate, int short_trai
|
||||
}
|
||||
s->last_sample = 0;
|
||||
span_log(&s->logging, SPAN_LOG_FLOW, "Phase rates %f %f\n", dds_frequencyf(s->carrier_phase_rate), dds_frequencyf(s->carrier_phase_rate_save));
|
||||
span_log(&s->logging, SPAN_LOG_FLOW, "Gains %f %f\n", s->agc_scaling_save, s->agc_scaling);
|
||||
|
||||
/* Initialise the working data for symbol timing synchronisation */
|
||||
#if defined(SPANDSP_USE_FIXED_POINTx)
|
||||
@ -1407,7 +1408,7 @@ SPAN_DECLARE(v17_rx_state_t *) v17_rx_init(v17_rx_state_t *s, int bit_rate, put_
|
||||
case 9600:
|
||||
case 7200:
|
||||
case 4800:
|
||||
/* 4800 is an extension of V.17, to provide full converage of the V.32bis modes */
|
||||
/* 4800 is an extension of V.17, to provide full coverage of the V.32bis modes */
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
@ -1425,13 +1426,6 @@ SPAN_DECLARE(v17_rx_state_t *) v17_rx_init(v17_rx_state_t *s, int bit_rate, put_
|
||||
s->short_train = FALSE;
|
||||
//s->scrambler_tap = 18 - 1;
|
||||
v17_rx_signal_cutoff(s, -45.5f);
|
||||
#if defined(SPANDSP_USE_FIXED_POINTx)
|
||||
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
|
||||
s->carrier_phase_rate_save = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
|
||||
v17_rx_restart(s, bit_rate, s->short_train);
|
||||
return s;
|
||||
|
Loading…
Reference in New Issue
Block a user