In the last blog, I described how I managed to provide an USB Audio device for a Speaker and a Microphone and the bumpy journey to it.

I also wanted the Headset sceanario to work where both the input and output of audio is supported. I was searchig very long why my first implementation did not work until I realized, that actually it did when Serial (CDC) was deactivated!

The symptoms were like this: Activating Serial first: then Serial was wrorking but Audio did not work; and when activating Audio first, then Serial did not work.

It took me quite some time of debugging to figure out that TinyUSB has a buffer for the descriptor that is limited to 256 bytes, and in my case the descriptor was just getting too big!

Fortunatly, there is an API to register your own (bigger) buffer, and like magic everything started to work just fine.

And to bring it to a lucky closing, I tested it successfully on a Seeeduino Xiao, that I had laying around unused for a long time!


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *