dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx_stream.h File Reference
#include "dx_serialize.h"
#include <map>
#include <string>
#include <utility>
#include <vector>
#include "dx_sync.h"
#include "dx_circular.h"
Include dependency graph for dx_stream.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  dx::int24be
 a packed 24 bit integer stored big endian: converts from and to the native int on every access, so the ring converters take it like int24 More...
struct  dx::stream::channel::control
 the kernel streaming client's own header beside its channel buffers: the frame counter and the last two buffer switch timestamps, from which a client derives where the hardware stands More...
struct  dx::stream::channel::open< bus_t, max_channels >
 generic stream open request More...
struct  dx::stream::channel::opened< data_t, channels >
 generic streaming channel buffer description More...
struct  dx::stream::clock
 select/get stream sample rate/iosize More...
struct  dx::stream::clock::consumer
 one clock consumer's share of the domain: its buffer switch is due every iosize samples More...
struct  dx::stream::clock::monitor
 performance monitor shared memory More...
struct  dx::stream::clock_value
 a value asked of, or answered by, one clock domain (sample rate, clock source) More...
struct  dx::stream::cursor
 a client's own place in a ring and the margin it keeps to the transport More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >
 device streaming interface descriptor More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::clock
 a clock domain of the device: its sources, the rates it serves and everything the streams of that domain are timed by More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::clock::defaults
 what the device asks for where nothing was stored yet - every one of them a preference's default More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::clock::defaults::iosize
 the buffer sizes offered to applications, in clock ticks: what a host may ask for and what the ring is sized from More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::clock::defaults::sync
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::clock::setting
 one clock source of this domain: internal, or an external one the device locks to More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::clock::setting::external
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::configuration
 the device's configuration, the value the promoted configuration holds: the bus entity selecting it and, per stream, the index of its active stream configuration - one past the stream's configurations: the stream is off More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::firmware
 the device's own: what the bus reports (USB: bcdDevice, iSerialNumber) unless a product knows a vendor way; the serial number is what a license binds to (DSN) More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::name_id
 a name with the bus entity's own id behind it - what a vendor, a model or a selectable source is called and how the bus addresses it More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::stream
 dx::desc::stream interface descriptor More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::stream::clock
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::stream::clock::sync
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::stream::config
 dx::desc::stream::config interface descriptor More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::stream::config::clock
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::stream::options
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::stream::options::quirk
 where the device departs from its class: what it does is the opposite of what its class descriptors state More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::stream::options::spdif
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::stream::pin
 a pin of the stream: the channels a host attaches to as one entity, their format and what they are wired to. A stream's channels may be split into several pins, and a hidden one is not offered to the host More...
struct  dx::stream::desc< target_t, max_streams, max_pins, max_clock_settings, max_clocks, max_configurations, max_sources >::stream::transaction
 what one transfer on the bus carries where it is not simply a run of sample frames: a granularity the bus enforces, or a vendor's own payload size More...
union  dx::stream::encoder
 the per channel controls a stream carries; what a device does not have is emulated where it has the gain, and the host publishes one control per bit More...
struct  dx::stream::encoder::index
struct  dx::stream::format
 what one sample frame looks like, container and content apart: the resolution inside the container's size, its alignment there and its endianness. operator == is a match against a wish, not an identity: a member left at zero in the asked format matches anything, which is how a pin states audio alone and a ring adopts the one format its participants agree on (dx::stream::format::align). The named constants below are the formats the converters of dx_circular.h move - dx::stream::sample keys them. More...
struct  dx::stream::format_value< bus_t >
 a stream's negotiated sample format, addressed by the bus's own stream target More...
struct  dx::stream::iosize
 a client's share of a clock domain: the samples between its buffer switches and the event the clock signals it on More...
struct  dx::stream::open< bus_t >
 generic stream open request More...
struct  dx::stream::opened< object_t >
 generic shared streaming buffer description More...

Namespaces

namespace  dx
 dynax driver framework interface namespace
namespace  dx::stream
 generic stream interface
namespace  dx::stream::bus
 the bus a device hangs on, as the system reports it: the transport type of a CoreAudio device (desc::bus), named by IOKit's own list where it names one and by CoreAudio's else
namespace  dx::stream::bus::from
namespace  dx::stream::bus::to
namespace  dx::stream::channel
 generic stream::channel interface
namespace  dx::stream::direction
namespace  dx::stream::direction::from
namespace  dx::stream::direction::to
namespace  dx::stream::plug
 what a pin is wired to - the plug on the device, as a system names it: CoreAudio's terminal type (pin::plug), Windows' endpoint form factor, and dxd's own for what neither names. A USB device answers its terminal id instead, which from::usb turns into one of these at the source, so the field carries one vocabulary
namespace  dx::stream::plug::from
namespace  dx::stream::plug::to
namespace  dx::stream::role

Macros

#define DX_MEMBERS_CLOCK(X)
#define DX_MEMBERS_CLOCK_SYNC(X)
#define DX_MEMBERS_CONFIG(X)
#define DX_MEMBERS_CONFIG_CLOCK(X)
#define DX_MEMBERS_CONFIGURATION(X)
#define DX_MEMBERS_DEFAULTS(X)
#define DX_MEMBERS_DESC(X)
#define DX_MEMBERS_ENCODER(X)
#define DX_MEMBERS_EXTERNAL(X)
#define DX_MEMBERS_FIRMWARE(X)
#define DX_MEMBERS_FORMAT(X)
#define DX_MEMBERS_IOSIZE(X)
#define DX_MEMBERS_NAME_ID(X)
#define DX_MEMBERS_OPTIONS(X)
#define DX_MEMBERS_PIN(X)
#define DX_MEMBERS_QUIRK(X)
#define DX_MEMBERS_SETTING(X)
#define DX_MEMBERS_SPDIF(X)
#define DX_MEMBERS_STREAM(X)
#define DX_MEMBERS_STREAM_CLOCK(X)
#define DX_MEMBERS_SYNC(X)
#define DX_MEMBERS_TRANSACTION(X)

Typedefs

typedef std::vector< std::pair< std::string, uint32_t > > dx::stream::named
 a choice's or a bitmap's entries: the name shown, the value or bit it stands for

Enumerations

enum  dx::stream::bus::bus : uint32_t {
  dx::stream::bus::unknown = 0 , dx::stream::bus::built_in = 'bltn' , dx::stream::bus::pci = 'pci ' , dx::stream::bus::usb = 'usb ' ,
  dx::stream::bus::firewire = '1394' , dx::stream::bus::network = 'ntwk' , dx::stream::bus::wireless = 'wrls' , dx::stream::bus::other = 'othr' ,
  dx::stream::bus::bluetooth = 'blue' , dx::stream::bus::vm = 'virt' , dx::stream::bus::displayport = 'dprt' , dx::stream::bus::hdmi = 'hdmi' ,
  dx::stream::bus::avb = 'eavb' , dx::stream::bus::thunderbolt = 'thun' , dx::stream::bus::hdaudio = 'hdau' , dx::stream::bus::aggregate = 'grup' ,
  dx::stream::bus::bluetooth_le = 'blea' , dx::stream::bus::airplay = 'airp' , dx::stream::bus::continuity = 'ccwd' , dx::stream::bus::continuity_wireless = 'ccwl' ,
  dx::stream::bus::screen = 'rscr' , dx::stream::bus::streaming = 'rstr'
}
enum  dx::stream::direction::direction {
  dx::stream::direction::any = -1 , dx::stream::direction::none = any , dx::stream::direction::out , dx::stream::direction::in ,
  dx::stream::direction::directions
}
enum  dx::stream::plug::plug : uint32_t {
  dx::stream::plug::unknown = 0 , dx::stream::plug::line = 'line' , dx::stream::plug::spdif = 'spdf' , dx::stream::plug::speaker = 'spkr' ,
  dx::stream::plug::headphones = 'hdph' , dx::stream::plug::lfe = 'lfes' , dx::stream::plug::receiver_speaker = 'rspk' , dx::stream::plug::microphone = 'micr' ,
  dx::stream::plug::headset = 'hmic' , dx::stream::plug::receiver_microphone = 'rmic' , dx::stream::plug::tty = 'tty_' , dx::stream::plug::hdmi = 'hdmi' ,
  dx::stream::plug::displayport = 'dprt' , dx::stream::plug::network = 'ntwk' , dx::stream::plug::digital = 'dgtl' , dx::stream::plug::din = 'din5' ,
  dx::stream::plug::synth = 'snth' , dx::stream::plug::keyboard = 'keys' , dx::stream::plug::dsp = 'dsp\0' , dx::stream::plug::control = 'cntr'
}
enum  dx::stream::role::role { dx::stream::role::client , dx::stream::role::transport , dx::stream::role::roles }

Functions

direction dx::stream::direction::of (direction stream, direction pin)
 a pin's direction: its stream's, its own where the stream is bidirectional (any), any where neither states one
std::ostream & dx::stream::plug::operator<< (std::ostream &os, enum plugplug plugplug)
 the word for a plug, its four characters where the list has none - a vendor states its own, and a terminal id no from table translated
std::ostream & operator<< (std::ostream &os, const dx::stream::direction::direction &direction)
std::ostream & operator<< (std::ostream &os, const dx::stream::format &format)
template<template< typename > class op_t>
auto dx::stream::sample (format format)

Macro Definition Documentation

◆ DX_MEMBERS_CLOCK

#define DX_MEMBERS_CLOCK ( X)
Value:
X##_cstr(name) X##_array(setting, settings) X##_bitmap(bitmap, rates)\
X##_nested(defaults) X##_value(resolution) X##_value(lock_delay)

◆ DX_MEMBERS_CLOCK_SYNC

#define DX_MEMBERS_CLOCK_SYNC ( X)
Value:
X##_value(reference) X##_vector(strategy)

◆ DX_MEMBERS_CONFIG

#define DX_MEMBERS_CONFIG ( X)
Value:
X##_power2(channels, 1, 2048) X##_nested(format) X##_nested(clock) X##_value(id)

◆ DX_MEMBERS_CONFIG_CLOCK

#define DX_MEMBERS_CONFIG_CLOCK ( X)
Value:
X##_value(domain) X##_value(bitmap)

◆ DX_MEMBERS_CONFIGURATION

#define DX_MEMBERS_CONFIGURATION ( X)
Value:
X##_value(id) X##_vector(config)

◆ DX_MEMBERS_DEFAULTS

#define DX_MEMBERS_DEFAULTS ( X)
Value:
X##_value(samplerate) X##_value(clocksource) X##_matrix(safety_offset)\
X##_nested(sync) X##_nested(iosize)

◆ DX_MEMBERS_DESC

#define DX_MEMBERS_DESC ( X)
Value:
X##_array(stream, streams) X##_array(clock, clocks) X##_nested(vendor) X##_nested(model) X##_nested(firmware)\
X##_value(version) X##_fourchar(bus) X##_direction(start_stop_order)\
X##_value(persistence) X##_value(hidden) X##_value(dflt) X##_value(editable)

◆ DX_MEMBERS_ENCODER

#define DX_MEMBERS_ENCODER ( X)
Value:
X##_value(main) X##_value(gain) X##_value(mute) X##_value(solo) X##_value(pan)

◆ DX_MEMBERS_EXTERNAL

#define DX_MEMBERS_EXTERNAL ( X)
Value:
X##_value(locked)

◆ DX_MEMBERS_FIRMWARE

#define DX_MEMBERS_FIRMWARE ( X)
Value:
X##_cstr(name) X##_value(version) X##_cstr(serial)

◆ DX_MEMBERS_FORMAT

#define DX_MEMBERS_FORMAT ( X)
Value:
X##_value(audio) X##_choice(midi, midis) X##_choice(resolution, resolutions) X##_choice(real, reals)\
X##_choice(size, sizes) X##_choice(endian, endians) X##_choice(alignment, alignments)

◆ DX_MEMBERS_IOSIZE

#define DX_MEMBERS_IOSIZE ( X)
Value:
X##_value(hw_ticks) X##_value(hw_min_ticks) X##_value(hw_max_ticks) X##_value(lock)

◆ DX_MEMBERS_NAME_ID

#define DX_MEMBERS_NAME_ID ( X)
Value:
X##_cstr(name) X##_value(id)

◆ DX_MEMBERS_OPTIONS

#define DX_MEMBERS_OPTIONS ( X)
Value:
X##_nested(spdif) X##_nested(quirk)

◆ DX_MEMBERS_PIN

#define DX_MEMBERS_PIN ( X)
Value:
X##_cstr(name) X##_power2(channels, 1, 2048) X##_direction(direction) X##_power2(index, 0, 2048)\
X##_nested(format) X##_power2(latency, 1, 256) X##_nested(encoder) X##_fourchar(plug) X##_value(hidden) X##_value(sync_reference)

◆ DX_MEMBERS_QUIRK

#define DX_MEMBERS_QUIRK ( X)
Value:
X##_value(samplerate)

◆ DX_MEMBERS_SETTING

#define DX_MEMBERS_SETTING ( X)
Value:
X##_cstr(name) X##_nested(external)

◆ DX_MEMBERS_SPDIF

#define DX_MEMBERS_SPDIF ( X)
Value:
X##_value(pro)

◆ DX_MEMBERS_STREAM

#define DX_MEMBERS_STREAM ( X)
Value:
X##_nested(target) X##_array(config, configurations) X##_nested(clock) X##_array(pin, pins)\
X##_array(source, sources) X##_value(group) X##_value(selector) X##_nested(transaction) X##_value(buffers) X##_nested(options)

◆ DX_MEMBERS_STREAM_CLOCK

#define DX_MEMBERS_STREAM_CLOCK ( X)
Value:
X##_nested(sync)

◆ DX_MEMBERS_SYNC

#define DX_MEMBERS_SYNC ( X)
Value:
X##_value(reference)

◆ DX_MEMBERS_TRANSACTION

#define DX_MEMBERS_TRANSACTION ( X)
Value:
X##_value(granularity) X##_value(vendor) X##_value(buffered)

Function Documentation

◆ operator<<() [1/2]

std::ostream & operator<< ( std::ostream & os,
const dx::stream::direction::direction & direction )
inline

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream & os,
const dx::stream::format & format )
inline

(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.