diff --git a/esphome/components/sendspin/__init__.py b/esphome/components/sendspin/__init__.py index 1348bf2bfc3..35280020bab 100644 --- a/esphome/components/sendspin/__init__.py +++ b/esphome/components/sendspin/__init__.py @@ -206,12 +206,15 @@ async def to_code(config: ConfigType) -> None: ) # sendspin-cpp library - esp32.add_idf_component(name="sendspin/sendspin-cpp", ref="0.4.0") + esp32.add_idf_component(name="sendspin/sendspin-cpp", ref="0.5.0") cg.add_define("USE_SENDSPIN", True) # for MDNS data = _get_data() + # The color role is not yet wired up in ESPHome; disable it in the library for now. + esp32.add_idf_sdkconfig_option("CONFIG_SENDSPIN_ENABLE_COLOR", False) + # Configure Sendspin roles based on requested features (ESPHome internally via USE_SENDSPIN_*) # and disable building unused code paths in the sendspin-cpp library (IDF SDKConfig via CONFIG_SENDSPIN_ENABLE_*). if data.artwork_support: @@ -264,7 +267,7 @@ async def to_code(config: ConfigType) -> None: # Library defaults: priority 18 (one above httpd_priority 17 so the decoder is not # starved by the HTTP server during the initial encoded-audio burst at stream start), - # interpolation/decode buffer locations PREFER_EXTERNAL. + # decode buffer location PREFER_EXTERNAL. player_struct_fields = [ ("audio_formats", audio_format_structs), ("audio_buffer_capacity", player_cfg[CONF_BUFFER_SIZE]), diff --git a/esphome/components/sendspin/media_source/sendspin_media_source.cpp b/esphome/components/sendspin/media_source/sendspin_media_source.cpp index 0fdfb01c55f..88ff234e831 100644 --- a/esphome/components/sendspin/media_source/sendspin_media_source.cpp +++ b/esphome/components/sendspin/media_source/sendspin_media_source.cpp @@ -188,14 +188,6 @@ void SendspinMediaSource::on_stream_end() { } } -// THREAD CONTEXT: Main loop (PlayerRoleListener lifecycle callback) -void SendspinMediaSource::on_stream_clear() { - if (this->get_state() != media_source::MediaSourceState::IDLE) { - // Only set to IDLE if we were previously in a non-IDLE state, to avoid duplicate state changes - this->set_state_(media_source::MediaSourceState::IDLE); - } -} - // THREAD CONTEXT: Main loop (PlayerRoleListener callback) void SendspinMediaSource::on_volume_changed(uint8_t volume) { this->request_volume_(volume / 100.0f); } diff --git a/esphome/components/sendspin/media_source/sendspin_media_source.h b/esphome/components/sendspin/media_source/sendspin_media_source.h index 3b31716127c..843578783e0 100644 --- a/esphome/components/sendspin/media_source/sendspin_media_source.h +++ b/esphome/components/sendspin/media_source/sendspin_media_source.h @@ -49,9 +49,6 @@ class SendspinMediaSource : public SendspinChild, /// @brief Called when the audio stream ends (main loop thread). void on_stream_end() override; - /// @brief Called when the audio stream is cleared (main loop thread). - void on_stream_clear() override; - /// @brief Called when volume changes (main loop thread). void on_volume_changed(uint8_t volume) override; diff --git a/esphome/idf_component.yml b/esphome/idf_component.yml index 45aaa827c87..814a4031c12 100644 --- a/esphome/idf_component.yml +++ b/esphome/idf_component.yml @@ -100,6 +100,6 @@ dependencies: esp32async/asynctcp: version: 3.4.91 sendspin/sendspin-cpp: - version: 0.4.0 + version: 0.5.0 lvgl/lvgl: version: 9.5.0