|
dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
|
USB streaming device: the streaming device over the platform's USB device, its streams the endpoints' rings, its clock the bus frame tick. More...
#include <dxd_usb_stream.h>
Public Types | |
| typedef device<super_device_t, desc_t, clock_server<super_device_t, desc_t>> | device_t |
| typedef decltype(desc_t{}.stream[0].target) | target |
| the bus's stream address, as the clients spell it | |
Public Member Functions | |
| super::client* | client_create() override |
| void | conclude() override |
| the session ends and the device's rings go while the bus below still answers: their pipes abort on a configured device | |
| template<typename... args_t> | |
| device(args_t&&... args) | |
| int | find(const target_t& targettarget) const |
| the stream a client addresses, as the desc spells its target | |
| int | find(uint64_t id) const |
| the stream carrying the given id - what a client knows its stream by (dx::stream::stream::id) | |
| auto& | format(unsigned int idx) |
| the format the given stream's ring runs: a participant assigns its own and reads what was adopted | |
| os_result | ioctl(unsigned int ioctl, const void* in, size_t size_in, void* out, size_t size_out, size_t& size) override |
| os_result | open(unsigned int idx) |
| a kernel endpoint's open: the ring sized as dx::stream::stream::initialize sizes it - a clock domain's stream by ticks of its interval, another by transactions | |
| os_result | open(unsigned int idx, uint32_t linesize, uint32_t lines, uint32_t slack= 0, uint32_t widest= 0) |
| creates the stream's ring on its first open; the device holds its own reference, so the ring outlives its clients for the endpoints ticking on it. Its size is a session's lines, the allocation keeps the slack past them - the wrap's room, as dx::stream::stream::alloc() keeps it - in the widest line its stream configurations take | |
| const auto* | operator ()(const struct desc_t::stream& stream) |
| the stream configuration the device runs the stream in, nullptr where it runs none: the stream is one of the desc's | |
| void | reset(int64_t timestamp) |
| the host's session start: every ring begins at its size, in silence, without a transport - the participants anchor to it as it stands | |
Public Attributes | |
| broadcast | broadcast |
| its values' listeners: every client's, woken on a commit of any of them | |
| promoted<typename desc_t::configuration, configuration_server<device_t>> | configuration |
| per stream the stream configuration the device runs it in, the richest by default | |
| class domain | hw |
| the DAW clock: every client rides on it with its own buffer switch event | |
| dxd::stream* | io [streams] |
| the shared ring of each stream, allocated with the first client opening it | |
| promoted<uint32_t, iosize_server<device_t>> | iosize |
| class multichannel::stream<>::clock::monitor | monitor |
| performance counters, allocated with the first client asking for them | |
| promoted<uint32_t, offset_server<device_t>> | safety_offset [dx::stream::direction::directions] |
| promoted<uint32_t, samplerate_server<device_t>> | samplerate |
| promoted<uint32_t, clock_server<super_device_t, desc_t>> | started |
| started streams over all clients: the clock domain runs while this is not zero | |
| promoted<uint32_t, transport_server<device_t>> | transport [3] |
Static Public Attributes | |
| static constexpr unsigned int | streams |
| the desc's stream capacity, as its array carries it | |
Protected Member Functions | |
| desc_t::configuration | align(const typename desc_t::configuration& value, const typename desc_t::configuration& current) override |
| the configuration the device's bus carries: its USB configuration, per stream what the rate and the periodic budget leave (dx::usb::align) - the rate as it stands, never asked from inside its own server | |
| uint32_t | blocks() |
| the domain's cycle in ticks: the block a client of its iosize moves per switch | |
| uint64_t | budget(const typename desc_t::configuration& value) override |
| the periodic bus time the configuration takes, in ns: to hold against budget(), what the bus offers | |
| auto& | clock_desc() |
| the desc's single clock domain - the buses served here have exactly one | |
| os_result | exchange(promoted<value_t, server_t>& value, const void* in, size_t size_in, void* out, size_t size_out, size_t& size) |
| promoted value as a get (no input) or set-and-read-back IOCTL | |
| uint32_t | granularity() |
| samples per clock tick, the unit both the tick and iosize are aligned to | |
| virtual void | halt() |
| os_result | launch() override |
| a desc without streams takes them from the selected configuration's audio class descriptors | |
| os_result | rate(const dx::usb::endpoint& targettarget, uint32_t& rate, bool set) |
| the sampling frequency request to an endpoint, in the alternate setting its session's charge selected - the endpoint exists there alone: sets the rate, or reads it | |
| uint32_t | rate(uint32_t value) override |
| the domain's rate: every isoc pipeline takes it for its sessions, a rated endpoint at its session's charge (dx::usb::audio::rate) | |
| virtual os_result | run() |
| the session's start and end, from started's server: the group's thread; an endpoint owner adds its own. A vanished device runs no session | |
| virtual void | tick(uint32_t lines, uint64_t frame, int64_t timestamp) |
| the reference stream advanced, under the mutex: the clock domain follows; an endpoint owner moves its endpoints first | |
| void | transported(uint32_t setting, uint32_t value) override |
| the transport's settings reach a running session: the group's wait, the isoc pipes' leads of the setting's direction | |
| virtual size_t | vendor(unsigned int, uint8_t *, size_t size, bool data) |
| a bulk transaction's wire bytes past its fill (out; data false: its idle transaction as the session starts and ends) and ahead of its take (in), the stream's: the bytes the ring takes, 0 where the device wrote them itself | |
Protected Attributes | |
| desc_t | desc |
| dxd::mutex | mutex |
| uint32_t | rated{} |
Friends | |
| struct | clock_server<super_device_t, desc_t> |
| template<typename> | |
| class | group |
| template<typename> | |
| class | pipe |
USB streaming device: the streaming device over the platform's USB device, its streams the endpoints' rings, its clock the bus frame tick.
|
inherited |
|
inherited |
the bus's stream address, as the clients spell it
|
inline |
|
inlineoverrideprotectedvirtual |
the configuration the device's bus carries: its USB configuration, per stream what the rate and the periodic budget leave (dx::usb::align) - the rate as it stands, never asked from inside its own server
Reimplemented from dxd::streaming::device< usb::device< super_device_t >, desc_t, clock_server< super_device_t, desc_t > >.
|
inlineprotectedinherited |
the domain's cycle in ticks: the block a client of its iosize moves per switch
|
inlineoverrideprotectedvirtual |
the periodic bus time the configuration takes, in ns: to hold against budget(), what the bus offers
Reimplemented from dxd::streaming::device< usb::device< super_device_t >, desc_t, clock_server< super_device_t, desc_t > >.
|
inlineoverrideinherited |
|
inlineprotectedinherited |
the desc's single clock domain - the buses served here have exactly one
|
inlineoverride |
the session ends and the device's rings go while the bus below still answers: their pipes abort on a configured device
|
inlineprotectedinherited |
promoted value as a get (no input) or set-and-read-back IOCTL
dx::stream::clock_value carries the clock domain alongside the value; the domain is not evaluated - the buses served here have a single one.
|
inlineinherited |
the stream a client addresses, as the desc spells its target
The target is the bus's own stream address - a direction here, an endpoint on USB - so matching it against the desc is what every bus has in common.
|
inlineinherited |
the stream carrying the given id - what a client knows its stream by (dx::stream::stream::id)
|
inlineinherited |
the format the given stream's ring runs: a participant assigns its own and reads what was adopted
|
inlineprotectedinherited |
samples per clock tick, the unit both the tick and iosize are aligned to
|
inlineprotectedvirtual |
|
inlineoverrideinherited |
dx::ioctl::stream::enumerate: the device's whole desc_t
dx::ioctl::stream::desc: the desc as a settable value - the enumerated topology stands
dx::ioctl::stream::puid: persistent device UID
dx::ioctl::stream::configuration: the device's configuration, a wish in, what it runs out
|
inlineoverrideprotected |
a desc without streams takes them from the selected configuration's audio class descriptors
|
inlineinherited |
a kernel endpoint's open: the ring sized as dx::stream::stream::initialize sizes it - a clock domain's stream by ticks of its interval, another by transactions
|
inlineinherited |
creates the stream's ring on its first open; the device holds its own reference, so the ring outlives its clients for the endpoints ticking on it. Its size is a session's lines, the allocation keeps the slack past them - the wrap's room, as dx::stream::stream::alloc() keeps it - in the widest line its stream configurations take
|
inlineinherited |
the stream configuration the device runs the stream in, nullptr where it runs none: the stream is one of the desc's
|
inlineprotected |
the sampling frequency request to an endpoint, in the alternate setting its session's charge selected - the endpoint exists there alone: sets the rate, or reads it
|
inlineoverrideprotectedvirtual |
the domain's rate: every isoc pipeline takes it for its sessions, a rated endpoint at its session's charge (dx::usb::audio::rate)
Reimplemented from dxd::streaming::device< usb::device< super_device_t >, desc_t, clock_server< super_device_t, desc_t > >.
|
inlineinherited |
the host's session start: every ring begins at its size, in silence, without a transport - the participants anchor to it as it stands
|
inlineprotectedvirtual |
the session's start and end, from started's server: the group's thread; an endpoint owner adds its own. A vanished device runs no session
|
inlineprotectedvirtual |
the reference stream advanced, under the mutex: the clock domain follows; an endpoint owner moves its endpoints first
|
inlineoverrideprotectedvirtual |
the transport's settings reach a running session: the group's wait, the isoc pipes' leads of the setting's direction
Reimplemented from dxd::streaming::device< usb::device< super_device_t >, desc_t, clock_server< super_device_t, desc_t > >.
|
inlineprotectedvirtual |
a bulk transaction's wire bytes past its fill (out; data false: its idle transaction as the session starts and ends) and ahead of its take (in), the stream's: the bytes the ring takes, 0 where the device wrote them itself
|
friend |
|
inherited |
its values' listeners: every client's, woken on a commit of any of them
|
inherited |
per stream the stream configuration the device runs it in, the richest by default
|
protectedinherited |
|
inherited |
the DAW clock: every client rides on it with its own buffer switch event
|
inherited |
the shared ring of each stream, allocated with the first client opening it
|
inherited |
|
inherited |
performance counters, allocated with the first client asking for them
|
protected |
serializes a pipe's binding against a session's run and the domain's rate
|
protected |
the streams whose endpoints take the sampling frequency control, a bit each (dx::usb::audio::rated)
|
inherited |
|
inherited |
|
inherited |
started streams over all clients: the clock domain runs while this is not zero
|
staticconstexprinherited |
the desc's stream capacity, as its array carries it
|
inherited |