philippe44 %!s(int64=4) %!d(string=hai) anos
pai
achega
f5bb058541
Modificáronse 1 ficheiros con 16 adicións e 58 borrados
  1. 16 58
      README.md

+ 16 - 58
README.md

@@ -40,7 +40,7 @@ Any esp32-based hardware with at least 4MB of flash and 4MB of PSRAM will be cap
 ### Raw WROVER module
 Per above description, a [WROVER module](https://www.espressif.com/en/products/modules/esp32) is enough to run Squeezelite-esp32, but that requires a bit of tinkering to extend it to have analogue audio or hardware buttons (e.g.) 
 
-Please note that when sending to a Bluetooth speaker, then resampling *must* be enabled (using -R) option if you want to send audio with rate other than 44.1kHz. Similarly, when using SPDIF, only 44.1kHz and 48kHz are supported so you might have to enable resampling as well. If you connect a DAC, choice will depends on its capabilities. See below for more details.
+Please note that when sending to a Bluetooth speaker (source), only 44.1 kHz can be used, so you either let LMS do the resampling, but you must make sure it only sends 44.1kHz tracks or enable internal resampling (using -R) option. If you connect a DAC, choice of sample rates will depends on its capabilities. See below for more details.
 
 Most DAC will work out-of-the-box with simply an I2S connection, but some require specific commands to be sent using I2C. See DAC option below to understand how to send these dedicated commands. There is build-in support for TAS575x, TAS5780, TAS5713 and AC101 DAC.
 ### SqueezeAMP
@@ -407,67 +407,25 @@ The above command will mount this repo into the docker container and start a bas
 for you to then follow the below build steps
 
 ### Manual Install of ESP-IDF
-<strong>Currently the master branch of this project requires this [IDF](https://github.com/espressif/esp-idf/tree/28f1cdf5ed7149d146ad5019c265c8bc3bfa2ac9) with gcc 5.2 (toolschain dated 20181001)
-If you want to use a more recent version of gcc and IDF (4.0 stable), move to cmake-master branch</strong>
+You can install IDF manually on Linux or Windows (using the Subsystem for Linux) following the instructions at: https://www.instructables.com/id/ESP32-Development-on-Windows-Subsystem-for-Linux/ or see here https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/windows-setup.html for a direct install. 
 
-You can install IDF manually on Linux or Windows (using the Subsystem for Linux) following the instructions at: https://www.instructables.com/id/ESP32-Development-on-Windows-Subsystem-for-Linux/
-And then copying the i2s.c patch file from this repo over to the esp-idf folder
-You also need to use esp-dsp recent version or at least make sure you have this patch https://github.com/espressif/esp-dsp/pull/12/commits/8b082c1071497d49346ee6ed55351470c1cb4264. As of this writing (08.2020), espressif has patched esp-dsp so this is no more needed
+**Use the esp-idf 4.0 https://github.com/espressif/esp-idf/tree/release/v4.0** and add esp-dsp
 
 ## Building Squeezelite-esp32
+When initially cloning the repo, make sure you do it recursively. For example: `git clone --recursive https://github.com/sle118/squeezelite-esp32.git`
+	
 Don't forget the to choose one of the config files in build_scripts/ and rename it sdkconfig.defaults or sdkconfig as many important WiFi/BT options are set there. The codecs libraries will not be rebuilt by these scripts (it's a tedious process - see below)
-### Using make (deprecated)
-MOST IMPORTANT: create the right default config file
-- make defconfig
-(Note: You can also copy over config files from the build-scripts folder to ./sdkconfig)
-Then adapt the config file to your wifi/BT/I2C device (can also be done on the command line)
-- make menuconfig
-Then
-
-```
-# Build recovery.bin, bootloader.bin, ota_data_initial.bin, partitions.bin  
-# force appropriate rebuild by touching all the files which may have a RECOVERY_APPLICATION specific source compile logic
-	find . \( -name "*.cpp" -o -name "*.c" -o -name "*.h" \) -type f -print0 | xargs -0 grep -l "RECOVERY_APPLICATION" | xargs touch
-	export PROJECT_NAME="recovery" 
-	make -j4 all EXTRA_CPPFLAGS='-DRECOVERY_APPLICATION=1'
-make flash
-#
-# Build squeezelite.bin
-# Now force a rebuild by touching all the files which may have a RECOVERY_APPLICATION specific source compile logic
-find . \( -name "*.cpp" -o -name "*.c" -o -name "*.h" \) -type f -print0 | xargs -0 grep -l "RECOVERY_APPLICATION" | xargs touch
-export PROJECT_NAME="squeezelite" 
-make -j4 app EXTRA_CPPFLAGS='-DRECOVERY_APPLICATION=0'
-python ${IDF_PATH}/components/esptool_py/esptool/esptool.py --chip esp32 --port ${ESPPORT} --baud ${ESPBAUD} --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x150000 ./build/squeezelite.bin  
-# monitor serial output
-make monitor
-
-```
-
-You can also manually download the recovery & initial boot
-```
-python ${IDF_PATH}/components/esptool_py/esptool/esptool.py --chip esp32 --port ${ESPPORT} --baud ${ESPBAUD} --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xd000 ./build/ota_data_initial.bin 0x1000 ./build/bootloader/bootloader.bin 0x10000 ./build/recovery.bin 0x8000 ./build/partitions.bin
-```
-### Using cmake
-Create you config using 'idf.py menuconfig' then build binaries using 'idf.py all'. It will build the recovery and the application (squeezelite) itself. See the recommended command to upload everything. Otherwise, if you just want to download squeezelite, do
-```
-python.exe <idf_path>\components\esptool_py\esptool\esptool.py -p COM<n> -b 921600 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 80m 0x150000 build\squeezelite.bin
-```
-Use 'idf monitor' to monitor the application (see esp-idf documentation)
-## Additional misc notes to do you build (kitchen sink)
-- don't forget to set IDF_PATH, ESPPORT and ESPBAUD
-- When initially cloning the repo, make sure you do it recursively. For example: 
-	- git clone --recursive https://github.com/sle118/squeezelite-esp32.git
-- If you have already cloned the repository and you are getting compile errors on one of the submodules (e.g. telnet), run the following git command in the root of the repository location
-	-  git submodule update --init --recursive
-- as of this writing, ESP-IDF has a bug int he way the PLL values are calculated for i2s, so you *must* use the i2s.c file in the patch directory
-- misc compiler #define
-	- use no resampling or set RESAMPLE (soxr - but overloads CPU) or set RESAMPLE16 for fast fixed 16 bits resampling
-	- use LOOPBACK (mandatory)
-	- use BYTES_PER_FRAME=4 (8 is not fully functionnal)
-	- LINKALL (mandatory)
-	- NO_FAAD unless you want to us faad, which currently overloads the CPU
-	- TREMOR_ONLY (mandatory)
-### codecs
+
+Create you config using `idf.py menuconfig` (select your target) then build binaries using `idf.py all`. It will build the recovery and the application (squeezelite) itself. then use `idf.py flash` to write everything. Otherwise, if you just want to download squeezelite, do (assuming you have set ESPPORT (e.g. COM10) and ESPBAUD (e.g. 921600)
+```
+<path_to_your_python>/python.exe <path_to_your_esptool>/esptool.py -p %ESPPORT% -b %ESPBAUD% --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 80m 0x150000 build\squeezelite.bin
+```
+Use `idf.py monitor` to monitor the application (see esp-idf documentation)
+
+You can use `idf.py build -DDEPTH=32` to build the 32 bits version and add the `-DVERSION=<your_version>` to add a custom version name (it will be 0.0-<your_version>). If you want to change the whole version string, see squeezelite.h
+
+If you have already cloned the repository and you are getting compile errors on one of the submodules (e.g. telnet), run the following git command in the root of the repository location: `git submodule update --init --recursive`
+### codecs (highly recommended to NOT try that)
 - for codecs libraries, add -mlongcalls if you want to rebuild them, but you should not (use the provided ones in codecs/lib). if you really want to rebuild them, open an issue
 - libmad, libflac (no esp's version), libvorbis (tremor - not esp's version), alac work
 - libfaad does not really support real time, but if you want to try (but using helixaac is a better option)