test public

Dependencies:   HttpServer_snapshot_mbed-os

Embed: (wiki syntax)

« Back to documentation index

AUDIO_GRBoard Class Reference

AUDIO_GRBoard Class Reference

AUDIO_GRBoard class. More...

#include <AUDIO_GRBoard.h>

Inherits AUDIO_RBSP, WM8978_RBSP, MAX9867_RBSP, and TLV320_RBSP.

Public Member Functions

 AUDIO_GRBoard (uint8_t int_level=0x80, int32_t max_write_num=16, int32_t max_read_num=16)
 Create a audio codec class.
 AUDIO_GRBoard (uint8_t int_level=0x80, int32_t max_write_num=16, int32_t max_read_num=16)
 Create a audio codec class.
 AUDIO_GRBoard (uint8_t int_level=0x80, int32_t max_write_num=16, int32_t max_read_num=16)
 Create a audio codec class.
virtual void power (bool type=true)
 Overloaded power()
virtual bool format (char length)
 Set I2S interface bit length and mode.
virtual bool frequency (int hz)
 Set sample frequency.
virtual int write (void *const p_data, uint32_t data_size, const rbsp_data_conf_t *const p_data_conf=NULL)
 Enqueue asynchronous write request.
virtual int read (void *const p_data, uint32_t data_size, const rbsp_data_conf_t *const p_data_conf=NULL)
 Enqueue asynchronous read request.
virtual bool outputVolume (float leftVolumeOut, float rightVolumeOut)
 Headphone out volume control.
virtual bool micVolume (float VolumeIn)
 Microphone volume.
int32_t GetSsifChNo (void)
 Get a value of SSIF channel number.
int32_t GetSsifChNo (void)
 Get a value of SSIF channel number.
void power (int device)
 Overloaded power() function default = 0x80, record requires 0x02.
void reset (void)
 Reset TLV320.
int32_t GetSsifChNo (void)
 Get a value of SSIF channel number.
bool inputVolume (float leftVolumeIn, float rightVolumeIn)
 Line in volume control i.e.
void bypass (bool bypassVar)
 Analog audio path control (Bypass) function default = false.
void mic (bool micVar)
 Analog audio path control (Input select for ADC) function default = false.
void micVolume (bool mute, bool boost)
 Microphone volume.
void mute (bool softMute)
 Digital audio path control.

Detailed Description

AUDIO_GRBoard class.

Definition at line 35 of file AUDIO_GRBoard.h.


Constructor & Destructor Documentation

AUDIO_GRBoard ( uint8_t  int_level = 0x80,
int32_t  max_write_num = 16,
int32_t  max_read_num = 16 
)

Create a audio codec class.

Parameters:
int_levelInterupt priority (SSIF)
max_write_numThe upper limit of write buffer (SSIF)
max_read_numThe upper limit of read buffer (SSIF)

Definition at line 44 of file AUDIO_GRBoard.h.

AUDIO_GRBoard ( uint8_t  int_level = 0x80,
int32_t  max_write_num = 16,
int32_t  max_read_num = 16 
)

Create a audio codec class.

Parameters:
int_levelInterupt priority (SSIF)
max_write_numThe upper limit of write buffer (SSIF)
max_read_numThe upper limit of read buffer (SSIF)

Definition at line 68 of file AUDIO_GRBoard.h.

AUDIO_GRBoard ( uint8_t  int_level = 0x80,
int32_t  max_write_num = 16,
int32_t  max_read_num = 16 
)

Create a audio codec class.

Parameters:
int_levelInterupt priority (SSIF)
max_write_numThe upper limit of write buffer (SSIF)
max_read_numThe upper limit of read buffer (SSIF)

Definition at line 90 of file AUDIO_GRBoard.h.


Member Function Documentation

void bypass ( bool  bypassVar ) [inherited]

Analog audio path control (Bypass) function default = false.

Parameters:
bypassVarRoute analogue audio direct from line in to headphone out

Definition at line 119 of file TLV320_RBSP.cpp.

virtual bool format ( char  length ) [virtual]

Set I2S interface bit length and mode.

Parameters:
lengthSet bit length to 16 bits
Returns:
true = success, false = failure

Implements AUDIO_RBSP.

Definition at line 105 of file AUDIO_GRBoard.h.

virtual bool frequency ( int  hz ) [virtual]

Set sample frequency.

Parameters:
frequencySample frequency of data in Hz
Returns:
true = success, false = failure

supports frequencies: 44.1kHz Default is 44.1kHz

Implements AUDIO_RBSP.

Definition at line 106 of file AUDIO_GRBoard.h.

int32_t GetSsifChNo ( void   ) [inherited]

Get a value of SSIF channel number.

Returns:
SSIF channel number

Definition at line 85 of file WM8978_RBSP.h.

int32_t GetSsifChNo ( void   ) [inherited]

Get a value of SSIF channel number.

Returns:
SSIF channel number

Definition at line 80 of file MAX9867_RBSP.h.

int32_t GetSsifChNo ( void   ) [inherited]

Get a value of SSIF channel number.

Returns:
SSIF channel number

Definition at line 106 of file TLV320_RBSP.h.

bool inputVolume ( float  leftVolumeIn,
float  rightVolumeIn 
) [inherited]

Line in volume control i.e.

record volume

Parameters:
leftVolumeInLeft line-in volume
rightVolumeInRight line-in volume
Returns:
Returns "true" for success, "false" if parameters are out of range Parameters accept a value, where 0.0 < parameter < 1.0 and where 0.0 maps to -34.5dB and 1.0 maps to +12dB (0.74 = 0 dB default).

Definition at line 71 of file TLV320_RBSP.cpp.

void mic ( bool  micVar ) [inherited]

Analog audio path control (Input select for ADC) function default = false.

Parameters:
micVarInput select for ADC. true : Microphone , false : Line

Definition at line 132 of file TLV320_RBSP.cpp.

virtual bool micVolume ( float  VolumeIn ) [virtual]

Microphone volume.

Parameters:
VolumeInMicrophone volume
Returns:
Returns "true" for success, "false" if parameters are out of range

Implements AUDIO_RBSP.

Definition at line 110 of file AUDIO_GRBoard.h.

void micVolume ( bool  mute,
bool  boost 
) [inherited]

Microphone volume.

Parameters:
muteMicrophone mute. true : mute , false : normal
boostMicrophone boost. true : 20dB , false : 0dB

Definition at line 143 of file TLV320_RBSP.cpp.

void mute ( bool  softMute ) [inherited]

Digital audio path control.

Parameters:
softMuteMute output

Definition at line 159 of file TLV320_RBSP.cpp.

virtual bool outputVolume ( float  leftVolumeOut,
float  rightVolumeOut 
) [virtual]

Headphone out volume control.

Parameters:
leftVolumeOutLeft headphone-out volume
rightVolumeOutRight headphone-out volume
Returns:
Returns "true" for success, "false" if parameters are out of range

Implements AUDIO_RBSP.

Definition at line 109 of file AUDIO_GRBoard.h.

virtual void power ( bool  type = true ) [virtual]

Overloaded power()

Parameters:
typetrue=power up, false=power down

Implements AUDIO_RBSP.

Definition at line 104 of file AUDIO_GRBoard.h.

void power ( int  device ) [inherited]

Overloaded power() function default = 0x80, record requires 0x02.

Parameters:
deviceCall individual devices to power up/down Device power 0x00 = On 0x80 = Off Clock 0x00 = On 0x40 = Off Oscillator 0x00 = On 0x20 = Off Outputs 0x00 = On 0x10 = Off DAC 0x00 = On 0x08 = Off ADC 0x00 = On 0x04 = Off Microphone input 0x00 = On 0x02 = Off Line input 0x00 = On 0x01 = Off

Definition at line 169 of file TLV320_RBSP.cpp.

virtual int read ( void *const   p_data,
uint32_t  data_size,
const rbsp_data_conf_t *const   p_data_conf = NULL 
) [virtual]

Enqueue asynchronous read request.

Parameters:
p_dataLocation of the data
data_sizeNumber of bytes to read
p_data_confAsynchronous control block structure
Returns:
Number of bytes read on success. negative number on error.

Implements AUDIO_RBSP.

Definition at line 108 of file AUDIO_GRBoard.h.

void reset ( void   ) [inherited]

Reset TLV320.

Definition at line 257 of file TLV320_RBSP.cpp.

virtual int write ( void *const   p_data,
uint32_t  data_size,
const rbsp_data_conf_t *const   p_data_conf = NULL 
) [virtual]

Enqueue asynchronous write request.

Parameters:
p_dataLocation of the data
data_sizeNumber of bytes to write
p_data_confAsynchronous control block structure
Returns:
Number of bytes written on success. negative number on error.

Implements AUDIO_RBSP.

Definition at line 107 of file AUDIO_GRBoard.h.