110 Commits

Author SHA1 Message Date
Frank
6317dcb757 swapped-channel workaround needed a bit longer
It seems that ESP-IDF 4.4.5 will (finally) fix this old bug.  hallelujah.

73ca054b80 (diff-02a5aef0ab7d8485b0a165910efaab3dfc450b473eef0bab1b32bccb4ea85c69)
2023-05-12 19:10:51 +02:00
Frank
477aae95fd swapped-channel workaround needed a bit longer
It seems that ESP-IDF 4.4.5 will (finally) fix this old bug.  hallelujah.

73ca054b80 (diff-02a5aef0ab7d8485b0a165910efaab3dfc450b473eef0bab1b32bccb4ea85c69)
2023-05-11 22:57:18 +02:00
TroyHacks
3df2272791 Warnings about AudioKit rubbish 2023-05-04 08:55:00 -04:00
TroyHacks
1713204bfe Better ES8388 init and mic support 2023-05-01 21:07:33 -04:00
Frank
0c58c12d0f audio fastpath: reduce filter delay
- reduced filter strength, which also reduces delays
- increased I2S buffer count, and reduced I2S cycle time to recover from delays faster.
2023-04-30 20:58:06 +02:00
TroyHacks
32a501c2e3 It's offically the LyraT, not Lyra-T. 2023-04-25 23:47:28 -03:00
TroyHacks
00e3f5e5fa Mic settings for ES8388. Also ALC, pass-thru, etc. 2023-04-25 23:45:09 -03:00
TroyHacks
0fd9596860 Fixes for LyraT 2023-04-22 08:35:03 -04:00
TroyHacks
58e2a3992b Some fixes for LyraT and also better inits/docs 2023-04-21 13:58:41 -04:00
TroyHacks
95d6d186c7 ES8388 init optimizations and fixes 2023-04-05 11:00:14 -04:00
TroyHacks
111c8c9202 Merge branch 'ES8388-troyhacks' of https://github.com/troyhacks/WLED into ES8388-troyhacks 2023-04-04 17:04:55 -04:00
TroyHacks
f44f307f89 Comments and typos, init optimization and shortening. 2023-04-04 17:04:18 -04:00
Troy
7d32bc5f97 Merge branch 'ES8388' into ES8388-troyhacks 2023-04-04 14:10:04 -04:00
TroyHacks
d775f7fb28 Removed reliance on the ES8388 library and made things more in line with similar boards with I2C init. 2023-04-04 14:01:47 -04:00
TroyHacks
bd477624f0 Working proof of concept for ES8388 2023-04-03 22:41:29 -04:00
Will Tatam
760ff836c3 Merge branch 'mdev' into ES8388 2023-04-03 19:15:28 +01:00
Frank
5575d6ab11 audioreactive optimization for -C3
some optimizations for -C3.

* skip every second FFT, and use interpolation instead.
* reduce sampling rate from 22Khz to 18Khz
* new debug measurement for I2S cycle times (FFTTask)

--> in total, this brings CPU load for sound processing down to 60% (from >100% previously)
2023-01-18 18:40:37 +01:00
Frank
e6bd66d35d improve support for -S2
got myself an adafruit "qt py -S2" with tinyUF2 bootloader. So I wanted to get that working. And it does work :-).
FFT time = 10ms (instead of 2ms on classic ESP32)  is a very good result, also virtual USB runs much better now.
2022-12-22 23:22:58 +01:00
Frank
0c3adf1f8a pin info small improvements 2022-12-04 20:09:10 +01:00
Frank
1f0b53ce7a prepare for merge with upstream
- prepare for merging upstream
--> audiorective files should stay the same after merging!
- makuna just release NeoPixelBus 2.7.1 -> use for "V4" build
2022-11-29 13:49:17 +01:00
Will Tatam
0a8347fb74 Further work in progress on ES8388 driver 2022-11-27 16:54:05 +00:00
netmindz
91fd6b7a7c Merge branch 'MoonModules:mdev' into ES8388 2022-11-27 14:54:51 +00:00
Frank
4cedcf6ad8 PIO: fix platformV4_packages
It seems that "platformio/framework-arduinoespressif32@ ~3.20004.220825" was removed/renamed very recently.
2022-11-26 22:26:18 +01:00
Frank
75b4c7e9e9 use WLED_DEBUG for important warnings
* make sure that important warnings are also shown when only WLED_DEBUG is set, but SR_DEBUG not set.
* some extra error messages for ES7243
2022-11-25 13:44:06 +01:00
Frank
3f4e7a6a77 AudioSource parameter re-ordered
making "i2sMaster" the last optional parameter
2022-11-25 10:35:23 +01:00
Frank
dfd839de87 add braces around potentially-empty (debug) else branches
the compiler advises "suggest braces around empty body in an 'else' statement [-Wempty-body]". We follow.
2022-11-24 16:53:58 +01:00
Will Tatam
5be6f748bc Merge branch 'mdev' into ES8388S 2022-11-22 20:34:21 +00:00
Will Tatam
69ed8084a1 Work in progress on building ES8388Source from es8388arduino library 2022-11-22 20:12:51 +00:00
Will Tatam
e7fd000636 Work in progress on building ES8388Source from es8388arduino library 2022-11-22 20:07:49 +00:00
Frank
1446bab3c5 I2S: another attempt to make "slave mode" work 2022-11-22 17:14:02 +01:00
Frank
cfe6fbb00c es7243 additional error checking
- es7243: check for valid SCK and MCLK
- minor UI improvements
2022-11-19 17:35:44 +01:00
Frank
a4ab3ee6f1 fix I2C pin alloc, and prep for settngs decluttering
ES7243: fix I2C pin alloc (multi-pin)
AR settings: prepare for de-cluttering
2022-11-19 16:38:53 +01:00
Frank
d593120dae some sanity checks for new MCUs
- warn if I2S does not have analog support
- warn if I2S does not have APLL clock
- compilation error if I2S not supported
2022-11-19 02:55:45 +01:00
Frank
d3af3446f7 add bandpass filter for PDM mics
This introduces an optional band pass filtering step to remove low frequency noise. Very effective for PDM mics - reduces noise floor by a factor of 100 !
2022-11-17 15:09:54 +01:00
Frank
06af6f5ad0 don't use aPLL in IDF version 3
seems that this interferes with MCLK routing
2022-11-09 21:08:46 +01:00
Frank
0fdc0d042d small improvements for I2S PDM and I2S Line-in 2022-11-09 18:36:02 +01:00
Frank
20aebf2789 improved support for PDM microphones (SPM1423)
seems that the "swapped channel" workaround is not needed for PDM.
2022-11-09 00:01:40 +01:00
Frank
260740d210 small improvement for analog input
do not disable ADC initially.
2022-11-07 16:26:33 +01:00
Frank
4bd35b780e Some improvements for I2S Line-In
- I2S DAC devices utilize the complete sample range [-32767 ... 32768], while I2S microphones typically deliver  samples in [-2047... 2047]. Down-scaling Line-in samples ensures that filters and AGC operate optimally.
- use aPLL clock source for I2S with MCLK
- experimental: I2S slave mode (however could not get it to work ...)
2022-11-07 15:34:42 +01:00
Frank
5ed0bb8c2b Microphone calibration profiles 2022-10-05 17:55:54 +02:00
Frank
90b3f009af AR: small improvement for ADC analog mics
ensure that ADC parameters are properly configured.
2022-09-19 13:30:13 +02:00
Frank
6f8deb83e3 some relaxations for S2 and C3
- AR: changed "error" into warning.
- reducing max_busses (for AR) not needed on S2
2022-09-17 22:00:33 +02:00
Frank
85fc8710dd mics that need MCLK should work 2022-09-17 20:39:23 +02:00
Frank
a766ddbebc make I2S microphones work with buggy IDF4.4.x
I2S microphones were not working any more in with the newest framework - only delivers silence.
Ther reason is stupid bug in espressif I2S "compatibility" driver: RIGHT and LEFT channel are swapped, so when only asking for LEFT, we get silence from RIGHT.

Workaround: simply change LEFT to RIGHT, until the problem is fixed in ESP-IDF --> Fix tested on "classic ESP32", but still need to check behavior on -S3.
Code compiles also on -S3, -S2, and -C3.

smaller changes:
- a few changes to use new APIs (MCLK, rouing and sample resolution)
- a few additional debug messages
- put correct value into _pinConfig.mck_io_num
2022-09-16 16:58:04 +02:00
Frank
925bc3b3dd AR: get rid of annoying "type conversion" warning 2022-09-11 14:32:00 +02:00
Frank
ac10b3a5c7 compilation support for audioreactive
putting all parts that will not compile between #ifdef .... #endif
Tested on S3, cannot say what will happen on other MCUs
2022-09-11 00:12:51 +02:00
Frank
5a4713950c improved ADCsample processing (from SR WLED)
improved ADCsample processing,  including replacement of "rogue" samples from other channels (this happens at least once in 5 seconds !!).

It compiles, don't ship it yet - needs more testing.
2022-08-14 16:17:34 +02:00
Frank
c6691564a5 removing dead code from getSamples() 2022-08-14 14:47:03 +02:00
Frank
968721a515 some audio processing improvements and bugfixes from SR WLED
- smoothing FFTResult (don't have a matrix to test)
- UDP sound sync improvements
- some bugfixes from SR WLED
- button.cpp: avoid starvation: strip.isUpdating() can be true for a long time.

work in progress - still needs testing!!
2022-08-14 13:58:07 +02:00
Frank
5e6532959b AudioSource improvements (work in progress)
-new methods: getType(), isInitailized(), postProcessSample()
- allow users to compile for RIGHT audio channel (-D I2S_USE_RIGHT_CHANNEL)
- better handling in case audio input driver failed to initialize
- removed some unneeded code and unneeded parameters
2022-08-10 17:18:43 +02:00