GithubHelp home page GithubHelp logo

sle118 / squeezelite-esp32 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from philippe44/squeezelite-esp32

1.1K 30.0 103.0 37.74 MB

ESP32 Music streaming based on Squeezelite, with support for multi-room sync, AirPlay, Bluetooth, Hardware buttons, display and more

Makefile 0.20% C 81.76% CMake 1.09% Dockerfile 0.19% JavaScript 3.02% HTML 0.23% CSS 0.01% Shell 0.29% Perl 1.08% C++ 9.91% TypeScript 0.01% SCSS 0.04% EJS 0.71% Python 1.34% Assembly 0.06% PowerShell 0.07%

squeezelite-esp32's Introduction

Platform Build

Squeezelite-esp32

Forewords

More and more people seems to use this without a LMS server, just for BT, AirPlay or Spotify. It's fine but understand that squeezeliteESP32 is primarily a Logitech Media Server player and has been designed around that concept. All the others are add-ons stitched to it, so other modes have their shortcomings. So please make sure you read this before opening an issue

What is this?

Squeezelite-esp32 is an audio software suite made to run on espressif's esp32 and esp32-s3 wifi (b/g/n) and bluetooth chipsets. It offers the following capabilities

  • Stream your local music and connect to all major on-line music providers (Spotify, Deezer, Tidal, Qobuz) using Logitech Media Server - a.k.a LMS and enjoy multi-room audio synchronization. LMS can be extended by numerous plugins and can be controlled using a Web browser or dedicated applications (iPhone, Android). It can also send audio to UPnP, Sonos, ChromeCast and AirPlay speakers/devices.
  • Stream from a Bluetooth device (iPhone, Android)
  • Stream from an AirPlay controller (iPhone, iTunes ...) and enjoy synchronization multiroom as well (although it's AirPlay 1 only)
  • Stream directly from Spotify using SpotifyConnect (thanks to cspot) - please read carefully this

Depending on the hardware connected to the esp32, you can send audio to a local DAC, to SPDIF or to a Bluetooth speaker. The bare minimum required hardware is a WROVER module with 4MB of Flash and 4MB of PSRAM (https://www.espressif.com/en/products/modules/esp32). With that module standalone, just apply power and you can stream to a Bluetooth speaker. You can also send audio to most I2S DAC as well as to SPDIF receivers using just a cable or an optical transducer.

But squeezelite-esp32 is highly extensible and you can add

Other features include

  • Resampling (16 bits mode)
  • 10-bands equalizer (16 bits mode)
  • Automatic initial setup using any WiFi device
  • Full web interface for further configuration/management
  • Firmware over-the-air update

To control the equalizer or use the display on LMS, a new player model is required and this is provided through a plugin that is part of LMS' 3rd party repositories

Performances

(opinions presented here so I = @philippe44) The main build of squeezelite-esp32 is a 16 bits internal core with all calculations in 32 bits or float precision. This is a design choice I've made to preserve CPU performances (it is already stretching a lot the esp32 chipset) and optimize memory usage as we only have 4MB of usable RAM. Some might correctly comment that the WROVER module have 8MB of RAM, but the processor is only able to address 4MB and the remaining 4MB must be paginated by smaller blocks and I don't have patience to that.

Now, when I did the porting of squeezelite to esp32, I've also made the core 16 or 32 bits compatible at compile-time. So far, it works in 32 bits but less tests have been done. You can chose to compile it in 32 bits mode. I'm not very interested above 16 bits samples because it does not bring anything (I have an engineering background in theory of information).

Capability 16 bits 32 bits comment
max sampling rate 192k 96k 192k is very challenging, especially when combined with display
max bit depth 16 24 24 bits are truncated in 16 bits mode
spdif 16 bits 20 bits
mp3, aac, opus, ogg/vorbis 48k 48k
alac, flac, ogg/flac 96k 96k
pcm, wav, aif 192k 96k
equalizer Y N 48kHz max (after resampling) - equalization skipped on >48k tracks
resampling Y N
cross-fade 10s <5s depends on buffer size and sampling rate

The esp32 must run at 240 MHz, with Quad-SPI I/O at 80 MHz and a clock of 40 Mhz. Still, it's a lot to run, especially knowing that it has a serial Flash and PSRAM, so kudos to Espressif for their chipset optimization. Now, to have all the decoding, resampling, equalizing, gain, display, spectrum/vu is a very (very) delicate equilibrium between use of internal /external RAM, tasks priorities and buffer handling. It is not perfect and the more you push the system to the limit, the higher the risk that some files would not play (see below). In general, the display will always have the lowest priority and you'll notice slowdown in scrolling and VU/Spectrum refresh rates. Now, even display thread has some critical section and impacts the capabilities. For example, a 16 bits-depth color display with low SPI speed might prevent 24/96 flac to work but still work with pcm 24/96

In 16 bits mode, although 192 kHz is reported as max rate, it's highly recommended to limit reported sampling rate to 96k (-Z 96000). Note that some high-speed 24/96k on-line streams might stutter because of TCP/IP stack performances. It is usually due to the fact that the server sends small packets of data and the esp32 cannot receive encoded audio fast enough, regardless of task priority settings (I've tried to tweak that a fair bit). The best option in that case is to let LMS proxy the stream as it will provide larger chunks and a "smoother" stream that can then be handled.

Note as well that some codecs consume more CPU than others or have not been optimized as much. I've done my best to tweak these, but that level of optimization includes writing some assembly which is painful. One very demanding codec is AAC when files are encoded with SBR. It allows reconstruction of upper part of spectrum and thus higher sampling rate, but the codec spec is such that this is optional, you can decode simply lower band and accept lower sampling rate - See the AAC_DISABLE_SBR option below.

IMPORTANT: on esp32 (not esp32-s3), using Spotify with SPDIF produces stuttering audio when "stats" are enabled. You MUST disable them

Supported Hardware

Any esp32-based hardware with at least 4MB of flash and 4MB of PSRAM will be capable of running squeezelite-esp32 and there are various boards that include such chip. A few are mentionned below, but any should work. You can find various help & instructions here

For the sake of clarity, WROOM modules DO NOT work as they don't include PSRAM. Some designs might add it externally, but it's (very) unlikely.

Raw WROVER module

Per above description, a WROVER module 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 (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.

Raw WROOM esp32-s3 module

The esp32-s3 based modules like this are also supported but requires esp-idf 4.4. It is not yet part of official releases, but it compiles & runs. The s3 does not have bluetooth audio. Note that CPU performances are greatly enhanced.

SqueezeAMP

This is the main hardware companion of Squeezelite-esp32 and has been developped together. Details on capabilities can be found here and here.

If you want to rebuild, use the squeezelite-esp32-SqueezeAmp-sdkconfig.defaults configuration file.

NB: You can use the pre-build binaries SqueezeAMP4MBFlash which has all the hardware I/O set properly. You can also use the generic binary I2S4MBFlash in which case the NVS parameters shall be set to get the exact same behavior

  • set_GPIO: 12=green,13=red,34=jack,2=spkfault
  • bat_config: channel=7,scale=20.24
  • dac_config: model=TAS57xx,bck=33,ws=25,do=32,sda=27,scl=26,mute=14:0
  • spdif_config: bck=33,ws=25,do=15

The IR can be used as a wake-up signal using (setting sleep_config with wake=0:0). It's a pull-up so it stays at 1 when not receiving anything which means it cannot be used in conjuction with other wake-up IOs. See Sleeping for more details regarding the limitation of waking-up upon multiple inputs.

MuseLuxe

This portable battery-powered speaker is compatible with squeezelite-esp32 for which there is a dedicated build supplied with every update. If you want to rebuild, use the squeezelite-esp32-Muse-sdkconfig.defaults configuration file.

NB: You can use the pre-build binaries Muse4MBFlash which has all the hardware I/O set properly. You can also use the generic binary I2S4MBFlash in which case the NVS parameters shall be set to get the exact same behavior

  • target: muse
  • bat_config: channel=5,scale=7.48,atten=3,cells=1
  • spi_config: "mosi=15,miso=2,clk=14 (this one is probably optional)
  • dac_config: model=I2S,bck=5,ws=25,do=26,di=35,i2c=16,sda=18,scl=23,mck=0
  • dac_controlset: {"init":[ {"reg":0,"val":128}, {"reg":0,"val":0}, {"reg":25,"val":4}, {"reg":1,"val":80}, {"reg":2,"val":0}, {"reg":8,"val":0}, {"reg":4,"val":192}, {"reg":0,"val":18}, {"reg":1,"val":0}, {"reg":23,"val":24}, {"reg":24,"val":2}, {"reg":38,"val":9}, {"reg":39,"val":144}, {"reg":42,"val":144}, {"reg":43,"val":128}, {"reg":45,"val":128}, {"reg":27,"val":0}, {"reg":26,"val":0}, {"reg":2,"val":240}, {"reg":2,"val":0}, {"reg":29,"val":28}, {"reg":4,"val":48}, {"reg":25,"val":0}, {"reg":46,"val":33}, {"reg":47,"val":33} ]}
  • actrls_config: buttons
  • define a "buttons" variable with: [{"gpio":32, "pull":true, "debounce":10, "normal":{"pressed":"ACTRLS_VOLDOWN"}}, {"gpio":19, "pull":true, "debounce":40, "normal":{"pressed":"ACTRLS_VOLUP"}}, {"gpio":12, "pull":true, "debounce":40, "long_press":1000, "normal":{"pressed":"ACTRLS_TOGGLE"},"longpress":{"pressed":"ACTRLS_POWER"}}]

ESP32-A1S

Works with ESP32-A1S module that includes audio codec and headset output. You still need to use a demo board like this or an external amplifier if you want direct speaker connection. Note that there is a version with AC101 codec and another one with ES8388 with probably two variants - these boards are a mess (see below)

The board shown above has the following IO set

  • amplifier: GPIO21
  • key2: GPIO13, key3: GPIO19, key4: GPIO23, key5: GPIO18, key6: GPIO5 (to be confirmed with dip switches)
  • key1: not sure, using GPIO36 in a matrix
  • jack insertion: GPIO39 (inserted low)
  • D4 -> GPIO22 used for green LED (active low)
  • D5 -> GPIO19 (muxed with key3)
  • The IO connector also brings GPIO5, GPIO18, GPIO19, GPIO21, GPIO22 and GPIO23 (don't forget it's muxed with keys!)
  • The JTAG connector uses GPIO 12, 13, 14 and 15 (see dip switch) but these are also used for SD-card (and GPIO13 is key2 as well)
  • It's always possible to re-use GPIOO (download at boot) and GPIO1/GPIO3 which are RX/TX of UART0 but you'll lose trace

(note that some GPIO need pullups)

So a possible config would be

  • set_GPIO: 21=amp,22=green:0,39=jack:0
  • a button mapping:
     [{"gpio":5,"normal":{"pressed":"ACTRLS_TOGGLE"}},{"gpio":18,"pull":true,"shifter_gpio":5,"normal":{"pressed":"ACTRLS_VOLUP"}, "shifted":{"pressed":"ACTRLS_NEXT"}}, {"gpio":23,"pull":true,"shifter_gpio":5,"normal":{"pressed":"ACTRLS_VOLDOWN"},"shifted":{"pressed":"ACTRLS_PREV"}}]

for AC101

  • dac_config: model=AC101,bck=27,ws=26,do=25,di=35,sda=33,scl=32

for ES8388 (it seems that there are variants with same version number - a total mess)

  • dac_config: model=ES8388,bck=5,ws=25,do=26,sda=18,scl=23,i2c=16 or
  • dac_config: model=ES8388,bck=27,ws=25,do=26,sda=33,scl=32,i2c=16

T-WATCH2020 by LilyGo

This is a fun smartwatch based on ESP32. It has a 240x240 ST7789 screen and onboard audio. Not very useful to listen to anything but it works. This is an example of a device that requires an I2C set of commands for its DAC/APU (see below). There is a build-option if you decide to rebuild everything by yourself, otherwise the I2S default option works with the following parameters

  • dac_config: model=I2S,bck=26,ws=25,do=33,i2c=53,sda=21,scl=22
  • dac_controlset:
     { "init": [ {"reg":41, "val":128}, {"reg":18, "val":255} ], "poweron": [ {"reg":18, "val":64, "mode":"or"} ], "poweroff": [ {"reg":18, "val":191, "mode":"and"} ] }
  • spi_config: dc=27,data=19,clk=18
  • display_config: SPI,driver=ST7789,width=240,height=240,cs=5,back=12,speed=16000000,HFlip,VFlip

ESP32-WROVER + I2S DAC

Squeezelite-esp32 requires esp32 chipset and 4MB PSRAM. ESP32-WROVER meets these requirements. To get an audio output an I2S DAC can be used. Cheap PCM5102 I2S DACs work but many others also do. PCM5012 DACs can be hooked up via:

I2S - WROVER
VCC - 3.3V
3.3V - 3.3V
GND - GND
FLT - GND
DMP - GND
SCL - GND
BCK - (BCK - see below)
DIN - (DO - see below)
LCK - (WS - see below) FMT - GND
XMT - 3.3V

Use the squeezelite-esp32-I2S-4MFlash-sdkconfig.defaults configuration file.

SqueezeAmpToo !

And the super cool project https://github.com/rochuck/squeeze-amp-too

Configuration

To access NVS, in the webUI, go to credits and select "shows nvs editor". Go into the NVS editor tab to change NFS parameters. In syntax description below <> means a value while [] describe optional parameters.

As mentionned above, there are a few dedicated builds that are provided today: SqueezeAMP and Muse but if you build it yourself, you can also create a build for T-WATCH2020. The default build is a generic firmware named I2S which can be configured through NVS to produce exactly the same results than dedicated builds. The difference is that parameters must be entered and can accidently be erased. The GUI provides a great help to load "known config sets" as well.

By design choice, there is no code that is only embedded for a given version, all code is always there. The philosophy is to minimize as much as possible platform-specific code and use of specific #ifdef is prohibited, no matter what. So if you want to add your own platfrom, please look very hard at the main\KConfig.projbuild to see how you can, using parameters below, make your device purely a configuration-based solution. When there is really no other option, look at targets\<target> to add your own code. I will not accept PR for code that can avoid creating such dedicated code whenever possible. The NVS "target" will be used to call target-specific code then, but again this is purely runtime, not compile-time.

I2C

The NVS parameter "i2c_config" set the i2c's gpio used for generic purpose (e.g. display). Leave it blank to disable I2C usage. Note that on SqueezeAMP, port must be 1. Default speed is 400000 but some display can do up to 800000 or more. Syntax is

sda=<gpio>,scl=<gpio>[,port=0|1][,speed=<speed>]

Please note that you can not use the same GPIO or port as the DAC.

SPI

The esp32 has 4 SPI sub-systems, one is unaccessible so numbering is 0..2 and SPI0 is reserved for Flash/PSRAM. The NVS parameter "spi_config" set the spi's gpio used for generic purpose (e.g. display). Leave it blank to disable SPI usage. The DC parameter is needed for displays. Syntax is

data|mosi=<gpio>,clk=<gpio>[,dc=<gpio>][,host=1|2][,miso=<gpio>]

Default and only "host" is 1 as others are used already by flash and spiram. The optional "miso" (MasterInSlaveOut) parameter is only used when SPI bus is bi-directional and shared with other peripheral like ethernet, gpio expander. Note that "data" can also be named "mosi" (MasterOutSlaveIn).

DAC/I2S

The NVS parameter "dac_config" set the gpio used for i2s communication with your DAC. You can define the defaults at compile time but nvs parameter takes precedence except for named configurations

bck=<gpio>,ws=<gpio>,do=<gpio>[,mck=0|1|2][,mute=<gpio>[:0|1][,model=TAS57xx|TAS5713|AC101|WM8978|ES8388|I2S][,sda=<gpio>,scl=<gpio>[,i2c=<addr>]]

if "model" is not set or is not recognized, then default "I2S" is used. The option "mck" is used for some codecs that require a master clock (although they should not). By default GPIO0 is used as MCLK and only recent builds (post mid-2023) can use 1 or 2. Also be aware that this cannot coexit with RMII Ethernet (see ethernet section below). I2C parameters are optional and only needed if your DAC requires an I2C control (See 'dac_controlset' below). Note that "i2c" parameters are decimal, hex notation is not allowed.

So far, TAS57xx, TAS5713, AC101, WM8978 and ES8388 are recognized models where the proper init sequence/volume/power controls are sent. For other codecs that might require an I2C commands, please use the parameter "dac_controlset" that allows definition of simple commands to be sent over i2c for init, power, speaker and headset on and off using a JSON syntax:

{ <command>: [ <item1>, <item2>, ... <item3> ],
  <command>: [ <item1>, <item2>, ... <item3> ],
  ... }

Where <command> is one of init, poweron, poweroff, speakeron, speakeroff, headseton, headsetoff (it must be an array even for a single item). Item is any of the following elements

{"reg":<register>,"val":<value>,"mode":<nothing>|"or"|"and"}
{"gpio":<gpio>,"level":0|1}
{"delay":<ms>}

This is standard JSON notation, so if you are not familiar with it, Google is your best friend. Be aware that the '...' means you can have as many entries as you want, it's not part of the syntax. Every section is optional, but it does not make sense to set i2c in the 'dac_config' parameter and not setting anything here.

The reg key allow to write registers on i2c bus. The parameter mode allows to or the register with the value or to and it. Don't set mode if you simply want to write. The val parameter can be an array [v1, v2,...] to write a serie of bytes in a single i2c burst (in that case 'mode' is ignored). Note that all values must be decimal. You can use a validator like this to verify your syntax. The gpio key is simply to set a gpio as part of DAC action and delay allows a pause between elements.

The 'power' command is used when powering on/off the DAC after the idle period (see -C option of squeezelite) and the 'speaker/headset' commands are sent when switching between speakers and headsets (see headset jack detection).

NB: For named configurations ((SqueezeAMP, Muse ... all except I2S), all this is ignored. For know codecs, the built-in sequences can be overwritten using dac_controlset

Please note that you can not use the same GPIO or port as the I2C.

SPDIF

The NVS parameter "spdif_config" sets the i2s's gpio needed for SPDIF.

SPDIF is made available by re-using i2s interface in a non-standard way, so although only one pin (DO) is needed, the controller must be fully initialized, so the bit clock (bck) and word clock (ws) must be set as well. As i2s and SPDIF are mutually exclusive, you can reuse the same IO if your hardware allows so.

You can define the defaults at compile time but nvs parameter takes precedence except for named configurations (SqueezeAMP, Muse ...)

Leave it blank to disable SPDIF usage, you can also define them at compile time using "make menuconfig". Syntax is

bck=<gpio>,ws=<gpio>,do=<gpio>

NB: For named configurations, this is ignored

The maximum bit depth is 24 bits, even in 32 bits mode (this a SPDIF limitation - thank @UrbanLienert for theupdate from 20 to 24 bit). Now, you can also get SPDIF using a specialized chip that offers a I2S interface like a DAC but spits out SPDIF (optical and coax). Refers to DAC chapter then.

If you want coax, you can also use a poor-man's trick to generate signal from a 3.3V GPIO. All that does is dividing the 3.3V to generate a 0.6V peak-to-peak and then remove DC

                          100nF
GPIO  ----210ohm-----------||---- coax S/PDIF signal out
                    |
                  110ohm
                    |
Ground -------------------------- coax signal ground

Display

The NVS parameter "display_config" sets the parameters for an optional display. It can be I2C (see here for shared bus) or SPI (see here for shared bus) Syntax is

I2C,width=<pixels>,height=<pixels>[address=<i2c_address>][,reset=<gpio>][,HFlip][,VFlip][driver=SSD1306|SSD1326[:1|4]|SSD1327|SH1106]
SPI,width=<pixels>,height=<pixels>,cs=<gpio>[,back=<gpio>][,reset=<gpio>][,speed=<speed>][,HFlip][,VFlip][driver=SSD1306|SSD1322|SSD1326[:1|4]|SSD1327|SH1106|SSD1675|ST7735|ST7789[:x=<offset>][:y=<offset>]|ILI9341[:16|18][,rotate]]
  • back: a LED backlight used by some older devices (ST7735). It is PWM controlled for brightness
  • reset: some display have a reset pin that is should normally be pulled up if unused. Most displays require reset and will not initialize well otherwise.
  • VFlip and HFlip are optional can be used to change display orientation
  • rotate: for non-square drivers, move to portrait mode. Note that width and height must be inverted then
  • Default speed is 8000000 (8MHz) but SPI can work up to 26MHz or even 40MHz
  • SH1106 is 128x64 monochrome I2C/SPI here
  • SSD1306 is 128x32 monochrome I2C/SPI here
  • SSD1322 is 256x64 grayscale 16-levels SPI in multiple sizes here - it is very nice
  • SSD1326 is 256x32 monochrome or grayscale 16-levels SPI here
  • SSD1327 is 128x128 16-level grayscale SPI here - artwork can be up to 96x96 with vertical vu-meter/spectrum
  • SSD1351 is 128x128 65k/262k color SPI here
  • SSD1675 is an e-ink paper and is experimental as e-ink is really not suitable for LMS du to its very low refresh rate
  • ST7735 is a 128x160 65k color SPI here. This needs a backlight control. Some have X/Y offsets betwen the driver and the glass (green/black/red models) that can be added using "x" and "y" options (case sensitive!)
  • ST7789 is a 240x320 65k (262k not enabled) color SPI here. It also exist with 240x240 displays. See rotate for use in portrait mode
  • ILI9341 is another 240x320 65k (262k capable) color SPI. I've not used it much, the driver it has been provided by one external contributor to the project

You can tweak how the vu-meter and spectrum analyzer are displayed, as well as size of artwork through a dedicated menu in player's settings (don't forget to add the plugin).

The NVS parameter "metadata_config" sets how metadata is displayed for AirPlay and Bluetooth. Syntax is

[format=<display_content>][,speed=<speed>][,pause=<pause>][,artwork[:0|1]]
  • 'speed' is the scrolling speed in ms (default is 33ms)
  • 'pause' is the pause time between scrolls in ms (default is 3600ms)
  • 'format' can contain free text and any of the 3 keywords %artist%, %album%, %title%. Using that format string, the keywords are replaced by their value to build the string to be displayed. Note that the plain text following a keyword that happens to be empty during playback of a track will be removed. For example, if you have set format=%artist% - %title% and there is no artist in the metadata then only <title> will be displayed not - <title>.
  • 'artwork' enables coverart display, if available (does not work for Bluetooth). The optional parameter indicates if the artwork should be resized (1) to fit the available space. Note that the built-in resizer can only do 2,4 and 8 downsizing, so fit is not optimal. The artwork will be placed at the right of the display for landscape displays and underneath the two information lines for others (there is no user option to tweak that).

Infrared

You can use any IR receiver compatible with NEC protocol (38KHz) or RC5. Vcc, GND and output are the only pins that need to be connected, no pullup, no filtering capacitor, it's a straight connection.

The IR codes are send "as is" to LMS, so only a Logitech SB remote from Boom, Classic or Touch will work. I think the file Slim_Devices_Remote.ir in the "server" directory of LMS can be modified to adapt to other codes, but I've not tried that.

In AirPlay and Bluetooth mode, only these native remotes are supported, I've not added the option to make your own mapping

See "set GPIO" below to set the GPIO associated to infrared receiver (option "ir").

Set GPIO

The parameter "set_GPIO" is used to assign GPIO to various functions.

GPIO can be set to GND provide or Vcc at boot. This is convenient to power devices that consume less than 40mA from the side connector. Be careful because there is no conflict checks being made wrt which GPIO you're changing, so you might damage your board or create a conflict here.

The <amp> parameter can use used to assign a GPIO that will be set to active level (default 1) when playback starts. It will be reset when squeezelite becomes idle. The idle timeout is set on the squeezelite command line through -C <timeout>

The <power> parameter can use used to assign a GPIO that will be set to active level (default 1) when player is powered on and reset when powered off (in LMS, does not apply to AirPlay, Spotify or BT).

If you have an audio jack that supports insertion (use :0 or :1 to set the level when inserted), you can specify which GPIO it's connected to. Using the parameter jack_mutes_amp allows to mute the amp when headset (e.g.) is inserted.

You can set the Green and Red status led as well with their respective active state (:0 or :1) or specific the chipset if you use addressable RGB led.

The <ir> parameter set the GPIO associated to an IR receiver. No need to add pullup or capacitor

Syntax is:

<gpio>=Vcc|GND|amp[:1|0]|power[:1:0]|ir[:nec|rc5]|jack[:0|1]|green[:0|1|ws2812]|red[:0|1|ws2812]|spkfault[:0|1][,<repeated sequence for next GPIO>]

You can define the defaults for jack, spkfault leds at compile time but nvs parameter takes precedence except for named configurations ((SqueezeAMP, Muse ...) where these are forced at runtime. Note that gpio 36 and 39 are input only and cannot use interrupt. When set to jack or speaker fault, a 100ms polling checks their value but that's expensive

GPIO expanders

It is possible to add GPIO expanders using I2C or SPI bus. They should mainly be used for buttons but they can support generic-purpose outputs as well. These additional GPIOs can be numbered starting from an arbitrary value (40 and above as esp32 has GPIO 0..39). Then these new "virtual" GPIOs from (e.g) 100 to 115 can be used in button configuration, set_GPIO or other config settings.

Each expander can support up to 32 GPIO. To use an expander for buttons, an interrupt must be provided, polling mode is not acceptable. An expander w/o interruption can still be configured, but only output will be usable. Note that the same interrupt can be shared accross expanders, as long as they are using open drain or open collectors (which they probably all do)

The parameter "gpio_exp_config" is a semicolon (;) separated list with following syntax for each expander

model=<model>,addr=<addr>,[,port=system|dac][,base=<n>][,count=<n>][,intr=<gpio>][,cs=<gpio>][,speed=<Hz>]
  • model: pca9535, pca85xx, mcp23017 and mcp23s17 (SPI version)
  • addr: chip i2c/spi address (decimal)
  • port (I2C): use either "system" port (shared with display for example) or "dac" port (system is default)
  • cs (SPI): gpio used for Chip Select
  • speed (SPI): speed of the SPI bus for that device (in Hz)
  • base: GPIO numbering offset to use everywhere else (default 40 on esp32 and 48 on esp32-s3)
  • count: number of GPIO of expander (default 16 - might be obsolted if model if sufficient to decide)
  • intr: real GPIO to use as interrupt.

Note that PWM ("led_brightness" below) is not supported for expanded GPIOs and they cannot be used for high speed or precise timing signals like CS, D/C, Reset and Ready. Buttons, rotary encoder, amplifier control and power are supported. Depending on the actual chipset, pullup or pulldown might be supported so you might have to add external resistors (only MCP23x17 does pullup). The pca8575 is not a great chip, it generate a fair bit of spurious interrupts when used for GPIO out. When using a SPI expander, the bus must be configured using shared SPI bus

LED

See set_GPIO for how to set the green and red LEDs (including addressable RGB ones). In addition, their brightness can be controlled using the "led_brigthness" parameter. The syntax is

[green=0..100][,red=0..100]

NB: For named configuration, GPIO affected to green and red LED cannot be changed but brightness option applies

LED Strip

One LED strip with up to 255 addressable LEDs can be configured to offer enhanced visualizations. The VU Meter visualizer includes a battery status indicator (see Battery). Currently only WS2812B LEDs are supported. Set the LED Strip hardware configuration, or the NVS led_vu_config syntax is

type=[WS2812],length=<n>,gpio=<dataPin>[,scale=<gain>]

where <n> is the number of LEDs in the strip (1..255). A <scale> gain value (percentage) can be added to enhance effect responses.

The latest LMS plugin update is required to set the visualizer mode and brightness in the ESP32 Settings page for the player, or a controllable display (see Extra/SqueezeESP32 menus). The plugin adds additional LMS CLI commands.

Command Notes
<playerid> led_visual [<mode>] [<brightness>] Toggles or selects the visualizer "mode".
The visualizer brightness(0..255) can be controlled using the "brightness" tag.
<playerid> dmx <R,G,B,R,G,B, ... R,G,B> [<offset>] Sets the LED color starting at position "offset"
with "R"(red),"G"(green),and "B"(blue) color sequences.
Add additional RGB values to the delimited string to set multiple LEDs.

Rotary Encoder

One rotary encoder is supported, quadrature shift with press. Such encoders usually have 2 pins for encoders (A and B), and common C that must be set to ground and an optional SW pin for press. A, B and SW must be pulled up, so automatic pull-up is provided by ESP32, but you can add your own resistors. A bit of filtering on A and B (~470nF) helps for debouncing which is not made by software.

Encoder is normally hard-coded to respectively knob left, right and push on LMS and to volume down/up/play toggle on BT and AirPlay. Using the option 'volume' makes it hard-coded to volume down/up/play toggle all the time (even in LMS). The option 'longpress' allows an alternate mode when SW is long-pressed. In that mode, left is previous, right is next and press is toggle. Every long press on SW alternates between modes (the main mode actual behavior depends on 'volume').

There is also the possibility to use 'knobonly' option (exclusive with 'volume' and 'longpress'). This mode attempts to offer a single knob full navigation which is a bit contorded due to LMS UI's principles. Left, Right and Press obey to LMS's navigation rules and especially Press always goes to lower submenu item, even when navigating in the Music Library. That causes a challenge as there is no 'Play', 'Back' or 'Pause' button. Workaround are as of below:

  • longpress is 'Play'
  • double press is 'Back' (Left in LMS's terminology).
  • a quick left-right movement on the encoder is 'Pause'

The speed of double click (or left-right) can be set using the optional parameter of 'knobonly'. This is not a perfect solution, and other ideas are welcome. Be aware that the longer you set double click speed, the less responsive the interface will be. The reason is that I need to wait for that delay before deciding if it's a single or double click. It can also make menu navigation "hesitations" being easily interpreted as 'Pause'

Use parameter rotary_config with the following syntax:

A=<gpio>,B=<gpio>[,SW=gpio>[[,knobonly[=<ms>]]|[[,volume][,longpress]]]]

HW note: all gpio used for rotary have internal pull-up so normally there is no need to provide Vcc to the encoder. Nevertheless if the encoder board you're using also has its own pull-up that are stronger than ESP32's ones (which is likely the case), then there will be crosstalk between gpio, so you must bring Vcc. Look at your board schematic and you'll understand that these board pull-up create a "winning" pull-down when any other pin is grounded.

The SW gpio is optional, you can re-affect it to a pure button if you prefer but the volume, longpress and knobonly options make little sense as the missing switch plays an important role in these modes. You could still have the "volume" mode, but you won't be able to use it for anything expect volume up and down. So be aware that the use of syntax [] is a bit misleading hereabove.

See also the "IMPORTANT NOTE" on the "Buttons" section and remember that when 'lms_ctrls_raw' (see below) is activated, none of these knobonly,volume,longpress options apply, raw button codes (not actions) are simply sent to LMS

Note that gpio 36 and 39 are input only and cannot use interrupt, so they cannot be set to A or B. When using them for SW, a 100ms polling is used which is expensive

Buttons

Buttons are described using a JSON string with the following syntax

[
{"gpio":<num>,
 "type":"BUTTON_LOW | BUTTON_HIGH",
 "pull":[true|false],
 "long_press":<ms>,
 "debounce":<ms>,
 "shifter_gpio":<-1|num>,
 "normal": {"pressed":"<action>","released":"<action>"},
 "longpress": { <same> },
 "shifted": { <same> },
 "longshifted": { <same> },
 },
 { ... },
 { ... },
] 

Where (all parameters are optionals except gpio)

  • "type": (BUTTON_LOW) logic level when the button is pressed
  • "pull": (false) activate internal pull up/down
  • "long_press": (0) duration (in ms) of keypress to detect long press, 0 to disable it
  • "debounce": (0) debouncing duration in ms (0 = internal default of 50 ms)
  • "shifter_gpio": (-1) gpio number of another button that can be pressed together to create a "shift". Set to -1 to disable shifter
  • "normal": ({"pressed":"ACTRLS_NONE","released":"ACTRLS_NONE"}) action to take when a button is pressed/released (see below)
  • "longpress": action to take when a button is long-pressed/released (see above/below)
  • "shifted": action to take when a button is pressed/released and shifted (see above/below)
  • "longshifted": action to take when a button is long-pressed/released and shifted (see above/below)

Where <action> is either the name of another configuration to load (remap) or one amongst

ACTRLS_NONE, ACTRLS_POWER, ACTRLS_VOLUP, ACTRLS_VOLDOWN, ACTRLS_TOGGLE, ACTRLS_PLAY, 
ACTRLS_PAUSE, ACTRLS_STOP, ACTRLS_REW, ACTRLS_FWD, ACTRLS_PREV, ACTRLS_NEXT, 
BCTRLS_UP, BCTRLS_DOWN, BCTRLS_LEFT, BCTRLS_RIGHT, 
BCTRLS_PS1, BCTRLS_PS2, BCTRLS_PS3, BCTRLS_PS4, BCTRLS_PS5, BCTRLS_PS6, BCTRLS_PS7, BCTRLS_PS8, BCTRLS_PS9, BCTRLS_PS10,
KNOB_LEFT, KNOB_RIGHT, KNOB_PUSH,
ACTRLS_SLEEP,

Note that ACTRLS_SLEEP is not an actual button that can be sent to LMS, but it's a hook to activate deep sleep mode (see Sleeping).

One you've created such a string, use it to fill a new NVS parameter with any name below 16(?) characters. You can have as many of these configs as you can. Then set the config parameter "actrls_config" with the name of your default config

For example a config named "buttons" :

[{"gpio":4,"type":"BUTTON_LOW","pull":true,"long_press":1000,"normal":{"pressed":"ACTRLS_VOLDOWN"},"longpress":{"pressed":"buttons_remap"}},
 {"gpio":5,"type":"BUTTON_LOW","pull":true,"shifter_gpio":4,"normal":{"pressed":"ACTRLS_VOLUP"}, "shifted":{"pressed":"ACTRLS_TOGGLE"}}]

Defines two buttons

  • first on GPIO 4, active low. When pressed, it triggers a volume down command. When pressed more than 1000ms, it changes the button configuration for the one named "buttons_remap"
  • second on GPIO 5, active low. When pressed it triggers a volume up command. If first button is pressed together with this button, then a play/pause toggle command is generated.

While the config named "buttons_remap"

[{"gpio":4,"type":"BUTTON_LOW","pull":true,"long_press":1000,"normal":{"pressed":"BCTRLS_DOWN"},"longpress":{"pressed":"buttons"}},
 {"gpio":5,"type":"BUTTON_LOW","pull":true,"shifter_gpio":4,"normal":{"pressed":"BCTRLS_UP"}}]

Defines two buttons

  • first on GPIO 4, active low. When pressed, it triggers a navigation down command. When pressed more than 1000ms, it changes the button configuration for the one described above
  • second on GPIO 5, active low. When pressed it triggers a navigation up command. That button, in that configuration, has no shift option

Below is a difficult but functional 2-buttons interface for your decoding pleasure:

actrls_config:

buttons

buttons:

[{"gpio":4,"type":"BUTTON_LOW","pull":true,"long_press":1000,
 "normal":{"pressed":"ACTRLS_VOLDOWN"},
 "longpress":{"pressed":"buttons_remap"}},
 {"gpio":5,"type":"BUTTON_LOW","pull":true,"long_press":1000,"shifter_gpio":4,
 "normal":{"pressed":"ACTRLS_VOLUP"}, 
 "shifted":{"pressed":"ACTRLS_TOGGLE"}, 
 "longpress":{"pressed":"ACTRLS_NEXT"}}
]

buttons_remap:

[{"gpio":4,"type":"BUTTON_LOW","pull":true,"long_press":1000,
 "normal":{"pressed":"BCTRLS_DOWN"},
 "longpress":{"pressed":"buttons"}},
 {"gpio":5,"type":"BUTTON_LOW","pull":true,"long_press":1000,"shifter_gpio":4,
 "normal":{"pressed":"BCTRLS_UP"},
 "shifted":{"pressed":"BCTRLS_PUSH"},
 "longpress":{"pressed":"ACTRLS_PLAY"},
 "longshifted":{"pressed":"BCTRLS_LEFT"}}
]

IMPORTANT NOTE: LMS also supports the possibility to send 'raw' button codes. It's a bit complicated, so bear with me. Buttons can either be processed by SqueezeESP32 and mapped to a "function" like play/pause or they can be just sent to LMS as plain (raw) code and the full logic of press/release/longpress is handled by LMS, you don't have any control on that.

The benefit of the "raw" mode is that you can build a player which is as close as possible to a Boom (e.g.) but you can't use the remapping function nor longpress or shift logics to do your own mapping when you have a limited set of buttons. In 'raw' mode, all you really need to define is the mapping between the gpio and the button. As far as LMS is concerned, any other option in these JSON payloads does not matter. Now, when you use BT or AirPlay, the full JSON construct described above fully applies, so the shift, longpress, remapping options still work.

Be aware that when using non "raw" mode, the CLI (Command Line Interface) of LMS is used and must be available without password

There is no good or bad option, it's your choice. Use the NVS parameter "lms_ctrls_raw" to change that option

Note that gpio 36 and 39 are input only and cannot use interrupt. When using them for a button, a 100ms polling is started which is expensive. Long press is also likely to not work very well

Ethernet

Wired ethernet is supported by esp32 with various options but squeezeESP32 is only supporting a Microchip LAN8720 with a RMII interface like this or SPI-ethernet bridges like Davicom DM9051 that or W5500 like this.

Note: Touch buttons that can be find on some board like the LyraT V4.3 are not supported currently.

RMII (LAN8720)

  • RMII PHY wiring is fixed and can not be changed
GPIO RMII Signal Notes
GPIO21 TX_EN EMAC_TX_EN
GPIO19 TX0 EMAC_TXD0
GPIO22 TX1 EMAC_TXD1
GPIO25 RX0 EMAC_RXD0
GPIO26 RX1 EMAC_RXD1
GPIO27 CRS_DV EMAC_RX_DRV
GPIO0 REF_CLK 50MHz clock
  • SMI (Serial Management Interface) wiring is not fixed and you can change it either in the configuration or using "eth_config" parameter with the following syntax:
model=lan8720,mdc=<gpio>,mdio=<gpio>[,rst=<gpio>]

Connecting a reset pin for the LAN8720 is optional but recommended to avoid that GPIO0 (50MHz input clock) locks the esp32 in download mode at boot time.

  • Clock

The APLL of the esp32 is required for the audio codec, so we need a LAN8720 that provides a 50MHz clock. That clock must be connected to GPIO0, there is no alternative. This means that if your DAC requires an MCLK, you need a recent build (later than mid-2023) to be able to select either GPIO 1 or 2.

SPI (DM9051 or W5500)

Ethernet over SPI is supported as well and requires less GPIOs but is obvsiously slower. SPI is the shared bus set with spi_config. The "eth_config" parameter syntax becomes:

model=dm9051|w5500,cs=<gpio>,speed=<clk_in_Hz>,intr=<gpio>[,rst=<gpio>]
  • To use the system SPI, shared with display (see spi_config) "host" must be set to -1. Any other value will reserve the SPI interface (careful of conflict with spi_config). The default "host" is 2 to avoid conflicting wiht default "spi_config" settings.
  • When not using system SPI, "mosi" for data out, "miso" for data in and "clk" must be set
  • The esp32 has a special I/O multiplexer for faster speed (up to 80 MHz) but that requires using specific GPIOs, which depends on SPI bus (See here for more details)
Pin Name SPI1 SPI2
CS 15 5
SCLK 14 18
MISO 12 19
MOSI 13 23

Battery / ADC

The NVS parameter "bat_config" sets the ADC1 channel used to measure battery/DC voltage. The "atten" value attenuates the input voltage to the ADC input (the read value maintains a 0-1V rage) where: 0=no attenuation(0..800mV), 1=2.5dB attenuation(0..1.1V), 2=6dB attenuation(0..1.35V), 3=11dB attenuation(0..2.6V). Scale is a float ratio applied to every sample of the 12 bits ADC. A measure is taken every 10s and an average is made every 5 minutes (not a sliding window). Syntax is

channel=0..7,scale=<scale>,cells=<1..3>[,atten=<0|1|2|3>]

NB: Set parameter to empty to disable battery reading. For named configurations (SqueezeAMP, Muse ...), this is ignored (except for SqueezeAMP where number of cells is required)

Sleeping

The esp32 can be put in deep sleep mode to save some power. How much really depends on the connected periperals, so best is to do your own measures. Waking-up from deep sleep is the equivalent of a reboot, but as the chip takes a few seconds to connect, it's still an efficient process.

The esp32 can enter deep sleep after an audio inactivity timeout, after a button has been pressed, after a GPIO is set to a given level (there is a subtle difference, see below) or if the battery reaches a threashold. It wakes up only on some GPIO events. Note that all GPIO are isolated when sleeping (unless they are set with the rtcoption) so you can not assume anything about their value, except that they will not drain current. The rtc option allows to keep some GPIO (from the RTC domain only) either pulled up or down. This can be useful if you want to keep some periperal active, for example a GPIO expander whose interrupt will be used to wake-up the system.

The NVS parameter sleep_config is mostly used for setting sleep conditions

[delay=<mins>][,sleep=<gpio>[:0|1]][,wake=<gpio>[:0|1][|<gpio>[:0|1]...][,rtc=<gpio>[:0|1][|<gpio>[:0|1]...][,batt=<voltage>][,spurious=<mins>]
  • delay: inactivity in minutes before going to sleep
  • spurious: when using IR, wake-up can be triggered by any activity on the allocated GPIO, hence other remotes may cause unwanted wake-up. This sets (in minutes - default is 1) an inactivity delay after which sleep resumes.
  • sleep: GPIO that will put the system into sleep and it can be a level 0 or 1.
  • wake: list of GPIOs that with cause it to wake up (reboot) with their respective values. In such list, GPIO's are separated by an actual '|'.
  • batt: threshold in volts under which the system will enter into sleep.

The battery voltage is measured every 10 seconds and 30 values are averaged before producing a result. The result must be 3 times below the threshold to enter sleep, so it takes a total of 10*30*3 = 15 minutes.

Be mindful that if the same GPIO is used to go to sleep and wakeup with the same level (in other word it's a transition/edge that triggers the action) the above will not work and the esp32 will immediately restart. In such case, you case use a button definition. The benefit of buttons is that not only can you re-use one actual button (e.g. 'stop') to make it the sleep trigger (using a long-press or a shift-press) but by selecting the ACTRLS_SLEEP action upon 'release', you can got to sleep upon release (1-0-1 transition) but also wake up upon another press (0 level applied on GPIO) because you only go to sleep after the GPIO returned to 1.

Please see buttons for detailed syntax.

The option to use multiple GPIOs is very limited on esp32 and the esp-idf 4.3.x we are using: it is only possible to wake-up when any of the defined GPIO is set to 1. The fact that you can specify different levels in the wake list is irrelevant for now, it's just a provision for future upgrades to more recent versions of esp-idf.

Only the following GPIOs can be used to wake-up the esp32

  • ESP32: 0, 2, 4, 12-15, 25-27, 32-39;
  • ESP32-S3: 0-21.

Some have asked for a soft power on/off option. Although this is not built-in, it's easy to create yours as long as the regulator/power supply of the board can be controlled by Vcc or GND. Depending on how it is active, add a pull-up/down resistor to the regulator's control and connect it also to one GPIO of the esp32. Then using set_GPIO, set that GPIO to Vcc or GND. Use a hardware button that forces the regulator on with a pull- up/down and once the esp32 has booted, it will force the GPIO to the desired value maintaining the board on by software. To power it off by software, just use the deep sleep option which will suspend all GPIO hence switching off the regulator.

Software configuration

Setup WiFi

  • Boot the esp, look for a new wifi access point showing up and connect to it. Default build ssid and passwords are "squeezelite"/"squeezelite".
  • Once connected, navigate to 192.168.4.1
  • Wait for the list of access points visible from the device to populate in the web page.
  • Choose an access point and enter any credential as needed
  • Once connection is established, note down the address the device received; this is the address you will use to configure it going forward

Setup squeezelite command line (optional)

At this point, the device should have disabled its built-in access point and should be connected to a known WiFi network.

  • navigate to the address that was noted in step #1
  • Using the list of predefined options, choose the mode in which you want squeezelite to start
  • Generate the command
  • Add or change any additional command line option (for example player name, etc)
  • Activate squeezelite execution: this tells the device to automatiaclly run the command at start
  • Update the configuration
  • click on the "start toggle" button. This will force a reboot.
  • The toggle switch should be set to 'ON' to ensure that squeezelite is active after booting (you might have to fiddle with it a few times)
  • You can enable accessto NVS parameters under 'credits'

Spotify

By default, SqueezeESP32 will use ZeroConf to advertise its Spotify capabilties. This means that until at least one local Spotify Connect application controllers discovers and connects to it, SqueezeESP32 will not be registered to Spotify servers. As a consequence, Spotify's WebAPI will not be able to see it (for example, Home Assistant services will miss it). Once you are connected to it using for example Spotify Desktop app, it will be registered and displayed everywhere.

If you want the player to be registered at start-up, you need to disable the ZeroConf option using the WebUI or cspot_config::ZeroConf. In that mode, the first time you run SqueezeESP32, it will be in ZeroConf mode and when you connect to it using a controller for the firt time, it receives and store credentials that will be used next time (after reboot).

Set ZeroConf to 1 will always force ZeroConf mode to be used.

The ZeroConf mode consumes less memory as it uses the built-in HTTP and mDNS servers to broadcast its capabilities. A Spotify controller will then discover these and trigger the SqueezeESP32 Spotify stack (cspot) to start. When the controller disconnects, the stack is shut down. In non-ZeroConf mode, the stack starts immediately (providing stored credentials are valid) and always run - a disconnect will not shut it down.

Monitor

In addition of the esp-idf serial link monitor option, you can also enable a telnet server (see NVS parameters) where you'll have access to a ton of logs of what's happening inside the WROVER.

Update Squeezelite

  • From the firmware tab, click on "Check for Updates"
  • Look for updated binaries
  • Select a line
  • Click on "Flash!"
  • The system will reboot into recovery mode (if not already in that mode), wipe the squeezelite partition and download/flash the selected version
  • You can choose a local file or have a local webserver

Recovery

  • From the firmware tab, click on the "Recovery" button. This will reboot the ESP32 into recovery, where additional configuration options are available from the NVS editor

Additional configuration notes (from the Web UI)

The squeezelite options are very similar to the regular Linux ones. Differences are :

- the output is -o ["BT -n '<sinkname>' "] | [I2S]
- if you've compiled with RESAMPLE option, normal soxr options are available using -R [-u <options>]. Note that anything above LQ or MQ will overload the CPU
- if you've used RESAMPLE16, <options> are (b|l|m)[:i], with b = basic linear interpolation, l = 13 taps, m = 21 taps, i = interpolate filter coefficients

For example, so use a BT speaker named MySpeaker, accept audio up to 192kHz and resample everything to 44100 and use 16 bits resample with medium quality, the command line is:

squeezelite -o "BT -n 'BT <sinkname>'" -b 500:2000 -R -u m -Z 192000 -r "44100-44100"

See squeezelite command line, but keys options are

- Z <rate> : tell LMS what is the max sample rate supported before LMS resamples
- R (see above)
- r "<minrate>-<maxrate>"
- C <sec> : set timeout to switch off amp gpio
- W : activate WAV and AIFF header parsing
- s <name>|-disable: connect to a specific server. Use -disable to not search for any server

There is a safety feature to protect against WiFi/LMS connection loss that forces a reboot every few minutes when there is no LMS server detected. In case you don't want to use LMS at all, please set the server name to "-disable" on squeezelite command line ("-s -disable")

Building everything yourself

Setting up ESP-IDF

Docker

A simple alternative to building the project's binaries is to leverage the same docker image that is being used on the GitHub Actions to build our releases. The instructions below assume that you have cloned the squeezelite-esp32 code that you want to build locally and that you have opened a command line/bash session in the folder that contains the code. Pull the most recent docker image for the environment:

docker pull sle118/squeezelite-esp32-idfv435

Then run the container interactively :

for windows:
docker run -v %cd%:/project -w /project -it sle118/squeezelite-esp32-idfv435
for linux:
docker run -it -v `pwd`:/workspace/squeezelite-esp32 sle118/squeezelite-esp32-idfv435

The above command will mount this repo into the docker container and start a bash terminal. From there, simply run idf.py build to build, etc. Note that at the time of writing these lines, flashing is not possible for docker running under windows docker/for-win#1018.

Manual Install of ESP-IDF

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 also need a few extra Python libraries for cspot by addingsudo pip3 install protobuf grpcio-tools

**Use the esp-idf 4.3.5 https://github.com/espressif/esp-idf/tree/release/v4.3.5 ** or the 4.4.5 (and above version) if you want to build for esp32-s3

Building SqueezeESP32

When initially cloning the repo, make sure you do it recursively. For example: git clone --recursive https://github.com/sle118/squeezelite-esp32.git. You also should install cspot additional components for protobuf use.

$ sudo pip3 install protobuf grpcio-tools

NB: I need to check on a fresh installation, but you might also require "protoc". You should do that within the esp32 local Python environment.

Don't forget 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)

Create and tweak your config using idf.py menuconfig then build binaries using idf.py all. It will build the recovery and the application (squeezelite). 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)

Note: 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. You can also disable the SBR extension of AAC codecs as it consumes a lot of CPU and might overload the esp32. Use -DAAC_DISABLE_SBR=1 for that

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

Rebuild 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)
    • -O3 -DFIXED_POINT -DSMALL_STACK
    • change ac_link in configure and case ac_files, remove ''
    • compiler but in cfft.c and cffti1, must disable optimization using #pragma GCC push_options #pragma GCC optimize ("O0") #pragma GCC pop_options
  • opus & opusfile
    • for opus, the ESP-provided library seems to work, but opusfile is still needed
    • per mad & few others, edit configure and change $ac_link to add -c (faking link)
    • change ac_files to remove ''
    • add DEPS_CFLAGS and DEPS_LIBS to avoid pkg-config to be required
    • stack consumption can be very high with some codec variants, so set NONTHREADSAFE_PSEUDOSTACK and GLOBAL_STACK_SIZE=48000 and unset VAR_ARRAYS in config.h
  • libmad has been patched to avoid using a lot of stack and is not provided here. There is an issue with sync detection in 1.15.1b from where the original stack patch was done but since a few fixes have been made wrt sync detection. This 1.15.1b-10 found on debian fixes the issue where mad thinks it has reached sync but has not and so returns a wrong sample rate. It comes at the expense of 8KB (!) of code where a simple check in squeezelite/mad.c that next_frame[0] is 0xff and next_frame[1] & 0xf0 is 0xf0 does the trick ...

Hardware tips

There is a possibility to have a software on/off where a temporary switch can power-up the esp32 which then will auto-sustain its power. Depending on the selected hardware, it a can also include a power-off by using a long press on the same button.

The auto-power is simply acheived by using setGPIO and forcing a GPIO to Vcc or GND and the sustain on/off requires a button creation whose longpress is an ACTRLS_SLEEP action (see also the Sleeping section). Credits Renber78 for schedmatics below

alt text

Footnotes

squeezelite-esp32's People

Contributors

caelor avatar daduke avatar hubertbanas avatar manherna avatar matthiaslienhard avatar mherger avatar michaelherger avatar mum-pf avatar olecorp avatar philippe44 avatar rochuck avatar sle118 avatar thomaspreece avatar urbanlienert avatar urknall avatar wizmo2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

squeezelite-esp32's Issues

flash read err, 1000

Hi,
I got the following error code in my serial monitor after flashing my brand new ESP32-A1S with the squeezelite-esp32-v0.5.573-IDFv3.1.5-master-ESP32-A1S.bin

rst:0x10 (RTCWDT_RTC_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

Can anybody tell me, what I was doing wrong?

Compilation error

Thank you for this great project!
I try to compile with IDF4.0 with gcc 5.2.0 and getting following error:

In file included from /Users/rsm/esp/esp-idf/components/esp_eth/src/esp_eth.c:15:0:
/Users/rsm/esp/esp-idf/components/newlib/include/stdatomic.h: In function 'atomic_flag_test_and_set_explicit':
/Users/rsm/esp/esp-idf/components/newlib/include/stdatomic.h:271:31: error: request for member '__val' in something not a structure or union
__atomic_exchange_n(&(object)->__val, desired, order)

I am using espressif LyraT 4.3 development board.
Please help to resolve this error.

i2c is started. ESP_FAIL

v0.5.601-IDFv3.1.5-I2S-4MFlash
that doesn't look OK?

i2cdetect
D (4392052) cmd_i2ctools: Initializing driver from configuration.
D (4392052) cmd_i2ctools: Loading configuration from nvs
D (4392052) cmd_i2ctools: Determining if i2c is started on port 1
D (4392062) cmd_i2ctools: i2c is started. ESP_FAIL
W (4392072) cmd_i2ctools: Stopping i2c driver on port 1
I (4392072) cmd_i2ctools: Initializing i2c driver configuration.
   mode = I2C_MODE_MASTER,
   scl_pullup_en = GPIO_PULLUP_ENABLE,
   i2c port = 1,
   sda_io_num = 22,
   sda_pullup_en = GPIO_PULLUP_ENABLE,
   scl_io_num = 23,
   scl_pullup_en = GPIO_PULLUP_ENABLE,
   master.clk_speed = 400000
E (4392082) i2c: /var/opt/esp-idf/components/driver/i2c.c:1273 (i2c_master_cmd_begin):i2c driver not installed
D (4392102) cmd_i2ctools: Installing i2c driver on port 1
E (4392112) I2CDefaultWriteBytes: i2c_master_cmd_begin( I2CPortNumber, CommandHandle, I2CWait ) != ESP_OK, result: 259
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

------------------------------------------------------------------------------------
Detected the following devices (names provided by https://i2cdevices.org/addresses).
60 [3ch]- SSD1305 SSD1306 PCF8578 PCF8569 SH1106
------------------------------------------------------------------------------------

Endless "switching amplifier ON" messages

ESP32 Audio Kit V2.2
fw: ESP32-A1S.552.master-cmake,

With "set_GPIO" set to "21=amp,39=jack:0" and the headphone jack empty, the following is printed every few seconds, forever:

[02:11:28.099475] jack_handler:149 switching amplifier ON
[02:11:32.099472] jack_handler:149 switching amplifier ON
[02:11:35.269468] jack_handler:149 switching amplifier ON
[02:11:43.249476] jack_handler:149 switching amplifier ON

For what it's worth, the amp appears to be powered continuously, I cannot hear any fluctuation in audio levels through the speakers when it is supposedly being switched on.
The GPIO numbers are correct, if I do not have this set then the amp is not powered at all when the headphone jack is empty.

OTA Request blocked on firefox

Using Firefox on Windows. The OTA "Check For Updates" button results in a "failed to fetch release history" error. The debugger shows the following error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.github.com/repos/sle118/squeezelite-esp32/releases. (Reason: CORS request did not succeed).

reboots when bluetooth is on

Hi
I‘ve sometimes a unintentionally and not reproducible reboot of my board. It looks, that the board works without reboot, if I turn off the bluetooth in this section:

Bluetooth

I've a AI-Thinker-ESP32AudioKit-V2.2 and nothing in jack, only 2 speekers on amp, a rotary controller 3 buttons and a I2C display.

And I‘ve several devices paired with this board (Smartphone, Tablet, PC) and it could be, that they connect this board in background, while it plays a radio-stream.

I disable bluetooth and it plays many hours without rebooting, when I enable bluetooth it reboots sometimes after 5 min., sometimes after 1 h.

Here the NVS-config:
nvs_config_ESP32-squeezelite_1610287831106json.txt

Tested version with this bug: V542 and V546 (other may also have it... not tested)

Many thanks.
M.P.

A1S 526/529: wifi disconnects, slimproto_run 602 errors, BT_APPL underflow error causing skip to next track

Initially thought these were just occurring when connected to a Bluetooth sink but it also occurred when configured for I2S and using wired headphones plugged in the headphone jack.
Basically when playing through a playlist (local VBR MP3s), pretty much every track fails to complete, playback skipping to the next track at any any seemingly random time.
The console logs shows these are caused by wifi disconnects/slimproto disconnects and underflow errs - not an expert but would guess the wifi disconnect is the cause of the others
For me this behaviour is unique to 526/529, I've used 142 for many hours at a time with no skips, but get this behaviour as soon as I upgrade to 526 or 529, upgrade can be a re-flash from scratch after flash erase using ESP32 download tool or OTA upgrade from v142
It makes 526/529 unusable for me.

If I OTA downgrade to 142, let it complete and reboot, no other changes, then playback is perfect with no wifi disconnects

A couple of console logs:

wifidropsandbrokenplayandskips.txt

wifilostskippingtracks2.txt

Update... Further testing in response to Sebastien's query regarding GPIO clashes, I've erased and reflashed an A1S to 526 using the ESP download tool, connected it to my wifi, and started using it with wired headphones, no other changes were made, so default settings from the flash process. Below is the nvm text file:

nvs_config1606211170053json.txt

The wifi drops and subsequent skips to next track continued as previously experienced.
As wifi mode is set by default to power save (f) the device was connected to my access point on channel 1 (AP furthest away) I then changed the wifi mode in nvm to comprehensive (a) saved and rebooted, confirmed device was connected to the nearest AP and re-tested... and am still getting the wifi drops.

Plugin can't be installed due to checksum missmatch

Slim::Utils::PluginDownloader::_installDownload (210) digest does not match /config/cache/DownloadedPlugins/SqueezeESP32.zip - SqueezeESP32 will not be installed: expected ab2d65f5ba8e73f0f78a1a8650af19ebb1e8e724, got c33af63de1c2e799a05352708b9f5db9e8d1102a

idf.py menuconfig not working with latest esp-idf

I tried to compile without success.

  1. with docker, on master branch: without any change in menuconfig
 git show
commit 3c418097b883d017055245f1e6a7943387f1814c (HEAD -> master, origin/master)
Author: Philippe G <[email protected]>
Date:   Thu Dec 3 20:59:06 2020 -0800

    plugin: sync players artwork & spectrum typo

make defconfig
make menuconfig
make          
WARNING: esp-idf git submodule components/asio/asio may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/bt/controller/lib may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/cbor/tinycbor may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/json/cJSON may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/lwip/lwip may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/mbedtls/mbedtls may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/mqtt/esp-mqtt may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/nghttp/nghttp2 may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/esptool_py/esptool may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
Toolchain path: /workspace/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
WARNING: Toolchain version is not supported: crosstool-ng-1.22.0-80-g6c4433a
Expected to see version: esp32-2019r1
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Compiler version is not supported: 5.2.0
Expected to see version(s): 8.2.0
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
Python requirements from /workspace/esp-idf/requirements.txt are satisfied.
GENCONFIG
App "squeezelite" version: custom.build
WARNING: esp-idf git submodule components/asio/asio may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/bt/controller/lib may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/cbor/tinycbor may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/json/cJSON may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/lwip/lwip may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/mbedtls/mbedtls may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/mqtt/esp-mqtt may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/nghttp/nghttp2 may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/esptool_py/esptool may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: esp-idf git submodule components/esptool_py/esptool may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: Toolchain version is not supported: crosstool-ng-1.22.0-80-g6c4433a
Expected to see version: esp32-2019r1
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Compiler version is not supported: 5.2.0
Expected to see version(s): 8.2.0
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: esp-idf git submodule components/esptool_py/esptool may be out of date. Run 'git submodule update' in IDF_PATH dir to update.
WARNING: Missing submodule components/esp_wifi/lib_esp32...
Attempting 'git submodule update --init components/esp_wifi/lib_esp32' in esp-idf root directory...
Submodule 'components/esp_wifi/lib_esp32' (https://github.com/espressif/esp32-wifi-lib.git) registered for path 'components/esp_wifi/lib_esp32'
Cloning into '/workspace/esp-idf/components/esp_wifi/lib_esp32'...
Submodule path 'components/esp_wifi/lib_esp32': checked out 'fbec234429466dc25291cd89ff6f94c6f7a525f0'
CC build/bootloader/bootloader_support/src/bootloader_flash.o
....
CC build/cbor/tinycbor/src/open_memstream.o
/workspace/esp-idf/components/cbor/tinycbor/src/open_memstream.c:45:4: error: #error "Cannot implement open_memstream!"
 #  error "Cannot implement open_memstream!"
    ^
/workspace/esp-idf/components/cbor/tinycbor/src/open_memstream.c:57:8: error: unknown type name 'RetType'
 static RetType write_to_buffer(void *cookie, const char *data, LenType len)
        ^
/workspace/esp-idf/components/cbor/tinycbor/src/open_memstream.c:57:64: error: unknown type name 'LenType'
 static RetType write_to_buffer(void *cookie, const char *data, LenType len)
                                                                ^
/workspace/esp-idf/components/cbor/tinycbor/src/open_memstream.c:82:12: warning: 'close_buffer' defined but not used [-Wunused-function]
 static int close_buffer(void *cookie)
            ^
/workspace/esp-idf/components/cbor/tinycbor/src/open_memstream.c: In function 'open_memstream':
/workspace/esp-idf/components/cbor/tinycbor/src/open_memstream.c:113:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/workspace/esp-idf/components/cbor/tinycbor/src/open_memstream.c: At top level:
cc1: warning: unrecognized command line option '-Wno-frame-address'
cc1: some warnings being treated as errors
/workspace/esp-idf/make/component_wrapper.mk:291: recipe for target 'tinycbor/src/open_memstream.o' failed
make[1]: *** [tinycbor/src/open_memstream.o] Error 1
/workspace/esp-idf/make/project.mk:604: recipe for target 'component-cbor-build' failed
make: *** [component-cbor-build] Error 2

I also tried on master-cmake without success further in the compilation.

CC build/cbor/tinycbor/src/open_memstream.o
/workspace/esp-idf/components/cbor/tinycbor/src/open_memstream.c:45:4: error: #error "Cannot implement open_memstream!"
 #  error "Cannot implement open_memstream!"
    ^
  1. with the last esp-idf version without docker:
git show
commit eb5df86733310f7380d734e205b5703714864f06 (HEAD -> master-cmake, tag: build-number-554, origin/master-cmake, origin/HEAD)
Merge: 096e1d6 4348367
Author: Philippe G <[email protected]>
Date:   Mon Jan 18 22:55:30 2021 -0800

    Merge branch 'master-cmake' of https://github.com/sle118/squeezelite-esp32 into master-cmake
idf.py --version
ESP-IDF v4.3-dev-2586-g526f68239

idf.py menuconfig
Executing action: menuconfig
Running ninja in directory /home/f/esp/squeezelite-esp32/build
Executing "ninja menuconfig"...
[0/1] Re-running CMake...
-- Building RECOVERY
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /home/f/esp/squeezelite-esp32/sdkconfig
Loading defaults file /home/f/esp/squeezelite-esp32/sdkconfig.defaults...
/home/f/esp/squeezelite-esp32/sdkconfig.defaults:512 CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE was replaced with CONFIG_ESP_COREDUMP_ENABLE_TO_NONE
/home/f/esp/squeezelite-esp32/sdkconfig.defaults:784 CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS was replaced with CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS
/home/f/esp/squeezelite-esp32/sdkconfig.defaults:785 CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN was replaced with CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN
/home/f/esp/squeezelite-esp32/sdkconfig:130 CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE was replaced with CONFIG_COMPILER_OPTIMIZATION_SIZE
/home/f/esp/squeezelite-esp32/sdkconfig:144 CONFIG_ESP32_APPTRACE_DEST_NONE was replaced with CONFIG_APPTRACE_DEST_NONE
/home/f/esp/squeezelite-esp32/sdkconfig:146 CONFIG_ESP32_APPTRACE_LOCK_ENABLE was replaced with CONFIG_APPTRACE_LOCK_ENABLE
/home/f/esp/squeezelite-esp32/sdkconfig:423 CONFIG_ESP32_PANIC_PRINT_REBOOT was replaced with CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT
/warning: LOGGING_SLIMPROTO (defined at /home/f/esp/squeezelite-esp32/main/Kconfig.projbuild:3) has leading or trailing whitespace in its prompt
warning: LOGGING_STREAM (defined at /home/f/esp/squeezelite-esp32/main/Kconfig.projbuild:8) has leading or trailing whitespace in its prompt
warning: I2S_NUM (defined at /home/f/esp/squeezelite-esp32/main/Kconfig.projbuild:93) has leading or trailing whitespace in its prompt
warning: I2S_BCK_IO (defined at /home/f/esp/squeezelite-esp32/main/Kconfig.projbuild:98) has leading or trailing whitespace in its prompt
warning: I2S_WS_IO (defined at /home/f/esp/squeezelite-esp32/main/Kconfig.projbuild:103) has leading or trailing whitespace in its prompt
warning: I2S_DO_IO (defined at /home/f/esp/squeezelite-esp32/main/Kconfig.projbuild:108) has leading or trailing whitespace in its prompt
warning: I2S_DI_IO (defined at /home/f/esp/squeezelite-esp32/main/Kconfig.projbuild:113) has leading or trailing whitespace in its prompt
warning: I2C_SDA (defined at /home/f/esp/squeezelitehome/f/esp/squeezelite-esp32/sdkconfig:521 CONFIG_ESP32_ENABLE_COREDUMP_TO_UART was replaced with CONFIG_ESP_COREDUMP_ENABLE_TO_UART
/home/f/esp/squeezelite-esp32/sdkconfig:523 CONFIG_ESP32_ENABLE_COREDUMP was replaced with CONFIG_ESP_COREDUMP_ENABLE
/home/f/esp/squeezelite-esp32/sdkconfig:524 CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM was replaced with CONFIG_ESP_COREDUMP_MAX_TASKS_NUM
/home/f/esp/squeezelite-esp32/sdkconfig:525 CONFIG_ESP32_CORE_DUMP_UART_DELAY was replaced with CONFIG_ESP_COREDUMP_UART_DELAY
/home/f/esp/squeezelite-esp32/sdkconfig:799 CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS was replaced with CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS
/home/f/esp/squeezelite-esp32/sdkconfig:800 CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN was replaced with CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN
-esp32/main/Kconfig.projbuild:120) has leading or trailing whitespace in its prompt
warning: I2C_SCL (defined at /home/f/esp/squeezelite-esp32/main/Kconfig.projbuild:125) has leading or trailing whitespace in its prompt
warning: A2DP_CONTROL_DELAY_MS (defined at /home/f/esp/squeezelite-esp32/main/Kconfig.projbuild:186) has leading or trailing whitespace in its prompt
warning: style: quotes recommended around default value for string symbol AIRPLAY_PORT (defined at /home/f/esp/squeezelite-esp32/main/Kconfig.projbuild:224)
warning: user value 1536 on the int symbol FREERTOS_ISR_STACKSIZE (defined at /home/f/esp/esp-idf/components/freertos/Kconfig:180) ignored due to being outside the active range ([2096, 32768]) -- falling back on defaults
-- App "recovery" version: custom.build
-- Adding linker script /home/f/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/f/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /home/f/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/f/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /home/f/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /home/f/esp/squeezelite-esp32/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script /home/f/esp/esp-idf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script /home/f/esp/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Components: app_recovery app_squeezelite app_trace app_update asio audio bootloader bootloader_support bt cbor cmock coap codecs console cxx display driver driver_bt efuse esp-dsp esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_ipc esp_local_ctrl esp_netif esp_pm esp_ringbuf esp_rom esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos hal heap idf_test jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table perfmon platform_config platform_console protobuf-c protocomm pthread raop sdmmc services soc spi_flash spiffs squeezelite squeezelite-ota tcp_transport tcpip_adapter telnet tinyusb tools ulp unity vfs wear_levelling wifi-manager wifi_provisioning wpa_supplicant xtensa
-- Component paths: /home/f/esp/squeezelite-esp32/components/platform_console/app_recovery /home/f/esp/squeezelite-esp32/components/platform_console/app_squeezelite /home/f/esp/esp-idf/components/app_trace /home/f/esp/esp-idf/components/app_update /home/f/esp/esp-idf/components/asio /home/f/esp/squeezelite-esp32/components/audio /home/f/esp/esp-idf/components/bootloader /home/f/esp/esp-idf/components/bootloader_support /home/f/esp/esp-idf/components/bt /home/f/esp/esp-idf/components/cbor /home/f/esp/esp-idf/components/cmock /home/f/esp/esp-idf/components/coap /home/f/esp/squeezelite-esp32/components/codecs /home/f/esp/esp-idf/components/console /home/f/esp/esp-idf/components/cxx /home/f/esp/squeezelite-esp32/components/display /home/f/esp/esp-idf/components/driver /home/f/esp/squeezelite-esp32/components/driver_bt /home/f/esp/esp-idf/components/efuse /home/f/esp/squeezelite-esp32/components/esp-dsp /home/f/esp/esp-idf/components/esp-tls /home/f/esp/esp-idf/components/esp32 /home/f/esp/esp-idf/components/esp_adc_cal /home/f/esp/esp-idf/components/esp_common /home/f/esp/esp-idf/components/esp_eth /home/f/esp/esp-idf/components/esp_event /home/f/esp/esp-idf/components/esp_gdbstub /home/f/esp/esp-idf/components/esp_hid /home/f/esp/esp-idf/components/esp_http_client /home/f/esp/esp-idf/components/esp_http_server /home/f/esp/esp-idf/components/esp_https_ota /home/f/esp/esp-idf/components/esp_https_server /home/f/esp/esp-idf/components/esp_hw_support /home/f/esp/esp-idf/components/esp_ipc /home/f/esp/esp-idf/components/esp_local_ctrl /home/f/esp/esp-idf/components/esp_netif /home/f/esp/esp-idf/components/esp_pm /home/f/esp/esp-idf/components/esp_ringbuf /home/f/esp/esp-idf/components/esp_rom /home/f/esp/esp-idf/components/esp_serial_slave_link /home/f/esp/esp-idf/components/esp_system /home/f/esp/esp-idf/components/esp_timer /home/f/esp/esp-idf/components/esp_websocket_client /home/f/esp/esp-idf/components/esp_wifi /home/f/esp/esp-idf/components/espcoredump /home/f/esp/esp-idf/components/esptool_py /home/f/esp/esp-idf/components/expat /home/f/esp/esp-idf/components/fatfs /home/f/esp/esp-idf/components/freemodbus /home/f/esp/esp-idf/components/freertos /home/f/esp/esp-idf/components/hal /home/f/esp/esp-idf/components/heap /home/f/esp/esp-idf/components/idf_test /home/f/esp/esp-idf/components/jsmn /home/f/esp/esp-idf/components/json /home/f/esp/esp-idf/components/libsodium /home/f/esp/esp-idf/components/log /home/f/esp/esp-idf/components/lwip /home/f/esp/squeezelite-esp32/main /home/f/esp/esp-idf/components/mbedtls /home/f/esp/esp-idf/components/mdns /home/f/esp/esp-idf/components/mqtt /home/f/esp/esp-idf/components/newlib /home/f/esp/esp-idf/components/nghttp /home/f/esp/esp-idf/components/nvs_flash /home/f/esp/esp-idf/components/openssl /home/f/esp/esp-idf/components/partition_table /home/f/esp/esp-idf/components/perfmon /home/f/esp/squeezelite-esp32/components/platform_config /home/f/esp/squeezelite-esp32/components/platform_console /home/f/esp/esp-idf/components/protobuf-c /home/f/esp/esp-idf/components/protocomm /home/f/esp/esp-idf/components/pthread /home/f/esp/squeezelite-esp32/components/raop /home/f/esp/esp-idf/components/sdmmc /home/f/esp/squeezelite-esp32/components/services /home/f/esp/esp-idf/components/soc /home/f/esp/esp-idf/components/spi_flash /home/f/esp/esp-idf/components/spiffs /home/f/esp/squeezelite-esp32/components/squeezelite /home/f/esp/squeezelite-esp32/components/squeezelite-ota /home/f/esp/esp-idf/components/tcp_transport /home/f/esp/esp-idf/components/tcpip_adapter /home/f/esp/squeezelite-esp32/components/telnet /home/f/esp/esp-idf/components/tinyusb /home/f/esp/squeezelite-esp32/components/tools /home/f/esp/esp-idf/components/ulp /home/f/esp/esp-idf/components/unity /home/f/esp/esp-idf/components/vfs /home/f/esp/esp-idf/components/wear_levelling /home/f/esp/squeezelite-esp32/components/wifi-manager /home/f/esp/esp-idf/components/wifi_provisioning /home/f/esp/esp-idf/components/wpa_supplicant /home/f/esp/esp-idf/components/xtensa
-- Adding new build target (from build folder): ninja size-squeezelite
-- Adding new build target (from build folder): ninja size-files-squeezelite
-- Adding new build target (from build folder): ninja size-components-squeezelite
-- Adding new build target (from build folder): ninja squeezelite-flash
CMake Error at squeezelite.cmake:7 (esptool_py_flash_project_args):
  Unknown CMake command "esptool_py_flash_project_args".
Call Stack (most recent call first):
  squeezelite.cmake:124 (___register_flash)
  CMakeLists.txt:8 (include)


-- Configuring incomplete, errors occurred!
See also "/home/f/esp/squeezelite-esp32/build/CMakeFiles/CMakeOutput.log".
FAILED: build.ninja 
/usr/bin/cmake -S/home/f/esp/squeezelite-esp32 -B/home/f/esp/squeezelite-esp32/build
ninja: error: rebuilding 'build.ninja': subcommand failed
ninja failed with exit code 1

Please advise on the esp-idf 4 version to use. My goal is to use A2DP source audio output on a naked ESP32 Wrover module for the moment.

Core dump when switching between streaming and local file

When I switch between sources (radio to fileserver or the other way around) squeezelite sometimes crashes. I get the following log

[00:03:30.260530] grfs_handler:712 scroller current size 1412 (w:225)
[00:03:30.560642] codec_open:279 codec open: 'm'
assertion "sockets[i].select_waiting == 0" failed: file "/var/lib/jenkins/workspace/v4.0/components/lwip/lwip/src/api/sockets.c", line 565, function: alloc_socket
abort() was called at PC 0x40218df3 on core 1

ELF file SHA256: 5a8e17b9e5a33c24ea458f7184ce8b2abe4ba26813ff62f8c55f2fdc11b543b5

Backtrace: 0x40095868:0x3ffcea00 0x40095bd1:0x3ffcea20 0x40218df3:0x3ffcea40 0x401a535d:0x3ffcea70 0x401a6cbd:0x3ffceaa0 0x400ea40f:0x3ffceac0 0x400e8c19:0x3ffceb00 0x400e9527:0x3ffceb30 0x400e507e:0x3ffcec10 0x400d947f:0x3ffcef40 0x400d41a1:0x3ffcef60

�[0;32mI (13933) esp_core_dump_uart: Press Enter to print core dump to UART...�[0m
�[0;32mI (13940) esp_core_dump_uart: Print core dump to uart...�[0m
�[0;32mI (13946) esp_core_dump_common: Found tasks: (27)!�[0m
================= CORE DUMP START =================
tFQAAAEAAAAWAAAAcAEAAA==

UI: Footer cutting out content

Rework of the page layout is needed to ensure that the footer won't overlap on page content. There should also be a border around nav bar and footer to clearly differentiate and avoid cluttered look. This has been addressed on the development system and should make it upstream in the coming days.

Unified configuration page

I think it's time to align the GPIO config page to make it match with how the system has evolved. I'll build a backend endpoint to retrieve/update them in a central place. @daduke could then update the front-end if he has bandwidth.

Compiling error esp-idf/components/driver/i2s.c:66:5: error: unknown type name 'SemaphoreHandle_t'

Hey,
trying build from src.
Debian WSL and Windows directly ends with:

Can anyone give me a hint or tell me that the error is real.

PS C:\Users\RamShadow\repo\SqueezeElite\squeezelite-esp32> idf.py all
Executing action: all (aliases: build)
Running cmake in directory c:\users\ramshadow\repo\squeezeelite\squeezelite-esp32\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized -DIDF_TARGET=esp32 -DCCACHE_ENABLE=1 c:\users\ramshadow\repo\squeezeelite\squeezelite-esp32"...
Warn about uninitialized values.
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.29.2.windows.2")
-- Building RECOVERY
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/RamShadow/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/RamShadow/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/RamShadow/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/RamShadow/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe
-- Check for working CXX compiler: C:/Users/RamShadow/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project version: custom.build
-- Building ESP-IDF components for target esp32
warning: LOGGING_SLIMPROTO (defined at C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/main/Kconfig.projbuild:3) has leading or trailing whitespace in its prompt
warning: LOGGING_STREAM (defined at C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/main/Kconfig.projbuild:8) has leading or trailing whitespace in its prompt
warning: I2S_NUM (defined at C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/main/Kconfig.projbuild:93) has leading or trailing whitespace in its prompt
warning: I2S_BCK_IO (defined at C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/main/Kconfig.projbuild:98) has leading or trailing whitespace in its prompt
warning: I2S_WS_IO (defined at C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/main/Kconfig.projbuild:103) has leading or trailing whitespace in its prompt
warning: I2S_DO_IO (defined at C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/main/Kconfig.projbuild:108) has leading or trailing whitespace in its prompt
warning: I2S_DI_IO (defined at C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/main/Kconfig.projbuild:113) has leading or trailing whitespace in its prompt
warning: I2C_SDA (defined at C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/main/Kconfig.projbuild:120) has leading or trailing whitespace in its prompt
warning: I2C_SCL (defined at C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/main/Kconfig.projbuild:125) has leading or trailing whitespace in its prompt
warning: A2DP_CONTROL_DELAY_MS (defined at C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/main/Kconfig.projbuild:186) has leading or trailing whitespace in its prompt
warning: style: quotes recommended around default value for string symbol AIRPLAY_PORT (defined at C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/main/Kconfig.projbuild:224)
Loading defaults file C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/sdkconfig.defaults...
-- Found PythonInterp: C:/Users/RamShadow/.espressif/python_env/idf4.1_py3.9_env/Scripts/python.exe (found version "3.9")
-- Found Perl: C:/Perl64/bin/perl.exe (found version "5.24.3")
-- Adding linker script C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script C:/Users/RamShadow/esp-idf/components/esp32/ld/esp32.extram.bss.ld
-- Adding linker script C:/Users/RamShadow/esp-idf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script C:/Users/RamShadow/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/RamShadow/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/RamShadow/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/RamShadow/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Users/RamShadow/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Components: app_recovery app_squeezelite app_trace app_update asio audio bootloader bootloader_support bt cbor coap codecs console cxx display driver driver_bt efuse esp-dsp esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_http_client esp_http_server esp_https_ota esp_https_server esp_local_ctrl esp_netif esp_ringbuf esp_rom esp_serial_slave_link esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos heap idf_test jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table perfmon platform_config platform_console protobuf-c protocomm pthread raop sdmmc services soc spi_flash spiffs squeezelite squeezelite-ota tcp_transport tcpip_adapter telnet tools ulp unity vfs wear_levelling wifi-manager wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/platform_console/app_recovery C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/platform_console/app_squeezelite C:/Users/RamShadow/esp-idf/components/app_trace C:/Users/RamShadow/esp-idf/components/app_update C:/Users/RamShadow/esp-idf/components/asio C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/audio C:/Users/RamShadow/esp-idf/components/bootloader C:/Users/RamShadow/esp-idf/components/bootloader_support C:/Users/RamShadow/esp-idf/components/bt C:/Users/RamShadow/esp-idf/components/cbor C:/Users/RamShadow/esp-idf/components/coap C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/codecs C:/Users/RamShadow/esp-idf/components/console C:/Users/RamShadow/esp-idf/components/cxx C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/display C:/Users/RamShadow/esp-idf/components/driver C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/driver_bt C:/Users/RamShadow/esp-idf/components/efuse C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/esp-dsp C:/Users/RamShadow/esp-idf/components/esp-tls C:/Users/RamShadow/esp-idf/components/esp32 C:/Users/RamShadow/esp-idf/components/esp_adc_cal C:/Users/RamShadow/esp-idf/components/esp_common C:/Users/RamShadow/esp-idf/components/esp_eth C:/Users/RamShadow/esp-idf/components/esp_event C:/Users/RamShadow/esp-idf/components/esp_gdbstub C:/Users/RamShadow/esp-idf/components/esp_http_client C:/Users/RamShadow/esp-idf/components/esp_http_server C:/Users/RamShadow/esp-idf/components/esp_https_ota C:/Users/RamShadow/esp-idf/components/esp_https_server C:/Users/RamShadow/esp-idf/components/esp_local_ctrl C:/Users/RamShadow/esp-idf/components/esp_netif C:/Users/RamShadow/esp-idf/components/esp_ringbuf C:/Users/RamShadow/esp-idf/components/esp_rom C:/Users/RamShadow/esp-idf/components/esp_serial_slave_link C:/Users/RamShadow/esp-idf/components/esp_websocket_client C:/Users/RamShadow/esp-idf/components/esp_wifi C:/Users/RamShadow/esp-idf/components/espcoredump C:/Users/RamShadow/esp-idf/components/esptool_py C:/Users/RamShadow/esp-idf/components/expat C:/Users/RamShadow/esp-idf/components/fatfs C:/Users/RamShadow/esp-idf/components/freemodbus C:/Users/RamShadow/esp-idf/components/freertos C:/Users/RamShadow/esp-idf/components/heap C:/Users/RamShadow/esp-idf/components/idf_test C:/Users/RamShadow/esp-idf/components/jsmn C:/Users/RamShadow/esp-idf/components/json C:/Users/RamShadow/esp-idf/components/libsodium C:/Users/RamShadow/esp-idf/components/log C:/Users/RamShadow/esp-idf/components/lwip C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/main C:/Users/RamShadow/esp-idf/components/mbedtls C:/Users/RamShadow/esp-idf/components/mdns C:/Users/RamShadow/esp-idf/components/mqtt C:/Users/RamShadow/esp-idf/components/newlib C:/Users/RamShadow/esp-idf/components/nghttp C:/Users/RamShadow/esp-idf/components/nvs_flash C:/Users/RamShadow/esp-idf/components/openssl C:/Users/RamShadow/esp-idf/components/partition_table C:/Users/RamShadow/esp-idf/components/perfmon C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/platform_config C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/platform_console C:/Users/RamShadow/esp-idf/components/protobuf-c C:/Users/RamShadow/esp-idf/components/protocomm C:/Users/RamShadow/esp-idf/components/pthread C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/raop C:/Users/RamShadow/esp-idf/components/sdmmc C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/services C:/Users/RamShadow/esp-idf/components/soc C:/Users/RamShadow/esp-idf/components/spi_flash C:/Users/RamShadow/esp-idf/components/spiffs C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/squeezelite C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/squeezelite-ota C:/Users/RamShadow/esp-idf/components/tcp_transport C:/Users/RamShadow/esp-idf/components/tcpip_adapter C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/telnet C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/tools C:/Users/RamShadow/esp-idf/components/ulp C:/Users/RamShadow/esp-idf/components/unity C:/Users/RamShadow/esp-idf/components/vfs C:/Users/RamShadow/esp-idf/components/wear_levelling C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/components/wifi-manager C:/Users/RamShadow/esp-idf/components/wifi_provisioning C:/Users/RamShadow/esp-idf/components/wpa_supplicant C:/Users/RamShadow/esp-idf/components/xtensa
-- Adding new build target (from build folder): ninja size-squeezelite
-- Adding new build target (from build folder): ninja size-files-squeezelite
-- Adding new build target (from build folder): ninja size-components-squeezelite
-- Adding new build target (from build folder): ninja squeezelite-flash
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/build
Running ninja in directory c:\users\ramshadow\repo\squeezeelite\squeezelite-esp32\build
Executing "ninja all"...
[3/1359] cmd.exe /C "cd /D C:\Users\RamShadow\repo\Squeeze...ueezeElite/squeezelite-esp32/generate_debug_scripts.cmake"
Generating debug script files
[85/1359] cmd.exe /C "cd /D C:\Users\RamShadow\repo\Squeez...*********************************************************"
Partition table binary generated. Contents:


Espressif ESP32 Partition Table

Name, Type, SubType, Offset, Size, Flags

nvs,data,nvs,0x9000,16K,
otadata,data,ota,0xd000,8K,
phy_init,data,phy,0xf000,4K,
recovery,app,factory,0x10000,1280K,
ota_0,app,ota_0,0x150000,2688K,
settings,data,nvs,0x3f0000,64K,


[292/1359] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir///port/esp32/esp_bignum.c.objC:/Users/RamShadow/esp-idf/components/mbedtls/port/esp32/esp_bignum.c:254:5: warning: no previous prototype for 'esp_mpi_mul_mpi_mod' [-Wmissing-prototypes]
int esp_mpi_mul_mpi_mod(mbedtls_mpi *Z, const mbedtls_mpi *X, const mbedtls_mpi *Y, const mbedtls_mpi *M)
^~~~~~~~~~~~~~~~~~~
[366/1359] Building C object esp-idf/driver/CMakeFiles/__idf_driver.dir/i2s.c.obj
FAILED: esp-idf/driver/CMakeFiles/__idf_driver.dir/i2s.c.obj
ccache C:\Users\RamShadow.espressif\tools\xtensa-esp32-elf\esp-2020r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DMODEL_NAME=SqueezeESP32 -Iconfig -IC:/Users/RamShadow/esp-idf/components/driver/include -IC:/Users/RamShadow/esp-idf/components/driver/esp32/include -IC:/Users/RamShadow/esp-idf/components/driver/include/driver -IC:/Users/RamShadow/esp-idf/components/newlib/platform_include -IC:/Users/RamShadow/esp-idf/components/freertos/include -IC:/Users/RamShadow/esp-idf/components/heap/include -IC:/Users/RamShadow/esp-idf/components/log/include -IC:/Users/RamShadow/esp-idf/components/lwip/include/apps -IC:/Users/RamShadow/esp-idf/components/lwip/include/apps/sntp -IC:/Users/RamShadow/esp-idf/components/lwip/lwip/src/include -IC:/Users/RamShadow/esp-idf/components/lwip/port/esp32/include -IC:/Users/RamShadow/esp-idf/components/lwip/port/esp32/include/arch -IC:/Users/RamShadow/esp-idf/components/soc/esp32/include -IC:/Users/RamShadow/esp-idf/components/soc/include -IC:/Users/RamShadow/esp-idf/components/esp_rom/include -IC:/Users/RamShadow/esp-idf/components/esp_common/include -IC:/Users/RamShadow/esp-idf/components/xtensa/include -IC:/Users/RamShadow/esp-idf/components/xtensa/esp32/include -IC:/Users/RamShadow/esp-idf/components/esp32/include -IC:/Users/RamShadow/esp-idf/components/esp_ringbuf/include -IC:/Users/RamShadow/esp-idf/components/efuse/include -IC:/Users/RamShadow/esp-idf/components/efuse/esp32/include -IC:/Users/RamShadow/esp-idf/components/vfs/include -IC:/Users/RamShadow/esp-idf/components/esp_wifi/include -IC:/Users/RamShadow/esp-idf/components/esp_wifi/esp32/include -IC:/Users/RamShadow/esp-idf/components/esp_event/include -IC:/Users/RamShadow/esp-idf/components/esp_netif/include -IC:/Users/RamShadow/esp-idf/components/tcpip_adapter/include -IC:/Users/RamShadow/esp-idf/components/app_trace/include -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -Os -freorder-blocks -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER="v4.1-dirty" -DESP_PLATFORM -MD -MT esp-idf/driver/CMakeFiles/__idf_driver.dir/i2s.c.obj -MF esp-idf\driver\CMakeFiles__idf_driver.dir\i2s.c.obj.d -o esp-idf/driver/CMakeFiles/__idf_driver.dir/i2s.c.obj -c C:/Users/RamShadow/esp-idf/components/driver/i2s.c
C:/Users/RamShadow/esp-idf/components/driver/i2s.c:66:5: error: unknown type name 'SemaphoreHandle_t'
SemaphoreHandle_t mux;
^~~~~~~~~~~~~~~~~
C:/Users/RamShadow/esp-idf/components/driver/i2s.c: In function 'i2s_set_clk':
C:/Users/RamShadow/esp-idf/components/driver/i2s.c:397:9: error: implicit declaration of function 'xSemaphoreTake'; did you mean 'xSemaphoreHandle'? [-Werror=implicit-function-declaration]
xSemaphoreTake(p_i2s_obj[i2s_num]->tx->mux, (portTickType)portMAX_DELAY);
^~~~~~~~~~~~~~
xSemaphoreHandle
C:/Users/RamShadow/esp-idf/components/driver/i2s.c:553:9: error: implicit declaration of function 'xSemaphoreGive'; did you mean 'xSemaphoreHandle'? [-Werror=implicit-function-declaration]
xSemaphoreGive(p_i2s_obj[i2s_num]->tx->mux);
^~~~~~~~~~~~~~
xSemaphoreHandle
C:/Users/RamShadow/esp-idf/components/driver/i2s.c: In function 'i2s_destroy_dma_queue':
C:/Users/RamShadow/esp-idf/components/driver/i2s.c:655:5: error: implicit declaration of function 'vSemaphoreDelete'; did you mean 'xSemaphoreHandle'? [-Werror=implicit-function-declaration]
vSemaphoreDelete(dma->mux);
^~~~~~~~~~~~~~~~
xSemaphoreHandle
C:/Users/RamShadow/esp-idf/components/driver/i2s.c: In function 'i2s_create_dma_queue':
C:/Users/RamShadow/esp-idf/components/driver/i2s.c:715:16: error: implicit declaration of function 'xSemaphoreCreateMutex'; did you mean 'xQueueCreateMutex'? [-Werror=implicit-function-declaration]
dma->mux = xSemaphoreCreateMutex();
^~~~~~~~~~~~~~~~~~~~~
xQueueCreateMutex
cc1.exe: some warnings being treated as errors
[375/1359] Performing configure step for 'bootloader'
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.29.2.windows.2")
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/RamShadow/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/RamShadow/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/RamShadow/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/RamShadow/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe
-- Check for working CXX compiler: C:/Users/RamShadow/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project version: v4.1-dirty
-- Building ESP-IDF components for target esp32
-- Adding linker script C:/Users/RamShadow/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/RamShadow/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/RamShadow/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/RamShadow/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/RamShadow/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script C:/Users/RamShadow/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 esp_common esp_rom esptool_py log main micro-ecc partition_table soc spi_flash xtensa
-- Component paths: C:/Users/RamShadow/esp-idf/components/bootloader C:/Users/RamShadow/esp-idf/components/bootloader_support C:/Users/RamShadow/esp-idf/components/efuse C:/Users/RamShadow/esp-idf/components/esp32 C:/Users/RamShadow/esp-idf/components/esp_common C:/Users/RamShadow/esp-idf/components/esp_rom C:/Users/RamShadow/esp-idf/components/esptool_py C:/Users/RamShadow/esp-idf/components/log C:/Users/RamShadow/esp-idf/components/bootloader/subproject/main C:/Users/RamShadow/esp-idf/components/bootloader/subproject/components/micro-ecc C:/Users/RamShadow/esp-idf/components/partition_table C:/Users/RamShadow/esp-idf/components/soc C:/Users/RamShadow/esp-idf/components/spi_flash C:/Users/RamShadow/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/RamShadow/repo/SqueezeElite/squeezelite-esp32/build/bootloader
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

Disable led in software?

I've build a Squeezeamp and I'm using it in my sleeping room. When no playback is active the led is blinking which is relay annoying when you try to sleep.
Is it possible to disable the led completely with some software switch or nvs property?

Feature request: MQTT

It seems this firmware is a stable media player for ESP32.

I was looking for something to be used just as a smart speaker without the Logitech media player. That you could control from Home Assistant or any MQTT enabled system.

Could it be possible to extend this to be a standalone player with MQTT or HTTP controls? It would be great to use it as general purpose audio player. If you could point an media URL to this device, it would allow using any media server as a music repository.

Compile problem

Hi, I have problem with compile this on Ubuntu (Windows subsystem). I have a lot of errors.
Firstly I do everything by this instruction (https://www.instructables.com/id/ESP32-Development-on-Windows-Subsystem-for-Linux/). In esp-idf I change toolchain to 5.2.0, make defconfig, and when

Before I have below error I had problem with CONFIG_SPIRAM_CACHE_WORKAROUND - i had to set it to "NO"

I run make and I have a lot of error firstly is:

In file included from /home/pawlak/esp/esp-idf/components/heap/heap_private.h:20:0,
from /home/pawlak/esp/esp-idf/components/heap/heap_caps_init.c:14:
/home/pawlak/esp/esp-idf/components/heap/heap_caps_init.c: In function 'heap_caps_add_region_with_caps':
/home/pawlak/esp/esp-idf/components/heap/multi_heap_platform.h:32:20: error: the comparison will always evaluate as 'true' for the address of 'registered_heaps_write_lock' will never be NULL [-Werror=address]
if((PLOCK) != NULL) {
^
/home/pawlak/esp/esp-idf/components/heap/heap_caps_init.c:230:5: note: in expansion of macro 'MULTI_HEAP_LOCK'
MULTI_HEAP_LOCK(&registered_heaps_write_lock);
^
/home/pawlak/esp/esp-idf/components/heap/multi_heap_platform.h:39:21: error: the comparison will always evaluate as 'true' for the address of 'registered_heaps_write_lock' will never be NULL [-Werror=address]
if ((PLOCK) != NULL) {
^
/home/pawlak/esp/esp-idf/components/heap/heap_caps_init.c:232:5: note: in expansion of macro 'MULTI_HEAP_UNLOCK'
MULTI_HEAP_UNLOCK(&registered_heaps_write_lock);
^

nextone is:
/mnt/d/squeezelite-esp32-master/main/console.c:122:36: error: 'CONFIG_CONSOLE_UART_NUM' undeclared (first use in this function)

Could you help me to run this compile and tell me what Am I doing wrong :) ?

Changing audio jack behavior via SqueezeESP32 Configuration page does not seem to work

Observed with: fw: development.148-SqueezeAmp4MBFl

After plugging in an audio jack in my SqueezeAMP, the audio amplifier of the TAS57xx IC stayed active. Parameter jack_mutes_amp in the NVS-editor was set to "n" (without the quotes). Then I tried to change the audio jack behavior via Configuration => Audio => General Audio Options. I changed the setting to "Headphones", and then hit the Save and Apply buttons. But after reboot, parameter jack_mutes_amp in the NVS-editor was still set to "n". So changing this parameter via the Audio Configuration page does not seem to work.

I could only change the audio jack behavior by changing parameter jack_mutes_amp from "n" to "y" in the NVS-editor.

Compiling and flashing fails

I wanted to give this very interesting project a try, but right now I'm failing to compile it.
I've used Docker to install and start ESP-IDF.
For the config I've used squeezelite-esp32-I2S-4MFlash-sdkconfig.defaults for testing purposes (old Hifiberry Miniamp which doesn't require i2c is conntected to the esp32).

After entering the Docker container I've issued the commands described in the topic "Building Squeezelite-esp32"
I didn't got the point "for all libraries, add -mlongcalls.", what I'm supposed to do here exactly?

The make flash command fails with

In file included from /workspace/squeezelite-esp32/main/esp_app_main.c:45:0:
/workspace/squeezelite-esp32/components/wifi-manager/wifi_manager.h:46:2: error: #error "RECOVERY_APPLICATION not defined. Defaulting to squeezelite"
 #error "RECOVERY_APPLICATION not defined. Defaulting to squeezelite"
  ^
/workspace/squeezelite-esp32/components/wifi-manager/wifi_manager.h:51:9: note: #pragma message: compiling for squeezelite.
 #pragma message "compiling for squeezelite."
         ^
cc1: warning: unrecognized command line option '-Wno-frame-address'
/workspace/esp-idf/make/component_wrapper.mk:291: recipe for target 'esp_app_main.o' failed
make[1]: *** [esp_app_main.o] Error 1
/workspace/esp-idf/make/project.mk:604: recipe for target 'component-main-build' failed
make: *** [component-main-build] Error 2

If I repeat those steps then it fails with

App "recovery" version: v0.4.232-v3.1.5-SqueezeAmp4MBFl
CC build/mqtt/esp-mqtt/mqtt_client.o
/workspace/esp-idf/components/mqtt/esp-mqtt/mqtt_client.c: In function 'esp_mqtt_client_init':
/workspace/esp-idf/components/mqtt/esp-mqtt/mqtt_client.c:487:9: error: implicit declaration of function 'esp_transport_ssl_set_client_key_password' [-Werror=implicit-function-declaration]
         esp_transport_ssl_set_client_key_password(ssl,
         ^
/workspace/esp-idf/components/mqtt/esp-mqtt/mqtt_client.c:504:9: error: implicit declaration of function 'esp_transport_ssl_set_alpn_protocol' [-Werror=implicit-function-declaration]
         esp_transport_ssl_set_alpn_protocol(ssl, (const char **)client->config->alpn_protos);
         ^
/workspace/esp-idf/components/mqtt/esp-mqtt/mqtt_client.c: At top level:
cc1: warning: unrecognized command line option '-Wno-frame-address'
cc1: some warnings being treated as errors
/workspace/esp-idf/make/component_wrapper.mk:291: recipe for target 'esp-mqtt/mqtt_client.o' failed
make[1]: *** [esp-mqtt/mqtt_client.o] Error 1
/workspace/esp-idf/make/project.mk:604: recipe for target 'component-mqtt-build' failed
make: *** [component-mqtt-build] Error 2

As an alternative I wanted to flash the release https://github.com/sle118/squeezelite-esp32/releases/tag/v0.4.218-v3.1.5-I2S-4MFlash-master
For this I've downloaded and extracted the zip file.
The flashing attemp fails with this error

usage: esptool write_flash [-h] [--erase-all]
                           [--flash_freq {keep,40m,26m,20m,80m}]
                           [--flash_mode {keep,qio,qout,dio,dout}]
                           [--flash_size FLASH_SIZE]
                           [--spi-connection SPI_CONNECTION] [--no-progress]
                           [--verify] [--encrypt]
                           [--ignore-flash-encryption-efuse-setting]
                           [--compress | --no-compress]
                           <address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: Address "squeezelite.bin" must be a number

Make prefs conditional to prevent error being logged

On

my @prefs = qw(width small_VU spectrum artwork eq);
you define what prefs to handle in the player settings. But many of these are not define in the template unless you have a display connected. Therefore you should make these conditional:

diff --git a/plugin/SqueezeESP32/PlayerSettings.pm b/plugin/SqueezeESP32/PlayerSettings.pm
index 9b331d8..33c275a 100644
--- a/plugin/SqueezeESP32/PlayerSettings.pm
+++ b/plugin/SqueezeESP32/PlayerSettings.pm
@@ -30,7 +30,8 @@ sub page {
 
 sub prefs {
        my ($class, $client) = @_;
-       my @prefs = qw(width small_VU spectrum artwork eq);
+       my @prefs;
+       shift @prefs, qw(width small_VU spectrum artwork eq) if $client->displayWidth;
        return ($prefs->client($client), @prefs);
 }

Dockerfile broken

Following the build instructions I ran into the following issue:

> docker build -t esp-idf .
[...]
Step 11/17 : RUN cp /workspace/squeezelite-esp32/idf-patch/i2s.c /workspace/esp-idf/components/driver/i2s.c
 ---> Running in e9de5f670c13
cp: cannot stat '/workspace/squeezelite-esp32/idf-patch/i2s.c': No such file or directory

Apparently this patch has been removed

some mp3 files play half(?) speed

noticed this when playing my favorite internet radio station, so it's a bit convoluted to reproduce:

squeezelite on my Fedora workstation plays it just fine. All my squeezesp32 play it slow. Happens with selected songs from different shows on that station.

some commands not recognised in telnet

hw: hardware: WROVER + I2S DAC
fw: bleeding.edge.69-I2S-4MFlash
config:

sent config JSON with data: {"timestamp":1593187540065,"config":{"a2dp_ctmt":{"value":"1000","type":33},"a2dp_ctrld":{"value":"500","type":33},"a2dp_dev_name":{"value":"Squeezelite","type":33},"a2dp_sink_name":{"value":"SMSL BT4.2","type":33},"actrls_config":{"value":"","type":33},"airplay_name":{"value":"ESP32-AirPlay-Scarlet","type":33},"airplay_port":{"value":"5000","type":33},"ap_channel":{"value":"1","type":33},"ap_ip_address":{"value":"192.168.4.1","type":33},"ap_ip_gateway":{"value":"192.168.4.1","type":33},"ap_ip_netmask":{"value":"255.255.255.0","type":33},"ap_pwd":{"value":"squeezelite","type":33},"ap_ssid":{"value":"squeezelite-Scarlet","type":33},"autoexec":{"value":"1","type":33},"autoexec1":{"value":"squeezelite -b 500:2000 -d all=info -n \"Scarlet\" -o I2S","type":33},"autoexec2":{"value":"i2cconfig -l","type":33},"autoexec3":{"value":"i2cset -c 72 -r 1 12","type":33},"bat_config":{"value":"","type":33},"bt_name":{"value":"ESP32-BT-Scarlet","type":33},"bt_sink_pin":{"value":"1234","type":33},"bypass_wm":{"value":"0","type":33},"dac_config":{"value":"bck=25,ws=33,do=32","type":33},"display_config":{"value":"I2C,width=128,height=64,address=60,driver=SSD1306","type":33},"enable_airplay":{"value":"1","type":33},"enable_bt_sink":{"value":"1","type":33},"host_name":{"value":"Scarlet","type":33},"i2c_config":{"value":"scl=13,sda=14,speed=400000,port=1","type":33},"jack_mutes_amp":{"value":"n","type":33},"lms_ctrls_raw":{"value":"n","type":33},"metadata_config":{"value":"","type":33},"ota_erase_blk":{"value":"249856","type":33},"ota_prio":{"value":"6","type":33},"ota_stack":{"value":"10240","type":33},"release_url":{"value":"https://github.com/sle118/squeezelite-esp32/releases","type":33},"rotary_config":{"value":"","type":33},"set_GPIO":{"value":"19=green:1,18=red:1,26=amp,15=ir","type":33},"spdif_config":{"value":"","type":33},"spi_config":{"value":"","type":33},"stats":{"value":"n","type":33},"telnet_block":{"value":"500","type":33},"telnet_buffer":{"value":"40000","type":33},"telnet_enable":{"value":"y","type":33}}}

I can issue commands to squeezelite-esp32 via the serial interface as expected

squeezelite-esp32> <\r><\n>
squeezelite-esp32> i2ccheck<\r><\n>
<\r><\n>
<27>[0;32mI (34417) messaging: i2c is started on port 1.<27>[0m<\r><\n>
squeezelite-esp32> <\r><\n>
squeezelite-esp32> free<\r><\n>
<\r><\n>
<27>[0;32mI (39657) messaging: 1413716<27>[0m<\r><\n>
squeezelite-esp32> <\r><\n>
squeezelite-esp32> heap<\r><\n>
<\r><\n>
<27>[0;32mI (44137) messaging: min heap size: 1393056<27>[0m<\r><\n>
squeezelite-esp32> <\r><\n>
squeezelite-esp32> i2cdetect<\r><\n>
<\r><\n>
<27>[0;32mI (49177) messaging: <\r><\n>
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f<\r><\r><\n>
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <\r><\r><\n>
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <\r><\r><\n>
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <\r><\r><\n>
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- -- <\r><\r><\n>
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- -- <\r><\r><\n>
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <\r><\r><\n>
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <\r><\r><\n>
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <\r><\r><\n>
<\r><\r><\n>
------------------------------------------------------------------------------------<\r><\r><\n>
Detected the following devices (names provided by https://i2cdevices.org/addresses).<\r><\r><\n>
60 [3ch]- SSD1305 SSD1306 PCF8578 PCF8569 SH1106<\r><\r><\n>
72 [48h]- PCA9685 INA219 PN532 TMP102 INA260 ADS1115<\r><\r><\n>
------------------------------------------------------------------------------------<\r><\r><\n>
<27>[0m<\r><\n>
squeezelite-esp32> <\r><\n>
squeezelite-esp32> i2cdump -c 72<\r><\n>
<\r><\n>
<27>[0;32mI (59327) messaging: <\r><\n>
    00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f    0123456789abcdef<\r><\r><\n>
00: 00 0c 18 10 00 68 4a 80 10 22 05 02 5a 40 8a 00    .???.hJ??"??Z@?.<\r><\r><\n>
10: 00 ff ff ff 7f 00 00 00 00 00 00 00 00 00 00 XX    ....?..........X.<\r><\r><\n>
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.<\r><\r><\n>
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.<\r><\r><\n>
40: 30 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00    0?..............<\r><\r><\n>
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 60 00 19    .............`.?<\r><\r><\n>
60: 26 85 XX XX XX XX XX XX XX XX XX XX XX XX XX XX    &?X.X.X.X.X.X.X.X.X.X.X.X.X.X.<\r><\r><\n>
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.<\r><\r><\n>
<27>[0m<\r><\n>
squeezelite-esp32> <\r><\n>

If I try the same via telnet I get errors for some commands

help
E (13369) console: Unrecognized command: help

free
I (17569) messaging: 1389084
heap
E (23719) console: Unrecognized command: heap

i2cdetect
E (30669) console: Unrecognized command: i2cdetect

i2cdump -c 72
I (41269) messaging:
    00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f    0123456789abcdef
00: 00 0c 18 10 00 68 4a 80 10 22 05 02 5a 40 8a 00    .???.hJ??"??Z@?.
10: 00 ff ff ff 7f 00 00 00 00 00 00 00 00 00 00 XX    ....?..........X.
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.
40: 30 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00    0?..............
50: 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 19    ........?......?
60: 26 85 XX XX XX XX XX XX XX XX XX XX XX XX XX XX    &?X.X.X.X.X.X.X.X.X.X.X.X.X.X.
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.

Update certificate for old recovery to work

All current SqueezeAMP have the initial recovery and are facing the certificate issue which means it's impossible to update them to any new version (cmake or make), unless a local webserver is used which is difficult for many users. Can you think of a way to have the certificate updated so that "old" recovery can go on GH?

Clicks/Pop in alac decoder

@philippe44 I've been trying to track down an issue with tiny audio dropouts/breaks when playing alac files with the apple alac decoder without success. I'm experiencing the problem with the current squeezeamp bleeding.edge.59.master build as well as with previous idf v3.1.5 builds.
I can reproduce the same issue with squeezlite linux i386 and armv6hf builds tool, so it's not squeezeamp specific. Would you be able to help? I can provide alac files to test if needed. Thanks.

build problem

Still trying to build my own ...
Ubuntu 20.04 on Windows Subsystem for Linux
installed idf by
git clone -b v4.0 --recursive https://github.com/espressif/esp-idf.git
and squeezelite by
git clone -b bleeding.edge.59-v4.0-I2S-4MFlash-master-cmake --recursive https://github.com/sle118/squeezelite-esp32.git

idf.py build yields

Python requirements from /home/user/esp/esp-idf/requirements.txt are satisfied.
[1/10] cd /home/user/esp/squeezelite-esp32/build && /usr/bin/cmake -P /home/user/esp/squeezelite-esp32/generate_debug_scripts.cmake
Generating debug script files
[2/10] Generating squeezelite_src.c, BUILD
[3/10] Performing build step for 'bootloader'
ninja: no work to do.
[4/8] Generating ld/esp32.project.ld
[5/8] Linking CXX executable recovery.elf
[6/8] Building C object CMakeFiles/squeezelite.elf.dir/squeezelite_src.c.obj
[7/8] Generating binary image from built executable
esptool.py v2.8
Generated /home/user/esp/squeezelite-esp32/build/recovery.bin
[8/8] Linking CXX executable squeezelite.elf
FAILED: squeezelite.elf
cd /home/user/esp/squeezelite-esp32/build && xtensa-esp32-elf-objcopy --weaken-symbol esp_app_desc /home/user/esp/squeezelite-esp32/build/esp-idf/app_update/libapp_update.a && xtensa-esp32-elf-objcopy --globalize-symbol find_command_by_name /home/user/esp/squeezelite-esp32/build/esp-idf/console/libconsole.a && cd /home/user/esp/squeezelite-esp32/build && /home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++  -mlongcalls -Wno-frame-address  -nostdlib CMakeFiles/squeezelite.elf.dir/squeezelite_src.c.obj  -o squeezelite.elf  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/driver/libdriver.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/efuse/libefuse.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/app_update/libapp_update.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/lwip/liblwip.a  esp-idf/tcpip_adapter/libtcpip_adapter.a  esp-idf/esp_event/libesp_event.a  esp-idf/pthread/libpthread.a  esp-idf/espcoredump/libespcoredump.a  esp-idf/esp32/libesp32.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/soc/libsoc.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/freertos/libfreertos.a  esp-idf/vfs/libvfs.a  esp-idf/newlib/libnewlib.a  esp-idf/cxx/libcxx.a  esp-idf/app_trace/libapp_trace.a  esp-idf/asio/libasio.a  esp-idf/bt/libbt.a  esp-idf/coap/libcoap.a  esp-idf/console/libconsole.a  esp-idf/nghttp/libnghttp.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_adc_cal/libesp_adc_cal.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/protobuf-c/libprotobuf-c.a  esp-idf/protocomm/libprotocomm.a  esp-idf/mdns/libmdns.a  esp-idf/esp_local_ctrl/libesp_local_ctrl.a  esp-idf/esp_websocket_client/libesp_websocket_client.a  esp-idf/expat/libexpat.a  esp-idf/wear_levelling/libwear_levelling.a  esp-idf/sdmmc/libsdmmc.a  esp-idf/fatfs/libfatfs.a  esp-idf/freemodbus/libfreemodbus.a  esp-idf/jsmn/libjsmn.a  esp-idf/json/libjson.a  esp-idf/libsodium/liblibsodium.a  esp-idf/mqtt/libmqtt.a  esp-idf/openssl/libopenssl.a  esp-idf/spiffs/libspiffs.a  esp-idf/ulp/libulp.a  esp-idf/unity/libunity.a  esp-idf/wifi_provisioning/libwifi_provisioning.a  esp-idf/tools/libtools.a  esp-idf/platform_config/libplatform_config.a  esp-idf/services/libservices.a  esp-idf/display/libdisplay.a  esp-idf/telnet/libtelnet.a  esp-idf/platform_console/libplatform_console.a  esp-idf/squeezelite-ota/libsqueezelite-ota.a  esp-idf/wifi-manager/libwifi-manager.a  esp-idf/main/libmain.a  esp-idf/audio/libaudio.a  esp-idf/codecs/libcodecs.a  esp-idf/driver_bt/libdriver_bt.a  esp-idf/esp-dsp/libesp-dsp.a  esp-idf/raop/libraop.a  esp-idf/squeezelite/libsqueezelite.a  esp-idf/app_squeezelite/libapp_squeezelite.a  -Wl,--cref -Wl,--Map=/home/user/esp/squeezelite-esp32/build/squeezelite.map  esp-idf/wear_levelling/libwear_levelling.a  esp-idf/sdmmc/libsdmmc.a  esp-idf/protocomm/libprotocomm.a  esp-idf/protobuf-c/libprotobuf-c.a  esp-idf/platform_console/libplatform_console.a  esp-idf/squeezelite-ota/libsqueezelite-ota.a  esp-idf/wifi-manager/libwifi-manager.a  esp-idf/platform_console/libplatform_console.a  esp-idf/squeezelite-ota/libsqueezelite-ota.a  esp-idf/wifi-manager/libwifi-manager.a  esp-idf/telnet/libtelnet.a  -Wl,--undefined=GDS_DrawPixelFast  esp-idf/app_squeezelite/libapp_squeezelite.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/nghttp/libnghttp.a  esp-idf/squeezelite/libsqueezelite.a  esp-idf/audio/libaudio.a  ../components/audio/lib/libesp_processing.a  -u pow  -u cos  -u sin  -u sqrt  esp-idf/driver_bt/libdriver_bt.a  esp-idf/bt/libbt.a  -L/home/user/esp/esp-idf/components/bt/controller/lib  -lbtdm_app  esp-idf/esp-dsp/libesp-dsp.a  esp-idf/raop/libraop.a  esp-idf/mdns/libmdns.a  esp-idf/services/libservices.a  esp-idf/display/libdisplay.a  esp-idf/services/libservices.a  esp-idf/display/libdisplay.a  esp-idf/platform_config/libplatform_config.a  esp-idf/console/libconsole.a  esp-idf/json/libjson.a  esp-idf/tools/libtools.a  -u _ZdlPv  -u _Znwj  esp-idf/codecs/libcodecs.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/driver/libdriver.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/efuse/libefuse.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/app_update/libapp_update.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/lwip/liblwip.a  esp-idf/tcpip_adapter/libtcpip_adapter.a  esp-idf/esp_event/libesp_event.a  esp-idf/pthread/libpthread.a  esp-idf/espcoredump/libespcoredump.a  esp-idf/esp32/libesp32.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/soc/libsoc.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/freertos/libfreertos.a  esp-idf/vfs/libvfs.a  esp-idf/newlib/libnewlib.a  esp-idf/cxx/libcxx.a  esp-idf/app_trace/libapp_trace.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libcoexist.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libcore.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libespnow.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libmesh.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libnet80211.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libphy.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libpp.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/librtc.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libsmartconfig.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/driver/libdriver.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/efuse/libefuse.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/app_update/libapp_update.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/lwip/liblwip.a  esp-idf/tcpip_adapter/libtcpip_adapter.a  esp-idf/esp_event/libesp_event.a  esp-idf/pthread/libpthread.a  esp-idf/espcoredump/libespcoredump.a  esp-idf/esp32/libesp32.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/soc/libsoc.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/freertos/libfreertos.a  esp-idf/vfs/libvfs.a  esp-idf/newlib/libnewlib.a  esp-idf/cxx/libcxx.a  esp-idf/app_trace/libapp_trace.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libcoexist.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libcore.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libespnow.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libmesh.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libnet80211.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libphy.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libpp.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/librtc.a  /home/user/esp/esp-idf/components/esp_wifi/lib_esp32/libsmartconfig.a  -u esp_app_desc  -L /home/user/esp/esp-idf/components/esp_wifi/lib_esp32  -u pthread_include_pthread_impl  -u pthread_include_pthread_cond_impl  -u pthread_include_pthread_local_storage_impl  -L /home/user/esp/squeezelite-esp32/build/esp-idf/esp32  -T esp32_out.ld  -u app_main  -L /home/user/esp/esp-idf/components/esp32/ld  -T esp32.extram.bss.ld  -L /home/user/esp/squeezelite-esp32/build/esp-idf/esp32/ld  -T esp32.project.ld  -T esp32.peripherals.ld  -u call_user_start_cpu0  -u ld_include_panic_highint_hdl  -mfix-esp32-psram-cache-issue  /home/user/esp/esp-idf/components/xtensa/esp32/libhal.a  -Wl,--gc-sections  -L /home/user/esp/esp-idf/components/esp_rom/esp32/ld  -T esp32.rom.ld  -T esp32.rom.libgcc.ld  -T esp32.rom.syscalls.ld  -T esp32.rom.newlib-data.ld  -Wl,--undefined=uxTopUsedPriority  -u vfs_include_syscalls_impl  esp-idf/newlib/libnewlib.a  -u newlib_include_locks_impl  -u newlib_include_heap_impl  -u newlib_include_syscalls_impl  -u newlib_include_pthread_impl  -u __cxa_guard_dummy  -lstdc++  esp-idf/pthread/libpthread.a  -lgcov  -lc  -lm  -lgcc  ../components/codecs/lib/libmad.a  ../components/codecs/lib/libFLAC.a  ../components/codecs/lib/libhelix-aac.a  ../components/codecs/lib/libvorbisidec.a  ../components/codecs/lib/libogg.a  ../components/codecs/lib/libalac.a  ../components/codecs/lib/libresample16.a  ../components/codecs/lib/libsoxr.a  ../components/codecs/lib/libopusfile.a  ../components/codecs/lib/libopus.a  -Wl,--undefined=feof  -Wl,--undefined=fdopen  -Wl,--undefined=esp_app_desc && cd /home/user/esp/squeezelite-esp32/build && /usr/bin/cmake -E echo "Generating /home/user/esp/squeezelite-esp32/build/squeezelite.bin" && /home/user/.espressif/python_env/idf4.0_py2.7_env/bin/python /home/user/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB --elf-sha256-offset 0xb0 -o /home/user/esp/squeezelite-esp32/build/squeezelite.bin squeezelite.elf
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(stream_decoder.o):(.literal+0x38): undefined reference to `fileno'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(stream_decoder.o):(.literal+0x3c): undefined reference to `fstat'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(stream_decoder.o): in function `read_callback_':
stream_decoder.c:(.text+0x924): undefined reference to `fileno'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: stream_decoder.c:(.text+0x92c): undefined reference to `fstat'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(fixed.o):(.literal+0x0): undefined reference to `log'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(fixed.o): in function `FLAC__fixed_compute_best_predictor':
fixed.c:(.text+0x134): undefined reference to `log'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: fixed.c:(.text+0x19c): undefined reference to `log'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: fixed.c:(.text+0x1f4): undefined reference to `log'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: fixed.c:(.text+0x24c): undefined reference to `log'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(fixed.o):fixed.c:(.text+0x2a0): more undefined references to `log' follow
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(lpc.o):(.literal+0x0): undefined reference to `lround'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(lpc.o):(.literal+0x48): undefined reference to `log'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(lpc.o): in function `FLAC__lpc_quantize_coefficients':
lpc.c:(.text+0xf8a): undefined reference to `lround'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: lpc.c:(.text+0xff2): undefined reference to `lround'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: lpc.c:(.text+0x103a): undefined reference to `lround'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: lpc.c:(.text+0x1076): undefined reference to `lround'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: lpc.c:(.text+0x10c8): undefined reference to `lround'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(lpc.o):lpc.c:(.text+0x1132): more undefined references to `lround' follow
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(lpc.o): in function `FLAC__lpc_compute_expected_bits_per_residual_sample':
lpc.c:(.text+0x9f98): undefined reference to `log'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(lpc.o): in function `FLAC__lpc_compute_expected_bits_per_residual_sample_with_error_scale':
lpc.c:(.text+0xa019): undefined reference to `log'
/home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ../components/codecs/lib/libFLAC.a(lpc.o): in function `FLAC__lpc_compute_best_order':
lpc.c:(.text+0xa0d9): undefined reference to `log'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Checking Python dependencies...
Executing action: all (aliases: build)
Running ninja in directory /home/user/esp/squeezelite-esp32/build
Executing "ninja all"...
ninja failed with exit code 1

help?

A1S_542: You have to select Bit Depth without the need of it.

If you save a non SSD1326-display, the hardware/display-section asks you to set the Bit Depth.
You only should set this, if you realy want to use a SSD1326-display.

(my) saved result in NVS-Editor: (with selected "1" for BitDepth, otherwise i can't save it)
SPI:width=128,height=64,cs=12,reset=22,speed=8000000,driver=SSD1306,HFlip,VFlip

If you need the 1 even with other displays than SSD1326, then the default should be "1", not "---".

Playing Internet Radio stations only works after performing a software reset

Observation

  • After weeks of normal operation in the configuration described below, internet radio stations suddenly stopped working.
  • This is independent of using http or https, or mp3, flac, aac stations.
  • When restarting the SqueezeAmp via the Web UI ("Software reset of the chip"), the radio streams play normally.
  • Using local audio media works (flac, mp3, opus).
  • Using the SqueezeAmp as Bluetooth sink works as well.

Scenario: Switch from local media playback (flac) to internet radio station (radio paradise), reset board via Web UI

Telnet log:

[00:41:16.870454] decode_flush:251 decode flush
[00:41:16.870718] output_flush:440 flush output buffer
[00:41:17.083391] codec_open:279 codec open: 'f'
[00:41:17.085840] stream_sock:508 connecting to 192.168.178.22:9000
[00:41:17.092932] stream_sock:585 header: GET /stream.mp3?player=fc:f5:c4:6d:9b:14 HTTP/1.0


[00:41:17.244708] stream_thread:264 headers: len: 118
HTTP/1.1 200 OK
Server: Logitech Media Server (7.9.3 - 1597753178)
Connection: close
Content-Type: audio/x-flac


[00:41:17.970950] output_thread_i2s:473 Output state is 1
[00:41:17.972873] output_thread_i2s:536 Restarting I2S.
[00:41:18.037007] write_cb:141 setting track_start
[00:41:18.065633] _output_frames:64 start buffer frames: 9216
[00:41:18.067695] _output_frames:149 track start sample rate: 44100 replay_gain: 0
[00:41:18.068143] output_thread_i2s:473 Output state is 2
[00:41:27.214258] output_thread_i2s:473 Output state is 0
[00:41:33.560206] decode_flush:251 decode flush
[00:41:33.560736] output_flush:440 flush output buffer
[00:41:33.564764] decode_flush:251 decode flush
[00:41:33.565242] output_flush:440 flush output buffer
[00:42:04.551914] output_thread_i2s:473 Output state is -1
[00:42:04.552495] output_thread_i2s:477 switching off amp GPIO -1

Resetting the board via Web Interface ("Software reset of the chip"):

Performing a simple restart to the currently active partition.
Connection closed by foreign host.
squeezeampfan@heaven:~$ telnet 192.168.178.38
Trying 192.168.178.38...
Connected to 192.168.178.38.
Escape character is '^]'.
I (1712) esp_app_main: Setting up config subsystem.
I (1752) esp_app_main: Registering default values
I (1752) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
W (1752) config: Waiting for config commit ...
I (2752) config: configuration has some uncommitted entries
I (2752) config: Committing configuration to nvs. Locking config object.
I (2752) config: Config committed!
I (2752) esp_app_main: Configuring services
I (2752) config: Done Committing configuration to nvs.
I (2752) services: Configuring I2C sda:-1 scl:-1 port:1 speed:400000
W (2752) services: no I2C configured
I (2752) services: Configuring SPI data:-1 clk:-1 host:1 dc:-1
W (2752) services: no SPI configured
I (2752) led: Configuring LEDs green:12 (active:0 -1%), red:13 (active:0 -1%)
I (2752) battery: Battery measure channel: 7, scale 20.240000, cells 2, avg 7.11V
I (2752) monitor: Initializing monitoring
I (2752) monitor: Adding jack (low) detection GPIO 34
I (2752) buttons: Creating button using GPIO 34, type 0, pull-up/down 0, long press 0 shifter -1
I (2752) buttons: starting button tasks
I (2752) monitor: Adding speaker fault (low) detection GPIO 2
I (2752) buttons: Creating button using GPIO 2, type 0, pull-up/down 0, long press 0 shifter -1
I (2752) monitor: Heap internal:239588 (min:224116) external:4077892 (min:4077892)
I (2752) esp_app_main: Initializing display
I (2752) display: Trying to configure display with N/A
W (2752) display: No display driver
I (2752) esp_app_main: Checking if certificates need to be updated
I (2752) esp_app_main: About to check if certificates need to be updated in flash
I (2752) esp_app_main: Running partition [ota_0] type 0 subtype 16 (offset 0x00150000)
I (2752) esp_app_main: Running version: development.142-SqueezeAmp8MBFl
I (2752) esp_app_main: Certificate version: development.142-SqueezeAmp8MBFl
I (2752) esp_app_main: Checking for update url
W (2752) config: Value not found for key fwurl
I (2762) esp_app_main: Starting Wifi Manager
I (2772) wifi: wifi driver task: 3ffdab54, prio:23, stack:3584, core=0
I (2772) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (2772) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (2782) wifi: wifi firmware version: 581f422
I (2782) wifi: config NVS flash: enabled
I (2782) wifi: config nano formating: disabled
I (2782) wifi: Init dynamic tx buffer num: 32
I (2782) wifi: Init data frame dynamic rx buffer num: 40
I (2782) wifi: Init management frame dynamic rx buffer num: 40
I (2782) wifi: Init management short buffer num: 32
I (2782) wifi: Init static tx buffer num: 12
I (2782) wifi: Init static rx buffer size: 1600
I (2782) wifi: Init static rx buffer num: 12
I (2782) wifi: Init dynamic rx buffer num: 40
I (2862) wifi: mode : null
I (2862) http_server: Initializing HTTP Server
I (2892) wifi_manager: Saved wifi found on startup. Will attempt to connect.
I (2892) wifi: mode : sta (fc:f5:c4:6d:9b:14)
I (2892) wifi_manager: Wifi Connecting...
W (2912) console: Processing autoexec commands while wifi_manager active.  Wifi related commands will be ignored.
I (2912) console: autoexec is set to perform auto-process
I (2912) console: Running command autoexec1 = squeezelite -b 500:2000 -d all=info -C 30 -W -n "squeezelite" -o I2S
W (2912) config: Value not found for key autoexec2
I (2912) squeezelite_cmd: Calling squeezelite
I (2912) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
[00:46:43.304110] stream_init:387 init stream
[00:46:43.304746] sb_controls_init:306 initializing audio (buttons/rotary/ir) controls (raw:0)
I (2912) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
[00:46:43.305113] sb_display_init:290 no display for LMS
[00:46:43.305307] output_init_embedded:70 init device: I2S
[00:46:43.306010] output_init_common:427 supported rates: 192000 176400 96000 88200 48000 44100 32000 24000 22050 16000 12000 11025 8000 
[00:46:43.306246] output_init_embedded:86 init I2S/SPDIF
I (2922) TAS575x/8x: Detected TAS @0x90
I (2922) TAS575x/8x: TAS57xx uses I2C sda:27, scl:26
I (2922) I2S: DMA Malloc info, datalen=blocksize=2048, dma_buf_count=12
I (2922) I2S: APLL: Req RATE: 44100, real rate: 44099.988, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 11289597.000, SCLK: 1411199.625000, diva: 1, divb: 0
[00:46:43.310767] output_init_i2s:311 TAS57xx DAC using I2S bck:33, ws:25, do:32, mute:14:0 (res:0)
[00:46:43.311184] output_init_i2s:331 Initializing I2S mode normal with rate: 44100, bits per sample: 16, buffer frames: 512, number of buffers: 12 
[00:46:43.312317] output_thread_i2s:473 Output state is -1
[00:46:43.312557] output_thread_i2s:477 switching off amp GPIO -1
[00:46:43.312851] output_visu_init:75 Initialize VISUEXPORT 2048 16 bits samples
[00:46:43.313032] output_init_embedded:94 init completed.
[00:46:43.313201] decode_init:153 init decode
[00:46:43.313367] register_alac:553 using alac to decode alc
[00:46:43.313541] register_helixaac:670 using helix-aac to decode aac
[00:46:43.313717] register_vorbis:380 using vorbis to decode ogg
[00:46:43.313894] register_opus:324 using opus to decode ops
[00:46:43.314070] register_flac:332 using flac to decode ogf,flc
[00:46:43.314231] register_pcm:468 using pcm to decode wav,aif,pcm
[00:46:43.314391] register_mad:417 using mad to decode mp3
I (2922) BTDM_INIT: BT controller compile version [79dd6f1]
I (2922) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (3252) wifi: new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
I (3952) wifi: state: init -> auth (b0)
I (3962) wifi: state: auth -> assoc (0)
I (3972) wifi: state: assoc -> run (10)
I (4002) wifi: connected with RasenderIgel, aid = 1, channel 1, BW20, bssid = 98:9b:cb:90:70:33
I (4002) wifi: security type: 3, phy: bgn, rssi: -57
I (4002) wifi: pm start, type: 1

W (4012) BT_AV: BT Sink pin code is: [1234] 
[00:46:44.402425] register_external:316 Initializing BT sink
[00:46:44.407387] discover_server:821 sending discovery
I (4022) tcpip_adapter: sta ip: 192.168.178.38, mask: 255.255.255.0, gw: 192.168.178.1
I (4022) wifi_manager: SYSTEM_EVENT_STA_GOT_IP. IP=192.168.178.38, Gateway=192.168.178.1, NetMask=255.255.255.0, Address was changed
I (4022) esp_app_main: I have a connection!
[00:46:44.416803] discover_server:833 got response from: 192.168.178.22:3483
[00:46:44.417984] slimproto:931 connecting to 192.168.178.22:3483
I (4032) wifi: AP's beacon interval = 102400 us, DTIM period = 1
[00:46:44.432058] slimproto:978 connected
[00:46:44.432663] sendHELO:153 mac: fc:f5:c4:6d:9b:14
[00:46:44.432953] sendHELO:155 cap: Model=squeezeesp32,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=v1.9.2-1145,ModelName=SqueezeLite,MaxSampleRate=192000,alc,aac,ogg,ops,ogf,flc,wav,aif,pcm,mp3
[00:46:44.443972] notify:285 notified server 192.168.178.22 hport 9000 cport 9090
[00:46:44.733795] decode_flush:251 decode flush
[00:46:44.734176] output_flush:440 flush output buffer
[00:46:44.744907] codec_open:279 codec open: 'a'
[00:46:44.745304] helixaac_open:577 opening adts stream
[00:46:44.750650] stream_sock:508 connecting to 23.29.121.253:80
[00:46:44.937339] stream_sock:585 header: GET /aac-320 HTTP/1.0
Cache-Control: no-cache
Connection: close
Accept: */*
Host: stream-tx3.radioparadise.com
User-Agent: iTunes/4.7.1 (Linux; N; Debian; x86_64-linux; EN; utf8) SqueezeCenter, Squeezebox Server, Logitech Media Server/7.9.3/1597753178
Icy-Metadata: 1


[00:46:44.947066] handler:54 got equalizer 14
[00:46:45.838914] stream_thread:264 headers: len: 718
HTTP/1.1 200 OK
Server: openresty/1.17.8.2
Date: Mon, 28 Sep 2020 09:22:16 GMT
Content-Type: audio/aac
Connection: close
icy-br: 320
ice-audio-info: channels=2;samplerate=44100;bitrate=320
icy-description: DJ-mixed blend of modern and classic rock, electronica, world music, and more. Always 100% commercial-free
icy-genre: Eclectic
icy-name: Radio Paradise (320k aac)
icy-pub: 1
icy-url: https://radioparadise.com
Cache-Control: no-cache, no-store
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type, Icy-MetaData
Access-Control-Allow-Methods: GET, OPTIONS, SOURCE, PUT, HEAD, STATS
icy-metaint: 16000


[00:46:45.944186] stream_thread:317 icy meta: len: 112
StreamTitle='Kent - Den Döda Vinkeln';StreamUrl='http://img.radioparadise.com/covers/l/B0007ZHWQS.jpg';
telnet event: TELNET_EV_WILL
telnet event: TELNET_EV_SUBNEGOTIATION
[00:46:48.610734] output_thread_i2s:473 Output state is 1
[00:46:48.613481] output_thread_i2s:536 Restarting I2S.
[00:46:48.616118] equalizer_open:51 equalizer initialized 0
[00:46:48.617340] helixaac_decode:406 setting track start, samplerate: 44100 channels: 2
[00:46:48.659927] _output_frames:64 start buffer frames: 5120
[00:46:48.664000] _output_frames:149 track start sample rate: 44100 replay_gain: 0
[00:46:48.664970] output_thread_i2s:473 Output state is 2

Test environment

  • SqueezeAmp basic, I2S operation via TAS onboard amp.
  • Versions affected:
    • development.140-SqueezeAmp8MBFl, mode: squeezelite
    • development.142-SqueezeAmp8MBFl, mode: squeezelite
    • older versions not tested
  • the unit was continuously updated from older cmake development versions.
  • reboot to recovery partition does not work with development.142-SqueezeAmp8MBFl anymore (when using the web UI "Resets and boot to recovery (if available)").
  • Logitech Media Server Version: 7.9.3 - 1597753178 @ Sun Aug 23 19:21:22 CEST 2020
    • Operating system: Debian - EN - utf8 (buster)
    • Platform Architecture: x86_64-linux
    • Perl Version: 5.28.1 - x86_64-linux-gnu-thread-multi
    • Audio::Scan: 1.02
    • IO::Socket::SSL: 2.060
    • Database Version: DBD::SQLite 1.58 (sqlite 3.22.0)
    • Player Model: SqueezeLite
    • Player Type: squeezeesp32
    • Firmware: v1.9.2-1145
    • Player IP Address: 192.168.178.38
    • Player MAC Address: fc:f5:c4:6d:9b:14
    • Wireless Signal Strength: 74%

A1S 526/529 Unresponsive web ui after saving Bluetooth Sink name

On a freshly flashed or ota upgraded version 526 or 529 after entering and saving a Bluetooth Sink device name the web ui would become completely unresponsive.
Connecting to the device console using putty showed it to be in a crash and reboot loop... attached are the console outputs from a 526 occurrence and 529 occurrence.
526failedstartafter BTSink Set.txt
529failedstartafter BTSink Set.txt

and the NVS config txt file for I think prior to the 529 attempt
nvs_config1606005485824json.txt

development.108-I2S-4MFlash loses WiFi

My esp frequently loses the WiFi connection:
Sound stops, display freezes, and web interface is not available.
I can issue a restart command via the serial interface and the WiFi connects w/o problems. LMS shows the player with a signal stregth of 73%.

log file attached.
wifi lost scarlet 200828.txt

A1S 526/529 - Squeezelite start line missing Bluetooth Sink name

On A1S 526 or 529, when changing the Bluetooth sink name on the Audio + LMS web ui page the a2dp_sink_name parameter in NVS gets changed but the squeezelite startup line in autoexec1 loses -n 'new sinkname'" from the BT section.
Even the message in 529 web ui confirming the change/save shows the missing name parameter.

Console output, NVS config text file upload and screenshot after changing bluetooth sink from SoundCore 2 to Bose OE SoundLink...

BT Sink.txt

nvs_config1606045361050json.txt

Screenshot 2020-11-22 at 11 39 07

Radio Paradise flac stream crash

The Radio Paradise flac stream crashes my Squeezelite-esp32 devices. This issue is to document one instance:

  • hardware: WROVER + I2S DAC ES9023, , LEDs (see config below)
  • firmware version used. Philippe's fix version
  • display type: SPI / SSD1322
  • Rotary: yes
  • Buttons: no
  • IR receiver: yes
  • Equalizer active: no
  • Stats activated in NVS: yes
  • Network encryption type: ?
  • Are you syncing with other players: not this time, normally yes.
  • LMS version: Logitech Media Server Version: 7.9.2 - 1578996832
  • Squeezelite-ESP32 plugin version: 0.94
  • Config.json: Gru-config-json.txt
  • Log: Gru-crash-serial.log

error: 'CONFIG_CONSOLE_UART_NUM' undeclared

newbie here.
I am trying to follow the steps in the readme to build my own bins.
I have very little understanding what I am acutally doing...

When I come to make flash I encounter the error below.

What shall I do?

Toolchain path: /home/user/.espressif/tools/xtensa-esp32-elf/esp-2020r1-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: esp-2020r1
Compiler version: 8.2.0
Python requirements from /home/user/esp/esp-idf/requirements.txt are satisfied.
Building partitions from /mnt/c/esp/squeezelite-esp32/partitions.csv...

App "recovery" version: v0.5.576-v3.1.5-ESP32-A1S-maste
CC build/cmd_system/cmd_system.o
/mnt/c/esp/squeezelite-esp32/components/cmd_system/cmd_system.c: In function 'light_sleep':
/mnt/c/esp/squeezelite-esp32/components/cmd_system/cmd_system.c:437:9: error: 'CONFIG_CONSOLE_UART_NUM' undeclared (first use in this function); did you mean 'CONFIG_ESP_CONSOLE_UART_NUM'?
     if (CONFIG_CONSOLE_UART_NUM <= UART_NUM_1) {
         ^~~~~~~~~~~~~~~~~~~~~~~
         CONFIG_ESP_CONSOLE_UART_NUM
/mnt/c/esp/squeezelite-esp32/components/cmd_system/cmd_system.c:437:9: note: each undeclared identifier is reported only once for each function it appears in
/home/user/esp/esp-idf/make/component_wrapper.mk:291: recipe for target 'cmd_system.o' failed
make[1]: *** [cmd_system.o] Error 1
/home/user/esp/esp-idf/make/project.mk:635: recipe for target 'component-cmd_system-build' failed
make: *** [component-cmd_system-build] Error 2

also I have no clue what "for all libraries, add -mlongcalls" means.

edit, I replaced CONFIG_CONSOLE_UART_NUM with CONFIG_ESP_CONSOLE_UART_NUM and after some warnings I get

 #include "adc1_i2s_private.h"

where can I find this?

Airplay connection problem

Hi,
tests for the airplay problem in latest ota v0.4.214 SqueezeAMP 4MB Version are not successfull here,
there must be a regression somewhere in the latest commits on github,..

different Versions of itunes (12.6.3, 12.9.2,.. ) give: The device ESP32-AirPlay-4d1a48
is not compatible with this Version of iTunes,
Logs remain empty, using the device with the airupnp bridge give sound without problems,..

if I use VLC on MacOS to play different sorts of audio files (i.e. pcm, flac,alac etc.,..) to SqueezeAMP via Airplay the routing
is done with VLC and the MacOS Audio-Midi-control panel,

in the logfiles there are always entries that at the beginning of the communication something goes wrong, before actual audio data are sent:

PM [AirPlay] Set up for stream GeneralAudio, PCM/44100/16/2 -> ALAC/44100/16/2 PM [AirPlay] ### Endpoint "ESP32-AirPlay-4d1a48" options error: -6748/0xFFFFE5A4 kMismatchErr PM [AirPlay] ### Endpoint "ESP32-AirPlay-4d1a48" start failed: -6748/0xFFFFE5A4 kMismatchErr PM [BonjourBrowser] Reconfirming PTR for 246F284D1A48@ESP32-AirPlay-4d1a48._raop._tcp.local. on en0 PM [AirPlay] Posted 'com.apple.AirTunes.endpointStartError' with -6748/0xFFFFE5A4 kMismatchErr PM [AirPlay] Tore down for stream GeneralAudio PM [AirPlay] Posting kAudioDevicePropertyDataSourceInfoForID: item 12531 error: -6748/0xFFFFE5A4 kMismatchErr PM [AirPlay] Client stop finished PM [AirPlay] Quiescing endpoint 'ESP32-AirPlay-4d1a48'

also going back to earlier versions for testing is not really a solution because in the latest version the commit for BT & AirPlay switch fix
is contained,..

best wishes pbg4

amp GPIO flickers

Both in v0.5.565-IDFv3.1.5-I2S-4MFlash and in bleeding.edge.62-I2S-4MFlash the amp GPIO switches on during boot and off again if the player is off in LMS. This is a bit of a nuisance as it can cause a turn-on thump.
Can squeezelite-esp32 be made in a way that leaves the GPIO low during boot if they player is off?
Thanks

cli or api?

Any command line or api to change "SQUEEZELITE COMMAND"?
I'd like to change bt connection from Home Automation System.

Thanks!!!

Bluetooth A2DP receiver mode works only if connected to WLAN before (master-cmake version "754b864")

After connecting to WLAN Network, i'm able to supply music by my local LMS and also by Bluetooth.
If WLAN router will be switched of, after ESP32 was started, playing music via Bluetooth is still possible.
But if the ESP32 will be started after WLAN was switched off (and stay off), it is not possible to establish an Bluetooth connection (mobile phone shows the ESP as active for few seconds only)

I2S-4MFlash-sdkconfig.defaults was used

squeezelite-esp_nowlan_log.txt

Airplay volume bug ?

Running bleeding.edge.72-ESP32-A1S
If issuing remotely volume 1 ie max in airplay mode no audio output but 0.98?????? or lower is fine.

I have been looking for other problems and found this was a cause of my struggles the same problem in earlier versions ie 62 and 66 I think I have played with.

Not a big problem now i know.

Thanks Paul V.

Compile issue under windows

I am trying to compile the cmake branch on windows 10 with idf 4.0.
idf.py makemenuconfig is working fine but after idf.py build I get the following error:

C:\esp-idf-40\projects\squeezelite-esp32>idf.py build
Checking Python dependencies...
Python requirements from C:\esp-idf-40\requirements.txt are satisfied.
Executing action: all (aliases: build)
Running ninja in directory c:\esp-idf-40\projects\squeezelite-esp32\build
Executing "ninja all"...
[2/10] cmd.exe /C "cd /D C:\esp-idf-40\projects\squeezeli.../projects/squeezelite-esp32/generate_debug_scripts.cmake"
Generating debug script files
[3/10] Performing build step for 'bootloader'
ninja: no work to do.
[7/8] Generating binary image from built executable
esptool.py v2.8
Generated C:/esp-idf-40/projects/squeezelite-esp32/build/recovery.bin
[8/8] Linking CXX executable squeezelite.elf
FAILED: squeezelite.elf
cmd.exe /C "cmd.exe /C "cd /D C:\esp-idf-40\projects\squeezelite-esp32\build && xtensa-esp32-elf-objcopy --weaken-symbol esp_app_desc C:/esp-idf-40/projects/squeezelite-esp32/build/esp-idf/app_update/libapp_update.a && xtensa-esp32-elf-objcopy --globalize-symbol find_command_by_name C:/esp-idf-40/projects/squeezelite-esp32/build/esp-idf/console/libconsole.a && cd C:\esp-idf-40\projects\squeezelite-esp32\build" && C:\esp-idf-tools\tools\xtensa-esp32-elf\esp-2019r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe  -mlongcalls -Wno-frame-address  -nostdlib @CMakeFiles\squeezelite.elf.rsp  -o squeezelite.elf  && cmd.exe /C "cd /D C:\esp-idf-40\projects\squeezelite-esp32\build && C:\esp-idf-tools\tools\cmake\3.13.4\bin\cmake.exe -E echo "Generating C:/esp-idf-40/projects/squeezelite-esp32/build/squeezelite.bin" && C:\esp-idf-tools\python_env\idf4.0_py3.8_env\Scripts\python.exe C:/esp-idf-40/components/esptool_py/esptool/esptool.py --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB --elf-sha256-offset 0xb0 -o C:/esp-idf-40/projects/squeezelite-esp32/build/squeezelite.bin squeezelite.elf""
c:/esp-idf-tools/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: ../components/codecs/lib/libalac.a(alac_wrapper.o):(.literal+0xc): undefined reference to `_Unwind_Resume'
c:/esp-idf-tools/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: ../components/codecs/lib/libalac.a(alac_wrapper.o): in function `alac_create_decoder':
D:\Developments\msys32\home\esp32\squeezelite\alac/alac_wrapper.cpp:38: undefined reference to `_Unwind_Resume'
c:/esp-idf-tools/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: ../components/codecs/lib/libalac.a(alac_wrapper.o):(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

It seems like the audio libraries are compiled with a different compiler version.
How can I fix that?
Whats the easiest way to get a default built with SPDIF enabled?

After boot, green led is left blinking quickly by WiFi

I've fixed that in make version but cmake has some changes that I don't know. After boot, when the network is acquired, the green led status is not restored. I guess an event is not caught that happens upon getting an IP address

Add Ogg/Flac support

Attached is a patch that adds ogg/flac support.

Unfortunately, I don't have an esp32 dev environment so I can't build and test it on my squeezeamp. I added ogg/flac to squeezelite in August of last year and so far it's been solid.

oggflac.patch.txt

I didn't create a PR because I couldn't build and test it.. Hopefully it works for squeezeamp....I've been enjoying mine!

Here's a few test URLs.

http://ice2.ikoula.net-radio.fr:80/frequence3.flac
http://stream.radioparadise.com/flac
http://440hz-radio.de:8080/440hz.flac.ogg

Ad Snapclient as Feature

Hello everyone,
before I found this today, I looked at snapclient by jorgenkraghjakobsen.
Do you think it would be posible to ad the Snapclient Feature to the Squeezelite32-esp32 Project?
I would also love to see the Spotify-Conect Feature Server Independant on the Esp.
Greatings
Axel Just

Support for Volume UP/DOWN Buttons on iOS / Android

Using the buttons on my (Android) Phone I've noticed that the volume buttons are not showing any effect. Paired with my Windows Laptop or using LMS, volume control works just fine.

So I've looked in the code and found this comment:

// volume UP/DOWN buttons are not supported by iPhone/Android

And this upstream issue with the volume buttons:
espressif/esp-idf#4438 (comment)

The serial difference between Android and Windows are these. Android button presses are not even shown:

Android:
E (197000) BT_APPL: bta_av_rc_create ACP handle exist for shdl:0
I (22330) BT_AV: A2DP connection state: Connecting, [a8:9c:ed:90:fa:e5]
I (22560) BT_AV: A2DP audio stream configuration, codec type 0
[00:03:37.154601] bt_sink_cmd_handler:155 Setting BT sample rate 44100
I (22560) BT_AV: Configure audio player 21-15-2-35
I (22570) BT_AV: Audio player configured, sample rate=44100
W (22780) BT_APPL: new conn_srvc id:19, app_id:0
I (22780) BT_AV: A2DP connection state: Connected, [a8:9c:ed:90:fa:e5]
I (23110) RCCT: AVRC conn_state evt: state 1, [a8:9c:ed:90:fa:e5]
I (23140) RCCT: remote rn_cap: count 6, bitmask 0xe26
I (23170) RCCT: AVRC metadata rsp: attribute id 0x1,
I (23180) RCCT: AVRC metadata rsp: attribute id 0x2,
I (23180) RCCT: AVRC metadata rsp: attribute id 0x4,
I (23190) RCCT: AVRC metadata rsp: attribute id 0x40,
I (23410) RCTG: AVRC register event notification: 13, param: 0x0

I (64950) BT_AV: Playback status changed: 0x2
W (64960) BT_AV: Not yet in BT connected mode: 0x2
I (65080) BT_LOG: bta_av_link_role_ok hndl:x41 role:1 conn_audio:x1 bits:1 features:x824b

W (65080) BT_APPL: new conn_srvc id:19, app_id:1
I (65090) BT_AV: A2DP audio state: Started
[00:04:19.696679] bt_sink_cmd_handler:130 BT sink started
[00:04:19.697994] bt_sink_cmd_handler:141 BT playing
I (65100) BT_AV: Track changed
I (65110) BT_AV: Playback status changed: 0x1
[00:04:19.732882] output_thread_i2s:406 Output state is 2
I (65160) RCCT: AVRC metadata rsp: attribute id 0x1, She Knows (feat. Amber Coffman & Cults) |
I (65170) RCCT: AVRC metadata rsp: attribute id 0x2, J. Cole
I (65180) RCCT: AVRC metadata rsp: attribute id 0x4, Born Sinner (Deluxe Version)
I (65180) RCCT: AVRC metadata rsp: attribute id 0x40, 296545

I (83770) BT_AV: Track changed
I (83780) BT_AV: Playback status changed: 0x2
[00:04:38.375519] bt_sink_cmd_handler:151 BT paused, just silence
I (83860) RCCT: AVRC metadata rsp: attribute id 0x1, Mona Lisa
I (83860) RCCT: AVRC metadata rsp: attribute id 0x2, Kool savas
I (83870) RCCT: AVRC metadata rsp: attribute id 0x4,
I (83880) RCCT: AVRC metadata rsp: attribute id 0x40, 200568
I (84370) BT_AV: Playback status changed: 0x0
[00:04:38.964991] bt_sink_cmd_handler:147 BT stopped
[00:04:38.982234] output_thread_i2s:406 Output state is 0
I (84630) BT_AV: Playback status changed: 0x2
[00:04:39.232802] bt_sink_cmd_handler:151 BT paused, just silence
I (84650) BT_AV: Track changed
I (84730) BT_AV: Playback status changed: 0x1
[00:04:39.331063] bt_sink_cmd_handler:141 BT playing
I (84740) RCCT: AVRC metadata rsp: attribute id 0x1, Mona Lisa
I (84740) RCCT: AVRC metadata rsp: attribute id 0x2, Kool savas
I (84750) RCCT: AVRC metadata rsp: attribute id 0x4,
[00:04:39.353760] output_thread_i2s:406 Output state is 2
I (84760) RCCT: AVRC metadata rsp: attribute id 0x40, 200573

I (101040) BT_AV: Playback status changed: 0x2
[00:04:55.641095] bt_sink_cmd_handler:151 BT paused, just silence
E (102680) BT_APPL: bta_av_str_stopped:audio_open_cnt=1, p_data 0x0
I (102680) RCCT: AVRC conn_state evt: state 0, [00:00:00:00:00:00]
I (102680) BT_AV: A2DP audio state: Stopped
[00:04:57.282075] bt_sink_cmd_handler:136 BT sink stopped
I (102700) BT_AV: A2DP connection state: Disconnected, [a8:9c:ed:90:fa:e5]
[00:04:57.325974] output_thread_i2s:406 Output state 

Windows:
E (197000) BT_APPL: bta_av_rc_create ACP handle exist for shdl:0
I (197000) BT_AV: A2DP connection state: Connecting, [04:ed:33:8b:73:23]
I (197310) BT_AV: A2DP audio stream configuration, codec type 0
[00:06:31.907957] bt_sink_cmd_handler:155 Setting BT sample rate 44100
I (197310) BT_AV: Configure audio player 21-15-2-35
I (197320) BT_AV: Audio player configured, sample rate=44100
I (197450) RCTG: AVRC conn_state evt: state 1, [04:ed:33:8b:73:23]
W (197690) BT_APPL: new conn_srvc id:19, app_id:0
I (197690) BT_AV: A2DP connection state: Connected, [04:ed:33:8b:73:23]
I (197780) RCTG: AVRC register event notification: 13, param: 0x0
I (197900) RCCT: AVRC conn_state evt: state 1, [04:ed:33:8b:73:23]
I (197900) RCCT: AVRC remote features 24b, TG features 11
I (197910) RCTG: AVRC remote features 24b, CT features 3
I (197990) RCCT: remote rn_cap: count 6, bitmask 0xf06
I (198170) RCCT: AVRC metadata rsp: attribute id 0x1, Bauer sucht Frau - Schäfer Heinricht sucht seine Traumfrau | Switch Reloaded Classics #reupload
I (198190) RCCT: AVRC metadata rsp: attribute id 0x2, Switch reloaded
E (200930) BT_APPL: bta_dm_pm_btm_status hci_status=36
I (247560) BT_AV: Playback status changed: 0x1
W (247560) BT_AV: Not yet in BT connected mode: 0x1
I (248580) BT_LOG: bta_av_link_role_ok hndl:x41 role:1 conn_audio:x1 bits:1 features:x824b

W (248580) BT_APPL: new conn_srvc id:19, app_id:1
I (248590) BT_AV: A2DP audio state: Started
[00:07:23.194328] bt_sink_cmd_handler:130 BT sink started
[00:07:23.195999] bt_sink_cmd_handler:141 BT playing
[00:07:23.240197] output_thread_i2s:406 Output state is 2
I (253910) RCTG: AVRC set absolute volume: 2%
I (253910) RCTG: Volume is set by remote controller 2%

[00:07:28.509953] volume:155 TAS57xx volume (L:0 R:0)
I (254830) RCTG: AVRC set absolute volume: 3%
I (254830) RCTG: Volume is set by remote controller 3%

[00:07:29.424431] volume:155 TAS57xx volume (L:3 R:3)
I (255590) RCTG: AVRC set absolute volume: 6%
I (255590) RCTG: Volume is set by remote controller 6%

[00:07:30.188233] volume:155 TAS57xx volume (L:16 R:16)
[00:07:30.333991] discover_server:805 sending discovery
I (257020) RCTG: AVRC set absolute volume: 3%
I (257020) RCTG: Volume is set by remote controller 3%

[00:07:31.619630] volume:155 TAS57xx volume (L:3 R:3)
I (259960) BT_AV: Playback status changed: 0x2

Right now, I'm at v0.5.543-IDFv3.1.5-SqueezeAmp8M

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.