Skip to content

Commit c14a6cb

Browse files
committed
Merge branch 'bugfix/fix_openai_crash' into 'main'
Add P4 openai demo support, fix crash See merge request adf/esp-webrtc-solution!22
2 parents 3a52782 + 693b91e commit c14a6cb

File tree

7 files changed

+40
-3
lines changed

7 files changed

+40
-3
lines changed

solutions/doorbell_demo/main/board.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ void init_board()
2424
// Notes when use playback and record at same time, must set reuse_dev = false
2525
codec_init_cfg_t cfg = {.reuse_dev = false};
2626
init_codec(&cfg);
27-
board_lcd_init();
2827
}

solutions/doorbell_demo/main/media_sys.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,10 @@ static int build_player_system()
183183
.lcd_handle = board_get_lcd_handle(),
184184
};
185185
player_sys.video_render = av_render_alloc_lcd_render(&lcd_cfg);
186+
186187
if (player_sys.video_render == NULL) {
187188
ESP_LOGE(TAG, "Fail to create video render");
188-
return -1;
189+
// Allow not display
189190
}
190191
av_render_cfg_t render_cfg = {
191192
.audio_render = player_sys.audio_render,

solutions/doorbell_demo/sdkconfig.defaults.esp32p4

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,17 @@ CONFIG_ESP_VIDEO_ENABLE_ISP_PIPELINE_CONTROLLER=y
1717
# Set Slave target type
1818
CONFIG_IDF_SLAVE_TARGET="esp32c6"
1919
CONFIG_SLAVE_IDF_TARGET_ESP32C6=y
20+
21+
# Enable following configuration if support C5 Slave, make sure GPIO matched
22+
# CONFIG_SLAVE_IDF_TARGET_ESP32C5=y
23+
# CONFIG_ESP_HOSTED_SPI_HD_HOST_INTERFACE=y
24+
# CONFIG_ESP_SPI_HD_GPIO_CS=4
25+
# CONFIG_ESP_SPI_HD_GPIO_CLK=5
26+
# CONFIG_ESP_SPI_HD_GPIO_D0=20
27+
# CONFIG_ESP_SPI_HD_GPIO_D1=21
28+
# CONFIG_ESP_SPI_HD_GPIO_D2=22
29+
# CONFIG_ESP_SPI_HD_GPIO_D3=23
30+
# CONFIG_ESP_SPI_HD_GPIO_DATA_READY=32
31+
# CONFIG_ESP_SPI_HD_GPIO_RESET_SLAVE=33
32+
# CONFIG_ESP_SPI_HD_FREQ_ESP32XX=40
33+
# CONFIG_ESP_HOSTED_SPI_HD_PRIV_INTERFACE_4_DATA_LINES=y

solutions/openai_demo/main/board.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,4 @@ void init_board(void)
2121
.reuse_dev = false
2222
};
2323
init_codec(&cfg);
24-
board_lcd_init();
2524
}

solutions/openai_demo/main/settings.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ extern "C" {
1616
/**
1717
* @brief Set used board name, see `codec_board` README.md for more details
1818
*/
19+
#if CONFIG_IDF_TARGET_ESP32P4
20+
#define TEST_BOARD_NAME "ESP32_P4_DEV_V14"
21+
#else
1922
#define TEST_BOARD_NAME "S3_Korvo_V2"
23+
#endif
2024

2125
/**
2226
* @brief If defined will use OPUS codec

solutions/openai_demo/main/webrtc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ int start_webrtc(void)
540540
.extra_size = sizeof(peer_cfg),
541541
},
542542
.signaling_cfg.extra_cfg = &openai_cfg,
543+
.signaling_cfg.extra_size = sizeof(openai_cfg),
543544
.peer_impl = esp_peer_get_default_impl(),
544545
.signaling_impl = esp_signaling_get_openai_signaling(),
545546
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Flash setting
2+
CONFIG_FLASHMODE_QIO=y
3+
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
4+
5+
CONFIG_SPIRAM_SPEED_200M=y
6+
7+
# If you use serial JTAG turn on this option
8+
#CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
9+
10+
# Use camera SC2336
11+
CONFIG_CAMERA_SC2336=y
12+
CONFIG_CAMERA_SC2336_MIPI_RAW8_1920x1080_30FPS=y
13+
14+
# Enable ISP pipelines
15+
CONFIG_ESP_VIDEO_ENABLE_ISP_PIPELINE_CONTROLLER=y
16+
17+
# Set Slave target type
18+
CONFIG_IDF_SLAVE_TARGET="esp32c6"
19+
CONFIG_SLAVE_IDF_TARGET_ESP32C6=y

0 commit comments

Comments
 (0)