Uwe Hermann [Sat, 29 Aug 2015 12:50:44 +0000 (14:50 +0200)]
Don't set _POSIX_C_SOURCE for VXI/RPC related files.
Make vxi.h the first #include in all affected files and #undef the
_POSIX_C_SOURCE macro in vxi.h.
This avoids various build issues on e.g. FreeBSD or Mac OS X where
setting _POSIX_C_SOURCE leads to the unavailability of certain types
such as u_long (as used in the VXI/RPC code).
Daniel Elstner [Fri, 28 Aug 2015 23:54:17 +0000 (01:54 +0200)]
Build: Pass compiler flags from make to setup.py
Extend setup.py to allow environment variables to be set on the
command line. Use that functionality to replace the pkg-config
invocations with flags passed on from make. Suppress the annoying
-Wstrict-prototypes warning by overriding the OPT variable.
Also move the "cd bindings/python" from Makefile.am to setup.py
to side-step problems with "cd" in make rules.
This also fixes bug #628.
Daniel Elstner [Thu, 27 Aug 2015 10:30:13 +0000 (12:30 +0200)]
Build: Go back to _POSIX_C_SOURCE=200112L
Daniel Elstner [Wed, 26 Aug 2015 21:09:03 +0000 (23:09 +0200)]
configure: Enable largefile support on 32-bit systems
Uwe Hermann [Fri, 28 Aug 2015 14:26:36 +0000 (16:26 +0200)]
configure.ac: Add libserialport dependency to kern-scale.
Uwe Hermann [Fri, 28 Aug 2015 14:26:07 +0000 (16:26 +0200)]
Various key lists: Add reminders of what needs updates upon changes.
Uwe Hermann [Fri, 28 Aug 2015 14:10:15 +0000 (16:10 +0200)]
session.c: Fix key order.
Uwe Hermann [Fri, 28 Aug 2015 12:25:24 +0000 (14:25 +0200)]
analog.c: Fix key order, add missing items.
Uwe Hermann [Fri, 28 Aug 2015 12:14:10 +0000 (14:14 +0200)]
output/analog: Fix key order, add missing items.
Uwe Hermann [Fri, 28 Aug 2015 12:01:09 +0000 (14:01 +0200)]
hwdriver.c: Fix key order, add missing items.
Uwe Hermann [Thu, 27 Aug 2015 20:06:26 +0000 (22:06 +0200)]
kern-scale: Add initial driver contents.
This currently supports (and is tested on) the KERN EW 6200-2NM,
other models will be added later.
Uwe Hermann [Thu, 27 Aug 2015 19:42:46 +0000 (21:42 +0200)]
kern-scale: Initial driver skeleton.
Uwe Hermann [Thu, 27 Aug 2015 19:21:03 +0000 (21:21 +0200)]
Add a protocol parser for KERN scales.
(KERN & SOHN GmbH, http://www.kern-sohn.com/)
Uwe Hermann [Thu, 27 Aug 2015 19:21:34 +0000 (21:21 +0200)]
output/analog: Support mass related units / MQ flags.
Uwe Hermann [Thu, 27 Aug 2015 18:44:23 +0000 (20:44 +0200)]
Add a few scale related flags.
- SR_MQ_MASS: Mass, as measured by scales / balances.
- SR_UNIT_*: Various units of mass.
- SR_MQFLAG_UNSTABLE: A flag denoting that a value has not
yet stabilized (settled). E.g. when placing an object on a scale
it'll take a few moments until a stable reading is available.
Measurement values marked with SR_MQFLAG_UNSTABLE denote that they
are "unsettled", unstable values (not yet stabilized).
The absence of SR_MQFLAG_UNSTABLE denotes that the value is stable.
- SR_CONF_SCALE: A device class for weighing scales / balances.
Daniel Elstner [Wed, 26 Aug 2015 11:55:53 +0000 (13:55 +0200)]
Build: Define feature test macro _DEFAULT_SOURCE
This basically makes glibc expose the same set of features as
if gcc was invoked without any restricting -std=c* option. Unlike
_GNU_SOURCE however, it does not enable GNU-specific extensions.
So, with this macro defined the behavior of Linux with glibc
should match that of other platforms.
Daniel Elstner [Wed, 26 Aug 2015 11:13:39 +0000 (13:13 +0200)]
Build: Use TESTS prefix instead of CHECK for flag variables
In order to avoid confusion of the flags-gathering pkg-config
result with the actual test for the availability of "check",
change the pkg-config output variable prefix from CHECK to TESTS.
Bert Vermeulen [Sun, 16 Aug 2015 23:43:22 +0000 (01:43 +0200)]
Add SR_T_MQLIST.
This type consists of an array, with each item a two-member tuple,
representing an MQ/MQflags pair: the first item is the MQ (type
G_VARIANT_TYPE_UINT32), and the second is the MQ flags value
(G_VARIANT_TYPE_UINT64).
A GVariant of type SR_T_MQLIST can thus always represent more than
one MQ/MQflag pair.
Bert Vermeulen [Sun, 16 Aug 2015 23:38:10 +0000 (01:38 +0200)]
Add key info tables for MQ and MQflags.
Bert Vermeulen [Sun, 16 Aug 2015 23:30:14 +0000 (01:30 +0200)]
Replace sr_config_info with sr_key_info.
The tables defined with this struct can now be used for information
on items other than config keys.
Functions to access these tables have been renamed sr_key_info_[name_]get.
These take an extra argument, keytype, which should be set to SR_KEY_CONFIG
to get the config key tables. Other key types will be added.
Bert Vermeulen [Sun, 16 Aug 2015 18:02:21 +0000 (20:02 +0200)]
scpi/usbtmc: Use sr_usb_close().
Bert Vermeulen [Sun, 16 Aug 2015 18:00:26 +0000 (20:00 +0200)]
Add sr_usb_close().
Bert Vermeulen [Mon, 17 Aug 2015 00:02:03 +0000 (02:02 +0200)]
scpi: Strip leading/trailing spaces from *IDN? response.
Bert Vermeulen [Sun, 16 Aug 2015 18:44:37 +0000 (20:44 +0200)]
scpi: Propagate error codes in API functions.
This allows client drivers to detect e.g. timeout conditions.
Bert Vermeulen [Sun, 16 Aug 2015 13:54:02 +0000 (15:54 +0200)]
Make sr_next_enabled_channel() from scpi-pps available library-wide.
Bert Vermeulen [Sun, 16 Aug 2015 13:12:34 +0000 (15:12 +0200)]
scpi: Make helper functions from scpi-pps available library-wide.
Bert Vermeulen [Sat, 15 Aug 2015 23:04:04 +0000 (01:04 +0200)]
scpi: Move SCPI-related definitions to separate header file.
Uwe Hermann [Tue, 25 Aug 2015 15:01:22 +0000 (17:01 +0200)]
sigrok.m4: License header consistency fixes.
Use the same wording and formatting as in the rest of the codebase.
Daniel Elstner [Tue, 25 Aug 2015 10:50:35 +0000 (12:50 +0200)]
Build: Limit system features to C99 and POSIX
Use -std=c99 to try and enforce standard compliance.
Daniel Elstner [Mon, 24 Aug 2015 22:17:09 +0000 (00:17 +0200)]
Build: Fix SR_CHECK_COMPILE_FLAGS
Do not put "no" into the flags if the check fails.
Daniel Elstner [Mon, 24 Aug 2015 20:20:30 +0000 (22:20 +0200)]
Build: Reduce unnecessary config substitutions
Variable substitutions with a constant value may as well be
set directly in Makefile.am.
Daniel Elstner [Mon, 24 Aug 2015 20:06:27 +0000 (22:06 +0200)]
Build: Leave LIBS alone during configure
Put the extra libraries into SR_EXTRA_LIBS instead of LIBS.
Create an SR_CHECK_LIBS macro to make that easy. Substitute
SR_EXTRA_LIBS into libsigrok.pc, too.
Daniel Elstner [Mon, 24 Aug 2015 09:18:09 +0000 (11:18 +0200)]
Build: Simplify driver dependency check
Daniel Elstner [Mon, 24 Aug 2015 07:25:37 +0000 (09:25 +0200)]
Build: Add private copy of C++11 check macro
Place a copy of ax_cxx_compile_stdcxx_11.m4 from the Autoconf
macro archive into our private m4/ directory. This is cleaner
than trying to parse M4 file versions etc. Plus, the macro is
now always available.
Daniel Elstner [Sun, 23 Aug 2015 22:08:01 +0000 (00:08 +0200)]
Build: Prefer newer versions of libftdi and SWIG
Daniel Elstner [Sun, 23 Aug 2015 21:53:01 +0000 (23:53 +0200)]
Build: Use commas to separate missing dependencies
Beautify the output. Also fix the PyGObject test.
Daniel Elstner [Sun, 23 Aug 2015 19:17:36 +0000 (21:17 +0200)]
Build: Reduce autogen.sh to a trivial stub
Use autoreconf instead of invoking the various Auto tools
separately. Get rid of the Darwin-specific guesswork -- it
does not make sense to handle this at the level of libsigrok.
People should set up their ACLOCAL_PATH themselves as appropriate
for their own system; just as they already need to set up various
other paths.
Daniel Elstner [Sun, 23 Aug 2015 19:08:54 +0000 (21:08 +0200)]
Build: Check for accepted compiler flags
Introduce the SR_CHECK_COMPILE_FLAGS macro and use it to check
for additional compiler flags. Put the accepted flags into the
separate substitution variable SR_EXTRA_CFLAGS.
With this and the preceding changes, bug #578 should now be fixed.
Daniel Elstner [Sun, 23 Aug 2015 18:07:38 +0000 (20:07 +0200)]
Build: Move package check macros to m4/sigrok.m4
Define generic macros for pkg-config dependency checks etc. in
m4/sigrok.m4, so they can be easily reused by downstream modules.
Daniel Elstner [Sun, 23 Aug 2015 13:02:30 +0000 (15:02 +0200)]
Build: Make compiler warnings configurable
Use the SR_ARG_ENABLE_WARNINGS macro to configure and check for
the availability of compiler warning flags. Maintain separate
sets of warning flags for C and C++.
The configure option --enable-warnings=[min|max|fatal|no] can
be used to set the compiler warning level for all languages.
The default level is "max".
Daniel Elstner [Sun, 23 Aug 2015 12:52:00 +0000 (14:52 +0200)]
Build: Move custom Autoconf macros to separate file
Place custom Autoconf macros which other sigrok modules may
re-use into a separate file m4/sigrok.m4. Also, introduce new
macros for defining the package and library versions, and for
gathering compiler warning flags.
Daniel Elstner [Sat, 22 Aug 2015 18:27:53 +0000 (20:27 +0200)]
Clean up .gitignore
Daniel Elstner [Sat, 22 Aug 2015 18:58:11 +0000 (20:58 +0200)]
Build: Place Autoconf macros into m4/ directory
This separates the M4 macros from the other cruft in autostuff/
to prepare for the introduction of custom macro files.
Daniel Elstner [Fri, 21 Aug 2015 22:07:48 +0000 (00:07 +0200)]
Build: Do not omit first argument to m4_warn()
It seems that contrary to what the documentation says, leaving
the category argument to m4_warn() empty is not allowed. Use
the "unsupported" category for lack of a better choice.
Uwe Hermann [Wed, 19 Aug 2015 13:44:43 +0000 (15:44 +0200)]
FreeBSD: Also check for swig3.0.
On FreeBSD (for example) the SWIG binary can also be called "swig3.0".
This fixes (together with the recent "swig2.0" addition) bug #557.
Daniel Elstner [Tue, 18 Aug 2015 19:24:39 +0000 (21:24 +0200)]
Build: Get rid of recursive make invocations
Do not invoke $(MAKE) just to execute some clean rule.
This gets rid of the "jobserver unavailable" warnings.
Daniel Elstner [Tue, 18 Aug 2015 18:09:53 +0000 (20:09 +0200)]
Build: Tell setup.py where to find SWIG
Uwe Hermann [Tue, 18 Aug 2015 16:01:54 +0000 (18:01 +0200)]
FreeBSD: Also check for swig2.0 in addition to swig.
On FreeBSD (for example) the SWIG binary is called "swig2.0".
This fixes bug #557.
Uwe Hermann [Tue, 18 Aug 2015 15:58:28 +0000 (17:58 +0200)]
FreeBSD: Fix compile/link error due to missing libusb_get_version().
The FreeBSD libusb-1.0 API implementation doesn't have libusb_get_version().
Use our CONF_LIBUSB_1_0_VERSION macro instead.
Daniel Elstner [Tue, 18 Aug 2015 16:06:08 +0000 (18:06 +0200)]
Build: Avoid $< in explicit rules
Although useful, makes other than GNU make do not like this.
Name the prerequisite explicitly instead, and circumvent any
VPATH substitution other makes may do.
Daniel Elstner [Tue, 18 Aug 2015 15:46:29 +0000 (17:46 +0200)]
Build: Skip C++ CFLAGS and LIBS check when disabled
It is not a good idea to invoke PKG_CHECK_MODULES with an empty
list of modules to check, so skip the invocation in that case.
Daniel Elstner [Tue, 18 Aug 2015 13:02:01 +0000 (15:02 +0200)]
Build: Fix typo that broke the driver enable options
Daniel Elstner [Mon, 17 Aug 2015 03:08:48 +0000 (05:08 +0200)]
Build: Make SR_DRIVER() handle dependencies
Turn the hardware driver dependency handling on its head, by
making SR_DRIVER() take a list of dependencies to check for.
Daniel Elstner [Mon, 17 Aug 2015 00:08:39 +0000 (02:08 +0200)]
Build: Make dependency on git change more robust
It can sometimes happen that .git/HEAD or .git/refs/head/*, which
are added as config.status dependencies during configure, do not
exist anymore at build time. For instance, when the current branch
is deleted after switching to a different one.
Wrap the dependencies inside $(wildcard ...) to avoid this problem.
Note that this is a GNU make feature. However, it should be fine
as it is only used for git builds. Even if a non-GNU make is used,
the construct will hopefully just expand to nothing.
Uwe Hermann [Sun, 16 Aug 2015 21:56:43 +0000 (23:56 +0200)]
Build: Show glib/libzip version requirements in configure summary.
Uwe Hermann [Sun, 16 Aug 2015 21:53:23 +0000 (23:53 +0200)]
Build: Fix a typo causing libftdi1 detection issues.
Daniel Elstner [Sun, 16 Aug 2015 16:53:32 +0000 (18:53 +0200)]
Build: Properly namespace the version defines
Use the CONF_ prefix for the configured host define as well as
the various build-time version macros.
Daniel Elstner [Sat, 15 Aug 2015 13:59:52 +0000 (15:59 +0200)]
Build: Cleanup up and modernize autotools setup
Note that some --enable options of configure have become
--with or --without options.
Daniel Elstner [Sat, 15 Aug 2015 00:28:54 +0000 (02:28 +0200)]
Build: Simplify the hardware driver selection
Replace DRIVER() and DRIVER2() by a single SR_DRIVER() macro.
Derive the names of shell variables and preprocessor defines
programatically to cut down on repetition.
Daniel Elstner [Sat, 15 Aug 2015 17:55:02 +0000 (19:55 +0200)]
Add dist tarball to gitignore
Daniel Elstner [Sat, 15 Aug 2015 17:43:29 +0000 (19:43 +0200)]
setup.py: Do VPATH search for swig/enums.i
Also, in swig/classes.i include swig/enums.i rather than plain
enums.i, to guard against future name clashes.
Daniel Elstner [Sat, 15 Aug 2015 17:18:36 +0000 (19:18 +0200)]
Build: Depend on swig/enums.i where appropriate
Daniel Elstner [Sat, 15 Aug 2015 17:02:15 +0000 (19:02 +0200)]
enums.py: Place swig/enums.i into build directory
Daniel Elstner [Sat, 15 Aug 2015 16:33:05 +0000 (18:33 +0200)]
Build: Do not distribute generated headers
version.h and enums.hpp are generated at build time and should
not be included in the distribution tarball. This seems to have
triggered a weird error when doing a VPATH build of the dist
tarball.
Daniel Elstner [Sat, 15 Aug 2015 16:10:50 +0000 (18:10 +0200)]
Build: Pass nostdinc option to automake
It seems automake automatically adds the directory containing
the generated version.h to the include path. Use nostdinc to
disable default includes altogether.
Daniel Elstner [Sat, 15 Aug 2015 15:54:14 +0000 (17:54 +0200)]
Build: Use angle brackets for enums.cpp include
Daniel Elstner [Sat, 15 Aug 2015 14:59:47 +0000 (16:59 +0200)]
Build: Distribute bindings sources
A couple of files referenced during the build were missing from
the distribution, causing a tarball build failure.
Daniel Elstner [Sat, 15 Aug 2015 14:10:36 +0000 (16:10 +0200)]
Build: Prefix directory to include of enums.hpp
This fixes a build problem due to the reduced include search paths
introduced by my recent changes. Also fix a couple of other
includes to use angle brackets.
Daniel Elstner [Fri, 14 Aug 2015 19:01:59 +0000 (21:01 +0200)]
Build: Append git revision hash to version
Append the git revision hash to the libsigrok package version,
unless HEAD exactly matches a release tag. Note that this does
not affect the version known to autoconf -- e.g. source tarballs
created by make dist will not receive a revision suffix.
Changes to git HEAD automatically trigger a reconfiguration.
Uncommitted changes do not, which is why I left out the -dirty
suffix.
Daniel Elstner [Wed, 12 Aug 2015 22:38:47 +0000 (00:38 +0200)]
Consistently use SR_PACKAGE_VERSION instead of VERSION
Daniel Elstner [Fri, 14 Aug 2015 16:03:47 +0000 (18:03 +0200)]
Build: Delay expansion of $datadir in FIRMWARE_DIR
Make it so that $(datadir) is resolved at make time, as per
autotools recommendations. Note that $datadir is not fully
resolved at configure time to begin with, i.e. part of it
already was evaluated at make time.
Daniel Elstner [Fri, 14 Aug 2015 15:53:06 +0000 (17:53 +0200)]
Build: Make version.h a configuration header
Use the proper tool for the job and make libsigrok/version.h
a secondary configuration header, so that autoconf's AC_DEFINE
machinery can be used to generate it. Note that the header
template is still hand-written, enabling fine control of the
content.
Daniel Elstner [Thu, 13 Aug 2015 00:06:41 +0000 (02:06 +0200)]
tests: Include <libsigrok/libsigrok.h>
This matches the global style and avoids the "../" path
components.
Daniel Elstner [Wed, 12 Aug 2015 23:18:51 +0000 (01:18 +0200)]
Build: Set local include directories in Makefile.am
Move the include flags for files in the source tree from
configure.ac to Makefile.am where they belong. Also use
AM_CPPFLAGS instead of CFLAGS/CXXFLAGS to make sure the
files in the build/source tree are always picked up first.
Also, remove the include/libsigrok sub-directory from the
search path, thereby making the <libsigrok/> prefix mandatory
when building libsigrok itself. This matches the convention
already imposed on users of the library.
Soeren Apel [Sat, 15 Aug 2015 21:40:29 +0000 (23:40 +0200)]
Introduce OutputFlag
Soeren Apel [Sat, 1 Aug 2015 19:41:32 +0000 (21:41 +0200)]
output/srzip: Prevent memory leak in case filename is empty
Uwe Hermann [Sat, 15 Aug 2015 19:06:30 +0000 (21:06 +0200)]
backend: Output lib versions, host, and endianness in sr_init().
This should help to more easily debug issues reported by users.
Aurelien Jacobs [Thu, 13 Aug 2015 23:03:57 +0000 (01:03 +0200)]
brymen-bm86x: add some error checking
Uwe Hermann [Sat, 15 Aug 2015 15:16:01 +0000 (17:16 +0200)]
Various minor cosmetics and consistency fixes.
Uwe Hermann [Sat, 15 Aug 2015 15:09:29 +0000 (17:09 +0200)]
Drop comment mentioning non-existing function.
Uwe Hermann [Wed, 5 Aug 2015 15:23:54 +0000 (17:23 +0200)]
Doxygen consistency fixes (@foo instead of \foo).
Uwe Hermann [Wed, 29 Jul 2015 17:31:43 +0000 (19:31 +0200)]
Various errno/strerror() related fixes.
- Don't #include <errno.h> in files that don't actually need it.
- Don't use strerror() on error codes from functions that don't set
errno. Replace strerror() with sr_strerror() for libsigrok functions.
Hubert CHAUMETTE [Fri, 31 Jul 2015 07:44:09 +0000 (09:44 +0200)]
libsigrok: demo: close pipes on dev_acquisition_stop()
Fixes a bug where new acquisition failes due to leftover pipes from
previous acquisitions:
sr: demo: dev_acquisition_start: pipe() failed
Indeed, PulseView had 2024 pipes opened. With this fix, it stabilizes at
33 with sampling thread active.
Signed-off-by: Hubert CHAUMETTE <hchaumette@baylibre.com>
Soeren Apel [Thu, 30 Jul 2015 05:29:11 +0000 (07:29 +0200)]
output/srzip: Use sr_output->filename instead of option
This fixes parts of bug #570.
Soeren Apel [Wed, 29 Jul 2015 19:19:49 +0000 (21:19 +0200)]
Add filename field to sr_output and make it accessible
This fixes parts of bug #570.
Uwe Hermann [Sat, 25 Jul 2015 17:50:36 +0000 (19:50 +0200)]
Only build BayLibre ACME driver if <sys/timerfd.h> is available.
This fixes bug #610 (Android build issue).
Uwe Hermann [Sat, 25 Jul 2015 14:59:04 +0000 (16:59 +0200)]
ols: Don't #include <libserialport.h> directly.
The driver is not using sp_* calls directly, so no need to #include
the header file.
Uwe Hermann [Sat, 18 Jul 2015 16:03:29 +0000 (18:03 +0200)]
Bump version to 0.4.0 (the upcoming next major release).
Uwe Hermann [Sat, 18 Jul 2015 15:54:41 +0000 (17:54 +0200)]
Append "-git" to the version string.
This avoids confusion with the released tarballs.
Uwe Hermann [Thu, 9 Jul 2015 19:05:44 +0000 (21:05 +0200)]
Convert a few more occurrences of d->priv to d->context.
Soeren Apel [Mon, 6 Jul 2015 19:55:36 +0000 (21:55 +0200)]
Fix #442 by renaming sr_dev_driver.priv to .context
Uwe Hermann [Thu, 9 Jul 2015 23:03:16 +0000 (01:03 +0200)]
fx2lafw: Use the USB_INTERFACE #define.
Uwe Hermann [Thu, 9 Jul 2015 22:59:48 +0000 (00:59 +0200)]
fx2lafw: Fix segfault wrt libusb_detach_kernel_driver().
Move the libusb_detach_kernel_driver() call after the code that
sets the usb->devhdl pointer, otherwise it'll be NULL and result
in a segfault.
#0 libusb_kernel_driver_active (dev=0x0, interface_number=0) at libusb/core.c:1711
#1 dev_open (sdi=0x12d99f0) at src/hardware/fx2lafw/api.c:374
[...]
Tested on a device with the default Cypress VID/PID and one with
the Saleae Logic VID/PID, both works fine.
Soeren Apel [Mon, 6 Jul 2015 19:20:26 +0000 (21:20 +0200)]
fx2lafw: Fix #445 by detaching the kernel driver (if any)
This avoids the need to run "rmmod usbtest" on Linux for devices
with the standard Cypress FX2 USB VID/PID (04b4:8613).
Daniel King [Mon, 6 Jul 2015 19:16:29 +0000 (21:16 +0200)]
Demo: Fix #314 by always honoring sample limit changes
Soeren Apel [Sun, 5 Jul 2015 19:06:05 +0000 (21:06 +0200)]
Fix #505 by providing a separate property list for the analog group
Soeren Apel [Sun, 5 Jul 2015 16:01:45 +0000 (18:01 +0200)]
Fix #574 by setting up the transfer first, then starting acquisition
Bartosz Golaszewski [Wed, 1 Jul 2015 10:30:09 +0000 (12:30 +0200)]
baylibre-acme: Remove unnecessary close().
The timerfd descriptor is closed automatically by
g_io_channel_shutdown(). No need to close it manually.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Bartosz Golaszewski [Wed, 1 Jul 2015 08:47:38 +0000 (10:47 +0200)]
baylibre-acme: Use SR_HZ_TO_NS() when configuring the timerfd.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Bartosz Golaszewski [Tue, 30 Jun 2015 13:07:50 +0000 (15:07 +0200)]
baylibre-acme: Add a workaround for slow data acquisition.
At high sampling rates and maximum channels we are not able to acquire
samples fast enough, even though frontends still think that samples
arrive on time. This causes visible shifts in frontend plots.
To compensate for the delay introduce the following workaround: check
if we are late (if any clock events have been missed) and resend the
last frame n times (n == number of missed clock events).
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>