Replies: 1 comment 2 replies
-
My suggestion is test playback and recording separately to see if either FIFO is underflowed.
It could also be the issue, since CPU and USB use different clock it's possible in some USB frame Personally I don't use OS for audio application to reduce overhead in high speed 768kHz, so I put
|
Beta Was this translation helpful? Give feedback.
-
I evaluated tinyusb using the examples provided with the stack, the result was just perfect
So, I have done porting on stm32H5 and use the existing porting on stm32H7 on our application.
The application is an audio processing system using freertos, the integration was done in the main audio capture freeRTOS thread that call tud_audio_write() and tud_audio_read() to fill or dispatch our internal audio buffers. I have also added a thread that calls tud_task() every ms.
The integration seems to be perfect but when I played our usb test case, I discovered pops every 5 secs when we capture and play at 16KHZ.
The test case is like the standard examples uac2_headset. We capture the speaker and re-inject the payload in the micro in our environment. The uac2_headset example works fine But not my FreeRtos use case :(.....
However, I measured the capture loop at an interval of 999.85 us, the tud_task varies a little due to the task priority lower than the capture task, but I is ~1 Ms.
To show the issue I use audacity and I generate a tone of 10HZ, then, I configure both the speaker and micro on the tinyusb. Finally, I push on record to capture the wave coming from the device.
I integrated the feedback on the speaker , I even tested the new FIFO_Count.
But nothing works :)
I really don’t understand where comes from this issue, it looks like an underflow, but I verified that our app feed properly tud_audio_write() every millisecond
• Is anybody already seen this issue ?
• The feedback seems to work on the speaker only, Can I add feedback on the playback too ( is possible)
• Any advice will be welcome
Here is the pop visualization and the logic analyzer check
https://postimg.cc/tnYkYjLZ
https://postimg.cc/5jTqnDhg
Thanks
Beta Was this translation helpful? Give feedback.
All reactions