Skip to content

Commit db8fd8f

Browse files
committed
Merge branch 'feature/gmf_app_utils_adapt_esp_board_manager' into 'main'
feat(gmf_app_utils): Adapt esp board manager See merge request adf/multimedia/esp-gmf!184
2 parents 787699f + dc3b940 commit db8fd8f

File tree

11 files changed

+52
-124
lines changed

11 files changed

+52
-124
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Advanced components are encapsulation modules in ESP-GMF that target specific ap
4242
| :------------: | :------------: | :------------ |
4343
| [esp_audio_simple_player](./packages/esp_audio_simple_player) | Simple audio player | - `gmf_audio`<br>- `gmf_io` |
4444
| [gmf_loader](./packages/gmf_loader) | Set up the given GMF pool using the <br> configuration selected via `Kconfig` | - `gmf_core`<br>- `gmf_io`<br>- `gmf_audio`<br>- `gmf_misc`<br>- `gmf_video`<br>- `gmf_ai_audio`<br>- `esp_codec_dev`<br>- `esp_audio_codec`<br>- `esp_video_codec` |
45-
| [gmf_app_utils](./packages/gmf_app_utils) | Common peripheral configuration, unit <br>testing tools Memory leak detection tools | - `gmf_core`<br>- `protocol_examples_common`<br>- `codec_board`|
45+
| [gmf_app_utils](./packages/gmf_app_utils) | Common peripheral configuration, unit <br>testing tools Memory leak detection tools | - `gmf_core`<br>- `protocol_examples_common`<br>- `esp_board_manager`|
4646
| [esp_capture](./packages/esp_capture) | High-level multimedia capture module | - `gmf_core`<br>- `gmf-audio`<br>- `gmf-video`<br>- `esp_muxer`<br>- `esp_codec_dev`<br>- `esp-sr`<br>- `esp_video`<br>- `esp32-camera`|
4747
| [esp_board_manager](./packages/esp_board_manager) | Intelligent, automated board configuration and management utilities with YAML-based setup | Dependencies vary based on selected board |
4848
| [esp_audio_render](./packages/esp_audio_render) | Audio render module with mixer support | - `gmf_core`<br>- `gmf-audio`<br>|

README_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ESP-GMF 各个模块以组件的形式存在,组件又按功能分为**原子
4242
| :------------: | :------------:|:------------ |
4343
| [esp_audio_simple_player](./packages/esp_audio_simple_player) | 简单的音频播放器 | - `gmf_audio`<br>- `gmf_io` |
4444
| [gmf_loader](./packages/gmf_loader) | 使用 `Kconfig` 选择的配置<br>设置给定的 GMF Pool | - `gmf_core`<br>- `gmf_io`<br>- `gmf_audio`<br>- `gmf_misc`<br>- `gmf_video`<br>- `gmf_ai_audio`<br>- `esp_codec_dev`<br>- `esp_audio_codec`<br>- `esp_video_codec` |
45-
| [gmf_app_utils](./packages/gmf_app_utils) | 常用外设配置,单元测试工具<br>内存泄漏检测工具 | - `gmf_core`<br>- `protocol_examples_common`<br>- `codec_board` |
45+
| [gmf_app_utils](./packages/gmf_app_utils) | 常用外设配置,单元测试工具<br>内存泄漏检测工具 | - `gmf_core`<br>- `protocol_examples_common`<br>- `esp_board_manager` |
4646
| [esp_capture](./packages/esp_capture) | 易用的音视频采集器 | - `gmf_core`<br>- `gmf-audio`<br>- `gmf-video`<br>- `esp_muxer`<br>- `esp_codec_dev`<br>- `esp-sr`<br>- `esp_video`<br>- `esp32-camera`|
4747
| [esp_board_manager](./packages/esp_board_manager) | 智能、自动化的板子配置和管理工具,支持基于 YAML 的设置 | 根据选择的板子变化依赖 |
4848
| [esp_audio_render](./packages/esp_audio_render) | 支持混音的音频渲染器 | - `gmf_core`<br>- `gmf-audio`<br>|

packages/esp_capture/CHANGELOG.md

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

3+
## v0.7.8
4+
5+
### Features
6+
7+
- Added dependency `codec_board` in video_capture example yaml to adapt `gmf_app_utils` use `esp_board_manager`
8+
39
## v0.7.7
410

511
### Features

packages/esp_capture/examples/video_capture/main/idf_component.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ dependencies:
2222
version: "^0.5"
2323
espressif/esp_audio_codec:
2424
version: "^2.3"
25-
25+
tempotian/codec_board:
26+
version: "^1.0"

packages/esp_capture/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "0.7.7"
1+
version: "0.7.8"
22
description: Espressif Capture is a module for capture media stream from camera and microphone
33
url: https://github.com/espressif/esp-gmf/tree/main/packages/esp_capture
44
documentation: "https://github.com/espressif/esp-gmf/blob/main/packages/esp_capture/README.md"

packages/gmf_app_utils/CHANGELOG.md

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

3+
## v0.7.6
4+
5+
### Features
6+
7+
- Updated dependency `esp_board_manager` instead of `codec_board`
8+
39
## 0.7.5
410

511
### Bug Fixes

packages/gmf_app_utils/README.md

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ The `gmf_app_utils` component also provides configuration options via **menuconf
3131
- SD card initialization and mounting
3232
- Connectivity management
3333
- Wi-Fi initialization and connection
34-
- Use menuconfig to select supported board
35-
- For other board support see [Other Board Support](#other-board-support) section
34+
- Use `esp_board_manager` to select supported board and custom board, see [ESP Board Manager](https://components.espressif.com/components/espressif/esp_board_manager)
3635

3736
### System Tools (`esp_gmf_app_sys.h`)
3837
Provides start/stop functionality for system resource monitoring, facilitating runtime performance tracking and resource usage monitoring. To use this feature, you need to enable `CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID` and `CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS` in menuconfig.
@@ -69,43 +68,3 @@ Provide common functions for GMF application unit tests
6968
- Call `esp_gmf_app_test_case_uses_tcpip()` in tests that require network functionality
7069
- Use test annotations like `[leaks]` or `[leaks=1024]` to control leak checking
7170
- The main function calls' esp_gmf_app_test_main() 'to create the unit test Task
72-
73-
### Other Board Support
74-
75-
Peripheral management currently uses `codec_board` as a reference implementation for fast verification. If you want to use supported peripherals on a custom board, follow these steps:
76-
77-
1. **Get `codec_board`** and put into project `components` folder
78-
79-
Can use either of following methods:
80-
81-
1.1 Build firstly to trigger auto download then copy it into project folder:
82-
```bash
83-
idf.py build
84-
mkdir -p components/codec_board
85-
cp -rf managed_components/tempotian__codec_board components/codec_board
86-
```
87-
88-
1.2 Download [codec_board](https://components.espressif.com/components/tempotian/codec_board/) from component registry and manual copy into project folder
89-
90-
2. **Add a new section** to `components/codec_board/board_cfg.txt` to describe your custom board:
91-
```
92-
Board: MY_BOARD
93-
i2c: {sda: 1, scl: 2}
94-
i2s: {mclk: 42, bclk: 40, ws: 41, dout: 39}
95-
out: {codec: ES8311, pa: 38, use_mclk: 0, pa_gain: 6}
96-
```
97-
98-
3. **Set the board type** in your application code before calling any peripheral APIs:
99-
```c
100-
#include "codec_board.h"
101-
void app_main(void)
102-
{
103-
set_codec_board_type("MY_BOARD");
104-
}
105-
```
106-
107-
4. **Rebuild to take effects**
108-
```bash
109-
idf.py fullclean
110-
idf.py -p /dev/XXXXX flash monitor
111-
```

packages/gmf_app_utils/README_CN.md

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ GMF 应用工具包(gmf_app_utils)是一个为方便 ESP GMF 开发应用程
3131
- SD 卡初始化和挂载
3232
- 连接管理
3333
- Wi-Fi 初始化连接
34-
- 通过 Menuconfig 选择支持的开发板
35-
- 其他开发板支持请参阅 [其他开发板支持](#其他开发板支持) 小节
34+
- 通过 `esp_board_manager` 选择支持的开发板或自定义开发板,请参阅 [ESP Board Manager](https://components.espressif.com/components/espressif/esp_board_manager)
3635

3736
### 系统工具(`esp_gmf_app_sys.h`
3837
提供系统资源监控功能的启动/停止,便于用户运行时性能跟踪以及资源使用情况监控,使用时需要在 menuconfig 中开启 `CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID``CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS`
@@ -69,43 +68,3 @@ GMF 应用工具包(gmf_app_utils)是一个为方便 ESP GMF 开发应用程
6968
- 使用`esp_gmf_app_test_case_uses_tcpip()`进行网络测试项资源预分配
7069
- 支持通过测试项描述如 `[leaks]``[leaks=1024]` 控制泄漏检查阈值
7170
- main 函数调用 `esp_gmf_app_test_main()` 创建单元测试线程
72-
73-
### 其他开发板支持
74-
75-
外设管理目前使用 `codec_board` 作为参考板卡实现,便于快速验证。若要在自定义开发板上使用支持的外设,请按照以下步骤操作:
76-
77-
1. **获取 `codec_board`** 并将其放入项目的 `components` 文件夹
78-
79-
可以使用以下任一方法:
80-
81-
1.1 首先构建代码以触发自动下载,然后复制到项目文件夹:
82-
```bash
83-
idf.py build
84-
mkdir -p components/codec_board
85-
cp -rf managed_components/tempotian__codec_board components/codec_board
86-
```
87-
88-
1.2 从组件注册表下载 [codec_board](https://components.espressif.com/components/tempotian/codec_board/) 并手动复制到项目文件夹
89-
90-
2. **`components/codec_board/board_cfg.txt` 中添加新的开发板配置节**,例如:
91-
```
92-
Board: MY_BOARD
93-
i2c: {sda: 1, scl: 2}
94-
i2s: {mclk: 42, bclk: 40, ws: 41, dout: 39}
95-
out: {codec: ES8311, pa: 38, use_mclk: 0, pa_gain: 6}
96-
```
97-
98-
3. **在调用任何外设 API 之前,在应用代码中设置板卡类型**
99-
```c
100-
#include "codec_board.h"
101-
void app_main(void)
102-
{
103-
set_codec_board_type("MY_BOARD");
104-
}
105-
```
106-
107-
4. **重新构建代码使修改生效**:
108-
```bash
109-
idf.py fullclean
110-
idf.py -p /dev/XXXXX flash monitor
111-
```

packages/gmf_app_utils/idf_component.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "0.7.5"
1+
version: "0.7.6"
22
description: Espressif GMF App Utils is a module that provides utility functions for the GMF application
33
url: https://github.com/espressif/esp-gmf/tree/main/packages/gmf_app_utils
44
documentation: "https://github.com/espressif/esp-gmf/blob/main/packages/gmf_app_utils/README.md"
@@ -12,6 +12,6 @@ dependencies:
1212
espressif/gmf_core:
1313
require: public
1414
version: "^0.7"
15-
tempotian/codec_board:
15+
espressif/esp_board_manager:
1616
require: public
17-
version: "^1.0.0"
17+
version: "^0.4.0"

packages/gmf_app_utils/include/esp_gmf_app_setup_peripheral.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ typedef struct {
4848
* @brief Codec information structure
4949
*/
5050
typedef struct {
51-
void *i2c_handle; /*!< User-initialized I2C handle; otherwise, set to NULL to let the `esp_gmf_app_setup_codec_dev` initialize it. */
51+
void *i2c_handle; /*!< User-initialized I2C handle; otherwise, set to NULL to let the `esp_gmf_app_setup_codec_dev` initialize it */
5252
esp_gmf_app_i2s_cfg_t play_info; /*!< Audio information for playback. Currently,
5353
only ESP_GMF_APP_I2S_MODE_STD I2S mode is supported */
5454
esp_gmf_app_i2s_cfg_t record_info; /*!< Audio information for recording */
@@ -82,8 +82,8 @@ void esp_gmf_app_teardown_sdcard(void *sdcard_handle);
8282
/**
8383
* @brief Setup codec with configuration
8484
*
85-
* @note It will initialize I2S and I2C. And open I2S.
86-
* If codec_info is NULL, it will use default codec configuration(ESP_GMF_APP_CODEC_INFO_DEFAULT()).
85+
* @note It will initialize I2S and I2C. And open I2S
86+
* If codec_info is NULL, it will use default codec configuration(ESP_GMF_APP_CODEC_INFO_DEFAULT())
8787
*
8888
* @param[in] codec_info The codec information
8989
*/
@@ -108,7 +108,7 @@ void *esp_gmf_app_get_i2c_handle(void);
108108
void *esp_gmf_app_get_playback_handle(void);
109109

110110
/**
111-
* @brief Get the record handle
111+
* @brief Get the record handle after `esp_gmf_app_setup_codec_dev`
112112
*
113113
* @return
114114
* - The record handle

0 commit comments

Comments
 (0)