arduino-audio-driver
|
Abstract Driver API for codec chips. More...
#include <Driver.h>
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... | |
virtual int | getVolume ()=0 |
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 DriverPins & | pins () |
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... | |
virtual bool | setMute (bool enable)=0 |
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) |
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 () |
virtual TwoWire * | getI2C () |
Determine the TwoWire object from the I2C config or use Wire. More... | |
virtual 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 |
Starts the processing.
Reimplemented in AudioDriverWM8978Class, AudioDriverCS42448Class, AudioDriverAD1938Class, AudioDriverLyratMiniClass, AudioDriverWM8994Class, AudioDriverWM8960Class, AudioDriverCS43l22Class, and NoDriverClass.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Reimplemented in AudioDriverPCM3168Class, AudioDriverWM8994Class, AudioDriverTAS5805MClass, AudioDriverES8388Class, AudioDriverES8374Class, AudioDriverES8311Class, AudioDriverES8156Class, AudioDriverES7243eClass, AudioDriverES7243Class, AudioDriverES7210Class, AudioDriverCS43l22Class, and AudioDriverAC101Class.
|
inlinevirtual |
Ends the processing: shut down dac and adc.
Reimplemented in AudioDriverCS42448Class, AudioDriverAD1938Class, AudioDriverLyratMiniClass, AudioDriverWM8960Class, NoDriverClass, and AudioDriverWM8978Class.
|
inlineprotectedvirtual |
Determine the TwoWire object from the I2C config or use Wire.
|
inlineprotectedvirtual |
|
pure virtual |
Determines the actual volume (range: 0-100)
Implemented in AudioDriverLyratMiniClass, AudioDriverWM8978Class, AudioDriverCS42448Class, AudioDriverAD1938Class, AudioDriverPCM3168Class, AudioDriverWM8994Class, AudioDriverWM8960Class, AudioDriverTAS5805MClass, AudioDriverES8388Class, AudioDriverES8374Class, AudioDriverES8311Class, AudioDriverES8156Class, AudioDriverES7243eClass, AudioDriverES7243Class, AudioDriverES7210Class, AudioDriverCS43l22Class, AudioDriverAC101Class, and NoDriverClass.
|
inlineprotectedvirtual |
|
inlinevirtual |
Determines if setInputVolume() is supported.
Reimplemented in AudioDriverLyratMiniClass, AudioDriverWM8978Class, AudioDriverCS42448Class, AudioDriverAD1938Class, AudioDriverWM8960Class, AudioDriverES8388Class, AudioDriverES7210Class, and NoDriverClass.
|
inlinevirtual |
Determines if setVolume() is suppored.
Reimplemented in AudioDriverWM8978Class, AudioDriverCS42448Class, AudioDriverAD1938Class, AudioDriverWM8960Class, and NoDriverClass.
|
inlineprotected |
make sure that value is in range
volume |
|
inline |
|
inlinevirtual |
Provides the pin information.
Reimplemented in AudioDriverCS42448Class, and AudioDriverAD1938Class.
|
inlinevirtual |
changes the configuration
Reimplemented in AudioDriverWM8978Class, AudioDriverWM8960Class, AudioDriverCS42448Class, AudioDriverCS43l22Class, and AudioDriverAD1938Class.
|
inlinevirtual |
Defines the input volume (range: 0-100) if supported.
Reimplemented in AudioDriverLyratMiniClass, AudioDriverWM8978Class, AudioDriverCS42448Class, AudioDriverAD1938Class, AudioDriverWM8960Class, AudioDriverES8388Class, AudioDriverES7210Class, and NoDriverClass.
|
pure virtual |
Mutes all output lines.
Implemented in AudioDriverWM8978Class, AudioDriverAD1938Class, AudioDriverPCM3168Class, AudioDriverWM8994Class, AudioDriverTAS5805MClass, AudioDriverES8388Class, AudioDriverES8374Class, AudioDriverES8311Class, AudioDriverES8156Class, AudioDriverES7243eClass, AudioDriverES7243Class, AudioDriverES7210Class, AudioDriverCS43l22Class, AudioDriverAC101Class, AudioDriverLyratMiniClass, AudioDriverCS42448Class, AudioDriverWM8960Class, and NoDriverClass.
|
inlinevirtual |
Mute individual lines: only supported for some rare DACs.
Reimplemented in AudioDriverWM8978Class, AudioDriverPCM3168Class, AudioDriverES8388Class, AudioDriverAD1938Class, and AudioDriverCS42448Class.
|
inline |
Sets the PA Power pin to active or inactive.
|
inline |
|
pure virtual |
Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100.
Implemented in AudioDriverLyratMiniClass, AudioDriverWM8978Class, AudioDriverCS42448Class, AudioDriverAD1938Class, AudioDriverWM8994Class, AudioDriverWM8960Class, AudioDriverTAS5805MClass, AudioDriverES8388Class, AudioDriverES8374Class, AudioDriverES8311Class, AudioDriverES8156Class, AudioDriverES7243eClass, AudioDriverES7243Class, AudioDriverES7210Class, AudioDriverCS43l22Class, AudioDriverAC101Class, NoDriverClass, and AudioDriverPCM3168Class.
|
protected |
|
protected |