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

Driver API for TAS5805M codec chip. More...

#include <Driver.h>

Inheritance diagram for AudioDriverTAS5805MClass:
AudioDriver

Public Member Functions

virtual bool begin (CodecConfig codecCfg, DriverPins &pins)
 Starts the processing. More...
 
virtual bool end (void)
 Ends the processing: shut down dac and adc. More...
 
int getVolume ()
 Determines the actual volume (range: 0-100) More...
 
virtual bool isInputVolumeSupported ()
 Determines if setInputVolume() is supported. More...
 
virtual bool isVolumeSupported ()
 Determines if setVolume() is suppored. More...
 
 operator bool ()
 
virtual DriverPinspins ()
 Provides the pin information. More...
 
virtual bool setConfig (CodecConfig codecCfg)
 changes the configuration More...
 
virtual bool setInputVolume (int volume)
 Defines the input volume (range: 0-100) if supported. More...
 
bool setMute (bool mute)
 Mutes all output lines. More...
 
virtual 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...
 
void setPins (DriverPins &pins)
 
bool setVolume (int volume)
 Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100. More...
 

Protected Member Functions

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

Protected Attributes

CodecConfig codec_cfg
 
DriverPinsp_pins = nullptr
 

Detailed Description

Driver API for TAS5805M codec chip.

Author
Phil Schatzmann

Member Function Documentation

◆ begin()

virtual bool begin ( CodecConfig  codecCfg,
DriverPins pins 
)
inlinevirtualinherited

◆ configInterface()

virtual bool configInterface ( codec_mode_t  mode,
I2SDefinition  iface 
)
inlineprotectedvirtualinherited

◆ controlState()

virtual bool controlState ( codec_mode_t  mode)
inlineprotectedvirtualinherited

◆ deinit()

bool deinit ( )
inlineprotectedvirtual

< error_t value indicating success (no error)

Reimplemented from AudioDriver.

◆ end()

virtual bool end ( void  )
inlinevirtualinherited

◆ getI2C()

virtual TwoWire* getI2C ( )
inlineprotectedvirtualinherited

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

◆ getI2CAddress()

virtual int getI2CAddress ( )
inlineprotectedvirtualinherited

◆ getVolume()

int getVolume ( )
inlinevirtual

Determines the actual volume (range: 0-100)

Implements AudioDriver.

◆ init()

bool init ( codec_config_t  codec_cfg)
inlineprotectedvirtual

< error_t value indicating success (no error)

Reimplemented from AudioDriver.

◆ isInputVolumeSupported()

virtual bool isInputVolumeSupported ( )
inlinevirtualinherited

◆ 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

◆ operator bool()

operator bool ( )
inlineinherited

◆ pins()

virtual DriverPins& pins ( )
inlinevirtualinherited

Provides the pin information.

Reimplemented in AudioDriverCS42448Class, and AudioDriverAD1938Class.

◆ setConfig()

virtual bool setConfig ( CodecConfig  codecCfg)
inlinevirtualinherited

◆ setInputVolume()

virtual bool setInputVolume ( int  volume)
inlinevirtualinherited

◆ setMute() [1/2]

bool setMute ( bool  enable)
inlinevirtual

Mutes all output lines.

< error_t value indicating success (no error)

Implements AudioDriver.

◆ setMute() [2/2]

virtual bool setMute ( bool  mute,
int  line 
)
inlinevirtualinherited

Mute individual lines: only supported for some rare DACs.

Reimplemented in AudioDriverWM8978Class, AudioDriverPCM3168Class, AudioDriverES8388Class, AudioDriverAD1938Class, and AudioDriverCS42448Class.

◆ setPAPower()

bool setPAPower ( bool  enable)
inlineinherited

Sets the PA Power pin to active or inactive.

◆ setPins()

void setPins ( DriverPins pins)
inlineinherited

◆ 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

◆ p_pins

DriverPins* p_pins = nullptr
protectedinherited

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