Atmel Software Framework

dsp_process.c File Reference
#include "dsp_process.h"
#include "dsp.h"
#include "tpa6130.h"
#include "abdac.h"
#include "audio.h"
#include "conf_demo.h"

Functions

void audio_callback (U32 arg)
 
void dac_overrun_callback (void)
 
void dac_reload_callback (void)
 
static void dsp_calculate_fft (dsp16_t *fft, dsp16_t *signal)
 
void dsp_process_init (int cpu_hz, int hsb_hz, int pba_hz, int pbb_hz)
 
void dsp_process_task (void)
 
const char * filter_active_get_description ()
 
const char * filter_get_description (unsigned int num)
 
void filter_restore_default ()
 
void filter_set_active (unsigned int num)
 
void generate_signal (dsp16_t *signal, struct signal_source *source)
 
unsigned int signal_source_get_freq (struct signal_source *source)
 
dsp16_t signal_source_get_volume (struct signal_source *source)
 
void signal_source_init (struct signal_source *source, unsigned int frequency, dsp16_t volume)
 
void signal_source_restore_defaults (struct signal_source *source)
 
void signal_source_set_freq (struct signal_source *source, unsigned int frequency)
 
void signal_source_set_volume (struct signal_source *source, dsp16_t volume)
 

Variables

unsigned int active_filter
 
dsp16_tcurrent_stereo_out_buf
 
static A_ALIGNED dsp16_t fft_window [BUFFER_LENGTH]
 
A_ALIGNED dsp16_t filter_coef [NUM_FILTERS-1][FIR_NUM_COEF]
 
const char * filter_description [NUM_FILTERS]
 
A_ALIGNED dsp16_t signal1_buf [BUFFER_LENGTH]
 
struct signal_source signal1_generator
 
A_ALIGNED dsp16_t signal2_buf [BUFFER_LENGTH]
 
struct signal_source signal2_generator
 
dsp16_tsignal_in_buf
 
A_ALIGNED dsp16_t signal_in_fft [BUFFER_LENGTH]
 
A_ALIGNED dsp16_t signal_out_buf [BUFFER_LENGTH+4]
 
A_ALIGNED dsp16_t signal_out_fft [BUFFER_LENGTH]
 
A_ALIGNED dsp16_t signal_pre_filter_buf [FIR_NUM_COEF+BUFFER_LENGTH]
 
bool signals_are_updated
 
A_ALIGNED dsp16_t stereo_out_buf1 [BUFFER_LENGTH *2]
 
A_ALIGNED dsp16_t stereo_out_buf2 [BUFFER_LENGTH *2]
 

void dac_overrun_callback ( void  )
void dac_reload_callback ( void  )
void dsp_process_task ( void  )
const char* filter_active_get_description ( )
const char* filter_get_description ( unsigned int  num)
void filter_restore_default ( )

References active_filter.

Referenced by dsp_process_init().

void filter_set_active ( unsigned int  num)

References active_filter, num, and NUM_FILTERS.

Referenced by state_machine_filter().

unsigned int signal_source_get_freq ( struct signal_source source)
dsp16_t signal_source_get_volume ( struct signal_source source)

References signal_source::volume.

Referenced by state_machine_source().

void signal_source_init ( struct signal_source source,
unsigned int  frequency,
dsp16_t  volume 
)
void signal_source_restore_defaults ( struct signal_source source)
void signal_source_set_freq ( struct signal_source source,
unsigned int  frequency 
)
void signal_source_set_volume ( struct signal_source source,
dsp16_t  volume 
)

References signal_source::volume, and volume.

Referenced by state_machine_source().

unsigned int active_filter
dsp16_t* current_stereo_out_buf

Referenced by dsp_process_init().

A_ALIGNED dsp16_t fft_window[BUFFER_LENGTH]
static
const char* filter_description[NUM_FILTERS]
Initial value:
= {
"No filtering",
"High-pass filter,\n1000Hz cut-off",
"Low-pass filter,\n1000Hz cut-off",
}

Referenced by filter_get_description().

Referenced by gui_task().

struct signal_source signal1_generator

Referenced by gui_task().

struct signal_source signal2_generator
dsp16_t* signal_in_buf

Referenced by dsp_process_task(), and gui_task().

A_ALIGNED dsp16_t signal_out_buf[BUFFER_LENGTH+4]

Referenced by dsp_process_task(), and gui_task().

A_ALIGNED dsp16_t signal_out_fft[BUFFER_LENGTH]

Referenced by dsp_process_task(), and gui_task().

A_ALIGNED dsp16_t signal_pre_filter_buf[FIR_NUM_COEF+BUFFER_LENGTH]

Referenced by dsp_process_init().

bool signals_are_updated

Referenced by gui_print_signal_box().

A_ALIGNED dsp16_t stereo_out_buf1[BUFFER_LENGTH *2]

Referenced by dsp_process_init().

A_ALIGNED dsp16_t stereo_out_buf2[BUFFER_LENGTH *2]