arduino-audio-driver
|
Abstract Driver API for codec chips. More...
#include <Driver.h>
Public Member Functions | |
virtual bool | begin (CodecConfig codecCfg, DriverPins &pins) |
virtual bool | end (void) |
virtual int | getVolume ()=0 |
virtual bool | isInputVolumeSupported () |
virtual bool | isVolumeSupported () |
DriverPins & | pins () |
virtual bool | setConfig (CodecConfig codecCfg) |
virtual bool | setInputVolume (int volume) |
virtual bool | setMute (bool enable)=0 |
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... | |
virtual bool | setVolume (int volume)=0 |
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) |
virtual bool | deinit () |
TwoWire * | getI2C () |
Determine the TwoWire object from the I2C config or use Wire. More... | |
int | getI2CAddress () |
virtual bool | init (codec_config_t codec_cfg) |
int | limitValue (int volume, int min=0, int max=100) |
Protected Attributes | |
CodecConfig | codec_cfg |
DriverPins * | p_pins = nullptr |
Abstract Driver API for codec chips.
|
inlinevirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlinevirtual |
Reimplemented in AudioDriverCS42448Class, AudioDriverAD1938Class, AudioDriverLyratMiniClass, AudioDriverWM8960Class, NoDriverClass, and AudioDriverWM8978Class.
|
inlineprotected |
Determine the TwoWire object from the I2C config or use Wire.
|
inlineprotected |
|
pure virtual |
Implemented in AudioDriverWM8978Class, AudioDriverCS42448Class, AudioDriverAD1938Class, AudioDriverLyratMiniClass, AudioDriverWM8994Class, AudioDriverWM8960Class, AudioDriverTAS5805MClass, AudioDriverES8388Class, AudioDriverES8374Class, AudioDriverES8311Class, AudioDriverES8156Class, AudioDriverES7243eClass, AudioDriverES7243Class, AudioDriverES7210Class, AudioDriverCS43l22Class, AudioDriverAC101Class, and NoDriverClass.
|
inlineprotectedvirtual |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in AudioDriverWM8978Class, AudioDriverCS42448Class, AudioDriverAD1938Class, AudioDriverWM8960Class, and NoDriverClass.
|
inlineprotected |
make sure that value is in range
volume |
|
inline |
|
inlinevirtual |
Reimplemented in AudioDriverWM8960Class, AudioDriverCS42448Class, AudioDriverCS43l22Class, and AudioDriverAD1938Class.
|
inlinevirtual |
|
pure virtual |
Implemented in AudioDriverWM8978Class, AudioDriverAD1938Class, AudioDriverWM8994Class, AudioDriverTAS5805MClass, AudioDriverES8388Class, AudioDriverES8374Class, AudioDriverES8311Class, AudioDriverES8156Class, AudioDriverES7243eClass, AudioDriverES7243Class, AudioDriverES7210Class, AudioDriverCS43l22Class, AudioDriverAC101Class, AudioDriverCS42448Class, AudioDriverLyratMiniClass, AudioDriverWM8960Class, and NoDriverClass.
|
inlinevirtual |
Mute individual lines: only supported for some rare DACs.
Reimplemented in AudioDriverES8388Class, AudioDriverAD1938Class, and AudioDriverCS42448Class.
|
inline |
Sets the PA Power pin to active or inactive.
|
pure virtual |
Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100.
Implemented in AudioDriverWM8978Class, AudioDriverCS42448Class, AudioDriverAD1938Class, AudioDriverLyratMiniClass, AudioDriverWM8994Class, AudioDriverWM8960Class, AudioDriverTAS5805MClass, AudioDriverES8388Class, AudioDriverES8374Class, AudioDriverES8311Class, AudioDriverES8156Class, AudioDriverES7243eClass, AudioDriverES7243Class, AudioDriverES7210Class, AudioDriverCS43l22Class, AudioDriverAC101Class, and NoDriverClass.
|
protected |
|
protected |