Replies: 1 comment
-
|
do you see any complains from PC kernel/driver log, also please double check with UAC2 specs to make sure you don't miss any other descriptors fields. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I added TinyUSB and the UAC2 headset example to a STM32CubeMX project (STM32F411 MPU). It worked fine - everything I sent to the speaker came back from the microphone. Yay!
But, what I really need is a device with a two input channels. I tried the following:
In tusb_config.h, I changed
#define CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX 2
In main.c, audio_task(), I adjusted the "limit" and amount of data to be written (as the microphone is stereo now):
This compiles and runs, and is recognized as a TinyUSB headset microphone and headphones. Also, the audio_task code above runs whenever I output any sound. Sadly, nothing makes it back through the microphone path.
One thing that seemed suspect to me was _nchannelslogical hardcoded as 0x01 in usb_descriptor.h, line 103:
TUD_AUDIO_DESC_INPUT_TERM(/_termid/ UAC2_ENTITY_MIC_INPUT_TERMINAL, /_termtype/ AUDIO_TERM_TYPE_IN_GENERIC_MIC, /_assocTerm/ 0x00, /_clkid/ UAC2_ENTITY_CLOCK, /_nchannelslogical/ 0x01, /_channelcfg/ AUDIO_CHANNEL_CONFIG_NON_PREDEFINED, /_idxchannelnames/ 0x00, /_ctrl/ 0 * (AUDIO_CTRL_R << AUDIO_IN_TERM_CTRL_CONNECTOR_POS), /_stridx/ 0x00),\
But, nothing happens when I change it to 2.
Any ideas? Am I doing something completely wrong?
Thanks!
Bart
Beta Was this translation helpful? Give feedback.
All reactions