alsa: add dll to estimate clock drift

Make delay signed in the clock io so that we can simply add it to the
tick to get the hw position.
Add clock drift to clock info
This commit is contained in:
Wim Taymans 2018-11-09 15:24:24 +01:00
parent 7925aed863
commit e69cf24f24
8 changed files with 98 additions and 46 deletions

View file

@ -324,13 +324,13 @@ struct pw_time {
int64_t now; /**< the monotonic time */
struct spa_fraction rate; /**< the rate of \a ticks and delay */
uint64_t ticks; /**< the ticks at \a now. This is the current time that
the remote end is reading/writing. */
uint64_t delay; /**< delay to device, add to ticks for INPUT streams and
subtract from ticks for OUTPUT streams to get the
time of the device. */
* the remote end is reading/writing. */
int64_t delay; /**< delay to device, add to ticks to get the time of the
* device. Positive for INPUT streams and
* negative for OUTPUT streams. */
uint64_t queued; /**< data queued in the stream, this is the sum
of the size fields in the pw_buffer that are
currently queued */
* of the size fields in the pw_buffer that are
* currently queued */
};
/** Query the time on the stream \memberof pw_stream */
int pw_stream_get_time(struct pw_stream *stream, struct pw_time *time);