-
Notifications
You must be signed in to change notification settings - Fork 877
Description
Answers checklist.
- I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
- I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
- I have searched the issue tracker for a similar issue and not found a similar issue.
IDF version.
5.4.2
Espressif SoC revision.
ESP32-S3
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
PowerShell
Development Kit.
ESP32-S3
Steps to reproduce.
- Set the SPK_CHANNEL_NUM to 0 via menuconfig.
- It will not be able to build the project.
- It will throw the following error:
D:/my_project/managed_components/espressif__usb_device_uac/usb_device_uac.c:508:33: error: 'ITF_NUM_AUDIO_STREAMING_SPK' undeclared (first use in this function); did you mean 'ITF_NUM_AUDIO_STREAMING_MIC'? 508 | s_uac_device->spk_itf_num = ITF_NUM_AUDIO_STREAMING_SPK; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | ITF_NUM_AUDIO_STREAMING_MIC
- This will happen due to below:
enum { ITF_NUM_AUDIO_CONTROL = 0, #if SPEAK_CHANNEL_NUM ITF_NUM_AUDIO_STREAMING_SPK, #endif // SPEAK_CHANNEL_NUM #if MIC_CHANNEL_NUM ITF_NUM_AUDIO_STREAMING_MIC, #endif // MIC_CHANNEL_NUM ITF_NUM_TOTAL };
If we set SPEAK_CHANNEL_NUM to 0, this enum will not add ITF_NUM_AUDIO_STREAMING_SPK into the enum. This is required by default for the following:
#if CONFIG_USB_DEVICE_UAC_AS_PART s_uac_device->spk_itf_num = config->spk_itf_num; s_uac_device->mic_itf_num = config->mic_itf_num; #else s_uac_device->spk_itf_num = ITF_NUM_AUDIO_STREAMING_SPK; s_uac_device->mic_itf_num = ITF_NUM_AUDIO_STREAMING_MIC; #endif
...
This will break the build. This needs to be taken care of. Also, I have tried with the setting CONFIG_USB_DEVICE_UAC_AS_PART.
I have defined my descriptor. However, it is working fine if both MIC and SPK are enabled. it is not exposed correctly if only MIC.

Please look into this has provide an appropriate solution to use the MIC interface only.
Build Logs.
D:/Nexar/Dastic/managed_components/espressif__usb_device_uac/usb_device_uac.c:508:33: error: 'ITF_NUM_AUDIO_STREAMING_SPK' undeclared (first use in this function); did you mean 'ITF_NUM_AUDIO_STREAMING_MIC'?
508 | s_uac_device->spk_itf_num = ITF_NUM_AUDIO_STREAMING_SPK;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| ITF_NUM_AUDIO_STREAMING_MIC
More Information.
No response