dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::usb::isoc::pipeline< pipe_t > Class Template Reference

one isochronous endpoint's request pipeline and data move over the slots of a round, the same in every environment More...

#include <dx_usb_isoc.h>

Inheritance diagram for dx::usb::isoc::pipeline< pipe_t >:
Collaboration diagram for dx::usb::isoc::pipeline< pipe_t >:

Public Member Functions

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 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 transfer (uint64_t frame, uint64_t live, int64_t timestamp, int64_t period)
 the group's tick at bus frame frame, the wire at live, the frame's start at timestamp; returns the lines moved

Public Attributes

struct { 
   bool   asynchronous 
   uint32_t   cadence 
 lines a frame carries at the samplerate: what a slot expects ahead of any scan More...
   bool   in 
   uint32_t   lead 
 frames the tick's data stays ahead of the wire More...
   uint32_t   linesize 
   uint32_t   micro_frames 
 requests per frame: the endpoint's interval at high speed More...
   uint32_t   packet 
 a slot's request: wMaxPacketSize per micro frame More...
cache
bool charged {}
 the session's alternate setting is selected and the slots stand
dx::circularcircular {}
 the endpoint's ring
dx::circularfeedback {}
 asynchronous: the line count an out slot carries per frame, produced by the in side's scan
dx::stream::clock::monitormonitor {}
 the session's counters, while a client maps them
uint8_tsentinel {}
 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 session's first failure: parks the pipeline until the session ends
struct { 
   uint8_t *   buffer 
 < explicit feedback: an asynchronous sink states its rate on an isoc endpoint of its own, one request per bus frame of a round; the platform stands the slots More...
   union isoc::frame *   frame 
 per slot: its request's frame descriptors More...
   uint32_t   micro_frames 
 requests per frame: the feedback endpoint's interval at high speed More...
   uint32_t   packet 
 3 byte states 10.14 samples per frame, 4 byte 16.16 More...
   uint64_t   rate 
 the sink's last stated rate, samples per frame in 16.16 More...
   uint64_t   remainder 
 the 16.16 fraction carried from frame to frame More...
   uint64_t *   sequence 
 per slot: the bus frame it is scheduled for, 0: free More...
sync
struct dx::usb::audio::isoc::cycle::tick * tick = nullptr
bool ticking {}
 between start() and stop(): the tick charges and submits
uint32_t ticks = 0

Detailed Description

template<typename pipe_t>
class dx::usb::isoc::pipeline< pipe_t >

one isochronous 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. 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
  • int64_t now(): the timestamp clock, in the group's units
  • 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

Constructor & Destructor Documentation

◆ pipeline()

template<typename pipe_t>
dx::usb::isoc::pipeline< pipe_t >::pipeline ( pipe_t & pipe)
inline

Member Function Documentation

◆ charge()

template<typename pipe_t>
void dx::usb::isoc::pipeline< pipe_t >::charge ( int64_t now,
int64_t period )
inline

the session prologue past the alternate setting's selection: frees every slot, seeds the feedback, times the cycle

◆ fill()

template<typename pipe_t>
uint32_t dx::usb::isoc::pipeline< pipe_t >::fill ( tick_t & tick)
inline

takes an out slot's data from the ring, sized as its request was submitted; returns the lines taken

Here is the caller graph for this function:

◆ housekeeping()

template<typename pipe_t>
void dx::usb::isoc::pipeline< pipe_t >::housekeeping ( volatile uint64_t & rtx,
uint32_t size,
int64_t timestamp,
int64_t entry,
int64_t period )
inline

the ring's cycle bookkeeping past a tick's move: its timestamp and the cycle boundary's time

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize() [1/2]

void dx::usb::audio::isoc::cycle::initialize ( uint32_t packet_size,
uint32_t micro_frames )
inlineinherited

◆ initialize() [2/2]

void dx::usb::audio::isoc::cycle::initialize ( uint32_t samplerate,
uint32_t line_size,
uint32_t micro_frames,
bool implicit_feedback )
inlineinherited
Here is the call graph for this function:

◆ sync_initialize()

template<typename pipe_t>
void dx::usb::isoc::pipeline< pipe_t >::sync_initialize ( uint32_t packet,
uint32_t micro_frames )
inline

the feedback endpoint's slots stand: every slot's request a packet per micro frame

◆ sync_transfer()

template<typename pipe_t>
void dx::usb::isoc::pipeline< pipe_t >::sync_transfer ( uint64_t frame)
inline

the sink's own feedback endpoint: collects the rate it states and turns it into this pipeline's per frame line counts

Here is the caller graph for this function:

◆ transfer()

template<typename pipe_t>
uint32_t dx::usb::isoc::pipeline< pipe_t >::transfer ( uint64_t frame,
uint64_t live,
int64_t timestamp,
int64_t period )
inline

the group's tick at bus frame frame, the wire at live, the frame's start at timestamp; returns the lines moved

Here is the call graph for this function:

Member Data Documentation

◆ asynchronous

template<typename pipe_t>
bool dx::usb::isoc::pipeline< pipe_t >::asynchronous

◆ buffer

template<typename pipe_t>
uint8_t* dx::usb::isoc::pipeline< pipe_t >::buffer

< explicit feedback: an asynchronous sink states its rate on an isoc endpoint of its own, one request per bus frame of a round; the platform stands the slots

every slot's packets, one per micro frame

◆ [struct]

struct { ... } dx::usb::isoc::pipeline< pipe_t >::cache

◆ cadence

template<typename pipe_t>
uint32_t dx::usb::isoc::pipeline< pipe_t >::cadence

lines a frame carries at the samplerate: what a slot expects ahead of any scan

◆ charged

template<typename pipe_t>
bool dx::usb::isoc::pipeline< pipe_t >::charged {}

the session's alternate setting is selected and the slots stand

◆ circular

template<typename pipe_t>
dx::circular* dx::usb::isoc::pipeline< pipe_t >::circular {}

the endpoint's ring

◆ feedback

template<typename pipe_t>
dx::circular* dx::usb::isoc::pipeline< pipe_t >::feedback {}

asynchronous: the line count an out slot carries per frame, produced by the in side's scan

◆ frame

template<typename pipe_t>
union isoc::frame* dx::usb::isoc::pipeline< pipe_t >::frame

per slot: its request's frame descriptors

◆ in

template<typename pipe_t>
bool dx::usb::isoc::pipeline< pipe_t >::in

◆ lead

template<typename pipe_t>
uint32_t dx::usb::isoc::pipeline< pipe_t >::lead

frames the tick's data stays ahead of the wire

◆ linesize

template<typename pipe_t>
uint32_t dx::usb::isoc::pipeline< pipe_t >::linesize

◆ micro_frames

template<typename pipe_t>
uint32_t dx::usb::isoc::pipeline< pipe_t >::micro_frames

requests per frame: the endpoint's interval at high speed

requests per frame: the feedback endpoint's interval at high speed

◆ monitor

template<typename pipe_t>
dx::stream::clock::monitor* dx::usb::isoc::pipeline< pipe_t >::monitor {}

the session's counters, while a client maps them

◆ packet

template<typename pipe_t>
uint32_t dx::usb::isoc::pipeline< pipe_t >::packet

a slot's request: wMaxPacketSize per micro frame

3 byte states 10.14 samples per frame, 4 byte 16.16

◆ rate

template<typename pipe_t>
uint64_t dx::usb::isoc::pipeline< pipe_t >::rate

the sink's last stated rate, samples per frame in 16.16

◆ remainder

template<typename pipe_t>
uint64_t dx::usb::isoc::pipeline< pipe_t >::remainder

the 16.16 fraction carried from frame to frame

◆ sentinel

template<typename pipe_t>
uint8_t* dx::usb::isoc::pipeline< pipe_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

◆ sequence

template<typename pipe_t>
uint64_t* dx::usb::isoc::pipeline< pipe_t >::sequence

per slot: the bus frame it is scheduled for, 0: free

◆ status

template<typename pipe_t>
os_result dx::usb::isoc::pipeline< pipe_t >::status {}

the session's first failure: parks the pipeline until the session ends

◆ [struct]

struct { ... } dx::usb::isoc::pipeline< pipe_t >::sync

◆ tick

struct dx::usb::audio::isoc::cycle::tick* dx::usb::audio::isoc::cycle::tick = nullptr
inherited

◆ ticking

template<typename pipe_t>
bool dx::usb::isoc::pipeline< pipe_t >::ticking {}

between start() and stop(): the tick charges and submits

◆ ticks

uint32_t dx::usb::audio::isoc::cycle::ticks = 0
inherited

The documentation for this class was generated from the following file:

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.