Skip to content

Commit 389afe6

Browse files
committed
fix(uac): add audio_player example
1 parent 94cb647 commit 389afe6

File tree

11 files changed

+513
-0
lines changed

11 files changed

+513
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# The following lines of boilerplate have to be in your project's CMakeLists
2+
# in this exact order for cmake to work correctly
3+
cmake_minimum_required(VERSION 3.5)
4+
5+
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
6+
project(audio_player)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
| Supported Targets | ESP32-S2 | ESP32-S3 | ESP32-P4 |
2+
| ----------------- | -------- | -------- | -------- |
3+
4+
# UVC driver example: Video stream
5+
6+
## Selecting the USB Component
7+
8+
To manually select which USB Component shall be used to build this example, please refer to the following documentation page: [Manual USB component selection](../../../../../../docs/host/usb_host_lib/usb_component_manual_selection.md).
9+
10+
## Enable MIC playback
11+
12+
To enable MIC playback in menuconfig `(Top) → Example USB Audio Player → Playback audio from microphone`
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
idf_component_register(SRC_DIRS .
2+
INCLUDE_DIRS "."
3+
EMBED_FILES ../spiffs/output_8k.wav ../spiffs/output_16k.wav)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
menu "Example USB Audio Player"
2+
config EXAMPLE_MIC_PLAYBACK
3+
bool "Playback audio from microphone"
4+
default n
5+
help
6+
Enabled this to playback audio from microphone
7+
8+
endmenu
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
dependencies:
2+
idf: ">=5.0" # The version of the ESP-IDF that esp-audio-player requires
3+
usb_host_uac:
4+
override_path: ../../../../usb_host_uac/
5+
espressif/usb:
6+
version: "*"
7+
override_path: "../../../../../../usb"
8+
rules: # Both if clauses must be fulfilled to override the component
9+
- if: "$ENV_VAR_USB_COMP_MANAGED == yes" # Environmental variable to select between managed (esp-usb) and native (esp-idf) USB Component
10+
- if: "idf_version >=5.4" # Use managed component only for 5.4 and above

0 commit comments

Comments
 (0)