Hardware done. Testprogram (blinking LED) programmed and working. Now let's see wether we can communicate via USB.
Again some news:The configuration has been changed to UAC2 and the host (MacOSX) accepts the device as a new sound card. I'm now finding out how the feedback mechanism for async. endpoints works and how the feedback values should be calculated. This is not clear to me, yet. I think I have to send the value per micro frame and not per frame as in UAC1.R.
"In order to use implicit feedback, the device must satisfy the following requirements:* Asynchronous input and output streams reside on one engine (i.e. needs to meet criteria for the Unified Engine Model.)* The polling intervals (bInterval) for the stream endpoints must match.* Either the input stream endpoint “Usage type” is set to “Implicit feedback data endpoint” (USB Audio 2.0 only, Section 220.127.116.11) and/or the sync feedback endpoint is omitted (see Table 4.)"Omitting the feedback endpoint sounds quite easy.
... 1 I2S channel is 2 analog channel right ?
1) Maximal number of audio channel onto USBAccording to the link below, 1 analog channel @ 16x48k uses 0.5% of the bandwith of the USB. So, 1 channel (24x192k) is 3%. So we can put up to 33analog channel 1 one free USB ?
But ! USB (High Speed) is 480Mbps, and 33 channels (24/192k) are only 33*24*192000 = 152064000 = 152Mbps ... so in fact we cant put much more than 33 analog channel ! Which way of thinking is wrong ?(I need to precise that I know USB maximum bandwith is divided by the number of connected devices, but let's say that I a one completely free USB ... on a PCIe card for example).
2) Number of endpointsAccording to the link I gave you, there is up to 16 endpoint on an USB device ... and there are normally 3 obligatory endpoint (2 for control and 1 for feedback). It remain 13 endpoint, each one have an I2S channel, that made up to 26 analog channel !
Now check your math. 192 kHz times 24 bits per sample is 4.6 Mbps per channel.
Remember that the stated "bandwidth" of 480 Mbps is really the wire speed; for high-speed transactions even one audio channel is still packetized and serialized at that 480 Mbps rate.
The point being that only one OUT endpoint is needed for ALL of a device's DAC data, and only one IN endpoint is needed for ALL of a device's ADC data.
Hi,Ok ... Good new ... I'm not so stupid, I understood (a few) things !QuoteNow check your math. 192 kHz times 24 bits per sample is 4.6 Mbps per channel.Yes, 1 channel is 4.6Mbps so 33 are 152Mbps. Remember, the link said that 1channel [email protected][email protected]What I wanna show you is that -even with 99 (3%*33 channels) percent of utilisation according to the link I gave you- it "remains" 480-152 = 328Mbps. So ... I understand that there are the control endpoints ... put if they uses 328Mbps of the bandwidth ... there is a problem no ?
QuoteRemember that the stated "bandwidth" of 480 Mbps is really the wire speed; for high-speed transactions even one audio channel is still packetized and serialized at that 480 Mbps rate.For example, just to see if I understand well ... UART is 115,2bps (it could be more or less, but it is an example). So, I can send 115200 bits for control, redundancy, error check and data in 1 second. The amount of each is defined by the protocol I'm using on this serial link.
Now, USB is 480Mbps. How many channels can-I put in one USB link ? There are 2 control enpoint (1 in and 1 out if i read well but I'm not sure), 1 isosynchronous enpoint IN for data from ADC, 1 isosynchronous enpoint OUT for data to DAC, and 2 others endpoint for the feedback
QuoteThe point being that only one OUT endpoint is needed for ALL of a device's DAC data, and only one IN endpoint is needed for ALL of a device's ADC data.Thank you for this clear explanation ! I hope I dont look so stupid ^^