Skip to content

Commit f7e2f14

Browse files
committed
Minor tab and comment clean-up.
1 parent 1fe871c commit f7e2f14

1 file changed

Lines changed: 20 additions & 18 deletions

File tree

usermods/audioreactive/audio_source.h

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -761,27 +761,29 @@ class AC101Source : public I2SSource {
761761

762762
void _ac101InitAdc() {
763763
// https://files.seeedstudio.com/wiki/ReSpeaker_6-Mics_Circular_Array_kit_for_Raspberry_Pi/reg/AC101_User_Manual_v1.1.pdf
764-
//
765-
_ac101I2cBegin();
766-
767-
#define CHIP_AUDIO_RS 0x00
768-
#define SYSCLK_CTRL 0x03
769-
#define MOD_CLK_ENA 0x04
770-
#define MOD_RST_CTRL 0x05
771-
#define I2S_SR_CTRL 0x06
772-
#define I2S1LCK_CTRL 0x10
773-
#define I2S1_SDOUT_CTRL 0x11
774-
#define I2S1_MXR_SRC 0x13
775-
#define ADC_DIG_CTRL 0x40
776-
#define ADC_APC_CTRL 0x50
777-
#define ADC_SRC 0x51
778-
#define ADC_SRCBST_CTRL 0x52
764+
// This supports mostly the older AI Thinkier AudioKit A1S that has an AC101 chip
765+
// Newer versions use the ES3833 chip - which we also support.
766+
767+
_ac101I2cBegin();
768+
769+
#define CHIP_AUDIO_RS 0x00
770+
#define SYSCLK_CTRL 0x03
771+
#define MOD_CLK_ENA 0x04
772+
#define MOD_RST_CTRL 0x05
773+
#define I2S_SR_CTRL 0x06
774+
#define I2S1LCK_CTRL 0x10
775+
#define I2S1_SDOUT_CTRL 0x11
776+
#define I2S1_MXR_SRC 0x13
777+
#define ADC_DIG_CTRL 0x40
778+
#define ADC_APC_CTRL 0x50
779+
#define ADC_SRC 0x51
780+
#define ADC_SRCBST_CTRL 0x52
779781
#define OMIXER_DACA_CTRL 0x53
780-
#define OMIXER_SR 0x54
781-
#define HPOUT_CTRL 0x56
782+
#define OMIXER_SR 0x54
783+
#define HPOUT_CTRL 0x56
782784

783785
_ac101I2cWrite(CHIP_AUDIO_RS, 0x123); // I think anything written here is a reset as 0x123 is kinda suss.
784-
786+
785787
delay(100);
786788

787789
_ac101I2cWrite(SYSCLK_CTRL, 0b0000100000001000); // System Clock is I2S MCLK

0 commit comments

Comments
 (0)