#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.
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) |
Referenced by ms3_dac_flush(), ms3_dac_mute(), ms3_dac_output(), ms3_dac_setup(), ms3_dac_stop(), and ms3_ssc_tx_pdca_int_handler().
|
static |
References MS3_HP_VOL_L, MS3_HP_VOL_R, MS3_LEFT_CHANNEL, ms3_read_reg(), and MS3_RIGHT_CHANNEL.
Referenced by ms3_dac_decrease_volume(), and ms3_dac_increase_volume().
|
static |
References twi_package_t::chip, data, MS3_TWI, MS3_TWI_ADDRESS, twi_master_read(), and TWI_SUCCESS.
Referenced by ms3_dac_is_volume_muted(), and ms3_get_volume().
|
static |
References MS3_HP_VOL_L, MS3_HP_VOL_R, MS3_LEFT_CHANNEL, MS3_RIGHT_CHANNEL, MS3_SP_VOL_L, MS3_SP_VOL_R, and ms3_write_reg().
Referenced by ms3_dac_decrease_volume(), ms3_dac_increase_volume(), and ms3_dac_set_volume().
|
static |
References AUDIO_DAC_OUT_OF_SAMPLE_CB, AUDIO_DAC_RELOAD_CB, ms3_output_params, MS3_SSC_TX_PDCA_CHANNEL, pdca_disable_interrupt_reload_counter_zero(), pdca_disable_interrupt_transfer_complete(), pdca_get_transfer_status(), PDCA_TRANSFER_COMPLETE, and PDCA_TRANSFER_COUNTER_RELOAD_IS_ZERO.
Referenced by ms3_dac_start().
|
static |
References twi_package_t::chip, data, MS3_TWI, MS3_TWI_ADDRESS, twi_master_write(), and TWI_SUCCESS.
Referenced by ms3_set_volume().
U32 callback_opt |
|
static |
struct { ... } ms3_output_params |
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().