[Jack-Devel] [PATCH 1/6] Added the beginnings of the IIO driver.

PrevNext  Index
DateFri, 14 Feb 2014 08:24:42 +1100
From Matt Flax <[hidden] at flatmax dot org>
To[hidden] at lists dot jackaudio dot org
In-Reply-ToMatt Flax [Jack-Devel] [PATCH 0/6] Jack2 IIO driver
---
 codeBlocks/jack2.cbp      | 660 ++++++++++++++++++++++++++++++++++++++++++++++
 codeBlocks/jack2.layout   | 179 +++++++++++++
 linux/iio/JackIIODriver.C | 172 ++++++++++++
 linux/iio/JackIIODriver.H |  65 +++++
 linux/wscript             |  45 +++-
 wscript                   |  13 +-
 6 files changed, 1125 insertions(+), 9 deletions(-)
 create mode 100644 codeBlocks/jack2.cbp
 create mode 100644 codeBlocks/jack2.layout
 create mode 100644 linux/iio/JackIIODriver.C
 create mode 100644 linux/iio/JackIIODriver.H

diff --git a/codeBlocks/jack2.cbp b/codeBlocks/jack2.cbp
new file mode 100644
index 0000000..f2f56db
--- /dev/null
+++ b/codeBlocks/jack2.cbp
@@ -0,0 +1,660 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+	<FileVersion major="1" minor="6" />
+	<Project>
+		<Option title="jack2" />
+		<Option pch_mode="2" />
+		<Option compiler="gcc" />
+		<Build>
+			<Target title="Debug">
+				<Option output="bin/Debug/jack2" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj/Debug/" />
+				<Option type="1" />
+				<Option compiler="gcc" />
+				<Compiler>
+					<Add option="-g" />
+				</Compiler>
+			</Target>
+			<Target title="Release">
+				<Option output="bin/Release/jack2" prefix_auto="1" extension_auto="1" />
+				<Option object_output="obj/Release/" />
+				<Option type="1" />
+				<Option compiler="gcc" />
+				<Compiler>
+					<Add option="-O2" />
+				</Compiler>
+				<Linker>
+					<Add option="-s" />
+				</Linker>
+			</Target>
+		</Build>
+		<Compiler>
+			<Add option="-Wall" />
+		</Compiler>
+		<Unit filename="../common/JackAC3Encoder.cpp" />
+		<Unit filename="../common/JackAC3Encoder.h" />
+		<Unit filename="../common/JackAPI.cpp" />
+		<Unit filename="../common/JackActivationCount.cpp" />
+		<Unit filename="../common/JackActivationCount.h" />
+		<Unit filename="../common/JackArgParser.cpp" />
+		<Unit filename="../common/JackArgParser.h" />
+		<Unit filename="../common/JackAtomic.h" />
+		<Unit filename="../common/JackAtomicArrayState.h" />
+		<Unit filename="../common/JackAtomicState.h" />
+		<Unit filename="../common/JackAudioAdapter.cpp" />
+		<Unit filename="../common/JackAudioAdapter.h" />
+		<Unit filename="../common/JackAudioAdapterFactory.cpp" />
+		<Unit filename="../common/JackAudioAdapterInterface.cpp" />
+		<Unit filename="../common/JackAudioAdapterInterface.h" />
+		<Unit filename="../common/JackAudioDriver.cpp" />
+		<Unit filename="../common/JackAudioDriver.h" />
+		<Unit filename="../common/JackAudioPort.cpp" />
+		<Unit filename="../common/JackChannel.h" />
+		<Unit filename="../common/JackClient.cpp" />
+		<Unit filename="../common/JackClient.h" />
+		<Unit filename="../common/JackClientControl.h" />
+		<Unit filename="../common/JackClientInterface.h" />
+		<Unit filename="../common/JackCompilerDeps.h" />
+		<Unit filename="../common/JackConnectionManager.cpp" />
+		<Unit filename="../common/JackConnectionManager.h" />
+		<Unit filename="../common/JackConstants.h" />
+		<Unit filename="../common/JackControlAPI.cpp" />
+		<Unit filename="../common/JackControlAPI.h" />
+		<Unit filename="../common/JackDebugClient.cpp" />
+		<Unit filename="../common/JackDebugClient.h" />
+		<Unit filename="../common/JackDriver.cpp" />
+		<Unit filename="../common/JackDriver.h" />
+		<Unit filename="../common/JackDriverInfo.h" />
+		<Unit filename="../common/JackDriverLoader.cpp" />
+		<Unit filename="../common/JackDriverLoader.h" />
+		<Unit filename="../common/JackDummyDriver.cpp" />
+		<Unit filename="../common/JackDummyDriver.h" />
+		<Unit filename="../common/JackEngine.cpp" />
+		<Unit filename="../common/JackEngine.h" />
+		<Unit filename="../common/JackEngineControl.cpp" />
+		<Unit filename="../common/JackEngineControl.h" />
+		<Unit filename="../common/JackEngineProfiling.cpp" />
+		<Unit filename="../common/JackEngineProfiling.h" />
+		<Unit filename="../common/JackError.cpp" />
+		<Unit filename="../common/JackError.h" />
+		<Unit filename="../common/JackException.cpp" />
+		<Unit filename="../common/JackException.h" />
+		<Unit filename="../common/JackExternalClient.cpp" />
+		<Unit filename="../common/JackExternalClient.h" />
+		<Unit filename="../common/JackFilters.h" />
+		<Unit filename="../common/JackFrameTimer.cpp" />
+		<Unit filename="../common/JackFrameTimer.h" />
+		<Unit filename="../common/JackFreewheelDriver.cpp" />
+		<Unit filename="../common/JackFreewheelDriver.h" />
+		<Unit filename="../common/JackGenericClientChannel.cpp" />
+		<Unit filename="../common/JackGenericClientChannel.h" />
+		<Unit filename="../common/JackGlobals.cpp" />
+		<Unit filename="../common/JackGlobals.h" />
+		<Unit filename="../common/JackGraphManager.cpp" />
+		<Unit filename="../common/JackGraphManager.h" />
+		<Unit filename="../common/JackInternalClient.cpp" />
+		<Unit filename="../common/JackInternalClient.h" />
+		<Unit filename="../common/JackInternalClientChannel.h" />
+		<Unit filename="../common/JackLibAPI.cpp" />
+		<Unit filename="../common/JackLibClient.cpp" />
+		<Unit filename="../common/JackLibClient.h" />
+		<Unit filename="../common/JackLibGlobals.h" />
+		<Unit filename="../common/JackLibSampleRateResampler.cpp" />
+		<Unit filename="../common/JackLibSampleRateResampler.h" />
+		<Unit filename="../common/JackLockedEngine.h" />
+		<Unit filename="../common/JackLoopbackDriver.cpp" />
+		<Unit filename="../common/JackLoopbackDriver.h" />
+		<Unit filename="../common/JackMessageBuffer.cpp" />
+		<Unit filename="../common/JackMessageBuffer.h" />
+		<Unit filename="../common/JackMidiAPI.cpp" />
+		<Unit filename="../common/JackMidiAsyncQueue.cpp" />
+		<Unit filename="../common/JackMidiAsyncQueue.h" />
+		<Unit filename="../common/JackMidiAsyncWaitQueue.cpp" />
+		<Unit filename="../common/JackMidiAsyncWaitQueue.h" />
+		<Unit filename="../common/JackMidiBufferReadQueue.cpp" />
+		<Unit filename="../common/JackMidiBufferReadQueue.h" />
+		<Unit filename="../common/JackMidiBufferWriteQueue.cpp" />
+		<Unit filename="../common/JackMidiBufferWriteQueue.h" />
+		<Unit filename="../common/JackMidiDriver.cpp" />
+		<Unit filename="../common/JackMidiDriver.h" />
+		<Unit filename="../common/JackMidiPort.cpp" />
+		<Unit filename="../common/JackMidiPort.h" />
+		<Unit filename="../common/JackMidiRawInputWriteQueue.cpp" />
+		<Unit filename="../common/JackMidiRawInputWriteQueue.h" />
+		<Unit filename="../common/JackMidiRawOutputWriteQueue.cpp" />
+		<Unit filename="../common/JackMidiRawOutputWriteQueue.h" />
+		<Unit filename="../common/JackMidiReadQueue.cpp" />
+		<Unit filename="../common/JackMidiReadQueue.h" />
+		<Unit filename="../common/JackMidiReceiveQueue.cpp" />
+		<Unit filename="../common/JackMidiReceiveQueue.h" />
+		<Unit filename="../common/JackMidiSendQueue.cpp" />
+		<Unit filename="../common/JackMidiSendQueue.h" />
+		<Unit filename="../common/JackMidiUtil.cpp" />
+		<Unit filename="../common/JackMidiUtil.h" />
+		<Unit filename="../common/JackMidiWriteQueue.cpp" />
+		<Unit filename="../common/JackMidiWriteQueue.h" />
+		<Unit filename="../common/JackMutex.h" />
+		<Unit filename="../common/JackNetAPI.cpp" />
+		<Unit filename="../common/JackNetAdapter.cpp" />
+		<Unit filename="../common/JackNetAdapter.h" />
+		<Unit filename="../common/JackNetDriver.cpp" />
+		<Unit filename="../common/JackNetDriver.h" />
+		<Unit filename="../common/JackNetInterface.cpp" />
+		<Unit filename="../common/JackNetInterface.h" />
+		<Unit filename="../common/JackNetManager.cpp" />
+		<Unit filename="../common/JackNetManager.h" />
+		<Unit filename="../common/JackNetOneDriver.cpp" />
+		<Unit filename="../common/JackNetOneDriver.h" />
+		<Unit filename="../common/JackNetSocket.h" />
+		<Unit filename="../common/JackNetTool.cpp" />
+		<Unit filename="../common/JackNetTool.h" />
+		<Unit filename="../common/JackNotification.h" />
+		<Unit filename="../common/JackPlatformPlug.h" />
+		<Unit filename="../common/JackPort.cpp" />
+		<Unit filename="../common/JackPort.h" />
+		<Unit filename="../common/JackPortType.cpp" />
+		<Unit filename="../common/JackPortType.h" />
+		<Unit filename="../common/JackProfiler.cpp" />
+		<Unit filename="../common/JackProfiler.h" />
+		<Unit filename="../common/JackRequest.h" />
+		<Unit filename="../common/JackRequestDecoder.cpp" />
+		<Unit filename="../common/JackRequestDecoder.h" />
+		<Unit filename="../common/JackResampler.cpp" />
+		<Unit filename="../common/JackResampler.h" />
+		<Unit filename="../common/JackRestartThreadedDriver.cpp" />
+		<Unit filename="../common/JackRestartThreadedDriver.h" />
+		<Unit filename="../common/JackServer.cpp" />
+		<Unit filename="../common/JackServer.h" />
+		<Unit filename="../common/JackServerAPI.cpp" />
+		<Unit filename="../common/JackServerGlobals.cpp" />
+		<Unit filename="../common/JackServerGlobals.h" />
+		<Unit filename="../common/JackServerLaunch.h" />
+		<Unit filename="../common/JackSession.h" />
+		<Unit filename="../common/JackShmMem.cpp" />
+		<Unit filename="../common/JackShmMem.h" />
+		<Unit filename="../common/JackSynchro.h" />
+		<Unit filename="../common/JackSystemDeps.h" />
+		<Unit filename="../common/JackThread.h" />
+		<Unit filename="../common/JackThreadedDriver.cpp" />
+		<Unit filename="../common/JackThreadedDriver.h" />
+		<Unit filename="../common/JackTime.h" />
+		<Unit filename="../common/JackTimedDriver.cpp" />
+		<Unit filename="../common/JackTimedDriver.h" />
+		<Unit filename="../common/JackTools.cpp" />
+		<Unit filename="../common/JackTools.h" />
+		<Unit filename="../common/JackTransportEngine.cpp" />
+		<Unit filename="../common/JackTransportEngine.h" />
+		<Unit filename="../common/JackTypes.h" />
+		<Unit filename="../common/JackWaitThreadedDriver.cpp" />
+		<Unit filename="../common/JackWaitThreadedDriver.h" />
+		<Unit filename="../common/JackWeakAPI.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../common/Jackdmp.cpp" />
+		<Unit filename="../common/driver_interface.h" />
+		<Unit filename="../common/jack/control.h" />
+		<Unit filename="../common/jack/intclient.h" />
+		<Unit filename="../common/jack/jack.h" />
+		<Unit filename="../common/jack/jslist.h" />
+		<Unit filename="../common/jack/midiport.h" />
+		<Unit filename="../common/jack/net.h" />
+		<Unit filename="../common/jack/ringbuffer.h" />
+		<Unit filename="../common/jack/session.h" />
+		<Unit filename="../common/jack/statistics.h" />
+		<Unit filename="../common/jack/systemdeps.h" />
+		<Unit filename="../common/jack/thread.h" />
+		<Unit filename="../common/jack/transport.h" />
+		<Unit filename="../common/jack/types.h" />
+		<Unit filename="../common/jack/weakjack.h" />
+		<Unit filename="../common/jack/weakmacros.h" />
+		<Unit filename="../common/memops.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../common/memops.h" />
+		<Unit filename="../common/netjack.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../common/netjack.h" />
+		<Unit filename="../common/netjack_packet.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../common/netjack_packet.h" />
+		<Unit filename="../common/ringbuffer.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../common/shm.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../common/shm.h" />
+		<Unit filename="../common/timestamps.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../common/timestamps.h" />
+		<Unit filename="../common/varargs.h" />
+		<Unit filename="../common/wscript" />
+		<Unit filename="../dbus/audio_reserve.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/audio_reserve.h" />
+		<Unit filename="../dbus/controller.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/controller.h" />
+		<Unit filename="../dbus/controller_iface_configure.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/controller_iface_control.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/controller_iface_introspectable.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/controller_iface_patchbay.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/controller_iface_session_manager.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/controller_iface_transport.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/controller_internal.h" />
+		<Unit filename="../dbus/jackdbus.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/jackdbus.h" />
+		<Unit filename="../dbus/list.h" />
+		<Unit filename="../dbus/org.jackaudio.service.in" />
+		<Unit filename="../dbus/params.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/params.h" />
+		<Unit filename="../dbus/reserve.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/reserve.h" />
+		<Unit filename="../dbus/sigsegv.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/sigsegv.h" />
+		<Unit filename="../dbus/wscript" />
+		<Unit filename="../dbus/xml.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/xml.h" />
+		<Unit filename="../dbus/xml_expat.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/xml_nop.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../dbus/xml_write_raw.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/alias.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/alsa_in.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/alsa_out.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/bufsize.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/capture_client.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/connect.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/control.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/cpu_load.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/evmon.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/freewheel.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/impulse_grabber.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/inprocess.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/internal_metro.cpp" />
+		<Unit filename="../example-clients/internal_metro.h" />
+		<Unit filename="../example-clients/ipload.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/ipunload.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/latent_client.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/lsp.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/metro.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/midi_dump.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/midi_latency_test.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/midiseq.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/midisine.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/monitor_client.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/netmaster.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/netslave.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/netsource.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/samplerate.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/server_control.cpp" />
+		<Unit filename="../example-clients/session_notify.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/showtime.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/simple_client.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/simple_session_client.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/thru_client.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/transport.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/tw.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/wait.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../example-clients/wscript" />
+		<Unit filename="../example-clients/zombie.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../linux/JackAtomic_os.h" />
+		<Unit filename="../linux/JackLinuxTime.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../linux/JackPlatformPlug_os.h" />
+		<Unit filename="../linux/alsa/JackAlsaAdapter.cpp" />
+		<Unit filename="../linux/alsa/JackAlsaAdapter.h" />
+		<Unit filename="../linux/alsa/JackAlsaDriver.cpp" />
+		<Unit filename="../linux/alsa/JackAlsaDriver.h" />
+		<Unit filename="../linux/alsa/alsa_driver.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../linux/alsa/alsa_driver.h" />
+		<Unit filename="../linux/alsa/alsa_midi.h" />
+		<Unit filename="../linux/alsa/alsa_midi_impl.h" />
+		<Unit filename="../linux/alsa/alsa_midi_jackmp.cpp" />
+		<Unit filename="../linux/alsa/alsa_rawmidi.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../linux/alsa/alsa_seqmidi.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../linux/alsa/bitset.h" />
+		<Unit filename="../linux/alsa/generic.h" />
+		<Unit filename="../linux/alsa/generic_hw.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../linux/alsa/hammerfall.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../linux/alsa/hammerfall.h" />
+		<Unit filename="../linux/alsa/hardware.h" />
+		<Unit filename="../linux/alsa/hdsp.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../linux/alsa/hdsp.h" />
+		<Unit filename="../linux/alsa/ice1712.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../linux/alsa/ice1712.h" />
+		<Unit filename="../linux/alsa/jslist.h" />
+		<Unit filename="../linux/alsa/midi_pack.h" />
+		<Unit filename="../linux/alsa/midi_unpack.h" />
+		<Unit filename="../linux/alsa/usx2y.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../linux/alsa/usx2y.h" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiDriver.cpp" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiDriver.h" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiInputPort.cpp" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiInputPort.h" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiOutputPort.cpp" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiOutputPort.h" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiPort.cpp" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiPort.h" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiReceiveQueue.cpp" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiReceiveQueue.h" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiSendQueue.cpp" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiSendQueue.h" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiUtil.cpp" />
+		<Unit filename="../linux/alsarawmidi/JackALSARawMidiUtil.h" />
+		<Unit filename="../linux/cycles.h" />
+		<Unit filename="../linux/driver.h" />
+		<Unit filename="../linux/firewire/JackFFADODriver.cpp" />
+		<Unit filename="../linux/firewire/JackFFADODriver.h" />
+		<Unit filename="../linux/firewire/JackFFADOMidiInputPort.cpp" />
+		<Unit filename="../linux/firewire/JackFFADOMidiInputPort.h" />
+		<Unit filename="../linux/firewire/JackFFADOMidiOutputPort.cpp" />
+		<Unit filename="../linux/firewire/JackFFADOMidiOutputPort.h" />
+		<Unit filename="../linux/firewire/JackFFADOMidiReceiveQueue.cpp" />
+		<Unit filename="../linux/firewire/JackFFADOMidiReceiveQueue.h" />
+		<Unit filename="../linux/firewire/JackFFADOMidiSendQueue.cpp" />
+		<Unit filename="../linux/firewire/JackFFADOMidiSendQueue.h" />
+		<Unit filename="../linux/firewire/ffado_driver.h" />
+		<Unit filename="../linux/freebob/JackFreebobDriver.cpp" />
+		<Unit filename="../linux/freebob/JackFreebobDriver.h" />
+		<Unit filename="../linux/freebob/freebob_driver.h" />
+		<Unit filename="../linux/iio/JackIIODriver.C">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../linux/iio/JackIIODriver.H" />
+		<Unit filename="../linux/wscript" />
+		<Unit filename="../macosx/JackAtomic_os.h" />
+		<Unit filename="../macosx/JackCompilerDeps_os.h" />
+		<Unit filename="../macosx/JackMachSemaphore.cpp" />
+		<Unit filename="../macosx/JackMachSemaphore.h" />
+		<Unit filename="../macosx/JackMachThread.cpp" />
+		<Unit filename="../macosx/JackMachThread.h" />
+		<Unit filename="../macosx/JackMachTime.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../macosx/JackPlatformPlug_os.h" />
+		<Unit filename="../macosx/coreaudio/JackCoreAudioAdapter.cpp" />
+		<Unit filename="../macosx/coreaudio/JackCoreAudioAdapter.h" />
+		<Unit filename="../macosx/coreaudio/JackCoreAudioDriver.cpp" />
+		<Unit filename="../macosx/coreaudio/JackCoreAudioDriver.h" />
+		<Unit filename="../macosx/coreaudio/TiPhoneCoreAudioRenderer.cpp" />
+		<Unit filename="../macosx/coreaudio/TiPhoneCoreAudioRenderer.h" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiDriver.cpp" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiDriver.h" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiInputPort.cpp" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiInputPort.h" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiOutputPort.cpp" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiOutputPort.h" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiPhysicalInputPort.cpp" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiPhysicalInputPort.h" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiPhysicalOutputPort.cpp" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiPhysicalOutputPort.h" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiPort.cpp" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiPort.h" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiUtil.cpp" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiUtil.h" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiVirtualInputPort.cpp" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiVirtualInputPort.h" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiVirtualOutputPort.cpp" />
+		<Unit filename="../macosx/coremidi/JackCoreMidiVirtualOutputPort.h" />
+		<Unit filename="../macosx/iphone/iPhoneNetAppDelegate.h" />
+		<Unit filename="../posix/JackCompilerDeps_os.h" />
+		<Unit filename="../posix/JackFifo.cpp" />
+		<Unit filename="../posix/JackFifo.h" />
+		<Unit filename="../posix/JackNetUnixSocket.cpp" />
+		<Unit filename="../posix/JackNetUnixSocket.h" />
+		<Unit filename="../posix/JackPosixMutex.cpp" />
+		<Unit filename="../posix/JackPosixMutex.h" />
+		<Unit filename="../posix/JackPosixProcessSync.cpp" />
+		<Unit filename="../posix/JackPosixProcessSync.h" />
+		<Unit filename="../posix/JackPosixSemaphore.cpp" />
+		<Unit filename="../posix/JackPosixSemaphore.h" />
+		<Unit filename="../posix/JackPosixServerLaunch.cpp" />
+		<Unit filename="../posix/JackPosixThread.cpp" />
+		<Unit filename="../posix/JackPosixThread.h" />
+		<Unit filename="../posix/JackShmMem_os.h" />
+		<Unit filename="../posix/JackSocket.cpp" />
+		<Unit filename="../posix/JackSocket.h" />
+		<Unit filename="../posix/JackSocketClientChannel.cpp" />
+		<Unit filename="../posix/JackSocketClientChannel.h" />
+		<Unit filename="../posix/JackSocketNotifyChannel.cpp" />
+		<Unit filename="../posix/JackSocketNotifyChannel.h" />
+		<Unit filename="../posix/JackSocketServerChannel.cpp" />
+		<Unit filename="../posix/JackSocketServerChannel.h" />
+		<Unit filename="../posix/JackSocketServerNotifyChannel.cpp" />
+		<Unit filename="../posix/JackSocketServerNotifyChannel.h" />
+		<Unit filename="../posix/JackSystemDeps_os.h" />
+		<Unit filename="../posix/JackTypes_os.h" />
+		<Unit filename="../solaris/JackAtomic_os.h" />
+		<Unit filename="../solaris/JackPlatformPlug_os.h" />
+		<Unit filename="../solaris/JackSolarisTime.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../solaris/oss/JackBoomerDriver.cpp" />
+		<Unit filename="../solaris/oss/JackBoomerDriver.h" />
+		<Unit filename="../solaris/oss/JackOSSAdapter.cpp" />
+		<Unit filename="../solaris/oss/JackOSSAdapter.h" />
+		<Unit filename="../solaris/oss/JackOSSDriver.cpp" />
+		<Unit filename="../solaris/oss/JackOSSDriver.h" />
+		<Unit filename="../tests/cpu.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../tests/external_metro.cpp" />
+		<Unit filename="../tests/external_metro.h" />
+		<Unit filename="../tests/iodelay.cpp" />
+		<Unit filename="../tests/test.cpp" />
+		<Unit filename="../tests/testAtomic.cpp" />
+		<Unit filename="../tests/testMutex.cpp" />
+		<Unit filename="../tests/testSem.cpp" />
+		<Unit filename="../tests/testSynchroClient.cpp" />
+		<Unit filename="../tests/testSynchroServer.cpp" />
+		<Unit filename="../tests/testSynchroServerClient.cpp" />
+		<Unit filename="../tests/testThread.cpp" />
+		<Unit filename="../tests/wscript" />
+		<Unit filename="../windows/JackAtomic_os.h" />
+		<Unit filename="../windows/JackCompilerDeps_os.h" />
+		<Unit filename="../windows/JackMMCSS.cpp" />
+		<Unit filename="../windows/JackMMCSS.h" />
+		<Unit filename="../windows/JackNetWinSocket.cpp" />
+		<Unit filename="../windows/JackNetWinSocket.h" />
+		<Unit filename="../windows/JackPlatformPlug_os.h" />
+		<Unit filename="../windows/JackRouter/JackRouter.cpp" />
+		<Unit filename="../windows/JackRouter/JackRouter.h" />
+		<Unit filename="../windows/JackRouter/profport.cpp" />
+		<Unit filename="../windows/JackRouter/profport.h" />
+		<Unit filename="../windows/JackRouter/psapi.h" />
+		<Unit filename="../windows/JackRouter/resource.h" />
+		<Unit filename="../windows/JackRouter/resource.rc" />
+		<Unit filename="../windows/JackShmMem_os.h" />
+		<Unit filename="../windows/JackSystemDeps_os.h" />
+		<Unit filename="../windows/JackTypes_os.h" />
+		<Unit filename="../windows/JackWinEvent.cpp" />
+		<Unit filename="../windows/JackWinEvent.h" />
+		<Unit filename="../windows/JackWinMutex.cpp" />
+		<Unit filename="../windows/JackWinMutex.h" />
+		<Unit filename="../windows/JackWinNamedPipe.cpp" />
+		<Unit filename="../windows/JackWinNamedPipe.h" />
+		<Unit filename="../windows/JackWinNamedPipeClientChannel.cpp" />
+		<Unit filename="../windows/JackWinNamedPipeClientChannel.h" />
+		<Unit filename="../windows/JackWinNamedPipeNotifyChannel.cpp" />
+		<Unit filename="../windows/JackWinNamedPipeNotifyChannel.h" />
+		<Unit filename="../windows/JackWinNamedPipeServerChannel.cpp" />
+		<Unit filename="../windows/JackWinNamedPipeServerChannel.h" />
+		<Unit filename="../windows/JackWinNamedPipeServerNotifyChannel.cpp" />
+		<Unit filename="../windows/JackWinNamedPipeServerNotifyChannel.h" />
+		<Unit filename="../windows/JackWinProcessSync.cpp" />
+		<Unit filename="../windows/JackWinProcessSync.h" />
+		<Unit filename="../windows/JackWinSemaphore.cpp" />
+		<Unit filename="../windows/JackWinSemaphore.h" />
+		<Unit filename="../windows/JackWinServerLaunch.cpp" />
+		<Unit filename="../windows/JackWinThread.cpp" />
+		<Unit filename="../windows/JackWinThread.h" />
+		<Unit filename="../windows/JackWinTime.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../windows/getopt.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../windows/getopt.h" />
+		<Unit filename="../windows/getopt1.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="../windows/jackaudioadapter.rc" />
+		<Unit filename="../windows/jackd.rc" />
+		<Unit filename="../windows/jackdummydriver.rc" />
+		<Unit filename="../windows/jackloopbackdriver.rc" />
+		<Unit filename="../windows/jacknetadapter.rc" />
+		<Unit filename="../windows/jacknetdriver.rc" />
+		<Unit filename="../windows/jacknetmanager.rc" />
+		<Unit filename="../windows/jacknetonedriver.rc" />
+		<Unit filename="../windows/jackportaudio.rc" />
+		<Unit filename="../windows/jackwinmme.rc" />
+		<Unit filename="../windows/libjack.rc" />
+		<Unit filename="../windows/libjacknet.rc" />
+		<Unit filename="../windows/libjackserver.rc" />
+		<Unit filename="../windows/portaudio/JackPortAudioAdapter.cpp" />
+		<Unit filename="../windows/portaudio/JackPortAudioAdapter.h" />
+		<Unit filename="../windows/portaudio/JackPortAudioDevices.cpp" />
+		<Unit filename="../windows/portaudio/JackPortAudioDevices.h" />
+		<Unit filename="../windows/portaudio/JackPortAudioDriver.cpp" />
+		<Unit filename="../windows/portaudio/JackPortAudioDriver.h" />
+		<Unit filename="../windows/portaudio/pa_asio.h" />
+		<Unit filename="../windows/portaudio/portaudio.h" />
+		<Unit filename="../windows/resource.h" />
+		<Unit filename="../windows/resource_vc.h" />
+		<Unit filename="../windows/samplerate.h" />
+		<Unit filename="../windows/winmme/JackWinMMEDriver.cpp" />
+		<Unit filename="../windows/winmme/JackWinMMEDriver.h" />
+		<Unit filename="../windows/winmme/JackWinMMEInputPort.cpp" />
+		<Unit filename="../windows/winmme/JackWinMMEInputPort.h" />
+		<Unit filename="../windows/winmme/JackWinMMEOutputPort.cpp" />
+		<Unit filename="../windows/winmme/JackWinMMEOutputPort.h" />
+		<Unit filename="../windows/winmme/JackWinMMEPort.cpp" />
+		<Unit filename="../windows/winmme/JackWinMMEPort.h" />
+		<Unit filename="../wscript" />
+		<Extensions>
+			<envvars />
+			<code_completion />
+			<debugger />
+		</Extensions>
+	</Project>
+</CodeBlocks_project_file>
diff --git a/codeBlocks/jack2.layout b/codeBlocks/jack2.layout
new file mode 100644
index 0000000..5246258
--- /dev/null
+++ b/codeBlocks/jack2.layout
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_layout_file>
+	<ActiveTarget name="Debug" />
+	<File name="../common/JackAudioDriver.cpp" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="4660" topLine="27" />
+		</Cursor>
+	</File>
+	<File name="../common/Jackdmp.cpp" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="4598" topLine="118" />
+		</Cursor>
+	</File>
+	<File name="../common/JackArgParser.cpp" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="6777" topLine="174" />
+		</Cursor>
+	</File>
+	<File name="../common/JackThreadedDriver.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="1045" topLine="18" />
+		</Cursor>
+	</File>
+	<File name="../common/netjack.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="2364" topLine="63" />
+		</Cursor>
+	</File>
+	<File name="../linux/iio/JackIIODriver.C" open="1" top="1" tabpos="5" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="6665" topLine="143" />
+		</Cursor>
+	</File>
+	<File name="../wscript" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="6258" topLine="129" />
+		</Cursor>
+	</File>
+	<File name="../linux/firewire/JackFFADODriver.cpp" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="30896" topLine="804" />
+		</Cursor>
+	</File>
+	<File name="../common/JackDummyDriver.cpp" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="950" topLine="15" />
+		</Cursor>
+	</File>
+	<File name="../common/JackError.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="2588" topLine="78" />
+		</Cursor>
+	</File>
+	<File name="../common/JackDriver.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="0" topLine="108" />
+		</Cursor>
+	</File>
+	<File name="../linux/alsa/JackAlsaDriver.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="1319" topLine="36" />
+		</Cursor>
+	</File>
+	<File name="../common/JackControlAPI.cpp" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="10513" topLine="360" />
+		</Cursor>
+	</File>
+	<File name="../common/driver_interface.h" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="4239" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="../linux/driver.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="1320" topLine="25" />
+		</Cursor>
+	</File>
+	<File name="../linux/freebob/freebob_driver.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="0" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="../common/JackLoopbackDriver.cpp" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="2289" topLine="93" />
+		</Cursor>
+	</File>
+	<File name="../common/JackAudioAdapterFactory.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="2313" topLine="68" />
+		</Cursor>
+	</File>
+	<File name="../linux/iio/JackIIODriver.H" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="1872" topLine="26" />
+		</Cursor>
+	</File>
+	<File name="../linux/freebob/JackFreebobDriver.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="0" topLine="24" />
+		</Cursor>
+	</File>
+	<File name="../common/JackInternalClient.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="877" topLine="13" />
+		</Cursor>
+	</File>
+	<File name="../common/JackDriverLoader.cpp" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="23261" topLine="752" />
+		</Cursor>
+	</File>
+	<File name="../common/JackAudioDriver.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="3119" topLine="37" />
+		</Cursor>
+	</File>
+	<File name="../common/JackTools.cpp" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="3683" topLine="118" />
+		</Cursor>
+	</File>
+	<File name="../dbus/wscript" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="814" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="../linux/firewire/ffado_driver.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="5335" topLine="170" />
+		</Cursor>
+	</File>
+	<File name="../linux/wscript" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="1135" topLine="30" />
+		</Cursor>
+	</File>
+	<File name="../linux/alsa/JackAlsaAdapter.cpp" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="3500" topLine="23" />
+		</Cursor>
+	</File>
+	<File name="../common/JackNetDriver.cpp" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="27095" topLine="694" />
+		</Cursor>
+	</File>
+	<File name="../common/JackArgParser.h" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="836" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="../common/JackAPI.cpp" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="15232" topLine="275" />
+		</Cursor>
+	</File>
+	<File name="../linux/firewire/JackFFADODriver.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="0" topLine="2" />
+		</Cursor>
+	</File>
+	<File name="../linux/alsa/JackAlsaDriver.cpp" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="0" topLine="24" />
+		</Cursor>
+	</File>
+	<File name="../common/JackDriver.cpp" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="2693" topLine="64" />
+		</Cursor>
+	</File>
+	<File name="../linux/freebob/JackFreebobDriver.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="2786" topLine="43" />
+		</Cursor>
+	</File>
+</CodeBlocks_layout_file>
diff --git a/linux/iio/JackIIODriver.C b/linux/iio/JackIIODriver.C
new file mode 100644
index 0000000..1b598c9
--- /dev/null
+++ b/linux/iio/JackIIODriver.C
@@ -0,0 +1,172 @@
+/*
+Copyright (C) 2013 Matt Flax <flatmax@>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "JackIIODriver.H"
+#include "driver_interface.h"
+
+#define IIO_DEFAULT_SAMPLERATE 1e6; ///< The default sample rate for the default chip
+#define IIO_DEFAULT_PERIODSIZE 1024; ///< The defaul period size
+
+namespace Jack {
+
+int JackIIODriver::Open(jack_nframes_t buffer_size,
+                          jack_nframes_t samplerate,
+                          bool capturing,
+                          bool playing,
+                          int inchannels,
+                          int outchannels,
+                          bool monitor,
+                          const char* capture_driver_name,
+                          const char* playback_driver_name,
+                          jack_nframes_t capture_latency,
+                          jack_nframes_t playback_latency)
+{
+    return JackAudioDriver::Open(buffer_size, samplerate, capturing, playing, inchannels, outchannels,
+        monitor, capture_driver_name, playback_driver_name, capture_latency, playback_latency);
+}
+
+} // end namespace Jack
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    SERVER_EXPORT const jack_driver_desc_t *
+    driver_get_descriptor () {
+        jack_driver_desc_t * desc;
+        jack_driver_desc_filler_t filler;
+        jack_driver_param_value_t value;
+
+        desc = jack_driver_descriptor_construct("iio", JackDriverMaster, "Linux Industrial IO backend", &filler);
+
+        strcpy(value.str, "AD7476");
+        jack_driver_descriptor_add_parameter(
+            desc,
+            &filler,
+            "device",
+            'd',
+            JackDriverParamString,
+            &value,
+            NULL,
+            "The IIO chip to use.",
+            "The IIO chip to use. Specifies which chip name to scan for on all devices present in /sys/bus/iio.");
+
+        value.ui = IIO_DEFAULT_PERIODSIZE;
+        jack_driver_descriptor_add_parameter(desc, &filler, "period", 'p', JackDriverParamUInt, &value, NULL, "Frames per period", NULL);
+
+        value.ui = 2;
+        jack_driver_descriptor_add_parameter(desc, &filler, "nperiods", 'n', JackDriverParamUInt, &value, NULL, "Number of periods of playback latency", NULL);
+
+        value.ui = (IIO_DEFAULT_SAMPLERATE)U;
+        jack_driver_descriptor_add_parameter(desc, &filler, "rate", 'r', JackDriverParamUInt, &value, NULL, "Sample rate", NULL);
+
+        value.i = 0;
+        jack_driver_descriptor_add_parameter(desc, &filler, "capture", 'C', JackDriverParamBool, &value, NULL, "Provide capture ports.", NULL);
+        jack_driver_descriptor_add_parameter(desc, &filler, "playback", 'P', JackDriverParamBool, &value, NULL, "Provide playback ports.", NULL);
+
+        value.i = 0;
+        jack_driver_descriptor_add_parameter(desc, &filler, "duplex", 'D', JackDriverParamBool, &value, NULL, "Provide both capture and playback ports.", NULL);
+
+        value.ui = 0;
+        jack_driver_descriptor_add_parameter(desc, &filler, "input-latency", 'I', JackDriverParamUInt, &value, NULL, "Extra input latency (frames)", NULL);
+        jack_driver_descriptor_add_parameter(desc, &filler, "output-latency", 'O', JackDriverParamUInt, &value, NULL, "Extra output latency (frames)", NULL);
+
+        value.ui = 0;
+        jack_driver_descriptor_add_parameter(desc, &filler, "inchannels", 'i', JackDriverParamUInt, &value, NULL, "Number of input channels to provide (note: currently ignored)", NULL);
+        jack_driver_descriptor_add_parameter(desc, &filler, "outchannels", 'o', JackDriverParamUInt, &value, NULL, "Number of output channels to provide (note: currently ignored)", NULL);
+
+        value.ui = 3;
+        jack_driver_descriptor_add_parameter(desc, &filler, "verbose", 'v', JackDriverParamUInt, &value, NULL, "gtkIOStream verbose level", NULL);
+
+//        value.i = 0;
+//        jack_driver_descriptor_add_parameter(desc, &filler, "snoop", 'X', JackDriverParamBool, &value, NULL, "Snoop firewire traffic", NULL);
+
+        return desc;
+    }
+
+    SERVER_EXPORT Jack::JackDriverClientInterface* driver_initialize(Jack::JackLockedEngine* engine, Jack::JackSynchro* table, const JSList* params) {
+        const JSList * node;
+        const jack_driver_param_t * param;
+
+        char *device_name=(char*)"AD7476";
+
+        for (node = params; node; node = jack_slist_next (node)) {
+            param = (jack_driver_param_t *) node->data;
+
+            switch (param->character) {
+                case 'd':
+                    device_name = const_cast<char*>(param->value.str);
+                    break;
+                case 'p':
+                    cmlparams.period_size = param->value.ui;
+                    cmlparams.period_size_set = 1;
+                    break;
+                case 'n':
+                    cmlparams.buffer_size = param->value.ui;
+                    cmlparams.buffer_size_set = 1;
+                    break;
+                case 'r':
+                    cmlparams.sample_rate = param->value.ui;
+                    cmlparams.sample_rate_set = 1;
+                    break;
+                case 'i':
+                    cmlparams.capture_ports = param->value.ui;
+                    break;
+                case 'o':
+                    cmlparams.playback_ports = param->value.ui;
+                    break;
+                case 'I':
+                    cmlparams.capture_frame_latency = param->value.ui;
+                    break;
+                case 'O':
+                    cmlparams.playback_frame_latency = param->value.ui;
+                    break;
+                case 'x':
+                    cmlparams.slave_mode = param->value.ui;
+                    break;
+//                case 'X':
+//                    cmlparams.snoop_mode = param->value.i;
+//                    break;
+                case 'v':
+                    cmlparams.verbose_level = param->value.ui;
+            }
+        }
+
+        /* duplex is the default */
+        if (!cmlparams.playback_ports && !cmlparams.capture_ports) {
+            cmlparams.playback_ports = 1;
+            cmlparams.capture_ports = 1;
+        }
+
+        iio.findDevicesByChipName(chipName);
+
+        // Special open for FFADO driver...
+        if (ffado_driver->Open(&cmlparams) == 0) {
+            return threaded_driver;
+        } else {
+            delete threaded_driver; // Delete the decorated driver
+            return NULL;
+        }
+    }
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/linux/iio/JackIIODriver.H b/linux/iio/JackIIODriver.H
new file mode 100644
index 0000000..d93e599
--- /dev/null
+++ b/linux/iio/JackIIODriver.H
@@ -0,0 +1,65 @@
+/*
+Copyright (C) 2013 Matt Flax <flatmax@>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef JACKIIODRIVER_H
+#define JACKIIODRIVER_H
+
+#include "JackAudioDriver.h"
+#include "JackThreadedDriver.h"
+
+#include <IIO/IIO.H>
+
+namespace Jack {
+
+/** The Linux Industrial IO (IIO) subsystem driver for Jack.
+Currently this driver only supports capture.
+*/
+class JackIIODriver : public JackAudioDriver {
+
+    IIO iio; ///< The actual IIO device
+
+public:
+    /** Constructor
+    */
+    JackIIODriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table) : JackAudioDriver(name, alias, engine, table) {
+    }
+
+    /** Destructor
+    */
+    virtual ~JackIIODriver() {
+    }
+
+    /**
+    */
+    virtual int Open(jack_nframes_t buffer_size,
+                    jack_nframes_t samplerate,
+                    bool capturing,
+                    bool playing,
+                    int inchannels,
+                    int outchannels,
+                    bool monitor,
+                    const char* capture_driver_name,
+                    const char* playback_driver_name,
+                    jack_nframes_t capture_latency,
+                    jack_nframes_t playback_latency);
+
+};
+
+} // end of Jack namespace
+#endif // JACKIIODRIVER_H
diff --git a/linux/wscript b/linux/wscript
index a2bb6ba..3cd9426 100644
--- a/linux/wscript
+++ b/linux/wscript
@@ -1,6 +1,8 @@
 #! /usr/bin/env python
 # encoding: utf-8
 
+from waflib import Context
+
 def configure(conf):
     conf.check_cfg(package='alsa', atleast_version='1.0.18', args='--cflags --libs', mandatory=False)
     conf.env['BUILD_DRIVER_ALSA'] = conf.is_defined('HAVE_ALSA')
@@ -11,7 +13,35 @@ def configure(conf):
     conf. check_cfg(package='libffado', atleast_version='1.999.17', args='--cflags --libs', mandatory=False)
     conf.env['BUILD_DRIVER_FFADO'] = conf.is_defined('HAVE_LIBFFADO')
 
-    conf.define('HAVE_PPOLL', 1 )
+    conf.check_cfg(package='gtkIOStream', atleast_version='1.4.0', args='--cflags --libs', mandatory=False)
+    conf.env['BUILD_DRIVER_IIO'] = conf.is_defined('HAVE_GTKIOSTREAM')
+    conf.check_cfg(package='eigen3', atleast_version='3.2.0', args='--cflags --libs', mandatory=False)
+    conf.env['BUILD_DRIVER_IIO'] += conf.is_defined('HAVE_EIGEN3')
+    conf.check_cfg(package='sox', atleast_version='14.4.1', args='--cflags --libs', mandatory=False)
+    conf.env['BUILD_DRIVER_IIO'] += conf.is_defined('HAVE_SOX')
+    #conf.env['BUILD_DRIVER_IIO'] += conf.is_defined('HAVE_EIGEN3')
+    #print conf.env
+    #conffile.write("\n".join(myconf))
+    #conf.define('HAVE_PPOLL', 1 )
+
+    conf.find_program("mkoctfile", var="MKOCTFILE")
+    if conf.env.MKOCTFILE:
+        conf.env['HAVE_OCTAVE']=1
+        conf.env['define_key'] += ['HAVE_OCTAVE']
+        conf.env['DEFINES'] += ['HAVE_OCTAVE=1']
+        #conf.env('Octave')
+        conf.env['INCLUDES_OCTAVE'] = conf.cmd_and_log([conf.env.MKOCTFILE, "--print", "INCFLAGS" ],
+                                   output=Context.STDOUT).replace('\n', '').replace('-I','').split()
+        lflags = conf.cmd_and_log([conf.env.MKOCTFILE, "--print", "LFLAGS" ],
+                                   output=Context.STDOUT)
+        conf.env['LIB_OCTAVE'] = conf.cmd_and_log([conf.env.MKOCTFILE, "--print", "OCTAVE_LIBS" ],
+                                   output=Context.STDOUT).replace('\n', '').replace('-l','').split()
+        #conf.append("INCFLAGS: " + incflags)
+        #conf.append("LFLAGS: " + lflags)
+        #conf.append("LIBS: " + libs)
+        print conf.env
+    #import pdb; pdb.set_trace()
+
 
 def create_jack_driver_obj(bld, target, sources, uselib = None):
     driver = bld(features = ['c', 'cxx', 'cxxshlib', 'cshlib'])
@@ -36,15 +66,15 @@ def build(bld):
         jackd.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
         jackd.source = ['../common/Jackdmp.cpp']
         jackd.use = ['serverlib']
-        if bld.env['IS_LINUX'] and bld.env['BUILD_JACKDBUS']: 
-            jackd.source += ['../dbus/reserve.c', '../dbus/audio_reserve.c'] 
+        if bld.env['IS_LINUX'] and bld.env['BUILD_JACKDBUS']:
+            jackd.source += ['../dbus/reserve.c', '../dbus/audio_reserve.c']
             jackd.use += ['PTHREAD', 'DL', 'RT', 'M', 'STDC++', 'DBUS-1']
         else:
             jackd.use += ['PTHREAD', 'DL', 'RT', 'M', 'STDC++']
         jackd.target = 'jackd'
-  	
+
     create_jack_driver_obj(bld, 'dummy', '../common/JackDummyDriver.cpp')
-    
+
     alsa_driver_src = [
                        'alsa/JackAlsaDriver.cpp',
                        'alsa/alsa_rawmidi.c',
@@ -74,6 +104,8 @@ def build(bld):
                         'firewire/JackFFADOMidiSendQueue.cpp'
                        ]
 
+    iio_driver_src = ['iio/JackIIODriver.C']
+
     if bld.env['BUILD_DRIVER_ALSA'] == True:
         create_jack_driver_obj(bld, 'alsa', alsa_driver_src, ["ALSA"])
         create_jack_driver_obj(bld, 'alsarawmidi', alsarawmidi_driver_src,
@@ -85,6 +117,9 @@ def build(bld):
     if bld.env['BUILD_DRIVER_FFADO'] == True:
         create_jack_driver_obj(bld, 'firewire', ffado_driver_src, ["LIBFFADO"])
 
+    if bld.env['BUILD_DRIVER_IIO'] == True:
+        create_jack_driver_obj(bld, 'iio', iio_driver_src, ["GTKIOSTREAM", "EIGEN3", "OCTAVE"])
+
     create_jack_driver_obj(bld, 'net', '../common/JackNetDriver.cpp')
 
     create_jack_driver_obj(bld, 'loopback', '../common/JackLoopbackDriver.cpp')
diff --git a/wscript b/wscript
index 0c3b350..aef4bd8 100644
--- a/wscript
+++ b/wscript
@@ -83,6 +83,7 @@ def options(opt):
     opt.add_option('--firewire', action='store_true', default=False, help='Enable FireWire driver (FFADO)')
     opt.add_option('--freebob', action='store_true', default=False, help='Enable FreeBob driver')
     opt.add_option('--alsa', action='store_true', default=False, help='Enable ALSA driver')
+    opt.add_option('--iio', action='store_true', default=False, help='Enable IIO driver')
     opt.add_option('--autostart', type='string', default="default", help='Autostart method. Possible values: "default", "classic", "dbus", "none"')
     opt.add_option('--portaudio', action='store_true', default=False, help='Enable Portaudio driver')
     opt.add_option('--winmme', action='store_true', default=False, help='Enable WinMME driver')
@@ -136,7 +137,7 @@ def configure(conf):
         conf.check_tool('compiler_cc')
         conf.env.append_unique('CCDEFINES', '_POSIX')
         conf.env.append_unique('CXXDEFINES', '_POSIX')
- 
+
     conf.env.append_unique('CXXFLAGS', '-Wall')
     conf.env.append_unique('CFLAGS', '-Wall')
 
@@ -149,9 +150,12 @@ def configure(conf):
             conf.fatal('FreeBob driver was explicitly requested but cannot be built')
         if Options.options.firewire and not conf.env['BUILD_DRIVER_FFADO']:
             conf.fatal('FFADO driver was explicitly requested but cannot be built')
+        if Options.options.iio and not conf.env['BUILD_DRIVER_IIO']:
+            conf.fatal('IIO driver was explicitly requested but cannot be built')
         conf.env['BUILD_DRIVER_ALSA'] = Options.options.alsa
         conf.env['BUILD_DRIVER_FFADO'] = Options.options.firewire
         conf.env['BUILD_DRIVER_FREEBOB'] = Options.options.freebob
+        conf.env['BUILD_DRIVER_IIO'] = Options.options.iio
     if conf.env['IS_WINDOWS']:
         conf.sub_config('windows')
         if Options.options.portaudio and not conf.env['BUILD_DRIVER_PORTAUDIO']:
@@ -319,7 +323,7 @@ def configure(conf):
 
     print("Build with a maximum of %d JACK clients" % Options.options.clients)
     print("Build with a maximum of %d ports per application" % Options.options.application_ports)
- 
+
     display_msg("Install prefix", conf.env['PREFIX'], 'CYAN')
     display_msg("Library directory", conf.all_envs[""]['LIBDIR'], 'CYAN')
     if conf.env['BUILD_WITH_32_64'] == True:
@@ -350,11 +354,12 @@ def configure(conf):
         display_feature('Build with ALSA support', conf.env['BUILD_DRIVER_ALSA'] == True)
         display_feature('Build with FireWire (FreeBob) support', conf.env['BUILD_DRIVER_FREEBOB'] == True)
         display_feature('Build with FireWire (FFADO) support', conf.env['BUILD_DRIVER_FFADO'] == True)
+        display_feature('Build with IIO support', conf.env['BUILD_DRIVER_IIO'] == True)
 
     if conf.env['IS_WINDOWS']:
         display_feature('Build with WinMME support', conf.env['BUILD_DRIVER_WINMME'] == True)
         display_feature('Build with Portaudio support', conf.env['BUILD_DRIVER_PORTAUDIO'] == True)
-       
+
     if conf.env['BUILD_JACKDBUS'] == True:
         display_msg('D-Bus service install directory', conf.env['DBUS_SERVICES_DIR'], 'CYAN')
         #display_msg('Settings persistence', xxx)
@@ -407,7 +412,7 @@ def build(bld):
         bld.add_subdirs('man')
         if bld.env['BUILD_JACKDBUS'] == True:
            bld.add_subdirs('dbus')
-  
+
     if bld.env['IS_MACOSX']:
         bld.add_subdirs('macosx')
         bld.add_subdirs('example-clients')
-- 
1.8.3.2
PrevNext  Index

1392326713.14291_0.ltw:2,a <1392326687-3964-2-git-send-email-flatmax at flatmax dot org>