Author Topic: 24bit USB audio descriptor  (Read 17051 times)

wenbingma

  • Member
  • ***
  • Posts: 7
24bit USB audio descriptor
« on: May 07, 2013, 02:57:28 am »
hello,

my device works fine with 16bit, 2channel, 48KHz descriptor.
Now, I want to implement 24bit ,2channel ,48Khz descriptor. I only change
audio streaming format type as below:

//TYPE 1 Format type descriptor
CONFIG_FORMAT_TYPE_SIZE,
bDescriptorType_CS_INTERFACE,   //bDescriptorType: CS_INTERFACE,
bInterfaceSubClass_AS_FORMAT_TYPE,   //format type
eAudioDataFormat_Type1,   //Type I
2,   //NrChannels   
0x03,   //bSubFrameSize
24,   //bBitresolutions
0x01,   //one freq
0x80,0xBB,0x00,  // 48KHz

after descriptor changed, windows can recognize audio device, but audio data format
is still 16 bit,not 24bit!!!

USB speaker Topology:
usb streaming IT --> Feature Control --> USB streaming OT -->Speaker

Audio streaming data flow:
windows recognize usb audio device as speaker, windows media player send audio streaming
data to usb audio speaker. USB speaker receives audio data streaming through endpoint4. then
usb speaker device process the audio streaming data as I2S format output.

if anybody have 24/32 bit audio experience, Please help me on this.
« Last Edit: May 07, 2013, 07:38:59 am by wenbingma »

nvd

  • Member
  • ***
  • Posts: 42
Re: 24bit USB audio descriptor
« Reply #1 on: May 08, 2013, 04:08:58 am »
With respect to descriptors, one thing that could be looked into is the Endpoint MaxPktsize. If it was set to be just enough to receive 16bit data, the size should be increased to accommodate 24bit data now.

wenbingma

  • Member
  • ***
  • Posts: 7
Re: 24bit USB audio descriptor
« Reply #2 on: May 08, 2013, 11:30:25 pm »
Yes, wMaxPacketSize is set to 288 according to 24bit/48K stereo.

also usb audio device descriptor(html format) is attached.

when 24bit/48K descriptor is used, press "Test" button on Advance tab of the Speaker properties under win7.
see attached picture.

[attachment deleted by admin]
« Last Edit: May 08, 2013, 11:35:00 pm by wenbingma »

nvd

  • Member
  • ***
  • Posts: 42
Re: 24bit USB audio descriptor
« Reply #3 on: May 09, 2013, 01:02:25 am »
This is just in case.
Windows seem to remember the properties of every device attached.
If VID PID remains same, windows might be remembering the previous configuration and treating it as 16bit still.
You may want to try uninstalling the device when connected with 16bit descriptor. then detach. then change the descriptors for 24bit and attach again.

wenbingma

  • Member
  • ***
  • Posts: 7
Re: 24bit USB audio descriptor
« Reply #4 on: May 09, 2013, 02:38:42 am »
appreciate nvd's great help.
now after uninstall audio device and re-install it. 24bit/48K audio device is installed correctly.
but press "Test" button, another error happens.


[attachment deleted by admin]

nvd

  • Member
  • ***
  • Posts: 42
Re: 24bit USB audio descriptor
« Reply #5 on: May 09, 2013, 05:30:13 am »
Actually Thanks Jan for the forum :)

Its difficult to guess what might cause the test to fail...
But looking at the analyzer log might give some hints...if the data transfers actually started.
Also see the drivers which got loaded on windows with new installation are as expected with your device.

wenbingma

  • Member
  • ***
  • Posts: 7
Re: 24bit USB audio descriptor
« Reply #6 on: May 09, 2013, 11:15:52 pm »
search "Failed to play test tone" in Google. It seems the issue relates with audio drivers.
after patch a workaround provided by Google search ,the issue is fixed and audio device can receive data over USB.
I am not familiar with audio drivers,  don't know why it works. :'(
workaround:
go to enhancements tab of speaker properties, select "disable all enhancements", and press "Preview".



[attachment deleted by admin]