Lines Matching +full:max +full:- +full:by +full:- +full:define
7 - Trigger_tstamp is the system time snapshot taken when the .trigger
8 callback is invoked. This snapshot is taken by the ALSA core in the
11 estimate with a delay. In the latter two cases, the low-level driver
17 - tstamp is the current system timestamp updated during the last
19 The difference (tstamp - trigger_tstamp) defines the elapsed time.
29 - ``avail`` reports how much can be written in the ring buffer
30 - ``delay`` reports the time it will take to hear a new sample after all
42 of time as measured by different components of audio hardware. In
43 ascii-art, this could be represented as follows (for the playback
47 --------------------------------------------------------------> time
53 |< codec delay >|<--hw delay-->|<queued samples>|<---avail->|
54 |<----------------- delay---------------------->| |
55 |<----ring buffer length---->|
63 supported in hardware by sample counters or wallclocks (e.g. with
67 The DMA time is measured using counters - typically the least reliable
70 The app time corresponds to the time tracked by an application after
73 The application can query the hardware capabilities, define which
74 audio time it wants reported by selecting the relevant settings in
76 accuracy. It can also request the delay-to-analog be included in the
84 in hardware/low-level driver, the type is overridden as DEFAULT and the
88 provide timestamp selection, with a zero-valued COMPAT timestamp type
92 The audio timestamp accuracy can be returned to user-space, so that
95 - for dma time (default), the granularity of the transfers can be
100 - the link time can be used to track long-term drifts between audio
101 and system time using the (tstamp-trigger_tstamp)/audio_tstamp
102 ratio, the precision helps define how much smoothing/low-pass
105 different streams - but may require the wallclock to be always
106 running and not wrap-around during idle periods). If supported in
107 hardware, the absolute link time could also be used to define a
110 - including the delay in the audio timestamp may
111 counter-intuitively not increase the precision of timestamps, e.g. if a
112 codec includes variable-latency DSP processing or a chain of
115 The accuracy is reported in nanosecond units (using an unsigned 32-bit
116 word), which gives a max precision of 4.29s, more than enough for
121 the ``STATUS`` ioctl, the parameters are read-only and do not allow for
124 with read/write parameters. ALSA-lib will be modified to make use of
136 In some hardware-specific configuration, the system timestamp is
137 latched by a low-level audio subsystem, and the information provided
142 timestamp shows when the information is put together by the driver
151 $ ./audio_time -p --ts_type=1
152 playback: systime: 341121338 nsec, audio time 342000000 nsec, systime delta -878662
153 playback: systime: 426236663 nsec, audio time 427187500 nsec, systime delta -950837
154 playback: systime: 597080580 nsec, audio time 598000000 nsec, systime delta -919420
155 playback: systime: 682059782 nsec, audio time 683020833 nsec, systime delta -961051
156 playback: systime: 852896415 nsec, audio time 853854166 nsec, systime delta -957751
157 playback: systime: 937903344 nsec, audio time 938854166 nsec, systime delta -950822
162 $ ./audio_time -p --ts_type=1 -d
163 playback: systime: 341053347 nsec, audio time 341062500 nsec, systime delta -9153
166 playback: systime: 681915317 nsec, audio time 681916666 nsec, systime delta -1349
167 playback: systime: 852741306 nsec, audio time 852750000 nsec, systime delta -8694
172 $ ./audio_time -p --ts_type=2 -d
173 playback: systime: 341060004 nsec, audio time 341062791 nsec, systime delta -2787
174 playback: systime: 426242074 nsec, audio time 426244875 nsec, systime delta -2801
175 playback: systime: 597080992 nsec, audio time 597084583 nsec, systime delta -3591
176 playback: systime: 682084512 nsec, audio time 682088291 nsec, systime delta -3779
177 playback: systime: 852936229 nsec, audio time 852940916 nsec, systime delta -4687
178 playback: systime: 938107562 nsec, audio time 938112708 nsec, systime delta -5146
182 measurement can help define rewind safeguards). Compensating for the
183 DMA-link delay in example 2 helps remove the hardware buffering but
192 the use of the frame counter by the driver)
197 $ ./audio_time -p -Dhw:1 -t1
198 playback: systime: 120174019 nsec, audio time 125000000 nsec, systime delta -4825981
199 playback: systime: 245041136 nsec, audio time 250000000 nsec, systime delta -4958864
200 playback: systime: 370106088 nsec, audio time 375000000 nsec, systime delta -4893912
201 playback: systime: 495040065 nsec, audio time 500000000 nsec, systime delta -4959935
202 playback: systime: 620038179 nsec, audio time 625000000 nsec, systime delta -4961821
203 playback: systime: 745087741 nsec, audio time 750000000 nsec, systime delta -4912259
204 playback: systime: 870037336 nsec, audio time 875000000 nsec, systime delta -4962664
209 $ ./audio_time -p -Dhw:1 -t1 -d