Skip to content

Commit e5990e8

Browse files
committed
Merge branch 'feat/device_uac_support_0_17_0_' into 'master'
feat(usb_device_uac): support espressif/tinyusb 0.17.2 version See merge request ae_group/esp-iot-solution!1209
2 parents 87637c7 + 2fb1e40 commit e5990e8

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

components/usb/usb_device_uac/CHANGELOG.md

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

3+
## v1.1.0 (2025-1-15)
4+
5+
* Use espressif/tinyusb: 0.17.2
6+
37
## v1.0.0 (2024-11-27)
48

59
* Release the official version.

components/usb/usb_device_uac/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@ idf_component_register(SRCS usb_device_uac.c
22
INCLUDE_DIRS "include"
33
PRIV_REQUIRES usb esp_timer)
44

5-
idf_component_get_property(tusb_lib leeebo__tinyusb_src COMPONENT_LIB)
65

6+
# Determine whether tinyusb is fetched from component registry or from local path
7+
idf_build_get_property(build_components BUILD_COMPONENTS)
8+
if(tinyusb IN_LIST build_components)
9+
set(tinyusb_name tinyusb) # Local component
10+
else()
11+
set(tinyusb_name espressif__tinyusb) # Managed component
12+
endif()
13+
14+
idf_component_get_property(tusb_lib ${tinyusb_name} COMPONENT_LIB)
715
target_include_directories(${tusb_lib} PUBLIC "${COMPONENT_DIR}/tusb")
816
target_sources(${tusb_lib} PUBLIC "${COMPONENT_DIR}/tusb/usb_descriptors.c")
917

components/usb/usb_device_uac/idf_component.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.0.0"
1+
version: "1.1.0"
22
targets:
33
- esp32s2
44
- esp32s3
@@ -11,9 +11,9 @@ repository: https://github.com/espressif/esp-iot-solution.git
1111
issues: https://github.com/espressif/esp-iot-solution/issues
1212

1313
dependencies:
14-
idf: ">=4.4"
15-
leeebo/tinyusb_src:
16-
version: ">=0.16.0~5"
14+
idf: ">=5.0"
15+
espressif/tinyusb:
16+
version: "^0.17.0~2"
1717
cmake_utilities: "*"
1818
examples:
1919
- path: ../../../examples/usb/device/usb_uac

components/usb/usb_device_uac/tusb/uac_descriptors.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ enum {
180180
/* Class-Specific AS Isochronous Audio Data Endpoint Descriptor(4.10.1.2) */\
181181
TUD_AUDIO_DESC_CS_AS_ISO_EP(/*_attr*/ AUDIO_CS_AS_ISO_DATA_EP_ATT_NON_MAX_PACKETS_OK, /*_ctrl*/ AUDIO_CTRL_NONE, /*_lockdelayunit*/ AUDIO_CS_AS_ISO_DATA_EP_LOCK_DELAY_UNIT_MILLISEC, /*_lockdelay*/ 0x0001),\
182182
/* Standard AS Isochronous Audio Data Endpoint Descriptor(4.10.1.1) */\
183-
TUD_AUDIO_DESC_STD_AS_ISO_FB_EP(/*_ep*/ _epfb, /*_interval*/TUD_OPT_HIGH_SPEED ? 4 : 1),\
183+
TUD_AUDIO_DESC_STD_AS_ISO_FB_EP(/*_ep*/ _epfb, /*_epsize*/ 4, /*_interval*/TUD_OPT_HIGH_SPEED ? 4 : 1),\
184184
/* Standard AS Interface Descriptor(4.9.1) */\
185185
/* Interface 2, Alternate 0 - default alternate setting with 0 bandwidth */\
186186
TUD_AUDIO_DESC_STD_AS_INT(/*_itfnum*/ _itfnum + 2, /*_altset*/ 0x00, /*_nEPs*/ 0x00, /*_stridx*/ _stridx + 2),\
@@ -266,7 +266,7 @@ enum {
266266
/* Class-Specific AS Isochronous Audio Data Endpoint Descriptor(4.10.1.2) */\
267267
TUD_AUDIO_DESC_CS_AS_ISO_EP(/*_attr*/ AUDIO_CS_AS_ISO_DATA_EP_ATT_NON_MAX_PACKETS_OK, /*_ctrl*/ AUDIO_CTRL_NONE, /*_lockdelayunit*/ AUDIO_CS_AS_ISO_DATA_EP_LOCK_DELAY_UNIT_MILLISEC, /*_lockdelay*/ 0x0001),\
268268
/* Standard AS Isochronous Audio Data Endpoint Descriptor(4.10.1.1) */\
269-
TUD_AUDIO_DESC_STD_AS_ISO_FB_EP(/*_ep*/ _epfb, /*_interval*/TUD_OPT_HIGH_SPEED ? 4 : 1)
269+
TUD_AUDIO_DESC_STD_AS_ISO_FB_EP(/*_ep*/ _epfb, /*_epsize*/ 4, /*_interval*/TUD_OPT_HIGH_SPEED ? 4 : 1)
270270
#endif
271271

272272
#ifdef __cplusplus

components/usb/usb_device_uac/usb_device_uac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ void tud_audio_feedback_params_cb(uint8_t func_id, uint8_t alt_itf, audio_feedba
193193
feedback_param->method = AUDIO_FEEDBACK_METHOD_FIFO_COUNT;
194194
feedback_param->sample_freq = s_uac_device->current_sample_rate;
195195

196-
ESP_LOGD(TAG, "Feedback method: %d, sample freq: %d", feedback_param->method, feedback_param->sample_freq);
196+
ESP_LOGD(TAG, "Feedback method: %d, sample freq: %"PRIu32"", feedback_param->method, feedback_param->sample_freq);
197197
}
198198

199199
// Helper for feature unit get requests

0 commit comments

Comments
 (0)