dragonman225 / stm32f469-usbaudio

Enable 24-bit / 96kHz Hi-Fi PCM stereo audio output via USB Audio Class 1.0 asynchronous mode on STM32469I-Discovery · Volume and mute control implemented
132 stars 33 forks source link

Increase audio speed #10

Open BitLoose opened 1 year ago

BitLoose commented 1 year ago

Di you think the speed can be increased for 193khz audio?

dragonman225 commented 1 year ago

Are you referring to 192kHz instead of 193kHz? 193kHz seems to be a non-standard sample rate.

I'd love to have 192kHz audio, but it's not possible on a STM32469I-Discovery dev board.

The board only supports USB Full Speed, although the max data rate is 12 Mbit/s, which seems to be able to accommodate, let's say 24bit/192kHz (24 bits 192000 samples/second 2 channels ≈ 9 Mbit/s). But USB Full Speed runs at 1 frame/ms, and audio data is sent via Isochronous Transaction, the actual limit, according to the USB standard (see Chapter 5.6.3), is 1023 bytes/frame (or 1023 bytes/ms), and 24bit/192kHz needs 24 bits 192 samples/ms 2 channels = 1152 bytes/ms, exceeding the limit. It may be possible to do 16bit/192kHz (at 768 bytes/ms), but I guess more people would prefer 24bit over 192kHz, since there're more 24bit recordings than 192kHz recordings. And I think this is the reason why many older DACs have the limit of 24bit/96kHz.