Compare commits

..

5 Commits

Author SHA1 Message Date
Philippe G
4b704faaf3 fix equalizer NVS storage - release 2022-01-15 00:42:03 -08:00
philippe44
1a8ab21b59 Update README.md 2022-01-13 18:42:53 -08:00
Philippe G
015ba4f970 remove compile warnings 2022-01-12 18:12:49 -08:00
philippe44
8c61f9c18d Update README.md 2022-01-12 15:43:10 -08:00
Philippe G
58dc607f55 displayer can_artwork function 2022-01-11 20:16:10 -08:00
7 changed files with 28 additions and 9 deletions

View File

@@ -6,15 +6,17 @@ Squeezelite-esp32 is an audio software suite made to run on espressif's ESP32 wi
- 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](https://forums.slimdevices.com/) 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 from a Spotify controller
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
- Buttons and Rotary Encoder and map/combine them to various functions (play, pause, volume, next ...)
- GPIO expander (buttons, led and rotary)
- IR receiver (no pullup resistor or capacitor needed, just the 38kHz receiver)
- Monochrome, GrayScale or Color displays using SPI or I2C (supported drivers are SH1106, SSD1306, SSD1322, SSD1326/7, SSD1351, ST7735, ST7789 and ILI9341).
- Ethernet using a Microchip LAN8720 with RMII interface or Davicom DM9051 over SPI.
- Ethernet using a Microchip LAN8720 with RMII interface or Davicom DM9051/W5500 over SPI.
Other features include
@@ -213,11 +215,12 @@ You can tweak how the vu-meter and spectrum analyzer are displayed, as well as s
The NVS parameter "metadata_config" sets how metadata is displayed for AirPlay and Bluetooth. Syntax is
```
[format=<display_content>][,speed=<speed>][,pause=<pause>]
[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). Vcc, GND and output are the only pins that need to be connected, no pullup, no filtering capacitor, it's a straight connection.

View File

@@ -281,6 +281,13 @@ void displayer_artwork(uint8_t *data) {
}
/****************************************************************************************
*
*/
bool displayer_can_artwork(void) {
return displayer.artwork.active;
}
/****************************************************************************************
*
*/

View File

@@ -40,4 +40,5 @@ void displayer_control(enum displayer_cmd_e cmd, ...);
void displayer_metadata(char *artist, char *album, char *title);
void displayer_artwork(uint8_t *data);
void displayer_timer(enum displayer_time_e mode, int elapsed, int duration);
bool displayer_can_artwork(void);
char * display_get_supported_drivers(void);

View File

@@ -11,3 +11,8 @@ idf_component_register( SRCS
PRIV_REQUIRES console app_update tools services spi_flash platform_config vfs pthread wifi-manager platform_config newlib telnet display squeezelite)
target_link_libraries(${COMPONENT_LIB} "-Wl,--undefined=GDS_DrawPixelFast")
target_link_libraries(${COMPONENT_LIB} ${build_dir}/esp-idf/$<TARGET_PROPERTY:RECOVERY_PREFIX>/lib$<TARGET_PROPERTY:RECOVERY_PREFIX>.a )
set_source_files_properties(cmd_config.c
PROPERTIES COMPILE_FLAGS
-Wno-unused-function
)

View File

@@ -272,9 +272,9 @@ static int stdin_dummy(const char * path, int flags, int mode) { return 0; }
void initialize_console() {
/* Minicom, screen, idf_monitor send CR when ENTER key is pressed (unused if we redirect stdin) */
esp_vfs_dev_uart_set_rx_line_endings(ESP_LINE_ENDINGS_CR);
esp_vfs_dev_uart_port_set_rx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CR);
/* Move the caret to the beginning of the next line on '\n' */
esp_vfs_dev_uart_set_tx_line_endings(ESP_LINE_ENDINGS_CRLF);
esp_vfs_dev_uart_port_set_tx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CRLF);
/* Configure UART. Note that REF_TICK is used so that the baud rate remains
* correct while APB frequency is changing in light sleep mode.

View File

@@ -20,6 +20,11 @@ set_source_files_properties(mad.c pcm.c flac.c alac.c helix-aac.c vorbis.c opus.
-Wno-maybe-uninitialized
)
set_source_files_properties(wm8978/wm8978.c
PROPERTIES COMPILE_FLAGS
-Wno-unused-function
)
add_definitions(-DLINKALL -DLOOPBACK -DNO_FAAD -DEMBEDDED -DTREMOR_ONLY -DCUSTOM_VERSION=${BUILD_NUMBER})
if (${DEPTH} EQUAL "32")

View File

@@ -89,16 +89,14 @@ void equalizer_close(void) {
*/
void equalizer_update(s8_t *gain) {
char config[EQ_BANDS * 4 + 1] = { };
char *p = config;
int n = 0;
for (int i = 0; i < EQ_BANDS; i++) {
equalizer.gain[i] = gain[i];
if (gain[i] < 0) *p++ = '-';
*p++ = (gain[i] / 10) + 0x30;
*p++ = (gain[i] % 10) + 0x30;
if (i < EQ_BANDS - 1) *p++ = ',';
n += sprintf(config + n, "%d,", gain[i]);
}
config[n-1] = '\0';
config_set_value(NVS_TYPE_STR, "equalizer", config);
equalizer.update = true;
}