I am starting with Usb audio UAC2 on a RT1021 dev. board with "evkmimxrt1020_dev_composite_hid_audio_unified_freertos" example.
I managed to change the bit resolution to 24 bit or 32 bit instead of 16 bit default and I modified in "usb_device_descriptor.h" line to #define AUDIO_IN_SAMPLING_RATE_KHZ (96) to have 96000Hz sample rate but when I run the example my Linux still detects the dev board as a 48Khz sample rate one.
This happens only when I compile with #define USB_DEVICE_CONFIG_AUDIO_CLASS_2_0 (1U) in "usb-device_config.h" header, instead, if I use #define USB_DEVICE_CONFIG_AUDIO_CLASS_2_0 (0U) it shows correct 96000Hz sample rate.
There is a way to correct this when #define USB_DEVICE_CONFIG_AUDIO_CLASS_2_0 (1U) changing any usb descriptor field when the board is an UAC2 device?
Using alsacap in Linux:
With #define USB_DEVICE_CONFIG_AUDIO_CLASS_2_0 (1U):
Card 3, ID `DEMO', name `USB AUDIO+HID DEMO'
Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
2 channels, sampling rate 48000..48000 Hz
Sample formats: S24_3LE
Subdevice 0, name `subdevice #0'
With #define USB_DEVICE_CONFIG_AUDIO_CLASS_2_0 (0U):
Card 3, ID `DEMO', name `USB AUDIO+HID DEMO'
Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
2 channels, sampling rate 96000..96000 Hz
Sample formats: S24_3LE
Subdevice 0, name `subdevice #0'
Jose.