arduino-audio-driver
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AudioDriverES8388Class Class Reference

Driver API for ES8388 codec chip. More...

#include <Driver.h>

Inheritance diagram for AudioDriverES8388Class:
AudioDriver

Public Member Functions

virtual bool begin (CodecConfig codecCfg, DriverPins &pins)
 
virtual bool end (void)
 
int getVolume ()
 
bool isInputVolumeSupported ()
 
virtual bool isVolumeSupported ()
 
DriverPinspins ()
 
virtual bool setConfig (CodecConfig codecCfg)
 
bool setInputVolume (int volume)
 
bool setMicrophoneGain (es_mic_gain_t gain)
 
bool setMute (bool mute)
 
bool setMute (bool mute, int line)
 Mute individual lines: only supported for some rare DACs. More...
 
bool setPAPower (bool enable)
 Sets the PA Power pin to active or inactive. More...
 
bool setVolume (int volume)
 Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100. More...
 

Protected Member Functions

bool configInterface (codec_mode_t mode, I2SDefinition iface)
 
bool controlState (codec_mode_t mode)
 
bool deinit ()
 
TwoWire * getI2C ()
 Determine the TwoWire object from the I2C config or use Wire. More...
 
int getI2CAddress ()
 
bool init (codec_config_t codec_cfg)
 
int limitValue (int volume, int min=0, int max=100)
 

Protected Attributes

CodecConfig codec_cfg
 
bool line_active [2] = {true}
 
DriverPinsp_pins = nullptr
 

Detailed Description

Driver API for ES8388 codec chip.

Author
Phil Schatzmann

Member Function Documentation

◆ begin()

virtual bool begin ( CodecConfig  codecCfg,
DriverPins pins 
)
inlinevirtualinherited

◆ configInterface()

bool configInterface ( codec_mode_t  mode,
I2SDefinition  iface 
)
inlineprotectedvirtual

< error_t value indicating success (no error)

Reimplemented from AudioDriver.

◆ controlState()

bool controlState ( codec_mode_t  mode)
inlineprotectedvirtual

< error_t value indicating success (no error)

Reimplemented from AudioDriver.

◆ deinit()

bool deinit ( )
inlineprotectedvirtual

< error_t value indicating success (no error)

Reimplemented from AudioDriver.

◆ end()

virtual bool end ( void  )
inlinevirtualinherited

◆ getI2C()

TwoWire* getI2C ( )
inlineprotectedinherited

Determine the TwoWire object from the I2C config or use Wire.

◆ getI2CAddress()

int getI2CAddress ( )
inlineprotectedinherited

◆ getVolume()

int getVolume ( )
inlinevirtual

Implements AudioDriver.

◆ init()

bool init ( codec_config_t  codec_cfg)
inlineprotectedvirtual

< error_t value indicating success (no error)

Reimplemented from AudioDriver.

◆ isInputVolumeSupported()

bool isInputVolumeSupported ( )
inlinevirtual

Reimplemented from AudioDriver.

◆ isVolumeSupported()

virtual bool isVolumeSupported ( )
inlinevirtualinherited

◆ limitValue()

int limitValue ( int  volume,
int  min = 0,
int  max = 100 
)
inlineprotectedinherited

make sure that value is in range

Parameters
volume
Returns

◆ pins()

DriverPins& pins ( )
inlineinherited

◆ setConfig()

virtual bool setConfig ( CodecConfig  codecCfg)
inlinevirtualinherited

◆ setInputVolume()

bool setInputVolume ( int  volume)
inlinevirtual

Reimplemented from AudioDriver.

◆ setMicrophoneGain()

bool setMicrophoneGain ( es_mic_gain_t  gain)
inline

< error_t value indicating success (no error)

◆ setMute() [1/2]

bool setMute ( bool  mute)
inlinevirtual

< error_t value indicating success (no error)

Implements AudioDriver.

◆ setMute() [2/2]

bool setMute ( bool  mute,
int  line 
)
inlinevirtual

Mute individual lines: only supported for some rare DACs.

< error_t value indicating success (no error)

< error_t value indicating success (no error)

< error_t value indicating success (no error)

< error_t value indicating success (no error)

Reimplemented from AudioDriver.

◆ setPAPower()

bool setPAPower ( bool  enable)
inlineinherited

Sets the PA Power pin to active or inactive.

◆ setVolume()

bool setVolume ( int  volume)
inlinevirtual

Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100.

< error_t value indicating success (no error)

Implements AudioDriver.

Member Data Documentation

◆ codec_cfg

CodecConfig codec_cfg
protectedinherited

◆ line_active

bool line_active[2] = {true}
protected

◆ p_pins

DriverPins* p_pins = nullptr
protectedinherited

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