Radio Control  Control Software and GUI for the Panoradio SDR, by DC9ST 2016
Public Slots | Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
AudioRX Class Reference

Toplevel class for an audio receiver with two audio DDCs with IQ Reset (DDC) More...

#include <audiorx.h>

Inheritance diagram for AudioRX:

Public Slots

void get_output_properties (int bandwidth, bool inverted, bool binaural)
 receives request for changing the audio processing properties More...
 
void get_ddc_frequency (double frequency, int ddc_number)
 receives request for changing the audio DDC's LO freqency More...
 
void get_output_ddc_selection (int ddc_number, bool active)
 receives request for selection, which DDCs are active for outputting audio data
 
void get_output_scaler_setting (int scaling_value_db)
 receives request to change the audio scaler gain setting
 
void get_output_scaler_auto_setting (bool auto_setting)
 receives request to change the automatic mode of the audio scaler
 
void scaler_timer_slot ()
 receives timer signal (every 500ms) to automatically update the scaler setting and sending the current audio level (by calling signal "send_audio_out_level")
 

Signals

void send_scaling_value (int true_scaler_value_db)
 sends the current gain value (in dB) of the audio scaler
 
void send_audio_out_level (int audio_level, int audio_level_dbfs)
 sends the current audio level (after the audio DDC)
 
void send_true_frequency (double frequency, int ddc)
 sends the actually set LO frequency after a frequency update has been recevied by slot get_ddc_frequency
 
void send_new_frequency_ddc0 (double frequency)
 sends the current LO frequency for DDC 0 (when it has been newly set in the DDC, e.g. originating in a waterfall shift)
 
void send_new_frequency_ddc1 (double frequency)
 sends the current LO frequency for DDC 1 (when it has been newly set in the DDC, e.g. originating in a waterfall shift)
 

Public Member Functions

 AudioRX ()
 constructor
 
 ~AudioRX ()
 destructor
 
void init_reset (int address, int memsize)
 initializes the reset IP core More...
 
void init_ddc_selector (int address, int memsize)
 initializes the MUX controller for selecting the audio DDCs More...
 
void init_lo (int address, int memsize, double master_frequency, int phase_width, double init_frequency, int ddc_number)
 initializes LO IP core of one DDC More...
 
void init_capture (int address, int memsize, int capture_size, int ddc_number)
 initializes Dual Capture IP core for IQ data of one DDC More...
 
void init_waterfall (WaterfallPlot *waterfall_audio, int max_frequency, double data_range_min, double data_range_max, double span_init, int data_size, int waterfall_depth, int ddc_number)
 initializes the waterfall for one DDC More...
 
void init_scaling (int i_address, int i_memsize, int q_address, int q_memsize, int max_scaling_db)
 initializes the scaling IP cores for I and Q components More...
 
void init_mux_controller (int address, int memsize)
 initializes the MUX controller for bandwidth, spectrum inversion and binaural mode selection More...
 
void init_weaver_lo (int address, int memsize, double master_frequency, int phase_width, double init_frequency)
 initializes Weaver LO More...
 
void capture_and_show (double gain_correction, int ddc_number)
 updates waterfall: captures data, does FFT and draws one line for the audio DDC More...
 
void init_output_spectrum_display (int capture_address, int capture_memsize, int capture_size, QwtPlot *spectrum_out_plot)
 shows the audio output spectrum before the audio IF to the PS or ADAU More...
 
void capture_and_show_spectrum_out ()
 shows the audio output spectrum before the audio IF to the PS or ADAU
 
void reset ()
 resets all audio DDCs and audio out interface, i.e. IQ paths (and sample rate conversion and audio interface)
 
void correct_size ()
 corrects size of the waterfall plots of all audio DDCs
 
bool get_ddc_output_active (int ddc_number)
 returns if DDC with specified number (0 to num_audio_ddcs_-1) currently outputs data
 

Private Member Functions

void set_audio_scaling (int scaling_factor_db)
 

Private Attributes

IP_Driver * ddc_selector_
 
IP_Driver * reset_module_
 
AudioDDC ** audio_ddc_
 
Data_Capture_Dual * capture_spectrum_out_
 
QwtPlot * spectrum_out_plot_
 
QwtPlotCurve * spectrum_out_curve_
 
QwtPlotGrid * spectrum_out_grid_
 
fft_basicfft_
 
double * captured_data_i_
 
double * captured_data_q_
 
double * captured_data_fft_db_
 
double * captured_data_fft_db_real_
 
int capture_size_
 
int num_audio_ddcs_
 
bool reset_initialized_
 
bool ddc_selector_initialized_
 
bool spectrum_out_initialized_
 
bool scaler_initalized_
 
bool mux_controller_initialized_
 
bool weaver_lo_initialized_
 
bool * ddc_out_active_
 
Signal_Scaler * audio_scaler_i_
 
Signal_Scaler * audio_scaler_q_
 
IP_Driver * mux_controller_
 
DDS * weaver_lo_
 
bool auto_scaling_
 
int manual_scaler_setting_db_
 
int max_scaling_db_
 
bool binaural_out_
 

Detailed Description

Toplevel class for an audio receiver with two audio DDCs with IQ Reset (DDC)

Member Function Documentation

void AudioRX::capture_and_show ( double  gain_correction,
int  ddc_number 
)

updates waterfall: captures data, does FFT and draws one line for the audio DDC

Parameters
gain_correctioncorrection of gain for FFT power spectrum, apart from CPG (e.g. scaling/filter/mixer gain)
ddc_numbernumber of audio ddc (0 or 1)
void AudioRX::get_ddc_frequency ( double  frequency,
int  ddc_number 
)
slot

receives request for changing the audio DDC's LO freqency

Parameters
frequencyLO frequency in kHz
ddc_number
void AudioRX::get_output_properties ( int  bandwidth,
bool  inverted,
bool  binaural 
)
slot

receives request for changing the audio processing properties

Parameters
bandwidth0: wideband, 1: mediumband, 2: narrowband
invertedspectrum inversion (other sideband)
binauralbinaural mode, i.e. stereo I/Q
void AudioRX::init_capture ( int  address,
int  memsize,
int  capture_size,
int  ddc_number 
)

initializes Dual Capture IP core for IQ data of one DDC

Parameters
addressIP core address (from Vivado)
memsizeIP core memory size in k (from Vivado)
capture_sizedepth of capture memory in i/q sample pairs
ddc_numbernumber of DDC (0 or 1)
void AudioRX::init_ddc_selector ( int  address,
int  memsize 
)

initializes the MUX controller for selecting the audio DDCs

Parameters
addressIP core adress from Vivado
memsizememory space size in k from Vivado
void AudioRX::init_lo ( int  address,
int  memsize,
double  master_frequency,
int  phase_width,
double  init_frequency,
int  ddc_number 
)

initializes LO IP core of one DDC

Parameters
addressIP core address (from Vivado)
memsizeIP core memory size in k (from Vivado)
master_frequencyDDS master frequency in kHz (from Vivado)
phase_widthDDS phase width (from Vivado)
init_frequencyinital LO frequency in kHz
ddc_numbernumber of DDC (0 or 1)
void AudioRX::init_mux_controller ( int  address,
int  memsize 
)

initializes the MUX controller for bandwidth, spectrum inversion and binaural mode selection

Parameters
addressIP core adress from Vivado
memsizememory space size in k from Vivado
void AudioRX::init_output_spectrum_display ( int  capture_address,
int  capture_memsize,
int  capture_size,
QwtPlot *  spectrum_out_plot 
)

shows the audio output spectrum before the audio IF to the PS or ADAU

Parameters
capture_addressaddress of dual capture IP core
capture_memsize
capture_sizecapture size of dual capture IP core
spectrum_out_plotpointer to QwtPlot, which will display the spectrum
void AudioRX::init_reset ( int  address,
int  memsize 
)

initializes the reset IP core

Parameters
addressIP core address from Vivado
memsizememory space size in k from Vivado
void AudioRX::init_scaling ( int  i_address,
int  i_memsize,
int  q_address,
int  q_memsize,
int  max_scaling_db 
)

initializes the scaling IP cores for I and Q components

Parameters
i_addressI scaler IP core address from Vivado
i_memsizeI scaler memory space size in k from Vivado
q_addressQ scaler IP core address from Vivado
q_memsizeQ scaler memory space size in k from Vivado
max_scaling_dbmaximum scaling value in dB (e.g. 48 means -48dB to +48dB)
void AudioRX::init_waterfall ( WaterfallPlot waterfall_audio,
int  max_frequency,
double  data_range_min,
double  data_range_max,
double  span_init,
int  data_size,
int  waterfall_depth,
int  ddc_number 
)

initializes the waterfall for one DDC

Parameters
*waterfall_audiopointer to waterfall display
max_frequencymaximum frequency the waterfall can be scrolled to in kHz (e.g. 125000 for 125 MHz)
data_range_minminimum data value in waterfall
data_range_maxmaximum data value in waterfall
span_initinitial frequency span of waterfall in kHz (= audio IQ signal's sample rate)
data_sizesize of data block to be captured and displayed
waterfall_depthdepth of waterfall display
ddc_numbernumber of DDC (0 or 1)
void AudioRX::init_weaver_lo ( int  address,
int  memsize,
double  master_frequency,
int  phase_width,
double  init_frequency 
)

initializes Weaver LO

Parameters
addressIP core address (from Vivado)
memsizeIP core memory size in k (from Vivado)
master_frequencyDDS master frequency in kHz (from Vivado)
phase_widthDDS phase width (from Vivado)
init_frequencyinital weaver frequency in kHz

The documentation for this class was generated from the following files: