Added platformio.ini file and few test configs#222
Conversation
luar123
left a comment
There was a problem hiding this comment.
Nice work. The pio flow is specially useful for the pre-build hardware. I am still trying to see how to use it conveniently with custom configurations and without modifying platform.ini.
| CONFIG_FREERTOS_MAX_TASK_NAME_LEN=10 | ||
| CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=1536 | ||
| CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=5 | ||
| CONFIG_FREERTOS_USE_TICKLESS_IDLE=y |
There was a problem hiding this comment.
Is this the default now or do you want to prevent light sleep mode?
There was a problem hiding this comment.
Actually, I found these in most of the configs, not sure if that is not supposed to be set. What do you think?
There was a problem hiding this comment.
I think I did not update all the legacy files when enabling sleep mode. Please revert and test. Should work fine and reduce power to ~0.2W when idle.
|
@luar123 thanks for reviewing. I'll finish converting the exisitng boards configs and will do some cleanup. |
|
Interesting, my louder-esp32s3 runs fine 24/7 for a few months now (but have not updated in a while). I will try to update to latest dev and test when I have time. |
Oh, good to know, we can cross-check SDKCONFIGs then, when I'm ready for S3 tuning |
|
I'm done with sdkconfigs transformations, feel free to look into those. I'm planning to run the tests with every board I have. This would not cover all of it though. |
|
Hey @luar123 is there a chance you can find which commit and SDKCONFIG your Louder-ESP32-S3 is built from? I'm testing with ESP32 boards, it works flawlessly, but the ESP32-S3 is not working at all. Constant RESYNCING HARD, not responding to volume changes, etc. |
I hope I can look into this during the weekend. |
|
@anabolyc ran a short test with current develop branch, default settings, idf 5.5.4
No re-syncs at all. |
|
These are sdkconfig recommendations mostly from esphome (RAM/network heavy sendspin/voice assistant implementations) based on idf guides and experience. However, I did not test most of them: On esp32s3 we should first add: Additionally: On non esp32s3 psram variants: on all psram variants for high performance network: |
|
Thanks @luar123 I'm trying those now. But I already see a huge improvement, I forgot to include |
|
It should not be necessary to load the target specific files explicitely: https://docs.espressif.com/projects/esp-idf/en/v5.5.4/esp32/api-guides/kconfig/configuration_structure.html#sdkconfig-defaults-and-sdkconfig-defaults-chip |
Ah, that was mentioned above already. Completely escaped my mind :) |
|
Some envs have now issue with IRAM overflow. Probably need to roll back some of the default settings. I guess these are caused by |
|
Do not use most of the iram optimizations, at least nit on variants without psram. I make heavy use of IRAM for pcm buffer. |
They are part of the PSRAM-enabled config. Would you suggest keeping them, or removing? |
|
adau1961 sdkconfig template is the one I used. It is probably outdated but you could compare with that one as it should be in the state when I did those memory optimizations. The IRAM options should be there. |
|
@CarlosDerSeher: From the settings I proposed only the first part is applied to all configs. reduce IRAM usage further and should be save to use. Settings that increase IRAM: are only applied to configs with PSRAM. Still not sure if this gives a benefit. |
|
@anabolyc Is it working fine for you now on esp32 and esp32-s3?
Is the log with or without the last block? |
|
Sorry for the delay, had a short holiday break. It works very well on all esp32 boards, on the esp32-s3 it is still not very stable. As you can see from the log, it falls into hard resyncs every now and then. I didn't include the last network-related block, since it made the situation even worse, so the log I posted also captured without those changes If you have a chance, can you try s3 config from this branch on your board. I'm wondering if maybe my network is causing my issues (or maybe my test board is too tired, i re-flashed it like 1000 times already). |
|
Tested the settings from this PR on my louder-esp-s3 and it works fine (did not build with pio). I only kept light sleep on (#222 (comment)). Differences could come from network or hardware. There are a few things you could try:
Most development was done with very small buffers so maybe there are some systematic issues when having large buffers. When dealing with network congestion increasing the buffers can help but somehow that seems not work. The Resync 1 message suggests there are too old samples. @CarlosDerSeher Do you think we could discard late chunk messages early before decoding them, maybe comparing tx time stamps with server time taking the buffer length into account? Are out-of-order messages handled? Another thought: Not sure if this could help but I think we should disable tcp nagle when sending time messages. |
We would need some kind of feedback from player task to http task. Not sure how to do this. We would have to evaluate this.
This should be done by lwip, we use a TCP connection so shouldn't be a problem. |
|
I'm trying on a different wifi network and it seems to perform better, although hard resyncs are still happening. Will play with IRAM optimizations, see if it does any good |
Yes, I think there are multiple options how to do it. Should not add much overhead and does not have to be super accurate. I am out for a few weeks, so won't look into it soon.
Does it help? Looking at your ping you should increase your buffer to 2000ms. |
I just pushed the settings that work more-or-less stable. This block seems to made it better, but I think most of the issues are coming from my network setup. Not the first time i have issues with it. Normally my ping is 5-50ms, but then it suddenly starts to go over the sky |
|
@CarlosDerSeher @luar123 I'm okay with the current state, unless you have some other ideas that I should implement, I'd do some cleanup, squashing, and merge preparations. How do you feel about that? |
|
Honestly I'll have to try and compare the configs to what I currently use |


Addressing #182
This change adds platformio.ini config file, that uses reduced sdkconfigs only:
and board-specific configs (only DAC settings and pinouts)
Most of the settings from the current sdkconfigs will be generated during build based on the idf defaults