Skip to content

Commit a22b1df

Browse files
committed
Merge branch 'feature/update_esp_audio_effects_to_v1.2.0' into 'master'
Update esp_audio_effects to v1.2.0 See merge request adf/esp-adf-libs!295
2 parents 459f696 + a667c56 commit a22b1df

File tree

97 files changed

+16513
-6856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+16513
-6856
lines changed

esp_audio_effects/CHANGELOG.md

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

3+
## v1.2.0
4+
5+
### Features
6+
7+
- Added audio effects module for `DRC`, `MBC`
8+
- Added `esp_ae_xx_reset` function for all effect modules
9+
- Added per-stream enable/disable control for `Mixer`
10+
- Added esp_audio_effects demo
11+
- Optimized effects implementation to reduce binary size
12+
- Added refine code and license for test app
13+
14+
### Bug Fixes
15+
16+
- Fixed an issue where `ALC` failed to operate correctly when the input level was too low
17+
- Fixed `FADE` module reset not taking effect
18+
- Fixed a bit-depth conversion error when converting 8-bit to 24-bit
19+
320
## v1.1.0
421

522
### Features

esp_audio_effects/README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
# ESP_AUDIO_EFFECTS
22

3-
Espressif Audio Effects (ESP_AUDIO_EFFECTS) is the official audio processing module developed by Espressif Systems for SoCs. The ESP Audio Effects module offers a range of professional, high-performance audio processing algorithms that can be used to modify, enhance, or alter the characteristics of audio signals. The supported modules include Automatic Level Control (ALC), Sample Rate Conversion, Bit Depth Conversion, Channel Conversion, Equalization, Data Weaving, Mixing, Fading, and Sonic Processing.
3+
- [中文版](./README_CN.md)
4+
5+
Espressif Audio Effects (ESP_AUDIO_EFFECTS) is the official audio processing module developed by Espressif Systems for SoCs. The ESP Audio Effects module offers a range of professional, high-performance audio processing algorithms that can be used to modify, enhance, or alter the characteristics of audio signals. The supported modules include Automatic Level Control (ALC), Sample Rate Conversion, Bit Depth Conversion, Channel Conversion, Equalization, Data Weaving, Mixing, Fading, Sonic,Dynamic Range Control (DRC) and Multi-band Compressor (MBC) Processing.
46

57
# Detailed Introduction of Each Module
68

79
The following table listed the sample_rate, channels and bits_per_sample supported by each module. If user wants to know the detailed introduction, performance, examples, and other information of each module, can click on the README link in the `Module` column
810

9-
| Module | Sample Rate | Channel | Bits Per Sample | Data Layout |
10-
|:------------------------------------------:|:-----------------------------------------------:|:--------:|:-------------------:|:-------------------------:|
11-
| [ALC](docs/README_ALC.md) | Full range |Full range| s16, s24, s32 |Interleave and Deinterleave|
12-
| [RATE CONVERSION](docs/README_RATE_CVT.md) |4-192 kHz, and integer multiples of 4000 or 11025|Full range| s16, s24, s32 |Interleave and Deinterleave|
13-
| [BIT CONVERSION](docs/README_BIT_CVT.md) | Full range |Full range| u8, s16, s24, s32 |Interleave and Deinterleave|
14-
| [CHANNEL CONVERSION](docs/README_CH_CVT.md)| Full range |Full range| s16, s24, s32 |Interleave and Deinterleave|
15-
| [DATA WEAVER](docs/README_DATA_WEAVER.md) | Full range |Full range| s16, s24, s32 |Interleave and Deinterleave|
16-
| [EQUALIZER](docs/README_EQ.md) | Full range |Full range| s16, s24, s32 |Interleave and Deinterleave|
17-
| [FADE](docs/README_FADE.md) | Full range |Full range| s16, s24, s32 |Interleave and Deinterleave|
18-
| [MIXER](docs/README_MIXER.md) | Full range |Full range| s16, s24, s32 |Interleave and Deinterleave|
19-
| [SONIC](docs/README_SONIC.md) |4-192 kHz, and integer multiples of 4000 or 11025|Full range| s16, s24, s32 | Interleave |
11+
| Module | Sample Rate | Channel | Bits Per Sample | Data Layout | Initial Supported Version |
12+
|:------------------------------------------:|:-----------------------------------------------:|:--------:|:-------------------:|:-------------------------:|:-------------------------:|
13+
| [ALC](docs/README_ALC.md) | Full range |Full range| s16, s24, s32 |Interleave and Deinterleave| v1.0.0 |
14+
| [RATE CONVERSION](docs/README_RATE_CVT.md) |4-192 kHz, and integer multiples of 4000 or 11025|Full range| s16, s24, s32 |Interleave and Deinterleave| v1.0.0 |
15+
| [BIT CONVERSION](docs/README_BIT_CVT.md) | Full range |Full range| u8, s16, s24, s32 |Interleave and Deinterleave| v1.0.0 |
16+
| [CHANNEL CONVERSION](docs/README_CH_CVT.md)| Full range |Full range| s16, s24, s32 |Interleave and Deinterleave| v1.0.0 |
17+
| [DATA WEAVER](docs/README_DATA_WEAVER.md) | Full range |Full range| s16, s24, s32 |Interleave and Deinterleave| v1.0.0 |
18+
| [EQUALIZER](docs/README_EQ.md) | Full range |Full range| s16, s24, s32 |Interleave and Deinterleave| v1.0.0 |
19+
| [FADE](docs/README_FADE.md) | Full range |Full range| s16, s24, s32 |Interleave and Deinterleave| v1.0.0 |
20+
| [MIXER](docs/README_MIXER.md) | Full range |Full range| s16, s24, s32 |Interleave and Deinterleave| v1.0.0 |
21+
| [SONIC](docs/README_SONIC.md) |4-192 kHz, and integer multiples of 4000 or 11025|Full range| s16, s24, s32 | Interleave | v1.0.0 |
22+
| [DRC](docs/README_DRC.md) | Full range |Full range| s16, s24, s32 |Interleave and Deinterleave| v1.2.0 |
23+
| [MBC](docs/README_MBC.md) | Full range |Full range| s16, s24, s32 |Interleave and Deinterleave| v1.2.0 |
2024

2125
# Audio Effects Release and SoC Compatibility
2226

2327
The following table shows the support of ESP_AUDIO_CODEC for Espressif SoCs. The "✔" means supported, and the "✖" means not supported.
24-
25-
|Chip | v1.0.1 |
26-
|:-----------:|:----------------:|
27-
|ESP32 | ✔ |
28-
|ESP32-S2 | ✔ |
29-
|ESP32-S3 | ✔ |
30-
|ESP32-C2 | ✔ |
31-
|ESP32-C3 | ✔ |
32-
|ESP32-C5 | ✔ |
33-
|ESP32-C6 | ✔ |
34-
|ESP32-P4 | ✔ |
28+
29+
|Version | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-P4 | ESP32-H4 |
30+
|:-----------:|:--------:|:----------:|:----------:|:----------:|:---------:|:---------:|:---------:|:-----------:|:----------:|
31+
| v1.0.0 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ |
32+
| v1.0.1 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ |
33+
| v1.0.2 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ |
34+
| v1.1.0 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
35+
| v1.2.0 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |

esp_audio_effects/README_CN.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# ESP_AUDIO_EFFECTS(音频效果库)
2+
3+
- [English](./README.md)
4+
5+
Espressif Audio Effects(ESP_AUDIO_EFFECTS)是乐鑫为 SoC 打造的官方音频处理模块集合,提供一系列专业且高性能的音频处理算法,可用于修改、增强或塑造音频信号的特性。当前支持的模块包括:自动电平控制(ALC)、采样率转换、位深转换、声道转换、均衡(EQ)、数据交织(Data Weaver)、混音(Mixer)、淡入淡出(Fade)、 Sonic 变速/变调处理、 动态范围控制(DRC)以及多频段动态范围压缩(MBC)。
6+
7+
# 各模块详细介绍入口
8+
9+
下表列出了各模块支持的采样率、声道数与采样位宽。若需了解各模块的功能介绍、性能指标、使用示例等,请点击 `模块` 列中的 README 链接进入相应的文档。
10+
11+
| 模块 | 采样率(Hz) | 声道数 | 采样位宽 | 数据布局 | 初始支持版本 |
12+
|:-------------------------------------------:|:--------------------------------------------------:|:------:|:-------------------:|:---------------------------:|:--------------:|
13+
| [ALC](docs/README_ALC_CN.md) | 全范围 | 全范围 | s16, s24, s32 | 交织 与 非交织 | v1.0.0 |
14+
| [RATE CONVERSION](docs/README_RATE_CVT_CN.md) | 4–192 kHz,且为 4000 或 11025 的整数倍 | 全范围 | s16, s24, s32 | 交织 与 非交织 | v1.0.0 |
15+
| [BIT CONVERSION](docs/README_BIT_CVT_CN.md) | 全范围 | 全范围 | u8, s16, s24, s32 | 交织 与 非交织 | v1.0.0 |
16+
| [CHANNEL CONVERSION](docs/README_CH_CVT_CN.md)| 全范围 | 全范围 | s16, s24, s32 | 交织 与 非交织 | v1.0.0 |
17+
| [DATA WEAVER](docs/README_DATA_WEAVER_CN.md)| 全范围 | 全范围 | s16, s24, s32 || v1.0.0 |
18+
| [EQUALIZER](docs/README_EQ_CN.md) | 全范围 | 全范围 | s16, s24, s32 | 交织 与 非交织 | v1.0.0 |
19+
| [FADE](docs/README_FADE_CN.md) | 全范围 | 全范围 | s16, s24, s32 | 交织 与 非交织 | v1.0.0 |
20+
| [MIXER](docs/README_MIXER_CN.md) | 全范围 | 全范围 | s16, s24, s32 | 交织 与 非交织 | v1.0.0 |
21+
| [SONIC](docs/README_SONIC_CN.md) | 4–192 kHz,且为 4000 或 11025 的整数倍 | 全范围 | s16, s24, s32 | 交织 | v1.0.0 |
22+
| [DRC](docs/README_DRC_CN.md) | 全范围 | 全范围 | s16, s24, s32 | 交织 与 非交织 | v1.2.0 |
23+
| [MBC](docs/README_MBC_CN.md) | 全范围 | 全范围 | s16, s24, s32 | 交织 与 非交织 | v1.2.0 |
24+
25+
# 版本发布与 SoC 兼容性
26+
27+
下表展示 ESP_AUDIO_EFFECTS 在各款乐鑫 SoC 上的支持情况。“✔” 表示支持,“✘” 表示不支持。
28+
29+
|Version | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-P4 | ESP32-H4 |
30+
|:-----------:|:--------:|:----------:|:----------:|:----------:|:---------:|:---------:|:---------:|:-----------:|:----------:|
31+
| v1.0.0 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ |
32+
| v1.0.1 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ |
33+
| v1.0.2 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ |
34+
| v1.1.0 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
35+
| v1.2.0 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |

esp_audio_effects/docs/README_ALC.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ALC
22

3+
- [中文版](./README_ALC_CN.md)
4+
35
`ALC` (Automatic Level Control) module is used to automatically adjust the volume level of audio signals to ensure stable output volume at different input signal levels. ALC is mainly used to prevent sudden increase or decrease in audio volume, thus providing a more consistent audio experience.
46

57
# Features
@@ -31,7 +33,7 @@ Note:
3133

3234
# Usage
3335

34-
Here is an example of using [ALC](../test_app/main/test_alc.c)
36+
Here is an example of using [ALC](../example/esp_audio_effects_demo/main/esp_audio_effects_demo.c)
3537

3638
# FAQ
3739

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# ALC(自动电平控制)
2+
3+
- [English](./README_ALC.md)
4+
5+
`ALC`(Automatic Level Control,自动电平控制)模块用于自动调节音频信号的电平,在不同输入电平下确保输出音量稳定。其主要目的在于防止音量的突增或突降,从而提供更一致的听感体验。
6+
7+
## 特性
8+
9+
- 支持全采样率与声道配置
10+
- 支持位深:s16、s24、s32
11+
- 支持增益范围(-∞, 63] dB;当增益设置小于 -64 dB 时,音频将被静音
12+
- 支持数据布局:交织(interleaved)与非交织(non-interleaved)
13+
14+
## 性能
15+
16+
测试环境:<br>
17+
| 芯片 | IDF 版本 | CPU 频率 | SPI RAM 频率 |
18+
| -- | -- | -- | -- |
19+
| ESP32-S3R8 | v5.3 | 240MHz | 80MHz |
20+
21+
| 位深 | 堆内存(Byte) | CPU 占用(%) |
22+
| -- | -- | -- |
23+
| 16 | < 5k | < 0.3 |
24+
| 24 | < 5k | < 0.4 |
25+
| 32 | < 5k | < 0.4 |
26+
27+
说明:
28+
1) 测试音频为 8 kHz 单声道。不同采样率与声道配置的 CPU 占用可按如下公式估算:
29+
> CPU Load = (sample_rate / 8000) × channel_count × base_load<br>
30+
31+
其中 `base_load` 为表中给出的基准占用。
32+
2) 表格中的 CPU 占用为平均测量值。
33+
34+
## 使用
35+
36+
以下为 ALC 的使用示例:[ALC](../example/esp_audio_effects_demo/main/esp_audio_effects_demo.c)
37+
38+
## 常见问题(FAQ)
39+
40+
1) 增益设置过高会导致失真吗?
41+
> 不会。当增益设置过高时,ALC 会在其动态范围内对信号进行限制,避免被放大至超过允许的最大幅度,从而防止削顶失真(clipping)。

esp_audio_effects/docs/README_BIT_CVT.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# BIT CONVERSION
22

3+
- [中文版](./README_BIT_CVT_CN.md)
4+
35
`BIT CONVERSION` module is used to convert the original audio bits per sample into the target bits per sample.
46

57
# Features
@@ -28,7 +30,7 @@ Note:
2830

2931
# Usage
3032

31-
Here is an example of using [BIT CONVERSION](../test_app/main/test_bit_cvt.c)
33+
Here is an example of using [BIT CONVERSION](../example/esp_audio_effects_demo/main/esp_audio_effects_demo.c)
3234

3335
# FAQ
3436
1) Why support unsigned 8-bit instead of signed 8-bit?
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# 位深转换(BIT CONVERSION)
2+
3+
- [English](./README_BIT_CVT.md)
4+
5+
`BIT CONVERSION` 模块用于将原始音频的每采样位数转换为目标每采样位数。
6+
7+
## 特性
8+
9+
- 支持全范围采样率与声道数
10+
- 支持位深:u8、s16、s24、s32
11+
- 支持数据布局:交织(interleaved)、非交织(non-interleaved)
12+
13+
## 性能
14+
15+
测试配置:
16+
17+
| 芯片 | IDF 版本 | CPU 频率 | SPI RAM 频率 |
18+
| -- | -- | -- | -- |
19+
| ESP32-S3R8 | v5.3 | 240MHz | 80MHz |
20+
21+
| 堆内存(Byte) | CPU 负载(%) |
22+
| -- | -- |
23+
| 20 | < 0.06 |
24+
25+
说明:
26+
1) 测试音频为 8 kHz 单声道。不同采样率和声道配置下的 CPU 负载可按如下公式估算:
27+
> CPU Load = (sample_rate / 8000) × channel_count × base_load
28+
其中 `base_load` 为表格所列基准负载。
29+
2) 表中 CPU 负载为平均值。
30+
31+
## 使用
32+
33+
使用示例参见:[BIT CONVERSION](../example/esp_audio_effects_demo/main/esp_audio_effects_demo.c)
34+
35+
## 常见问题(FAQ)
36+
1) 为什么支持无符号 8 位而不是有符号 8 位?
37+
> 因为 8 位 PCM 音频数据是无符号的。

esp_audio_effects/docs/README_CH_CVT.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# CHANNEL CONVERSION
22

3+
- [中文版](./README_CH_CVT_CN.md)
4+
35
`CHANNEL CONVERSION` module is designed to transform the original audio channel into a target channel. The implementation algorithm works by multiplying the input data with a specified weight matrix, resulting in the output data.
46

57
# Features
@@ -28,7 +30,7 @@ Note:
2830

2931
# Usage
3032

31-
Here is an example of using [CHANNEL CONVERSION](../test_app/main/test_ch_cvt.c)
33+
Here is an example of using [CHANNEL CONVERSION](../example/esp_audio_effects_demo/main/esp_audio_effects_demo.c)
3234

3335
# FAQ
3436

0 commit comments

Comments
 (0)