27 #if !defined(_SPANDSP_PRIVATE_SIG_TONE_H_)
28 #define _SPANDSP_PRIVATE_SIG_TONE_H_
33 #if defined(SPANDSP_USE_FIXED_POINT)
54 #if defined(SPANDSP_USE_FIXED_POINT)
175 #if defined(SPANDSP_USE_FIXED_POINT)
191 #if defined(SPANDSP_USE_FIXED_POINT)
@ SIG_TONE_2_PRESENT
Definition: sig_tone.h:74
Definition: private/sig_tone.h:157
void * user_data
A user specified opaque pointer passed to the callback function.
Definition: private/sig_tone.h:130
int tone_amp[2][2]
The high and low tone amplitudes for each of the tones, in dBm0.
Definition: private/sig_tone.h:79
int16_t detection_ratio
Minimum signalling tone to total power ratio, in dB.
Definition: private/sig_tone.h:115
int current_rx_tone
The current receive tone.
Definition: private/sig_tone.h:167
float b[3]
Flat mode bandpass bi-quad parameters.
Definition: private/sig_tone.h:65
int16_t dds_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
Generate an integer tone sample, with modulation.
Definition: dds_int.c:378
int32_t flat_detection_threshold
The minimum reading from the power meter for detection in flat mode.
Definition: private/sig_tone.h:207
int sig_tone_rx_release(sig_tone_rx_state_t *s)
Release a signalling tone receiver context.
Definition: sig_tone.c:680
int notch_insertion_timeout
???
Definition: private/sig_tone.h:220
int16_t flat_detection_threshold
Minimum total power for detection in flat mode, in dB.
Definition: private/sig_tone.h:119
power_meter_t flat_power
The output power of the flat (unfiltered or flat filtered) path.
Definition: private/sig_tone.h:199
int16_t tone_scaling[2][2]
Definition: private/sig_tone.h:141
int32_t dds_phase_rate(float frequency)
Find the phase rate value to achieve a particular frequency.
Definition: dds_int.c:316
int high_low_timeout
The delay, in audio samples, before the high level tone drops to a low level tone....
Definition: private/sig_tone.h:87
void sig_tone_rx_set_mode(sig_tone_rx_state_t *s, int mode, int duration)
Set the receive mode.
Definition: sig_tone.c:626
int tones
The number of tones used.
Definition: private/sig_tone.h:108
int16_t dds_scaling_dbm0(float level)
Find the scaling factor needed to achieve a specified level in dBm0.
Definition: dds_int.c:328
int16_t sharp_detection_threshold
Minimum total power for detection in sharp mode, in dB.
Definition: private/sig_tone.h:117
int current_notch_filter
???
Definition: private/sig_tone.h:171
int32_t power_meter_update(power_meter_t *s, int16_t amp)
Update a power meter.
Definition: power_meter.c:84
int tone_persistence_timeout
Persistence check for tone present.
Definition: private/sig_tone.h:202
@ SIG_TONE_RX_FILTER_TONE
Definition: sig_tone.h:83
tone_report_func_t sig_update
The callback function used to handle signalling changes.
Definition: private/sig_tone.h:159
tone_report_func_t sig_update
The callback function used to handle signalling changes.
Definition: private/sig_tone.h:128
const sig_tone_descriptor_t * desc
Tone descriptor.
Definition: private/sig_tone.h:164
int notch_lag_time
Parameters to control the behaviour of the notch filter, used to remove the tone from the voice path ...
Definition: private/sig_tone.h:100
Definition: power_meter.h:49
const sig_tone_flat_coeffs_t * flat
The coefficients for the single bi-quad flat mode filter.
Definition: private/sig_tone.h:112
int signalling_state_duration
Time in current signalling state, in samples.
Definition: private/sig_tone.h:150
const sig_tone_descriptor_t * desc
Tone descriptor.
Definition: private/sig_tone.h:133
int current_tx_tone
Current transmit tone.
Definition: private/sig_tone.h:146
int signalling_state
???
Definition: private/sig_tone.h:223
void sig_tone_tx_set_mode(sig_tone_tx_state_t *s, int mode, int duration)
Set the tone mode.
Definition: sig_tone.c:299
uint32_t phase_acc[2]
Definition: private/sig_tone.h:138
float a[3]
Flat mode bandpass bi-quad parameters.
Definition: private/sig_tone.h:63
int32_t sharp_detection_threshold
The minimum reading from the power meter for detection in sharp mode.
Definition: private/sig_tone.h:209
@ SIG_TONE_TX_UPDATE_REQUEST
Definition: sig_tone.h:85
int sig_tone_tx(sig_tone_tx_state_t *s, int16_t amp[], int len)
Generate a block of signalling tone audio samples.
Definition: sig_tone.c:222
Definition: private/schedule.h:39
The coefficient set for a pair of cascaded bi-quads that make a signalling notch filter.
Definition: private/sig_tone.h:32
sig_tone_tx_state_t * sig_tone_tx_init(sig_tone_tx_state_t *s, int tone_type, tone_report_func_t sig_update, void *user_data)
Initialise a signalling tone context.
Definition: sig_tone.c:319
int sig_tone_tx_free(sig_tone_tx_state_t *s)
Free a signalling tone transmitter context.
Definition: sig_tone.c:358
int32_t detection_ratio
The minimum ratio between notched power and total power for detection.
Definition: private/sig_tone.h:211
int high_low_timer
Definition: private/sig_tone.h:143
int high_low_timer
The timeout for switching from the high level to low level tone detector.
Definition: private/sig_tone.h:169
int current_tx_timeout
Current transmit timeout.
Definition: private/sig_tone.h:148
void * user_data
A user specified opaque pointer passed to the callback function.
Definition: private/sig_tone.h:161
int sig_tone_rx(sig_tone_rx_state_t *s, int16_t amp[], int len)
Process a block of received audio samples.
Definition: sig_tone.c:368
float flat_z[2]
The z's for the weighting/bandpass filter.
Definition: private/sig_tone.h:196
power_meter_t power
The power output of the notch.
Definition: private/sig_tone.h:188
@ SIG_TONE_2_CHANGE
Definition: sig_tone.h:76
int tone_off_check_time
The tone off persistence check, in audio samples.
Definition: private/sig_tone.h:105
@ SIG_TONE_TX_PASSTHROUGH
Definition: sig_tone.h:78
@ SIG_TONE_1_PRESENT
Definition: sig_tone.h:70
const sig_tone_notch_coeffs_t * notch[2]
The coefficients for the cascaded bi-quads notch filter.
Definition: private/sig_tone.h:110
The coefficient set for a bi-quad that makes a signalling flat filter. Some signalling tone schemes r...
Definition: private/sig_tone.h:53
int sig_tone_tx_release(sig_tone_tx_state_t *s)
Release a signalling tone transmitter context.
Definition: sig_tone.c:352
int32_t power_meter_level_dbm0(float level)
Get the current power meter reading, in dBm0.
Definition: power_meter.c:91
int last_sample_tone_present
The tone pattern on the last audio sample.
Definition: private/sig_tone.h:204
sig_tone_rx_state_t * sig_tone_rx_init(sig_tone_rx_state_t *s, int tone_type, tone_report_func_t sig_update, void *user_data)
Initialise a signalling tone context.
Definition: sig_tone.c:632
@ SIG_TONE_RX_PASSTHROUGH
Definition: sig_tone.h:80
int signalling_state_duration
???
Definition: private/sig_tone.h:225
@ SIG_TONE_1_CHANGE
Definition: sig_tone.h:72
int flat_mode_timeout
???
Definition: private/sig_tone.h:218
int32_t phase_rate[2]
Definition: private/sig_tone.h:136
float notch_z2[2]
The z's for the notch filter.
Definition: private/sig_tone.h:184
power_meter_t * power_meter_init(power_meter_t *s, int shift)
Initialise a power meter context.
Definition: power_meter.c:50
int sharp_flat_timeout
Some signalling tone detectors use a sharp initial filter, changing to a broader, flatter,...
Definition: private/sig_tone.h:92
Definition: private/sig_tone.h:126
int sig_tone_rx_free(sig_tone_rx_state_t *s)
Free a signalling tone receiver context.
Definition: sig_tone.c:686
Definition: private/sig_tone.h:75
int notch_enabled
TRUE if the notch filter is enabled in the media path.
Definition: private/sig_tone.h:216
int flat_mode
TRUE if in flat mode. FALSE if in sharp mode.
Definition: private/sig_tone.h:214
int tone_freq[2]
The tones used.
Definition: private/sig_tone.h:77
float notch_z1[2]
The z's for the notch filter.
Definition: private/sig_tone.h:182
int tone_on_check_time
The tone on persistence check, in audio samples.
Definition: private/sig_tone.h:103