* - add wifi credential reset
o press reset button (nRESET pin) 3 times
but wait about 1s between button presses
the button press counter is reset 5s after boot
* add wifi provisioning service through improv wifi (fix#75)
Signed-off-by: Karl Osterseher <karli_o@gmx.at>
* upgrade to IDF v5.1.1
* add new synchronization implementation, use sample stuffing / removal to keep up sync
* use big DMA buffer for I2S and improve sync
* Add DAC TAS5805M as custom board
* add wifi credential reset
o press reset button (nRESET pin) 3 times
but wait about 1s between button presses
the button press counter is reset 5s after boot
* Add support for PT8211 DAC (#78)
* upgrade ethernet interface to IDF v5 (#84)
* port official example of ethernet for IDF v5.x
* Fix cmake if guard for ethernet
Signed-off-by: Karl Osterseher <karli_o@gmx.at>
Co-authored-by: DerPicknicker <64746593+DerPicknicker@users.noreply.github.com>
Co-authored-by: whc2001 <ianwang0122@outlook.com>
this only works for chunk sizes <= 10ms if set to 20ms server sometimes sends 20ms and sometimes 10ms frames which confuses esp client.
RESYNCING HARD 2 still happen very often for some reason.
remove bug in insert_pcm_chunk() resulting in dropped chunks if queue gets full, which isn't desired.
work in progress which eventually will enable the user to configure dsp processor on the fly using an on device http server.
first try and possible fix for #22
Signed-off-by: Karl Osterseher <karli_o@gmx.at>
o wait max. 200ms and try to allocate memory every 1 ms
- set sync task to max priority and http task to (max priority - 1)
- mute audio if a hard resync happens to prevent clicks and other audible distortions
- reduce LWIP buffer sizes
Signed-off-by: Karl Osterseher <karli_o@gmx.at>
- instead of storing chunk duration in ms store the frame count
and do calculations based on that
- add updated snapserver.conf for reference (#17)
- some code clean up
- move Kconfig entries to correct place
- remove unnecessary Kconfig entries
- add necessary dependencies in Kconfig files
Signed-off-by: Karl Osterseher <karli_o@gmx.at>
- change some function return values from int8_t to int32_t
- improve syncing
o try to mimic original algorithm used by badaix
- latency_buffer_full() call in player sporadically returns negative value
which led to a unnecessary vTaskDelay --> resolved
- use esp_timer_get_time() instead of gettimeofday() for timestamping
- enable IRAM optimazations for WIFI
- decrease WIFI RX buffers
Signed-off-by: Karl Osterseher <karli_o@gmx.at>
- disable shortMedianFilter
- decrease control loop's calls to adjust_apll()
- increase size of latencyMedianFilterLong
Signed-off-by: Karl Osterseher <karli_o@gmx.at>
o configurable through CHNK_CTRL_CNT
- move time sync messaging to timer callback so it will keep going to send and receive them as long as we are connected to snapserver
- change task priorities and core IDs of tasks
Signed-off-by: Karl Osterseher <karli_o@gmx.at>
- increase DMA buffer size from 1 chunk to 3 chunks settable through source code Macro CHNK_CTRL_CNT
- activate OTA server
Signed-off-by: Karl Osterseher <karli_o@gmx.at>
o copy component audio_board from ADF and create custom component from it
o copy component audio_hal from ADF and create custom component from it
o copy component audio_sal from ADF and create custom component from it
o copy component esp_peripherals from ADF and create custom component from it
- add fLaC support through xiph's original repository as a git module
- run player_task on core 1 with max priority
- create/destroy chunk queue as required automatically
- use mutex to access snapcast config and communicate this change by queue with size 1
- increase buffers for WIFI and LWIP in sdkconfig for NO_SPIRAM config
- add some more debug output
- detect snapcast configuration and init everything accordingly, e.g sample rate, chunk duration, ...
o calculate apll predefines in dependence of sample rate
o communicate these settings to interested parties
- remove typos
- minimize RAM usage of all components
- use both IRAM and DRAM in player component so we can buffer up to 1s on modules without SPI RAM
- support fragemented pcm chunks so we can use all available RAM if there isn't a big enough block available but still enough HEAP
- reinclude all components from jorgen's master branch
- add custom i2s driver to get a precise timing of initial sync
- change wrong usage of esp_timer for latency measurement of snapcast protocol
- add player component
- change syncing to be more predictable using I2S_EVENT_TX_DONE
o also increase DMA length so i2s won't eat up so much processing time
o ensure at least one chunk is in DMA buffer
- try to improve synced playback using APLL adjustments
- reduce diffBuf size to 1, bigger values seem to be problematic if packet loss is happening, maybe we need to detect this and clear diffBuf
- do early time syncs on boot to fill diffBuf
- playing with pipline ringbuf sizes and I2S DMA buffer sizes
- use espressif ADF, remove external opus rep
o uses audio pipelines now
- change code to use flac decoder
- remove mersus code
- add first try of audio synchronization
o needed to sync timeofday to server on reception of server settings to avoid overflows in timeval calculations (int32_t on esp32 SDK)
o still a lot of TODO's in the code, but it's almost in sync, although there is quite some chunk skipping which I am currently working on