Skip to content

Commit 7469e1b

Browse files
committed
Codec board support Kconfig to select default board
1 parent 5780ef5 commit 7469e1b

File tree

6 files changed

+83
-1
lines changed

6 files changed

+83
-1
lines changed

components/codec_board/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## v2.0.0
4+
5+
- Fixed `fb_num` configuration no take effect
6+
- Added `Kconfig` to select default board use API `set_default_codec_board`
7+
38
## v1.0.2
49

510
- Fixed pin parse error
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
menu "Codec Board Configuration"
2+
3+
choice
4+
prompt "Selection for codec board"
5+
default ESP32_S3_KORVO_V2_BOARD
6+
help
7+
Select a codec board
8+
config ESP32_S3_KORVO_V2_BOARD
9+
depends on IDF_TARGET_ESP32S3
10+
bool "ESP32 S3 Korvo V2"
11+
config ESP32_S3_KORVO_V4_BOARD
12+
depends on IDF_TARGET_ESP32S3
13+
bool "ESP32 S3 Korvo V4"
14+
config ESP32_LYRAT_MINI_V1_BOARD
15+
depends on IDF_TARGET_ESP32
16+
bool "ESP32 LyraT Mini V1"
17+
config ESP32_KORVO_V1_BOARD
18+
depends on IDF_TARGET_ESP32
19+
bool "ESP32 Korvo V1"
20+
config ESP32_S3_BOX_BOARD
21+
depends on IDF_TARGET_ESP32S3
22+
bool "ESP32 S3 BOX"
23+
config ESP32_S3_BOX_3_BOARD
24+
depends on IDF_TARGET_ESP32S3
25+
bool "ESP32 S3 BOX 3"
26+
config ESP32_P4_FUNCTION_EV_V14_BOARD
27+
depends on IDF_TARGET_ESP32P4
28+
bool "ESP32 P4 Function EV V1.4"
29+
config ESP32_S3_EYE_BOARD
30+
depends on IDF_TARGET_ESP32S3
31+
bool "ESP32 S3 EYE"
32+
config XD_AIOT_C3
33+
depends on IDF_TARGET_ESP32C3
34+
bool "XD AIOT C3"
35+
config ESP32_S3_KORVO_2L_BOARD
36+
depends on IDF_TARGET_ESP32S3
37+
bool "ESP32 S3 KORVO 2L"
38+
config ESP32_S3_ECHOEAR_BOARD
39+
depends on IDF_TARGET_ESP32S3
40+
bool "ESP32 S3 ECHOEAR"
41+
config ATOMS3_ECHO_BASE_BOARD
42+
depends on IDF_TARGET_ESP32S3
43+
bool "ATOMS3 ECHO BASE"
44+
endchoice
45+
46+
config CODEC_BOARD
47+
string
48+
default "S3_Korvo_V2" if ESP32_S3_KORVO_V2_BOARD
49+
default "S3_Korvo_V4" if ESP32_S3_KORVO_V4_BOARD
50+
default "LYRAT_MINI_V1" if ESP32_LYRAT_MINI_V1_BOARD
51+
default "ESP32_KORVO_V1" if ESP32_KORVO_V1_BOARD
52+
default "ESP32S3_BOX" if ESP32_S3_BOX_BOARD
53+
default "ESP32_S3_BOX_3" if ESP32_S3_BOX_3_BOARD
54+
default "ESP32_P4_DEV_V14" if ESP32_P4_FUNCTION_EV_V14_BOARD
55+
default "ESP32S3_EYE" if ESP32_S3_EYE_BOARD
56+
default "XD_AIOT_C3" if XD_AIOT_C3
57+
default "ESP32_S3_KORVO_2L" if ESP32_S3_KORVO_2L_BOARD
58+
default "ESP32_S3_EchoEar" if ESP32_S3_ECHOEAR_BOARD
59+
default "ATOMS3_ECHO_BASE" if ATOMS3_ECHO_BASE_BOARD
60+
default "DUMMY_CODEC_BOARD"
61+
endmenu

components/codec_board/codec_board.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <sdkconfig.h>
12
#include "codec_board.h"
23
#include "esp_log.h"
34

@@ -29,6 +30,14 @@ void set_codec_board_type(const char *codec_type)
2930
codec = get_codec_section(codec_type);
3031
}
3132

33+
void set_default_codec_board(void)
34+
{
35+
if (codec) {
36+
return;
37+
}
38+
set_codec_board_type(CONFIG_CODEC_BOARD);
39+
}
40+
3241
int get_sdcard_config(sdcard_cfg_t *card_cfg)
3342
{
3443
RET_ON_NOT_INIT();

components/codec_board/idf_component.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## IDF Component Manager Manifest File
2-
version: "1.0.2"
2+
version: "2.0.0"
33
description: Simple ESP32 series codec board realization
4+
url: https://github.com/espressif/esp-webrtc-solution/tree/main/components/codec_board
45
dependencies:
56
espressif/esp_codec_dev: "~1.5"
67
esp_lcd_ek79007:

components/codec_board/include/codec_board.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,11 @@ int codec_board_parse_all_config(const char *section);
280280
*/
281281
void set_codec_board_type(const char *board_type);
282282

283+
/**
284+
* @brief Set default codec board
285+
*/
286+
void set_default_codec_board(void);
287+
283288
/**
284289
* @brief Get SDCard configuration
285290
*

components/codec_board/lcd_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ static int _init_mipi_lcd(lcd_cfg_t *cfg)
281281
if (cfg->width == 1024 && cfg->height == 600) {
282282
ESP_LOGI(TAG, "Install EK79007 LCD control panel");
283283
esp_lcd_dpi_panel_config_t dpi_config = EK79007_1024_600_PANEL_60HZ_CONFIG(LCD_COLOR_PIXEL_FORMAT_RGB565);
284+
dpi_config.num_fbs = mipi_cfg->fb_num;
284285
ek79007_vendor_config_t vendor_config = {
285286
.mipi_config = {
286287
.dsi_bus = mipi_dsi_bus,

0 commit comments

Comments
 (0)