Fix build under Visual Studio

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Add workaround for kernel crash in transmit mode

Older kernel versions crash when the transmit channel is enabled. Transmitting
still works fine when the channel is not enabled. So we just skip over enabling
the channel if we detect such a kernel version.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
local: Handle the case where less blocks than requested are allocated

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
C#: Fix memory leaks produced by GCHandle.Alloc()
C#: Fix a spelling mistake, no functional changes
local: Move timeout check after enabling the buffer

We'll always get a timeout when checking data is available if the buffer has not
been enabled yet. So move this check after enabling the buffer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
local: Move timeout check after enabling the buffer

We'll always get a timeout when checking data is available if the buffer has not
been enabled yet. So move this check after enabling the buffer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
local: Add workaround for drivers which expect length in bytes

Some broken drivers expect the buffer length to be specified in bytes rather
than in samples. Add a workaround for those drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Merge remote-tracking branch 'origin/master' into v0.1

Conflicts:
	local.c