Skip to main content
Explorer II
February 15, 2023
Solved

USB audio type I IEEE_FLOAT descriptor

  • February 15, 2023
  • 15 replies
  • 5847 views

Hi all,

I am using a STM32H7 and I implemented a composite usb device (CDC + AUDIO recording) using IAD interface descriptor.

I can successfully configure the audio interface as type I PCM (I tested both 16 and 32 bit), but if I try to configure the audio as type I IEEE_FLOAT windows does not recognize the microphone (the device is still present in device manager under 'sound devices', but there is no input device under 'Audio inputs and outputs'.

I just changed the wFormatTag field of the descriptor, leaving the bSubFrameSize=4 and bBitResolution=32.

Have I to change something else?

Thank you in advance,

regards

Arianna

    This topic has been closed for replies.
    Best answer by mohamed.ayed

    Hi @AGhez​ 

    It seems that windows USB audio 1.0 drivers does not support IEE_FLOAT

    https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/usb-audio-class-system-driver--usbaudio-sys-

    you need to switch to audio 2.0 class it is noted in microsoft documentation that audio 2.0 driver support IEE_FLOAT

    https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/usb-2-0-audio-drivers?source=recommendations

    15 replies

    AGhezAuthor
    Explorer II
    March 17, 2023

    My device supports only 2 channels, 32 bit, 48000 Hz and cannot be open in exclusive mode by wasapi.

    Explain me why, if you can.

    Graduate II
    March 17, 2023

    Check Piranha's 2nd link, Exclusive Mode, 2nd bullet:

    It looks like the 32 bit might be the problem, as he said before.

    Graduate II
    March 22, 2023

    > It looks like the 32 bit might be the problem, as he said before.

    I didn't say that and the article also doesn't say it. The OS has no problems with 32-bit audio interfaces.

    > fails with PCM 32 bit, while it succeeds with PCM 16 bit

    > My device supports only ..., 32 bit

    You are contradicting yourself...

    > WasapiCapture fails

    It doesn't matter at what some particular software fails. I already told how to check and test the capabilities with a reliable well known free software - use Windows sound properties and AIMP.

    AGhezAuthor
    Explorer II
    March 22, 2023

    > I didn't say that and the article also doesn't say it.

    I am glad to know that you are so rude also with other people of the community

    >> fails with PCM 32 bit, while it succeeds with PCM 16 bit

    >> My device supports only ..., 32 bit

    >You are contradicting yourself...

    I can modify my code and recompile it with different parameters, you know

    >> WasapiCapture fails

    >It doesn't matter at what some particular software fails. I already told how to check and test the capabilities with a reliable well known free software - use Windows sound properties and AIMP

    I already checked the capabilities of my device with Windows, that it is not the point.

    I try to explain better what I am trying to do:

    • if I compile my code in order to appear as microphone working in PCM 16 bit, I can start a recording with WASAPI in exclusive mode setting it as PCM 16 bit as well;
    • if I compile my code in order to appear as microphone working in PCM 32 bit, I cannot start a recording with WASAPI in exclusive mode setting it as PCM 32 bit as well.

    Sorry if my English is not so clear, but you may be more polite instead of pretending that people are stupid

    Regards

    Arianna

    Graduate II
    March 23, 2023

    Why haven't you tested 24-bit sample size, which is the most appropriate for Hi-Fi devices?

    It is not clear how are you testing the PC software side. Some 12 years old less known .NET library used in your own software is not an indicator of anything. Check the recording with Audacity or some professional software, for example, REAPER.

    The same thing about the MCU side. Are you using the HAL/Cube broken bloatware and ST's unusable USB stack? Instead use a stack developed by competent people - TinyUSB.

    Post edited to adhere community guidelines.