File tree Expand file tree Collapse file tree 5 files changed +26
-1
lines changed
components/usb/usb_device_uac Expand file tree Collapse file tree 5 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 11# ChangeLog
22
3+ ## v1.2.1 (2025-8-4)
4+
5+ * Fix build issue and audio path for MIC-only configuration.
6+
37## v1.2.0 (2025-3-31)
48
59* Supports integration into other TinyUSB projects.
Original file line number Diff line number Diff line change 1- version : " 1.2.0 "
1+ version : " 1.2.1 "
22targets :
33 - esp32s2
44 - esp32s3
Original file line number Diff line number Diff line change 1+ CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
2+ CONFIG_FREERTOS_HZ=1000
3+ CONFIG_ESP_TASK_WDT_EN=n
Original file line number Diff line number Diff line change 4747
4848// Unit numbers are arbitrary selected
4949#define UAC2_ENTITY_CLOCK 0x04
50+
51+ #if SPEAK_CHANNEL_NUM && MIC_CHANNEL_NUM
5052// Speaker path
5153#define UAC2_ENTITY_SPK_INPUT_TERMINAL 0x01
5254#define UAC2_ENTITY_SPK_FEATURE_UNIT 0x02
@@ -55,11 +57,23 @@ enum {
5557#define UAC2_ENTITY_MIC_INPUT_TERMINAL 0x11
5658#define UAC2_ENTITY_MIC_FEATURE_TERMINAL 0x12
5759#define UAC2_ENTITY_MIC_OUTPUT_TERMINAL 0x13
60+ #else
61+ // Speaker path
62+ #define UAC2_ENTITY_SPK_INPUT_TERMINAL 0x01
63+ #define UAC2_ENTITY_SPK_FEATURE_UNIT 0x02
64+ #define UAC2_ENTITY_SPK_OUTPUT_TERMINAL 0x03
65+ // Microphone path
66+ #define UAC2_ENTITY_MIC_INPUT_TERMINAL 0x01
67+ #define UAC2_ENTITY_MIC_FEATURE_TERMINAL 0x02
68+ #define UAC2_ENTITY_MIC_OUTPUT_TERMINAL 0x03
69+ #endif
5870
5971#if SPEAK_CHANNEL_NUM && MIC_CHANNEL_NUM
6072#define NUM_INTERFACES 3
6173#elif SPEAK_CHANNEL_NUM || MIC_CHANNEL_NUM
6274#define NUM_INTERFACES 2
75+ #else
76+ #error "SPEAK_CHANNEL_NUM and MIC_CHANNEL_NUM cannot both be 0"
6377#endif
6478
6579#if SPEAK_CHANNEL_NUM && MIC_CHANNEL_NUM
Original file line number Diff line number Diff line change @@ -509,8 +509,12 @@ esp_err_t uac_device_init(uac_device_config_t *config)
509509 s_uac_device -> spk_itf_num = config -> spk_itf_num ;
510510 s_uac_device -> mic_itf_num = config -> mic_itf_num ;
511511#else
512+ #if SPEAK_CHANNEL_NUM
512513 s_uac_device -> spk_itf_num = ITF_NUM_AUDIO_STREAMING_SPK ;
514+ #endif
515+ #if MIC_CHANNEL_NUM
513516 s_uac_device -> mic_itf_num = ITF_NUM_AUDIO_STREAMING_MIC ;
517+ #endif
514518#endif
515519
516520 BaseType_t ret_val ;
You can’t perform that action at this time.
0 commit comments