|
dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
|
generic USB audio 1.0 More...
Namespaces | |
| namespace | to |
Classes | |
| union | descriptor |
| USB audio class descriptors. More... | |
| struct | isoc |
| the isochronous cycle of one pipe: the slots a session rotates through, each carrying the bus frame it is scheduled for, its request size and the lines its micro frames hold. More... | |
| struct | range |
| an ADC2 control's answer: subranges of minimum, maximum and resolution More... | |
| struct | subclass |
Enumerations | |
| enum | endpoint_control : uint16_t { sampling_frequency = 0x0100 } |
| enum | feature_control : uint16_t { mute = 0x0100 , volume = 0x0200 } |
| enum | request : uint8_t { set_cur = 0x01 , set_min , set_max , set_res , set_mem , get_cur = 0x81 , get_min , get_max , get_res , get_mem , get_stat = 0xff } |
| enum | selector_control : uint16_t { selector_v1 = 0x0000 , selector_v2 = 0x0100 } |
| enum | terminal : uint16_t { usb_undefined = 0x0100 , usb_streaming = 0x0101 , usb_vendor = 0x01ff , input_undefined = 0x0200 , microphone = 0x0201 , desktop_microphone = 0x0202 , personal_microphone = 0x0203 , omni_microphone = 0x0204 , microphone_array = 0x0205 , processing_microphone = 0x0206 , output_undefined = 0x0300 , speaker = 0x0301 , headphones = 0x0302 , head_mounted = 0x0303 , desktop_speaker = 0x0304 , room_speaker = 0x0305 , communication_speaker = 0x0306 , lfe_speaker = 0x0307 , bidirectional_undefined =0x0400 , handset = 0x0401 , headset = 0x0402 , speakerphone = 0x0403 , echo_suppressing = 0x0404 , echo_canceling = 0x0405 , telephony_undefined = 0x0500 , phone_line = 0x0501 , telephone = 0x0502 , down_line_phone = 0x0503 , external_undefined = 0x0600 , analog_connector = 0x0601 , digital_interface = 0x0602 , line_connector = 0x0603 , legacy_connector = 0x0604 , spdif = 0x0605 , da_stream = 0x0606 , dv_stream = 0x0607 , embedded_undefined = 0x0700 , calibration_noise = 0x0701 , equalization_noise = 0x0702 , cd_player = 0x0703 , dat = 0x0704 , dcc = 0x0705 , minidisk = 0x0706 , analog_tape = 0x0707 , phonograph = 0x0708 , vcr = 0x0709 , video_disc = 0x070a , dvd = 0x070b , tv_tuner = 0x070c , satellite = 0x070d , cable_tuner = 0x070e , dss = 0x070f , radio_receiver = 0x0710 , radio_transmitter = 0x0711 , multitrack = 0x0712 , synthesizer = 0x0713 } |
| the terminal types of the audio class ("Universal Serial Bus Device
Class Definition for Terminal Types", A.2): what wTerminalType holds, and what a CoreAudio HAL answers as a stream's terminal type for a USB device and for the machine's own More... | |
Functions | |
| template<typename desc_t> | |
| bool | configure (desc_t &desc, const void *configuration, size_t length) noexcept |
| a class compliant device's desc from its configuration descriptor: the clocks, streams and pins of the audio class descriptors, walked in place - bLength and wTotalLength are device supplied and untrusted, every step is bounded by them. ADC1 only, an ADC2 device leaves the desc as it is. A vendor specific interface (bInterfaceClass vendor) with the audio subclasses is read like the class's own: what makes it audio is its class descriptors, and a setting without them yields nothing. | |
| template<typename request_t> | |
| os_result | rate (uint32_t value, request_t &&requestrequest) |
| the domain's sampling frequency at a rated endpoint, taken at its session's charge in the alternate setting the charge selected - the endpoint exists there alone: set, then read back; a device running another rate than the domain's fails the charge. request(rate, set) is the platform's class request to the endpoint, ok returned | |
| template<typename desc_t> | |
| uint32_t | rated (const desc_t &desc, const typename desc_t::configuration &active, const void *configuration, size_t length) noexcept |
| the streams of a desc, in the stream configurations active runs, whose endpoints take the sampling frequency control, a bit per desc.stream[]: the class endpoint descriptor states it (bmAttributes D0) - or, none stating it, every audio stream of a configuration carrying an AudioControl header (ADC1); a configuration without one takes no class request. A stream stating options.quirk.samplerate does the opposite of what its descriptor states, and the fallback leaves it alone | |
| bool | within (const decltype(usb::descriptor::head) *head, uint8_t type, uint8_t subtype) noexcept |
| a class specific descriptor of the type and subtype: those of an interface setting run up to its next interface descriptor | |
generic USB audio 1.0
| enum dx::usb::audio::request : uint8_t |
| enum dx::usb::audio::terminal : uint16_t |
the terminal types of the audio class ("Universal Serial Bus Device Class Definition for Terminal Types", A.2): what wTerminalType holds, and what a CoreAudio HAL answers as a stream's terminal type for a USB device and for the machine's own
|
noexcept |
a class compliant device's desc from its configuration descriptor: the clocks, streams and pins of the audio class descriptors, walked in place - bLength and wTotalLength are device supplied and untrusted, every step is bounded by them. ADC1 only, an ADC2 device leaves the desc as it is. A vendor specific interface (bInterfaceClass vendor) with the audio subclasses is read like the class's own: what makes it audio is its class descriptors, and a setting without them yields nothing.
Each audio endpoint of an AudioStreaming interface is a stream, and every alternate setting carrying it with a format one of its configurations - richest first (bit resolution, then channels), each with the rates its format states; the general descriptor's terminal link names the terminal pair the stream runs between, which gives the pin its channels and, from the terminal on the far side of the USB streaming one, its plug. ADC1 states no clock entity: the function runs off one clock, its rates those of every configuration. Feedback endpoints yield no stream: a sink finds its sync endpoint in its own endpoint descriptor. The target is the endpoint address, the configuration's id its alternate setting.
the descriptor after head, nullptr past the end
a terminal of the control interface by id: the input or output terminal descriptor
the rate entries a type I format states: a list clamped to what its descriptor carries, a continuous range its two bounds
the sample rates a type I format states: its list, or every rate of the continuous range between its two bounds
< a clock the desc states drives every stream: the formats' rate lists are not asked
< the clock domain's advance is read off one stream only
| os_result dx::usb::audio::rate | ( | uint32_t | value, |
| request_t && | request ) |
the domain's sampling frequency at a rated endpoint, taken at its session's charge in the alternate setting the charge selected - the endpoint exists there alone: set, then read back; a device running another rate than the domain's fails the charge. request(rate, set) is the platform's class request to the endpoint, ok returned
|
noexcept |
the streams of a desc, in the stream configurations active runs, whose endpoints take the sampling frequency control, a bit per desc.stream[]: the class endpoint descriptor states it (bmAttributes D0) - or, none stating it, every audio stream of a configuration carrying an AudioControl header (ADC1); a configuration without one takes no class request. A stream stating options.quirk.samplerate does the opposite of what its descriptor states, and the fallback leaves it alone
|
inlinenoexcept |
a class specific descriptor of the type and subtype: those of an interface setting run up to its next interface descriptor
| (c) copyright 2009 dynamic acoustics e.U. | generated on |