Atmel Software Framework

ms3.c File Reference
#include "ms3.h"
#include "ssc_i2s.h"
#include "pdca.h"
#include "board.h"
#include "audio.h"
#include "intc.h"
#include "gpio.h"
#include "twi.h"
#include "cs2200.h"

Macros

#define CS2200_FREF   12000000
 Frequency (in Hz) of the reference clock connected to the CS2200. More...
 
#define MS3_SSC_TX_FRAME_SYNC_PIN   (AVR32_SSC_TX_FRAME_SYNC_0_PIN)
 
#define MS3_SSC_TX_PDCA_CHANNEL   (0)
 

Functions

void ms3_dac_decrease_volume (void)
 
void ms3_dac_flush (void)
 
U8 ms3_dac_get_volume (void)
 
void ms3_dac_increase_volume (void)
 
bool ms3_dac_is_volume_boosted (void)
 
bool ms3_dac_is_volume_muted (void)
 
void ms3_dac_mute (bool mute)
 
bool ms3_dac_output (void *sample_buffer, size_t sample_length)
 
void ms3_dac_set_volume (U8 volume)
 
void ms3_dac_setup (U32 sample_rate_hz, U8 num_channels, U8 bits_per_sample, bool swap_channels, void(*callback)(U32 arg), U32 callback_opt, U32 pba_hz)
 
void ms3_dac_start (U32 sample_rate_hz, U8 num_channels, U8 bits_per_sample, bool swap_channels, void(*callback)(U32 arg), U32 callback_opt, U32 pba_hz)
 
void ms3_dac_stop (void)
 
static uint8_t ms3_get_volume (uint8_t ch)
 
static uint16_t ms3_read_reg (uint8_t reg)
 
static void ms3_set_volume (uint8_t ch, uint8_t vol)
 
static void ms3_ssc_tx_pdca_int_handler (void)
 
static void ms3_write_reg (uint8_t reg, uint8_t data)
 

Variables

static const gpio_map_t MS3_GPIO_MAP
 
struct {
   void(*   callback )(U32 arg)
 
   U32   callback_opt
 
   U8   num_channels
 
ms3_output_params
 Output parameters. More...
 
uint32_t usb_stream_resync_frequency
 CS2200 out frequency. More...
 

#define CS2200_FREF   12000000

Frequency (in Hz) of the reference clock connected to the CS2200.

Note
By default this value is set to 12 MHz.

Referenced by ms3_dac_setup().

#define MS3_SSC_TX_FRAME_SYNC_PIN   (AVR32_SSC_TX_FRAME_SYNC_0_PIN)

Referenced by ms3_dac_output().

#define MS3_SSC_TX_PDCA_CHANNEL   (0)

static uint8_t ms3_get_volume ( uint8_t  ch)
static
static uint16_t ms3_read_reg ( uint8_t  reg)
static
static void ms3_set_volume ( uint8_t  ch,
uint8_t  vol 
)
static
static void ms3_write_reg ( uint8_t  reg,
uint8_t  data 
)
static

void(* callback)(U32 arg)
U32 callback_opt
const gpio_map_t MS3_GPIO_MAP
static
Initial value:
= {
{AVR32_SSC_TX_CLOCK_0_PIN, AVR32_SSC_TX_CLOCK_0_FUNCTION},
{AVR32_SSC_TX_DATA_0_PIN, AVR32_SSC_TX_DATA_0_FUNCTION},
{AVR32_SSC_TX_FRAME_SYNC_0_PIN, AVR32_SSC_TX_FRAME_SYNC_0_FUNCTION},
{AVR32_PM_GCLK_2_0_PIN, AVR32_PM_GCLK_2_0_FUNCTION}
}
struct { ... } ms3_output_params
Initial value:
= {
.num_channels = 0,
.callback = NULL,
.callback_opt = 0
}
#define NULL
Definition: lwip-1.4.0/src/include/lwip/def.h:47

Output parameters.

Referenced by ms3_dac_mute(), ms3_dac_output(), ms3_dac_setup(), ms3_dac_stop(), and ms3_ssc_tx_pdca_int_handler().

U8 num_channels
uint32_t usb_stream_resync_frequency

CS2200 out frequency.

Referenced by aic23b_dac_setup(), ms3_dac_setup(), usb_stream_init(), and usb_stream_input().