pub struct Config<'d> {
pub sample_rates_hz: &'d [u32],
pub sample_width: SampleWidth,
pub channels: &'d [Channel],
pub input_terminal: TerminalType,
pub feature_unit: Vec<FeatureUnitControls, MAX_AUDIO_CHANNEL_COUNT, u8>,
}Expand description
Everything the audio source advertises to the host.
The stream has no synch (feedback) endpoint: an asynchronous source has none [USB 2.0 5.12.4.2] — the data stream itself carries the rate, and the host follows it.
Fields§
§sample_rates_hz: &'d [u32]The supported sample rates in Hz, as discrete values. At least one, at most ten. The first is the one reported before the host sets any.
sample_width: SampleWidthThe audio sample resolution.
channels: &'d [Channel]The audio channels, in stream order (up to 12). The host numbers the
logical channels by wChannelConfig bit order, so the entries must be
unique and in that order. One entry is a mono stream.
input_terminal: TerminalTypeWhat the Input Terminal is; the host shows the device by it. Must not
be TerminalType::UsbStreaming — that is the Output Terminal’s role.
feature_unit: Vec<FeatureUnitControls, MAX_AUDIO_CHANNEL_COUNT, u8>Controls the USB host can change on each channel.
Use heapless::Vec::new() to omit the Feature Unit. Otherwise, provide
channels.len() + 1 entries: the master first, then each audio channel in
Self::channels order. Use FeatureUnitControls::empty for no controls
on a channel.