From 187886c731ae2b2afe6b960a09d74444c177d6ea Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Tue, 9 Sep 2025 10:55:00 +1000 Subject: [PATCH 1/3] Upgrade to latest Korvo2 BSP --- examples/voice_agent/main/idf_component.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/voice_agent/main/idf_component.yml b/examples/voice_agent/main/idf_component.yml index e30c15d..a104d38 100644 --- a/examples/voice_agent/main/idf_component.yml +++ b/examples/voice_agent/main/idf_component.yml @@ -6,8 +6,7 @@ dependencies: path: ../../../components/third_party/esp-webrtc-solution/components/codec_board # Eventually, the BSP will perform all the functions of the codec_board component. # It currently is used because codec_board is required to support AEC. - esp32_s3_korvo_2: - version: ">=0.1" + esp32_s3_korvo_2: ~4.1.0 render_impl: path: ../../../components/third_party/esp-webrtc-solution/components/av_render/render_impl livekit_sandbox: From ab2f48509d57c3fc406b060df5a0f6c0b347eb87 Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Tue, 9 Sep 2025 10:55:25 +1000 Subject: [PATCH 2/3] Update BSP usage --- examples/voice_agent/main/board.c | 2 -- examples/voice_agent/main/example.c | 11 ++++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/voice_agent/main/board.c b/examples/voice_agent/main/board.c index e28b4df..57c92ed 100755 --- a/examples/voice_agent/main/board.c +++ b/examples/voice_agent/main/board.c @@ -17,8 +17,6 @@ void board_init() // Initialize board support package and LEDs bsp_i2c_init(); bsp_leds_init(); - bsp_led_set(BSP_LED_RED, true); - bsp_led_set(BSP_LED_BLUE, true); // Initialize temperature sensor temperature_sensor_config_t temp_sensor_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(10, 50); diff --git a/examples/voice_agent/main/example.c b/examples/voice_agent/main/example.c index c230ccc..752431b 100644 --- a/examples/voice_agent/main/example.c +++ b/examples/voice_agent/main/example.c @@ -65,20 +65,21 @@ static void set_led_state(const livekit_rpc_invocation_t* invocation, void* ctx) } const char *color = color_entry->valuestring; + bool state = cJSON_IsTrue(state_entry); bsp_led_t led; if (strncmp(color, "red", 3) == 0) { - led = BSP_LED_RED; - } else if (strncmp(color, "blue", 4) == 0) { + // TODO: there is a bug in the Korvo2 BSP which causes the LED pins to be swapped + // (i.e., blue is mapped to red and red is mapped to blue): https://github.com/espressif/esp-bsp/pull/632 led = BSP_LED_BLUE; + } else if (strncmp(color, "blue", 4) == 0) { + led = BSP_LED_RED; } else { error = "Unsupported color"; break; } - // There is a known bug in the BSP component, so we need to invert the state for now. - // See https://github.com/espressif/esp-bsp/pull/610. - if (bsp_led_set(led, !state) != ESP_OK) { + if (bsp_led_set(led, state) != ESP_OK) { error = "Failed to set LED state"; break; } From d2135a36f11bb95b8a1aaa6f545ba6e925efa5b3 Mon Sep 17 00:00:00 2001 From: Jacob Gelman <3182119+ladvoc@users.noreply.github.com> Date: Tue, 9 Sep 2025 10:59:21 +1000 Subject: [PATCH 3/3] Pin version --- examples/voice_agent/main/idf_component.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/voice_agent/main/idf_component.yml b/examples/voice_agent/main/idf_component.yml index a104d38..0198b8c 100644 --- a/examples/voice_agent/main/idf_component.yml +++ b/examples/voice_agent/main/idf_component.yml @@ -6,7 +6,7 @@ dependencies: path: ../../../components/third_party/esp-webrtc-solution/components/codec_board # Eventually, the BSP will perform all the functions of the codec_board component. # It currently is used because codec_board is required to support AEC. - esp32_s3_korvo_2: ~4.1.0 + esp32_s3_korvo_2: "4.1.0" render_impl: path: ../../../components/third_party/esp-webrtc-solution/components/av_render/render_impl livekit_sandbox: