dxd - dynax driver framework 2.1.0d73
cross platform open source driver development framework
|
#include <dx_usb_stream_pipe.h>
Classes | |
struct | cache |
struct | isoc |
Public Types | |
enum class | type : uint8_t { control =::kUSBControl , isoc = ::kUSBIsoc , bulk = ::kUSBBulk , irq = ::kUSBInterrupt , control =::UsbdPipeTypeControl , isoc = ::UsbdPipeTypeIsochronous , bulk = ::UsbdPipeTypeBulk , irq = ::UsbdPipeTypeInterrupt } |
enum class | type : unsigned char { control =::kUSBControl , isoc = ::kUSBIsoc , bulk = ::kUSBBulk , irq = ::kUSBInterrupt , control =::UsbdPipeTypeControl , isoc = ::UsbdPipeTypeIsochronous , bulk = ::UsbdPipeTypeBulk , irq = ::UsbdPipeTypeInterrupt } |
Public Member Functions | |
pipe & | abort () try |
dx_catchall_rethrow () os_result status() const noexcept | |
dx_catchall_rethrow (;,"endpoint:%x interface:%d setting:%d", endpoint.address, endpoint.interface, endpoint.setting) bool in() const noexcept | |
dx_catchall_rethrow (try {const_cast< pipe * >(this) ->clear();} dx_catchall_handler(this,), "idx:%d size:%lld", idx, sizeof request) template< typename data_t > data_t submit(const control &control) const | |
control request to pipe | |
bool | in () const noexcept |
bus initializer (isoc, bulk, pci, etc.) compatibility | |
pipe & | info () noexcept |
pipe & | max_frame_size (uint32_t frame_size) |
pipe & | operator<< (const data_t &data) |
synchronous USB write request | |
pipe & | operator>> (data_t &data) |
synchronous USB read request | |
template<typename data_t > | |
pipe & | submit (const request< data_t > &request) const try |
standard request to pipe | |
Public Attributes | |
const struct dx::usb::pipe::attributes & | attributes |
std::deque< union audio::descriptor::endpoint > | audio |
device_t & | device |
interface_t & | interface |
enum dx::usb::platform::pipe::type | type |
Protected Types | |
typedef struct desc_t::stream | desc |
Protected Member Functions | |
template<unsigned int channels, typename channel_t > | |
pipe & | attach (channel_t **io[2], uint64_t channel_map[(channels+63)/64]) |
dx_assert_discard (size==cache.transaction_size? ok:invalid) | |
dx_catchall_rethrow () | |
dx_catchall_rethrow () | |
dx_catchall_rethrow () void received(os_result status | |
async isoc read callback | |
dx_catchall_rethrow () void transmitted(os_result status | |
async write callback | |
dx_catchall_rethrow (async.status=exception.error;this->signal();) pipe &flush() noexcept | |
dx_catchall_rethrow (isoc_housekeeping(exception.error, circular->tx, timestamp);) void transmitted(os_result status | |
async isoc write callback | |
virtual float | encoder (dx::stream::encoder::index::type type, unsigned int index) const |
virtual bool | encoder (dx::stream::encoder::index::type type, unsigned int index, float value) |
virtual void | exception (const dx::exception &exception, bool filtered=false) const noexcept |
virtual void | exception (const dx::exception &exception, bool filtered=false) const noexcept |
if (!cache.buffered||config.transaction.vendor) | |
if (!sync.cycle.transaction.count--) | |
generates timestamp | |
if (cache.monitor) | |
if (cache.monitor) | |
if (hw.clock &&iosize) | |
if (started &&config.clock.domain) if(cache.buffered) | |
if (started) | |
if (started) | |
if (status) async.status | |
if (this->device.driver.log.bus.operation >=log::level::debug||this->device.driver.log.streaming.operation >=log::level::debug) | |
void | initialize (uint32_t packet_size, uint32_t micro_frames) |
void | initialize (uint32_t samplerate, uint32_t line_size, uint32_t micro_frames, bool implicit_feedback) |
isoc_housekeeping (status, circular->rx, timestamp) | |
isoc_housekeeping (status, circular->tx, timestamp) | |
uint32_t | latency () noexcept |
operator circular_t * () const noexcept | |
circular_t * | operator-> () const noexcept |
pipe (usb::stream::device< desc_t > &device, const desc &desc) | |
creates circular streaming backing store and frame buffers | |
void | received (os_result status, size_t size) override try |
virtual async callbacks | |
virtual void | received (os_result, size_t, int64_t, usb::isoc::frame *) |
virtual uint32_t | samplerate () try |
provisional sample rate handler: needs to move into clock class | |
virtual void | samplerate (uint32_t samplerate) try |
this | signal () |
void | start (uint64_t frame, unsigned int starting=1) override try |
async IO thread control (required for Windows compatibility) | |
unsigned int | stop (bool force=false) noexcept override |
virtual uint8_t | submit (dx::stream::encoder::index::type type, unsigned int index) const |
virtual bool | submit (dx::stream::encoder::index::type type, unsigned int index, uint8_t value) |
submit encoder stage to device return true if successfully submitted; if false is returned the encode state machine will not update the stage value (i.e. if the stage can't be submitted during streaming pause), given the chance to submit the stage at start(). | |
switch (status) | |
virtual void | transmitted (os_result, size_t) |
virtual void | transmitted (os_result, size_t) |
virtual void | transmitted (os_result, size_t, int64_t, usb::isoc::frame *) |
virtual void | transmitted (os_result, size_t, int64_t, usb::isoc::frame *) |
~pipe () noexcept override | |
Protected Attributes | ||
struct { | ||
} | address | |
uint8_t | address = 0 | |
struct { | ||
uint32_t ahead | ||
volatile uint32_t completion | ||
os_result status | ||
bytes ahead in streaming buffer due to pre-scheduled async requests More... | ||
uint32_t submit | ||
} | async | |
struct dx::usb::stream::pipe::cache | cache | |
circular_t * | circular = nullptr | |
async | completion = async.completion? async.completion- 1: ticks- 1 | |
auto & | config = this->config[0] | |
else | ||
auto & | hw = this->device.hw | |
uint8_t | idx = 0 | |
auto | iosize = hw.iosize | |
struct dx::usb::stream::pipe::isoc | isoc | |
auto | reference = circular->rx | |
size_t | size | |
std::recursive_mutex | start_stop_in_progress | |
start/stop operation in progress | ||
dx_catchall_rethrow(isoc_housekeeping(exception.error, circular->rx, timestamp);) void exception(const dx std::atomic< int > | started {} | |
data driven streaming out / observer watchdog thread | ||
struct { | ||
struct { | ||
unsigned int ticks | ||
struct { | ||
unsigned int count | ||
} transaction | ||
} cycle | ||
} | sync | |
struct dx::usb::audio::isoc::cycle::tick * | tick = nullptr | |
size_t int64_t | timestamp | |
size_t size override | try | |
size_t int64_t usb::isoc::frame *frame override | try | |
size_t int64_t usb::isoc::frame *override | try | |
struct { | ||
::WINUSB_INTERFACE_HANDLE handle | ||
} | winusb | |
Friends | |
class | pause |
|
protected |
|
stronginherited |
|
stronginherited |
|
inlineprotected |
creates circular streaming backing store and frame buffers
generates isoc cycle metrics from sample rate,
requests buffers to fit at least 3x max iosize with isoc cycle size granularity
update max frame size
|
inlineoverrideprotectedvirtualnoexcept |
Reimplemented from dx::usb::platform::pipe< device_t, interface_t >.
|
inlineinherited |
|
inlineprotected |
|
protected |
|
protected |
|
protected |
|
inlinenoexceptinherited |
|
protected |
async isoc read callback
|
protected |
async write callback
|
inlinenoexceptinherited |
|
inlineprotectednoexcept |
|
protected |
async isoc write callback
|
inlineinherited |
control request to pipe
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtualnoexceptinherited |
|
inlineprotectedvirtualnoexceptinherited |
|
inlineprotected |
|
inlineprotected |
generates timestamp
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
inlineprotected |
|
inlinenoexceptinherited |
bus initializer (isoc, bulk, pci, etc.) compatibility
|
inlinenoexceptinherited |
< Bit D7 indicates a requirement for wMaxPacketSize packets.; D7: MaxPacketsOnly
< D1..0: Pitch Control; D3..2: Data Overrun Control; D5..4: Data Underrun Control; D7..6: Reserved. Must be set to 0.
< Indicates the units used for the wLockDelay field: 0: Undefined; 1: Milliseconds; 2: Decoded PCM samples; 3..255: Reserved
< Indicates the time it takes this endpoint to reliably lock its internal clock recovery circuitry. Units used depend on the value of the bLockDelayUnits field.
< Number of Embedded MIDI Jacks: n.
< ID of the n-th Embedded Jack that is associated with this endpoint.
|
inlineinherited |
|
inlineinherited |
|
protected |
|
protected |
|
inlineprotectednoexcept |
|
inlineinherited |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineinherited |
synchronous USB write request
|
inlineinherited |
synchronous USB read request
|
inlineoverrideprotectedvirtual |
virtual async callbacks
generates timestamp
Reimplemented from dx::usb::platform::pipe< device_t, interface_t >.
|
inlineprotectedvirtualinherited |
|
inlineprotectedvirtual |
provisional sample rate handler: needs to move into clock class
|
inlineprotectedvirtual |
|
protected |
|
inlineoverrideprotectedvirtual |
async IO thread control (required for Windows compatibility)
estimate upcoming timestamp
scheduling all but one isoc requests at least 1 sequence ahead; aligned to whole cycles,
Reimplemented from dx::usb::platform::pipe< device_t, interface_t >.
|
inlineoverrideprotectedvirtualnoexcept |
Reimplemented from dx::usb::platform::pipe< device_t, interface_t >.
|
inlineinherited |
standard request to pipe
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
submit encoder stage to device return true if successfully submitted; if false is returned the encode state machine will not update the stage value (i.e. if the stage can't be submitted during streaming pause), given the chance to submit the stage at start().
|
inlineprotected |
|
inlineprotectedvirtualinherited |
|
inlineprotectedvirtualinherited |
|
inlineprotectedvirtualinherited |
|
inlineprotectedvirtualinherited |
|
friend |
struct { ... } dx::usb::platform::pipe< device_t, interface_t >::address |
|
protectedinherited |
uint32_t dx::usb::stream::pipe< desc_t, circular_t >::ahead |
struct { ... } dx::usb::stream::pipe< desc_t, circular_t >::async |
|
inherited |
|
inherited |
class { ... } ::buffer dx::usb::platform::pipe< device_t, interface_t >::buffer |
|
protected |
|
protected |
volatile uint32_t dx::usb::stream::pipe< desc_t, circular_t >::completion |
|
protected |
|
protected |
unsigned int dx::usb::stream::pipe< desc_t, circular_t >::count |
struct { ... } dx::usb::stream::pipe< desc_t, circular_t >::cycle |
|
inherited |
|
protected |
|
inherited |
|
protected |
|
protectedinherited |
|
inherited |
|
protected |
|
protected |
|
inherited |
|
protected |
|
protected |
|
protected |
start/stop operation in progress
|
protected |
data driven streaming out / observer watchdog thread
os_result dx::usb::stream::pipe< desc_t, circular_t >::status |
bytes ahead in streaming buffer due to pre-scheduled async requests
streaming status for observer thread
uint32_t dx::usb::stream::pipe< desc_t, circular_t >::submit |
struct { ... } dx::usb::stream::pipe< desc_t, circular_t >::sync |
|
inherited |
unsigned int dx::usb::stream::pipe< desc_t, circular_t >::ticks |
|
protected |
struct { ... } dx::usb::stream::pipe< desc_t, circular_t >::transaction |
|
protected |
|
protected |
|
protected |
|
inherited |
struct { ... } dx::usb::platform::pipe< device_t, interface_t >::winusb |
(c) copyright 2009 dynamic acoustics e.U. | generated on Thu Nov 28 2024 |