cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-USB-AUDIO multifrequency.

Pawel Piwowarski
Associate II

Hi.

In X-CUBE-USB-AUDIO, You wrote:

X-CUBE-UAC2.jpg
1. Does it mean that playback and recording can work simultaneously, and at different sampling rates? For example, playback at 44,1k, and recording at 96k?
2. Does it mean that playback and recording may by governed by different software (at PC) as separate devices? For example, playing using Foobar2000, and recording using Audacity?
3. If 1 and 2 is "yes", does it mean that can we have asynchronous streams?
For example, playing at 44.1k, and recording at 44,1k but from different clock domains? For example, playing 44,1k clocked from STM32H7xx, and recording from incoming SPDIF (SPDIF is always clock master, so it forced its own clock, which always is slightly different from STM clock)
Questions 3 is general, about UAC2 devices. If it is not yet implemented in X-CUBE-USB-AUDIO, but general possible, please answer anyway. Implementing by myself is not a problem, but I need information if it is possible at all (in UAC2).

Thanks in advance!

4 REPLIES 4
AScha.3
Chief III

Hi,

1. no.

2. depends on PC software , but afaik : no. If a device is "used", other programs dont get access to it.

3. hmm - just try it . :)  (Big surprise for me was: setting 44k1 , gives 44k . Thats it. USB only works on 48k with 48k.

(or 96 , because it must fit to the 1ms clock, so transfer of 44,1 samples is impossible. Funny, eh ?)

+ from > SPDIF (SPDIF is always clock master, so it forced its own clock, which always is slightly different from STM clock)

Thats why it will not work, except you manage to do some resampling , to the clk coming from PC.

UAC2  (what its doing, different to older ...( V1 , i assume ) ?

In USBX you can set USB 2   also, this should be it. (But i didnt try.)

AScha3_0-1715013699927.png

Read little about :

https://wiki.st.com/stm32mcu/wiki/Introduction_to_USBX

 

 

>Implementing by myself is not a problem

Really ? Great, if you can do this. And show me then how to do... :)

If you feel a post has answered your question, please click "Accept as Solution".
Pawel Piwowarski
Associate II

@ wrote:

Big surprise for me was: setting 44k1 , gives 44k . Thats it. USB only works on 48k with 48k.

(or 96 , because it must fit to the 1ms clock, so transfer of 44,1 samples is impossible. Funny, eh ?


This is true only for Bulk transfer mode. But UAC2 have also Synchronous and Asynchronous mode.

Maybe X-CUBE-USB-AUDIO implement only Bulk transfer mode?

 


@ wrote:
Thats why it will not work, except you manage to do some resampling , to the clk coming from PC.

This works (partially: mean asynchronous receiving without resampling) on other devices (for example in XMOS UAC2 implementation).

Well, i did not try to much with it ...so i cannot tell you, what might possible, or not.

But audio switches to isochronous mode , not bulk. So you just can decide : 44, 48, 96 .. sampels to transfer on 1ms sync.

To be true: i dont know, how XMOS manage this; maybe, the chip switches to bulk mode and just has a big buffer, to give out the I2S stream to DAC at the local master clock (my Topping D10s DAC also has XMOS usb chip and local clocks for 44.1 and 48k based frequencies ) and tell the system just "give me next 16KB data" , without forced timing from USB host . So this is a UAC2 device, i think.

And : D10s dont work with my audio-host ! (Azure usbx set to usb 1.1 - whatever it means.)

And a "simple" USB soundcard works fine, at 48kHz isochronous mode.

 

If you feel a post has answered your question, please click "Accept as Solution".
Pawel Piwowarski
Associate II

Could I please someone to answer, preferably someone from X-CUBE-USB-AUDIO library creators?
What exactly "multifrequency support" mean in X-CUBE-USB-AUDIO description?

Maybe I'm not a native english speaker, but I'm near sure that "multi" means "many at the same time", not "one chosen from many".

So I'd like to make sure that X-CUBE-USB-AUDIO actually supports many (at least two) frequencies at a time. Not only allows to choose one from a variety of available options (on the fly).