Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 19 12311 ... LastLast
Results 1 to 10 of 184
  1. #1
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,058

    ANNOUNCE: Squeezelite-ESP32 (dedicated thread)

    I've decided to separate the SqueezeAMP (HW) and the SqueezeliteESP32 (SW) threads for better clarity. So, this is a sort of re-announce of the software only work that we are doing with @sle118 and contributions from @daduke.

    The Squeezelite-ESP32 shall not be confused with the squeezeesp32 project that was doing a native re-implementation of the slimproto on ESP8266/ESP32 devices, even with very small memory. This project is a port of Squeezelite to ESP32 devices that have at least 4MB of flash and 4MB os SRAM (e.g. WROVER modules, but not WROOM). The project technical part lives here https://github.com/sle118/squeezelite-esp32 and you'll find all the details how configure it.

    • full port of squeezelite (up to 192kHz samplerate, but 16 bits only)
    • pcm, wav, aif, alac, flac, mp3, ogg, ogf, ops, aac (mp4) codecs
    • resampling to and from any rate
    • 10-bands equalizer
    • synchronization with other squeezeboxes
    • output to I2S DAC. Special drivers exist for TAS5754/56/13/80 and AC101 but most I2S-connected DAC will work and it's possible to configure rudimentary I2C commands.
    • SPDIF output using one wire
    • Bluetooth source to send LMS audio to a BT speaker
    • Bluetooth sink (play from any BT-capable devices, iPhone, Android ...)
    • AirPlay sink with synchronization (play from any iOS/iTunes or compatible device)
    • Display support for monochrome SH1106 (128x64), SSD1306 (128x32), grayscale SSD1322 (256x32), SSD1326 (256x64), SSD1327 (128x128), color 65k ST7735 (128x160) and ST7789 (240x320) with deemable backlight
    • Buttons
    • Rotary encoder
    • InfraRed
    • Control LED (green & red - both deemable)
    • Web Interface for configuration and updates

    Display is very much like a Boom/SB3/Transporter with a few visual improvements as height is larger than classical SB. It supports VU-meter, spectrum analyzer, artwork. Note that display, Buttons, Rotary encoder, InfraRed, SPDIF, I2S DAC are all optional. I strongly recommend using Michael's plugin MusicInfoSCR to wteak display.

    There are pre-existing builds for SqueezeAMP, ESP-A1S module based devices and then a generic I2S version. All option can be sets by a dedicated web interface, so you can use the I2S generic version as well on the SqueezeAMP and the ESP-A1S, it's just more config work on you . Just look here https://github.com/sle118/squeezelit...ster/README.md

    Example of kit using Espressif's native WROVER can be found here https://a.aliexpress.com/_dY83WTf and also using the 3rd-party ESP32-A1S module can be found here https://a.aliexpress.com/_dZMwS57 but again, any device based on these module will work. The main difference is that the WROVER does not include a DAC, you must add one where the A1S does have a build-in DAC.

    Don't forget to add the LMS associated plugin here https://raw.githubusercontent.com/sl...lugin/repo.xml. It's not mandatory for the SqueezeESP32 to work, but if you want display or equalizer, then you need it.

    If you don't use a SqueezeAMP where I pre-load the basic firmware then you should first flash your device with a version found here https://github.com/sle118/squeezelite-esp32/tags, download once of the .zip version and use the espressif download tool here https://www.espressif.com/en/support...ad/other-tools. You want to download:
    • ota_data_initial.bin at 0xd000
    • bootloader.bin at 0x1000
    • partition-table.bin at 0x8000
    • recovery.bin at 0x10000

    You can also use the python downloader directly with
    Code:
    python ${IDF_PATH}/components/esptool_py/esptool/esptool.py --chip esp32 --port ${ESPPORT} --baud ${ESPBAUD} --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xd000 ota_data_initial.bin 0x1000 bootloader.bin 0x10000 recovery.bin 0x8000 partitions.bin
    Once this is done, the ESP32 will broadcast a WiFi Access Point that you can use from any WiFi-enable device. Default password is 'squeezelite' and from there, follow the webUI to configure your device. Then, once it is connected o your home WiFi, connect to it again using any web browser and load a full firmware. Again, look at the README on github. You should never had to use again this initial download procedure (unless you want to or have bricked your device), all updated can be done through the WebUI.

    We are maintaining two versions that will merge at some point: The "bleeding edge" (maintained by @sle118) with used a more version of the espressif toolkit and a better UI interface (including using display during firmware update) and the "classical" version I'm maintaining which is using an older version of espressif's kit but this is where I do more tests and introduce audio & display features. You can flip-flop between version.
    Last edited by philippe_44; 2020-08-03 at 17:31.
    LMS 7.9 on Pi 3B+ & Odroid-C2 - SqueezeAMP!, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3

  2. #2
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,058

    Updated information

    I've pushed a new release of the master version that has important changes & improvements

    - supports LCD drivers like ST7735 and ST7789 that can go up to 240x320 color in 65k and 262k (ST7735). I strongly recommend to stick with 65k for performances reasons
    - supports (for fun) the smart watch T-WATCH2020
    - lot of refactoring on audio side to allow some use of unknown codecs that require an I2C (see doc on GitHub, I don't want to re-describe here how to use that but basically you can set a series of commands to init and power the DAC
    - simplified menuconfig for the adventurous that rebuild their own version
    - deemable green & red LED
    - amp control gpio active level can be set
    - one small negative thing: there is no more autodetect of the DAC. If you use the I2S version on a SqueezeAMP or a ESP32-A1S, you have to set the dac_config parameter. Again, if you use the dedicated builds, there is nothing to do
    Last edited by philippe_44; 2020-08-03 at 00:27.
    LMS 7.9 on Pi 3B+ & Odroid-C2 - SqueezeAMP!, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3

  3. #3
    Junior Member
    Join Date
    Jan 2020
    Posts
    22

    Prioritise Bluetooth

    I was trying out the Squeezelite ESP32 on an A1s demo board running v0.5.640-v3.1.5-ESP32-A1S today and wanted to switch between LMS and Bluetooth there seems to be some issues with Bluetooth playback after switching between an active LMS connection and Bluetooth. I find that after doing so I can still create the connection but I will not have any audio output through the line-out jack unless I reset both board and restart player. In general I can not see how Squeezelite handles the priority of two simultaneous connections to one player such as trying to connect to an active player connected to LMS and connecting by Bluetooth. Handling this by prioritising one connection could be a way to force a clean exit and change over between sources. I would think that Bluetooth could be prioritised as the normal use would probably be LMS , so this would run in normal use, Bluetooth would be more likely for short term source, and when so it would be a priority. If you can see a better logic then that that would be OK by me, I am more interested in finding a way to cleanly switch between the sources with minimal user interaction

  4. #4
    Senior Member
    Join Date
    Dec 2009
    Location
    Quebec City, Canada
    Posts
    326
    Quote Originally Posted by justjason View Post
    I find that after doing so I can still create the connection but I will not have any audio output through the line-out jack unless I reset both board and restart player.
    Could you please describe the steps to reproduce the issue, in a sequential manner?

    I suspect there might be an issue with the Bluetooth state machine, but need some more info.

    Thank you!
    LMS 7.9 - 1xRadio, 1xBoom, 5xDuet,3xTouch, 1 SB2. Sony PlayStation, Emby, Chromecast v1 and v2 and...
    6xSqueezeAmp!
    Contributing to Folding@Home : https://stats.foldingathome.org/donor/squeezelite-esp32

  5. #5
    Junior Member
    Join Date
    Jan 2020
    Posts
    22
    I have managed to narrow this down to an issue with the pause function handling between LMS and Squeezelite.
    to reproduce it is quite simple.
    1. Start LMS and Squeezelite.
    2. Start a Bluetooth stream to the the Squeezelite.
    3. Start a Radio stream from LMS. ( should automatically stop the Bluetooth stream - great )
    4. Try and restart Bluetooth stream ( will not work - great )
    5. Pause the LMS stream.
    6. Restart the Bluetooth stream ( will start, but audio from Bluetooth is muted)
    7. Stop LMS steam ( nothing changes -BT stream still runs , audio muted )
    8. Restart LMS stream ( BT is stoped )
    9 Stop LMS steam
    10. Restart BT stream (all good )

    It makes sense to me that when the LMS stream is started the BT steam is automatically stopped and blocked. However it can be confusing when the LMS stream has been paused and the Squeezelite is seemingly unused that the the BT stream can be successfully started but no audio comes through. I do not know if there is a conventional behaviour , but could it be an idea to handle the paused LMS stream in a similar way, ie, blocks the starting of the BT stream until the LMS stream is cleanly stopped.
    I only discovered this behaviour after finding the option to add the stop button next to the play button on LMS. Before that I was using the pause button thinking that this was the standard LMS way and was thinking the whole time that I had "stopped" the LMS stream and the BT stream was starting
    and running and thought so why was there no audio after switching between sources.
    Last edited by justjason; 2020-08-12 at 04:19.

  6. #6
    Junior Member
    Join Date
    Jan 2020
    Posts
    22

    Stand-alone Bluetooth streaming

    I am not sure if I have missed something ,but when I have an instance of LMS running ( but not streaming anything ) I can connect and steam to the Squeezelite via Bluetooth successfully. However If LMS is shut down, I am able to make a BT connection to the Squeezelite and start a stream, but there is no audio output. Is it possible to use the Squeezelite as a stand-alone BT device without LMS running in the background ?

    #### EDIT: ####

    I found what was causing this issue. Even after cleanly stopping the LMS stream it was necessary to remove the radio streams I had in the playlist. After clearing those out, It worked perfect. This raises the next issue, with cleanly switching between streams. Is it really necessary to have to stop and clear-out the playlist just to switch sources ?
    Last edited by justjason; 2020-08-12 at 04:18.

  7. #7
    Senior Member
    Join Date
    Feb 2008
    Posts
    320

    no s/pdif in 604

    Upgraded from fw: v0.5.604-IDFv3.1.5-I2S-4MFlash to v0.5.641 on my ESP-WROOM S/PDIF system via OTA, but there is no sound.
    Checked with my scope and there is no S/PDIF signal coming out. Went back to 604 and am back to normal.

    Did I miss a config change or something?
    Thx

  8. #8
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,058
    Quote Originally Posted by ElFishi View Post
    Upgraded from fw: v0.5.604-IDFv3.1.5-I2S-4MFlash to v0.5.641 on my ESP-WROOM S/PDIF system via OTA, but there is no sound.
    Checked with my scope and there is no S/PDIF signal coming out. Went back to 604 and am back to normal.

    Did I miss a config change or something?
    Thx
    There is no default GPIO config anymore for SPDIF or DAC in I2S version, it was causing too many issues, so you have to set them up in spdif_config (using the webUI). I forgot to mention it, sorry
    LMS 7.9 on Pi 3B+ & Odroid-C2 - SqueezeAMP!, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3

  9. #9
    Senior Member
    Join Date
    Feb 2008
    Posts
    320
    my spdif_config was already 'bck=33,ws=25,do=32'
    Do I need to change this?

    rest of config:
    Code:
    {"timestamp":1597299341149,"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-Vector","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-Vector","type":33},"autoexec":{"value":"1","type":33},"autoexec1":{"value":"squeezelite -b 500:2000 -d all=info -n \"Vector\" -o SPDIF -R -Z 192000","type":33},"bat_config":{"value":"","type":33},"bt_name":{"value":"ESP32-BT-Vector","type":33},"bt_sink_pin":{"value":"1234","type":33},"bypass_wm":{"value":"0","type":33},"dac_config":{"value":"","type":33},"dac_controlset":{"value":"","type":33},"display_config":{"value":"I2C,width=128,height=64,address=60,driver=SH1106,VFLIP,HFLIP","type":33},"enable_airplay":{"value":"1","type":33},"enable_bt_sink":{"value":"1","type":33},"host_name":{"value":"Vector","type":33},"i2c_config":{"value":"sda=22,scl=23","type":33},"jack_mutes_amp":{"value":"n","type":33},"led_brightness":{"value":"","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":"12=green:1,13=amp","type":33},"spdif_config":{"value":"bck=33,ws=25,do=32","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}}

  10. #10
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,058
    Quote Originally Posted by ElFishi View Post
    my spdif_config was already 'bck=33,ws=25,do=32'
    Do I need to change this?

    rest of config:
    Code:
    {"timestamp":1597299341149,"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-Vector","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-Vector","type":33},"autoexec":{"value":"1","type":33},"autoexec1":{"value":"squeezelite -b 500:2000 -d all=info -n \"Vector\" -o SPDIF -R -Z 192000","type":33},"bat_config":{"value":"","type":33},"bt_name":{"value":"ESP32-BT-Vector","type":33},"bt_sink_pin":{"value":"1234","type":33},"bypass_wm":{"value":"0","type":33},"dac_config":{"value":"","type":33},"dac_controlset":{"value":"","type":33},"display_config":{"value":"I2C,width=128,height=64,address=60,driver=SH1106,VFLIP,HFLIP","type":33},"enable_airplay":{"value":"1","type":33},"enable_bt_sink":{"value":"1","type":33},"host_name":{"value":"Vector","type":33},"i2c_config":{"value":"sda=22,scl=23","type":33},"jack_mutes_amp":{"value":"n","type":33},"led_brightness":{"value":"","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":"12=green:1,13=amp","type":33},"spdif_config":{"value":"bck=33,ws=25,do=32","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 might have screwed something then (I did a fair bit of changes in that part). I'll try tomorrow. What do the log say wrt SPDIF when booting?
    LMS 7.9 on Pi 3B+ & Odroid-C2 - SqueezeAMP!, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •