arduino-audio-driver
|
Driver API for the wm8978 codec chip. More...
#include <Driver.h>
Public Member Functions | |
AudioDriverWM8978Class ()=default | |
bool | begin (CodecConfig codecCfg, DriverPins &pins) override |
Starts the processing. More... | |
WM8978 & | driver () |
bool | end () override |
Ends the processing: shut down dac and adc. More... | |
int | getVolume () override |
Determines the actual volume (range: 0-100) More... | |
bool | isInputVolumeSupported () override |
Determines if setInputVolume() is supported. More... | |
bool | isVolumeSupported () override |
Determines if setVolume() is suppored. More... | |
operator bool () | |
virtual DriverPins & | pins () |
Provides the pin information. More... | |
bool | setConfig (CodecConfig codecCfg) override |
changes the configuration More... | |
bool | setInputVolume (int volume) override |
Defines the input volume (range: 0-100) if supported. More... | |
bool | setMute (bool mute) override |
Mutes all output lines. More... | |
bool | setMute (bool mute, int line) override |
Mute line 0 = speaker, line 1 = headphones. More... | |
bool | setPAPower (bool enable) |
Sets the PA Power pin to active or inactive. More... | |
void | setPins (DriverPins &pins) |
bool | setVolume (int volume) override |
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) |
int | toBits (sample_bits_t bits) |
int | toI2S (i2s_format_t fmt) |
Protected Attributes | |
CodecConfig | codec_cfg |
DriverPins * | p_pins = nullptr |
int | volume = 0 |
WM8978 | wm8078 |
Driver API for the wm8978 codec chip.
|
default |
|
inlineoverridevirtual |
Starts the processing.
Reimplemented from AudioDriver.
|
inlineprotectedvirtualinherited |
|
inlineprotectedvirtualinherited |
|
inlineprotectedvirtualinherited |
Reimplemented in AudioDriverPCM3168Class, AudioDriverWM8994Class, AudioDriverTAS5805MClass, AudioDriverES8388Class, AudioDriverES8374Class, AudioDriverES8311Class, AudioDriverES8156Class, AudioDriverES7243eClass, AudioDriverES7243Class, AudioDriverES7210Class, AudioDriverCS43l22Class, and AudioDriverAC101Class.
|
inline |
|
inlineoverridevirtual |
Ends the processing: shut down dac and adc.
Reimplemented from AudioDriver.
|
inlineprotectedvirtualinherited |
Determine the TwoWire object from the I2C config or use Wire.
|
inlineprotectedvirtualinherited |
|
inlineoverridevirtual |
Determines the actual volume (range: 0-100)
Implements AudioDriver.
|
inlineprotectedvirtualinherited |
|
inlineoverridevirtual |
Determines if setInputVolume() is supported.
Reimplemented from AudioDriver.
|
inlineoverridevirtual |
Determines if setVolume() is suppored.
Reimplemented from AudioDriver.
|
inlineprotectedinherited |
make sure that value is in range
volume |
|
inlineinherited |
|
inlinevirtualinherited |
Provides the pin information.
Reimplemented in AudioDriverCS42448Class, and AudioDriverAD1938Class.
|
inlineoverridevirtual |
changes the configuration
Reimplemented from AudioDriver.
|
inlineoverridevirtual |
Defines the input volume (range: 0-100) if supported.
Reimplemented from AudioDriver.
|
inlineoverridevirtual |
Mutes all output lines.
Implements AudioDriver.
|
inlineoverridevirtual |
Mute line 0 = speaker, line 1 = headphones.
Reimplemented from AudioDriver.
|
inlineinherited |
Sets the PA Power pin to active or inactive.
|
inlineinherited |
|
inlineoverridevirtual |
Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100.
Implements AudioDriver.
|
inlineprotected |
|
inlineprotected |
fmt:0,LSB(right-aligned);1,MSB(left-aligned);2,Philips standard, I2S;3,PCM/DSP;
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protected |