one clock domain endpoint's request pipeline and data move over the slots of a round, the same in every environment
More...
|
| void | charge(int64_t now, int64_t period) |
| | the session prologue past the alternate setting's selection: frees every slot, seeds the feedback, times the cycle
|
| uint32_t | fill(tick_t& tick) |
| | takes an out slot's data from the ring, sized as its request was submitted; returns the lines taken
|
| void | housekeeping(volatile uint64_t& rtx, uint32_t size, int64_t timestamp, int64_t entry, int64_t period) |
| | the ring's cycle bookkeeping past a tick's move: its timestamp and the cycle boundary's time
|
| 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) |
| | pipeline(pipe_t& pipe) |
| void | rate(uint32_t samplerate) |
| bool | submitting() const |
| void | sync_initialize(uint32_t packet, uint32_t micro_frames) |
| | the feedback endpoint's slots stand: every slot's request a packet per micro frame
|
| void | sync_transfer(uint64_t frame) |
| | the sink's own feedback endpoint: collects the rate it states and turns it into this pipeline's per frame line counts
|
| uint32_t | transact(int64_t timestamp, int64_t period, uint32_t advance) |
| | a bulk or interrupt endpoint's tick: its slots are transactions the device paces, in submission order - the tick counts their completions, takes an in transaction as soon as the last bytes of each of its packets left the sentinel (at its completion where they never do: a short packet, a buffer the platform copies) and fills an out transaction once the device's position comes within lead transactions of it (at its submit where it already is). The device's position runs with the reference's advance and is raised by every completion; a completion ahead of its fill counts as overload. Returns the lines the wire moved.
|
| uint32_t | transfer(uint64_t frame, uint64_t live, int64_t timestamp, int64_t period, uint32_t advance) |
| | the group's tick at bus frame frame, the wire at live, the frame's start at timestamp, the reference stream's lines the tick before at advance; returns the lines moved
|
|
| struct | cache |
| bool | charged{} |
| | the session's alternate setting is selected and the slots stand
|
| circular_t* | circular{} |
| | the endpoint's ring: its type's force_read/force_write are the wire format's codec
|
| dx::circular* | feedback{} |
| | asynchronous: the line count an out slot carries per frame, produced by the in side's scan
|
| bool | held{} |
| | past its stop: the session keeps it submitting while the direction the device stops first still holds requests (desc::start_stop_order)
|
| dx::stream::clock::monitor* | monitor{} |
| | the session's counters, while a client maps them
|
| uint8_t* | sentinel{} |
| | in: a slot's image of pseudo random lines, its fill between takes - the controller's data ends at the last line differing from it
|
| os_result | status{} |
| | the charge's: a failed one rests the group, a recovery clears it
|
| struct | sync |
| struct dx::usb::audio::isoc::cycle::tick* | tick= nullptr |
| bool | ticking{} |
| | between start() and stop(): the tick charges and submits
|
| uint32_t | ticks{} |
template<typename pipe_t, typename circular_t = dx::circular>
class dx::usb::isoc::pipeline< pipe_t, circular_t >
one clock domain endpoint's request pipeline and data move over the slots of a round, the same in every environment
Compiled in user mode and in the kernel alike (status returns, no exceptions), the pipeline holds every scheduling rule of an endpoint's session - see dxd/CLAUDE.md "Isoc scheduling": the group's tick at bus frame frame submits the free slot a round ahead, resubmits every polled completion a round on, both in frame order, and moves the data - an out slot due lead frames ahead is filled from the ring into its pending request, the in slot due lead frames behind is taken ahead of its completion, the sentinel scan its size's source. A bulk or interrupt endpoint's slot is one transaction of cache.lines lines the device paces (transact). Completions only count.
The environment's pipe supplies the platform's part:
- os_result receive(struct tick&, uint64_t& sequence) / transmit(...): the slot's request, sequence advanced past it
- bool poll(isoc::result&): the next completion, in submission order (the platform's request ring keeps it), result.frame naming the slot's frames
- void moved(): data moved between a slot and the ring: the ring's readers get told
- size_t vendor(uint8_t* wire, size_t size, bool data): a transaction's wire bytes past its fill (out, data false: an idle slot) and ahead of its take (in: the bytes the ring takes)
- int64_t now(): the timestamp clock, in the group's units
- bool outstanding(): requests in flight, the session's idle gate; os_result charge(): the session prologue - the alternate setting selected, the slots stood, then the pipeline's own; it keeps its result in status, logging a failure as it starts and its recovery once
- with a sync endpoint: os_result sync_receive(unsigned int slot, uint64_t& sequence) / bool sync_poll(isoc::result&), the feedback endpoint's request and completion
template<typename pipe_t, typename circular_t= dx::circular>
a bulk or interrupt endpoint's tick: its slots are transactions the device paces, in submission order - the tick counts their completions, takes an in transaction as soon as the last bytes of each of its packets left the sentinel (at its completion where they never do: a short packet, a buffer the platform copies) and fills an out transaction once the device's position comes within lead transactions of it (at its submit where it already is). The device's position runs with the reference's advance and is raised by every completion; a completion ahead of its fill counts as overload. Returns the lines the wire moved.