diff --git a/components/app_composition/src/runtime/app_composition_default_runtime.c b/components/app_composition/src/runtime/app_composition_default_runtime.c index effb0e7..9b239d4 100644 --- a/components/app_composition/src/runtime/app_composition_default_runtime.c +++ b/components/app_composition/src/runtime/app_composition_default_runtime.c @@ -28,7 +28,7 @@ typedef enum { APP_COMPOSITION_BOOT_STAGE_POWER_HOLD = 1, APP_COMPOSITION_BOOT_STAGE_AUDIO_INIT, APP_COMPOSITION_BOOT_STAGE_BOOT_SOUND, - APP_COMPOSITION_BOOT_STAGE_AUDIO_RELEASE, + APP_COMPOSITION_BOOT_STAGE_AUDIO_READY, APP_COMPOSITION_BOOT_STAGE_LCD_DEVICE, APP_COMPOSITION_BOOT_STAGE_LCD_RENDER_LOOP, APP_COMPOSITION_BOOT_STAGE_PLATFORM_DOMAIN, @@ -83,9 +83,9 @@ static esp_err_t app_composition_run_plan_a_boot_sequence(void) "Boot sound unavailable, continue boot: %s", esp_err_to_name(boot_sound_err)); } - app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_AUDIO_RELEASE, - "audio_release", - "boot_sound_policy_end"); + app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_AUDIO_READY, + "audio_ready", + "boot_sound_policy_end_keep_runtime"); #if CONFIG_TQ_SCREEN_ENABLE app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_LCD_DEVICE, diff --git a/components/control_plane/src/multimodal/control_plane_multimodal_runtime.c b/components/control_plane/src/multimodal/control_plane_multimodal_runtime.c index af07327..27be0c7 100644 --- a/components/control_plane/src/multimodal/control_plane_multimodal_runtime.c +++ b/components/control_plane/src/multimodal/control_plane_multimodal_runtime.c @@ -66,6 +66,7 @@ static bool s_multimodal_autostart_stop_requested; static bool s_multimodal_watchdog_task_starting; static bool s_multimodal_autostart_task_starting; static bool s_model_command_dispatched; +static bool s_server_success_prompt_played; static control_plane_model_command_callback_t s_model_command_cb; static void *s_model_command_cb_user_data; static portMUX_TYPE s_multimodal_runtime_lock = portMUX_INITIALIZER_UNLOCKED; @@ -587,12 +588,22 @@ static void control_plane_multimodal_event_bridge(control_plane_multimodal_event (void)user_data; switch (event) { - case CONTROL_PLANE_MULTIMODAL_EVENT_TRANSPORT_CONNECTED: - (void)domain_runtime_behavior_play_prompt_file(CONTROL_PLANE_SERVER_SUCCESS_PROMPT_FILE); + case CONTROL_PLANE_MULTIMODAL_EVENT_TRANSPORT_CONNECTED: { + bool should_play_prompt = false; + portENTER_CRITICAL(&s_multimodal_runtime_lock); + if (!s_server_success_prompt_played) { + s_server_success_prompt_played = true; + should_play_prompt = true; + } + portEXIT_CRITICAL(&s_multimodal_runtime_lock); + if (should_play_prompt) { + (void)domain_runtime_behavior_play_prompt_file(CONTROL_PLANE_SERVER_SUCCESS_PROMPT_FILE); + } if (CONTROL_PLANE_MULTIMODAL_AUTO_START_FLAG) { schedule_autostart_if_enabled(); } break; + } case CONTROL_PLANE_MULTIMODAL_EVENT_TRANSPORT_DISCONNECTED: control_plane_multimodal_stop_uplink(); diff --git a/components/control_plane/src/multimodal/control_plane_multimodal_session_service.c b/components/control_plane/src/multimodal/control_plane_multimodal_session_service.c index 5207687..dedbf9a 100644 --- a/components/control_plane/src/multimodal/control_plane_multimodal_session_service.c +++ b/components/control_plane/src/multimodal/control_plane_multimodal_session_service.c @@ -1515,7 +1515,6 @@ void control_plane_multimodal_stop(void) if (transport_stop_err != ESP_OK) { ESP_LOGW(TAG, "Multimodal transport stop ended with %s", esp_err_to_name(transport_stop_err)); } - domain_runtime_multimodal_audio_deinit(); control_plane_multimodal_auth_clear(); if (lock_state()) { diff --git a/components/control_plane/src/runtime/control_plane_connectivity_runtime.c b/components/control_plane/src/runtime/control_plane_connectivity_runtime.c index 6e35229..dd80438 100644 --- a/components/control_plane/src/runtime/control_plane_connectivity_runtime.c +++ b/components/control_plane/src/runtime/control_plane_connectivity_runtime.c @@ -114,12 +114,6 @@ static esp_err_t control_plane_connect_sta_with_feedback(int timeout_ms, break; } - if (domain_runtime_multimodal_audio_is_initialized() && - !domain_runtime_multimodal_audio_is_uplink_running()) { - domain_runtime_multimodal_audio_deinit(); - ESP_LOGI(TAG, "Released multimodal audio before STA connect attempt %d", attempt); - } - err = domain_runtime_wifi_portal_connect_sta(attempt_timeout_ms); if (err == ESP_OK) { break; @@ -250,8 +244,7 @@ esp_err_t control_plane_play_boot_sound(int timeout_ms) ESP_LOGW(TAG, "Boot sound playback failed: %s", esp_err_to_name(play_err)); } - domain_runtime_multimodal_audio_deinit(); - ESP_LOGI(TAG, "Boot sound audio resources released"); + ESP_LOGI(TAG, "Boot sound audio resources kept for runtime"); return play_err; }