The descriptor data in usb_desc.c tells the USB host what to expect in the endpoint data.
Hi Paul,
I am trying to understand the usb libs implementation by reading them with the Universal Serial Bus Device Class Definition for Audio Devices
Starting with the descriptor, I found the descriptor section that I should changed first to let the USB Host knows that the interface has 4 channels.
Code:
bNrChannels = 2 --> 4
wChannelConfig, 0x0003 = Left & Right Front --> 0x0107 = 4 channels
I believe that my big mission is to create a new AudioOutputQuadUSB object, quite same as the AudioOutputQuadUSB.
Code:
static void copy_from_buffers(uint32_t *dst, int16_t *left, int16_t *right, unsigned int len)
{
// TODO: optimize...
while (len > 0) {
*dst++ = (*right++ << 16) | (*left++ & 0xFFFF);
len--;
}
}
If you think I'm wrong or my way of thinking is wrong please tell me..
of course any suggestion is blessed.
Thanks