|
arduino-audio-driver
|
Driver API for WM8990 codec chip. More...
#include <Driver.h>
Public Member Functions | |
| AudioDriverWM8960Class () | |
| bool | begin (CodecConfig codecCfg, DriverPins &pins) |
| Starts the processing. More... | |
| void | dumpRegisters () |
| bool | end (void) |
| Ends the processing: shut down dac and adc. More... | |
| virtual int | getI2CAddress () |
| Provides the i2c address. More... | |
| int | getVolume () |
| Determines the actual volume (range: 0-100) More... | |
| bool | isInputVolumeSupported () |
| Determines if setInputVolume() is supported. More... | |
| 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... | |
| void | setEnablePLL (bool active) |
| Configuration: enable/disable PLL (active by default) More... | |
| virtual bool | setI2CAddress (uint16_t adr) |
| Defines the i2c address. More... | |
| void | setI2CRetryCount (int cnt) |
| Configuration: define retry count (default : 0) More... | |
| bool | setInputVolume (int volume) |
| Defines the input volume (range: 0-100) if supported. More... | |
| void | setMclkHz (uint32_t hz) |
| Configuration: define master clock frequency (default: 0) More... | |
| bool | setMute (bool enable) |
| 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) |
| void | setupI2CAddress () |
| If no address is defined in the pins we provide it here. More... | |
| 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) |
| bool | configure_clocking () |
| virtual bool | controlState (codec_mode_t mode) |
| virtual bool | deinit () |
| int | getFeatures (CodecConfig cfg) |
| virtual i2c_bus_handle_t | getI2C () |
| Determine the TwoWire object from the I2C config or use Wire. More... | |
| virtual bool | init (codec_config_t codec_cfg) |
| int | limitValue (int volume, int min=0, int max=100) |
| int | mapVolume (int x, int in_min, int in_max, int out_min, int out_max) |
| mtb_wm8960_mode_t | modeMasterSlave (bool is_master) |
| if microcontroller is master then module is slave More... | |
| mtb_wm8960_adc_dac_sample_rate_t | sampleRate (int rate) |
| mtb_wm8960_word_length_t | wordLength (int bits) |
Protected Attributes | |
| CodecConfig | codec_cfg |
| int | i2c_default_address = -1 |
| int | i2c_retry_count = 0 |
| DriverPins * | p_pins = nullptr |
| int | volume_in = 100 |
| int | volume_out = 100 |
| bool | vs1053_enable_pll = true |
| uint32_t | vs1053_mclk_hz = 0 |
Driver API for WM8990 codec chip.
|
inline |
|
inlinevirtual |
Starts the processing.
Reimplemented from AudioDriver.
|
inlineprotectedvirtualinherited |
|
inlineprotected |
|
inlineprotectedvirtualinherited |
|
inlineprotectedvirtualinherited |
Reimplemented in AudioDriverPCM3168Class, AudioDriverWM8994Class, AudioDriverTAS5805MClass, AudioDriverES8388Class, AudioDriverES8374Class, AudioDriverES8311Class, AudioDriverES8156Class, AudioDriverES7243eClass, AudioDriverES7243Class, AudioDriverES7210Class, AudioDriverCS43l22Class, and AudioDriverAC101Class.
|
inline |
|
inlinevirtual |
Ends the processing: shut down dac and adc.
Reimplemented from AudioDriver.
|
inlineprotected |
|
inlineprotectedvirtualinherited |
Determine the TwoWire object from the I2C config or use Wire.
|
inlinevirtualinherited |
Provides the i2c address.
|
inlinevirtual |
Determines the actual volume (range: 0-100)
Implements AudioDriver.
|
inlineprotectedvirtualinherited |
|
inlinevirtual |
Determines if setInputVolume() is supported.
Reimplemented from AudioDriver.
|
inlinevirtual |
Determines if setVolume() is suppored.
Reimplemented from AudioDriver.
|
inlineprotectedinherited |
make sure that value is in range
| volume |
|
inlineprotectedinherited |
|
inlineprotected |
if microcontroller is master then module is slave
|
inlineinherited |
|
inlinevirtualinherited |
Provides the pin information.
Reimplemented in AudioDriverCS42448Class.
|
inlineprotected |
|
inlinevirtual |
changes the configuration
Reimplemented from AudioDriver.
|
inline |
Configuration: enable/disable PLL (active by default)
|
inlinevirtualinherited |
Defines the i2c address.
|
inline |
Configuration: define retry count (default : 0)
|
inlinevirtual |
Defines the input volume (range: 0-100) if supported.
Reimplemented from AudioDriver.
|
inline |
Configuration: define master clock frequency (default: 0)
|
inlinevirtual |
Mutes all output lines.
Implements AudioDriver.
|
inlinevirtualinherited |
Mute individual lines: only supported for some rare DACs.
Reimplemented in AudioDriverWM8978Class, AudioDriverPCM3168Class, AudioDriverES8388Class, and AudioDriverCS42448Class.
|
inlineinherited |
Sets the PA Power pin to active or inactive.
|
inlineinherited |
|
inlineinherited |
If no address is defined in the pins we provide it here.
|
inlinevirtual |
Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100.
Implements AudioDriver.
|
inlineprotected |
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protected |