cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 USB Audio Class 2

stucrouc
Associate II
Posted on May 31, 2016 at 12:22

Hello,

we are working on a project where we want to use the STM32F7 Disco as a USB Soundcard for a Linux-based PC. Therefore we need a USB Audio Class 2 Device. Did anyone ever tried something with UAC2? Can you provide us some example codes. That would be great.

We already tested the Audio Standalone example from the Cube Package. We tried to change the code, so that we can use USB High Speed instead of Full Speed, but it doesnt work. The 'readme' also says that the example code does not support USB High Speed. Why exactly? What do we need to change?

Best regards

#hs #uac2 #audio-class-2 #cart-horse #chicken-egg
4 REPLIES 4
Walid FTITI_O
Senior II
Posted on May 31, 2016 at 16:42

Hi peter.hans.004,

USB Audio class 2.0 is not supported yet by our product.

And USB Audio class 1 supports only low and full speed as mentionned in p43 of 

http://www.st.com/content/ccc/resource/technical/document/user_manual/cf/38/e5/b5/dd/1d/4c/09/DM00108129.pdf/files/DM00108129.pdf/jcr:content/translations/en.DM00108129.pdf

:

Note:The Audio Class 1.0 is based on USB Specification 1.0 and thus supports only Low and Full speed modes and does not allow High Speed transfers. Please refer to ''USB Device Class Definition for Audio Devices V1.0 Mar 18, 98'' for more details.

 

 

-Hannibal-
stucrouc
Associate II
Posted on May 31, 2016 at 20:57

Hello,

thank you for your reply. Do you mean that it isn't supported by the Hardware or by the Software? We already tested a USB High Speed Project so that we can see that the USB High Speed Controller matches the speed we need. We reached up to 63Mbit/s. So the software and the hardware can handle this speed. That shouldn't be the bottleneck.

In our current project we need a few Audio Channels with each 24bit and 192kHz in TDM Mode. Therefore we need 55,3Mbit/s transfer rate which means we need UAC2. According to the datasheet it is possible to map the SAI_B Block Output to the GPIOs. We want to connect them to our own Codec so it's not important if the codec can't handle that. In short we want to use the Discovery Board as an USB<->i2s Bridge.

Why is UAC2 not possible?

Best regards

Posted on June 01, 2016 at 01:55

Most likely they simply haven't expended the engineering resources to build and validate an example that advances your project goals yet, or characterizes the operational envelope it delivers. The performance may or may not reach your performance expectations.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
stucrouc
Associate II
Posted on June 01, 2016 at 16:36

Hi there,

in the Audio Standalone Example Code from the Cube Package you define ''USE_USB_FS'' in the preprocessor. In the ''usbd_conf.c'' in line 313 you use ''#ifdef USE_USB_FS''. In line 338 there is also the option ''#ifdef USE_USB_HS''. So you already prepared the programm for a USB High Speed transfer rate. Our Linux PC also recognizes a USB High Speed Soundcard if we define ''USE_USB_HS''. But when we try to play some music the soundquality is really really bad. Why doesn't it work? Is it a hardware problem, or do we just need to add some code?

Best regards