AR: avoid user confusion between PDM and I2S
"'Generic I2S PDM" -> "'Generic PDM" unrelated: simplify an ifdef in audio_source.h
This commit is contained in:
@@ -2065,7 +2065,7 @@ class AudioReactive : public Usermod {
|
|||||||
break;
|
break;
|
||||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||||
case 5:
|
case 5:
|
||||||
DEBUGSR_PRINT(F("AR: I2S PDM Microphone - ")); DEBUGSR_PRINTLN(F(I2S_PDM_MIC_CHANNEL_TEXT));
|
DEBUGSR_PRINT(F("AR: Generic PDM Microphone - ")); DEBUGSR_PRINTLN(F(I2S_PDM_MIC_CHANNEL_TEXT));
|
||||||
audioSource = new I2SSource(SAMPLE_RATE, BLOCK_SIZE, 1.0f/4.0f);
|
audioSource = new I2SSource(SAMPLE_RATE, BLOCK_SIZE, 1.0f/4.0f);
|
||||||
useInputFilter = 1; // PDM bandpass filter - this reduces the noise floor on SPM1423 from 5% Vpp (~380) down to 0.05% Vpp (~5)
|
useInputFilter = 1; // PDM bandpass filter - this reduces the noise floor on SPM1423 from 5% Vpp (~380) down to 0.05% Vpp (~5)
|
||||||
delay(100);
|
delay(100);
|
||||||
@@ -2697,10 +2697,12 @@ class AudioReactive : public Usermod {
|
|||||||
if (audioSource->getType() == AudioSource::Type_I2SAdc) {
|
if (audioSource->getType() == AudioSource::Type_I2SAdc) {
|
||||||
infoArr.add(F("ADC analog"));
|
infoArr.add(F("ADC analog"));
|
||||||
} else {
|
} else {
|
||||||
if (dmType != 51)
|
if (dmType != 51) {
|
||||||
infoArr.add(F("I2S digital"));
|
if (dmType == 5) infoArr.add(F("PDM digital"));
|
||||||
|
else infoArr.add(F("I2S digital"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
infoArr.add(F("legacy I2S PDM"));
|
infoArr.add(F("legacy PDM"));
|
||||||
}
|
}
|
||||||
// input level or "silence"
|
// input level or "silence"
|
||||||
if (maxSample5sec > 1.0) {
|
if (maxSample5sec > 1.0) {
|
||||||
@@ -3075,14 +3077,14 @@ class AudioReactive : public Usermod {
|
|||||||
#endif
|
#endif
|
||||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||||
#if SR_DMTYPE==5
|
#if SR_DMTYPE==5
|
||||||
oappend(SET_F("addOption(dd,'Generic I2S PDM (⎌)',5);"));
|
oappend(SET_F("addOption(dd,'Generic PDM (⎌)',5);"));
|
||||||
#else
|
#else
|
||||||
oappend(SET_F("addOption(dd,'Generic I2S PDM',5);"));
|
oappend(SET_F("addOption(dd,'Generic PDM',5);"));
|
||||||
#endif
|
#endif
|
||||||
#if SR_DMTYPE==51
|
#if SR_DMTYPE==51
|
||||||
oappend(SET_F("addOption(dd,'.Legacy I2S PDM ☾ (⎌)',51);"));
|
oappend(SET_F("addOption(dd,'.Legacy PDM ☾ (⎌)',51);"));
|
||||||
#else
|
#else
|
||||||
oappend(SET_F("addOption(dd,'.Legacy I2S PDM ☾',51);"));
|
oappend(SET_F("addOption(dd,'.Legacy PDM ☾',51);"));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if SR_DMTYPE==6
|
#if SR_DMTYPE==6
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ class I2SSource : public AudioSource {
|
|||||||
// S3: not supported; S2: supported; C3: not supported
|
// S3: not supported; S2: supported; C3: not supported
|
||||||
_config.use_apll = false; // APLL not supported on this MCU
|
_config.use_apll = false; // APLL not supported on this MCU
|
||||||
#endif
|
#endif
|
||||||
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S3) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||||
if (ESP.getChipRevision() == 0) _config.use_apll = false; // APLL is broken on ESP32 revision 0
|
if (ESP.getChipRevision() == 0) _config.use_apll = false; // APLL is broken on ESP32 revision 0
|
||||||
#endif
|
#endif
|
||||||
#if defined(WLED_USE_ETHERNET) || defined(WLED_ENABLE_HUB75MATRIX)
|
#if defined(WLED_USE_ETHERNET) || defined(WLED_ENABLE_HUB75MATRIX)
|
||||||
|
|||||||
Reference in New Issue
Block a user