Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
I2c_Codec Class Reference
Inheritance diagram for I2c_Codec:
I2c AudioCodec I2c_MultiI2sCodec

Public Types

enum  CodecType { TLV320AIC3104 = 0, TLV320AIC3106 }

Public Member Functions

int writeRegister (unsigned int reg, unsigned int value)
int readRegister (unsigned int reg)
int initCodec ()
int setParameters (const AudioCodecParams &codecParams)
AudioCodecParams getParameters ()
int startAudio (int shouldBeReady)
int stopAudio ()
unsigned int getNumIns ()
unsigned int getNumOuts ()
float getSampleRate ()
int setPllJ (short unsigned int j)
int setPllD (unsigned int d)
int setPllP (short unsigned int p)
int setPllR (unsigned int r)
int setPllK (float k)
int setNcodec (double NCODEC)
int setAudioSamplingRate (float newSamplingRate)
short unsigned int getPllJ ()
unsigned int getPllD ()
unsigned int getPllP ()
unsigned int getPllR ()
float getPllK ()
float getAudioSamplingRate ()
int setInputGain (int channel, float gain)
int setDacVolume (int channel, float gain)
int setHpVolume (int channel, float gain)
int setLineOutVolume (int channel, float gain)
int enableHpOut (bool enable)
int enableLineOut (bool enable)
int disable ()
int reset ()
void setVerbose (bool isVerbose)
 I2c_Codec (int i2cBus, int I2cAddress, CodecType type, bool verbose=false)
virtual McaspConfiggetMcaspConfig ()
int setMode (std::string str)
- Public Member Functions inherited from I2c
ssize_t readBytes (void *buf, size_t count)
ssize_t writeBytes (const void *buf, size_t count)
 I2c (I2c &&)=delete
int initI2C_RW (int bus, int address, int file)
int closeI2C ()

Protected Types

enum  InitMode { InitMode_init = 0, InitMode_noDeinit = 1, InitMode_noInit = 2 }

Protected Member Functions

int configureDCRemovalIIR (bool enable)

Protected Attributes

int codecType
std::array< int, kNumIoChannels > dacVolumeHalfDbs
std::array< float, kNumIoChannels > inputGain {}
std::array< float, kNumIoChannels > hpVolume {}
std::array< float, kNumIoChannels > lineOutVolume {}
AudioCodecParams params
McaspConfig mcaspConfig
bool running
bool verbose
bool hpEnabled = true
bool lineOutEnabled = true
bool differentialInput
bool unmutedPowerStage
double micBias
InitMode mode
- Protected Attributes inherited from I2c
int i2C_bus
int i2C_address
int i2C_file

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