Skip to content

Commit 4c185ba

Browse files
committed
feat(pwm_audio): publish official version
1. add test-apps
1 parent a4894c5 commit 4c185ba

File tree

29 files changed

+8164
-8096
lines changed

29 files changed

+8164
-8096
lines changed

.gitlab/ci/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,14 @@ build_example_utilities_xz_decompress_file:
820820
variables:
821821
EXAMPLE_DIR: examples/utilities/xz_decompress_file
822822

823+
build_components_audio_pwm_audio_test_apps:
824+
extends:
825+
- .build_examples_template
826+
- .rules:build:component_audio_pwm_audio_test_apps
827+
- .build_idf_active_release_version
828+
variables:
829+
EXAMPLE_DIR: components/audio/pwm_audio/test_apps
830+
823831
build_components_avi_player_test_apps:
824832
extends:
825833
- .build_examples_template

.gitlab/ci/rules.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1429,7 +1429,7 @@
14291429
- <<: *if-dev-push
14301430
changes: *patterns-components_audio_dac_audio
14311431

1432-
.rules:build:component_audio_pwm_audio_test:
1432+
.rules:build:component_audio_pwm_audio_test_apps:
14331433
rules:
14341434
- <<: *if-protected
14351435
- <<: *if-label-build

components/.build-rules.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
components/audio/pwm_audio/test_apps:
2+
enable:
3+
- if: INCLUDE_DEFAULT == 1
4+
15
components/avi_player/test_apps:
26
enable:
37
- if: IDF_TARGET in ["esp32s3", "esp32p4"]

components/audio/pwm_audio/CHANGELOG.md

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

3+
## v1.1.2 - 2024-08-15
4+
5+
### Enhancements:
6+
7+
* Add test-apps.
8+
39
## v1.1.1 - 2023-03-20
410

511
### Bug Fixes:

components/audio/pwm_audio/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.1.1"
1+
version: "1.1.2"
22
description: PWM audio output driver for ESP32 series Socs
33
url: https://github.com/espressif/esp-iot-solution/tree/master/components/audio/pwm_audio
44
repository: https://github.com/espressif/esp-iot-solution.git

components/audio/pwm_audio/pwm_audio.c

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -475,12 +475,28 @@ esp_err_t pwm_audio_init(const pwm_audio_config_t *cfg)
475475
/**
476476
* Get the address of LEDC register to reduce the addressing time
477477
*/
478-
g_ledc_left_duty_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].channel[handle->ledc_channel[CHANNEL_LEFT_INDEX].channel].duty.val;
479-
g_ledc_left_conf0_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].channel[handle->ledc_channel[CHANNEL_LEFT_INDEX].channel].conf0.val;
480-
g_ledc_left_conf1_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].channel[handle->ledc_channel[CHANNEL_LEFT_INDEX].channel].conf1.val;
481-
g_ledc_right_duty_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].channel[handle->ledc_channel[CHANNEL_RIGHT_INDEX].channel].duty.val;
482-
g_ledc_right_conf0_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].channel[handle->ledc_channel[CHANNEL_RIGHT_INDEX].channel].conf0.val;
483-
g_ledc_right_conf1_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].channel[handle->ledc_channel[CHANNEL_RIGHT_INDEX].channel].conf1.val;
478+
#if defined (CONFIG_IDF_TARGET_ESP32P4) || defined (CONFIG_IDF_TARGET_ESP32C5) || defined (CONFIG_IDF_TARGET_ESP32C61)
479+
g_ledc_left_duty_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].
480+
channel[handle->ledc_channel[CHANNEL_LEFT_INDEX].channel].duty_init.val;
481+
#else
482+
g_ledc_left_duty_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].
483+
channel[handle->ledc_channel[CHANNEL_LEFT_INDEX].channel].duty.val;
484+
#endif
485+
g_ledc_left_conf0_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].
486+
channel[handle->ledc_channel[CHANNEL_LEFT_INDEX].channel].conf0.val;
487+
g_ledc_left_conf1_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].
488+
channel[handle->ledc_channel[CHANNEL_LEFT_INDEX].channel].conf1.val;
489+
#if defined (CONFIG_IDF_TARGET_ESP32P4) || defined (CONFIG_IDF_TARGET_ESP32C5) || defined (CONFIG_IDF_TARGET_ESP32C61)
490+
g_ledc_right_duty_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].
491+
channel[handle->ledc_channel[CHANNEL_RIGHT_INDEX].channel].duty_init.val;
492+
#else
493+
g_ledc_right_duty_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].
494+
channel[handle->ledc_channel[CHANNEL_RIGHT_INDEX].channel].duty.val;
495+
#endif
496+
g_ledc_right_conf0_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].
497+
channel[handle->ledc_channel[CHANNEL_RIGHT_INDEX].channel].conf0.val;
498+
g_ledc_right_conf1_val = &LEDC.channel_group[handle->ledc_timer.speed_mode].
499+
channel[handle->ledc_channel[CHANNEL_RIGHT_INDEX].channel].conf1.val;
484500

485501
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
486502
gptimer_config_t timer_config = {

components/audio/pwm_audio/test/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

components/audio/pwm_audio/test/wave_1ch_16bits.c

Lines changed: 0 additions & 2013 deletions
This file was deleted.

components/audio/pwm_audio/test/wave_1ch_8bits.c

Lines changed: 0 additions & 2013 deletions
This file was deleted.

components/audio/pwm_audio/test/wave_2ch_16bits.c

Lines changed: 0 additions & 2013 deletions
This file was deleted.

0 commit comments

Comments
 (0)