Brian,
Thank you for your answer. My remarks below.
On 31/03/16 07:17, Brian Willoughby wrote:
Philippe,
Having developed a number of USB Devices for clients, I have a strong suspicion
that your USB Descriptors are in error - even if only slightly. It might be
worth posting to Apple's USB list, but they may suggest that you're better off
looking to an official USB forum for support with regard to this area of USB
audio product development. Someone might be willing to answer a few questions,
if you're lucky.
(One quick sanity check is whether you are connecting to a Full Speed or High
Speed port. I assume that none of your features can possibly work if your
device is connected to a Full Speed port.)
It's a HS port. I can stream 10ch/24bit/192KHz on the output.
Are you aware of any existing commercial USB Audio Devices that support the
same kind of features that you're after? If so, then comparing their USB
Descriptors to yours could give you some clues.
I looked at the AudioBox 1818VSL. They support on IN and OUT 18 or 14
channels 48/96K. It shows up correctly on Audio MIDI Setup, so I surely
have something wrong in my descriptors.
Have you tried your USB Audio 2.0 Device under other operating systems? If so,
does it function the way that you intend with your current firmware?
Not yet.
The reason I suggest focusing on the USB Descriptors is that - at least in my
experience - OSX is basically flawless when it comes to USB Class drivers. If
there is a problem, it's probably not Apple's fault. I've done more development
of USB-MIDI than USB Audio, and I can say that USB-MIDI support is probably
perfect. Every commercial audio device I've used has also been 100% accurate.
If there's a discrepancy between the Input tab and the Output tab, then I
suspect you may have a very simple error in your Descriptors that's causing
Apple's USB Audio Class driver to become confused.
Apple's only limitation I'm aware of is that USB High Speed Devices may not
support Isochronous endpoints with more than 1024 bytes. That may be an old
limitation, or it may still be present in the latest releases of OSX. If your
audio formats exceed 1024 bytes per endpoint, then perhaps that would be the
source of your problems. I believe that USB HS supports at least 3072 bytes per
Isochronous endpoint, officially, if not more, but Apple's USB drivers stop
short of the full potential of the spec (or they did at one time). Workarounds
for this involve using more than one endpoint, each with less than 1024 bytes
per Iso EP. A quick check of the math for your examples shows that all exceed
1024 bytes. I've had some people tell me that this limit is per frame, but I
believe it's actually a microframe limit, in which case you're safe because
your largest microframe would be 600 bytes.
This limitation is for a microframe, and this is among other reasons why
we need to support channel numbers dependent on the sample rate.
https://developer.apple.com/library/mac/technotes/tn2274/_index.html
Another aspect of your question seems to revolve around whether you can tie the
number of input channels to output channels. I haven't reviewed the USB Audio
2.0 specifications looking for this particular answer, but I suspect that
you'll need to represent your requirements in the USB Descriptors before OSX
will know how to match the input and output channel counts.
To my understanding Clock and Streams descriptors are independent. And
IN and OUT Streams descriptors are also independent. Which means that it
could be possible to choose some streams configuration for the Input
side, and another for the Output side. This is a point I'll have to
investigate, how to make sure that a user won't be able to choose non
consistent configurations.
Sorry I don't have time for a more complete answer, but hopefully one or more
of the ideas above will give you something to investigate that might prove
useful.
It has been useful, thanks.
Brian Willoughby
Sound Consulting
On Mar 30, 2016, at 6:02 AM, Philippe Wicker <[email protected]>
wrote:
Don’t know if I should have posted this to the USB list but as it concerns the
firmware of an audio 2.0 device I thought that there could be people here able
to give me some hints about my problems.
I’m working on the firmware of a device which is a USB audio 2.0 class
compliant device. This device supports sample rate from 44.1 to 192KHz
(discrete values 44.1, 48, 88.2, 96, 176.4 and 192). And we want it to support
for both Input and Output 8 channels (6 analog + 2 ADAT) at 192 and 176.4, 10
channels (6 analog + 4 ADAT) at 88.2 and 96, and 14 channels (6 analog + 8
ADAT) at 44.1 and 48. All the channels support a unique 24 bits resolution.
For now I’m trying to do that using alternate settings and I check it using the
“Audio Devices” window of Audio MIDI Setup. Apart the AS Interface for the zero
bandwidth I have 2 sets of 3 alternate interfaces (1 set for the input and the
2nd set for the output). The channels number is specified within the Class
Specific AS Interface descriptors, and the resolution is specified within Type
1 Format descriptors.
Looking at the Audio Devices window, it works for the “Input” tab, but not for
the “Output” tab.
The “Input" tab displays 1 popup where I can choose the sample rate, and a 2nd
one where I can choose the number of channels.
On the other hand the “Output” tab correctly displays the sample rate popup,
but gives me only the “14ch - 24bit integer” choice. If I set the “output”
descriptors so that the alternate settings provides different resolutions
(instead of channels numbers) then the right popup is correctly populated with
the 3 resolutions.
So I cannot get a "8 in / 8 out” configuration which what I want to achieve. I have
at best an "8 in / 14 out” config which is too much (not enough bandwidth at high
sample rates).
Is this non-symetic behaviour the expected one? Any idea?
More generally, is there a better way to manage this kind of
multw-configurations where the number of channels is correlated with the actual
sample rate?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com
This email sent to [email protected]