Commit af83c4e9 authored by sletz's avatar sletz
Browse files

Remove Linux Makefile, update Readme.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2134 0c269be4-1314-0410-8aa9-9f06e86f4224
parent cf2834c6
......@@ -20,6 +20,10 @@ Fernando Lopez-Lezcano
Jackdmp changes log
---------------------------
2008-04-10 Stephane Letz <letz@grame.fr>
* Remove Linux Makefile, update Readme.
2008-04-03 Stephane Letz <letz@grame.fr>
* Correct a dirty port array issue in JackGraphManager::GetPortsAux.
......
......@@ -20,45 +20,20 @@ The audible result of this mode is that if a client is not activated during one
Linux version
--------------
The published version still uses fifos for server/client synchronization. The use of POSIX named semaphore is implemented but still a bit unstable. Sockets are used for server/client communications. The ALSA backend derived from jackd implementation is used.
To build jackdmp, two options have available : a rather simple "Makefile" and a "scons" based compilation system. Makefile based compilation is the preferred option since the scons one is not complete yet. There is no configuration step yet. The code has to be compiled on a machine where ALSA and frebob (FFADO) headers and libraries are corrected installed.
The published version still uses fifos for server/client synchronization. The use of POSIX named semaphore is implemented but still a bit unstable. Sockets are used for server/client communications. The ALSA backend derived from jackd implementation is used. To build jackdmp, a "scons" based compilation system is available. The code has to be compiled on a machine where ALSA and possibly frebob (FFADO) headers and libraries are corrected installed.
Go in the src/linux folder and do :
In the top folder do :
make
(sudo) make install
scons
sudo scons install
(WARNING : this will install everything needed in /usr/local in place of a regular jack installation so that jack applications will use jackdmp)
Freebob driver can be compiled with : make freebob
FFADO driver can be compiled with : make firewire
You may define variables for special purpose, like :
make prefix=/usr to compile and install everything in /usr location instead of /usr/local or
make libdir=lib64 on a 64 bits system so that libraries are installed at the proper location.
Compilation options :
- the GETCYCLE_TIME flag must be defined to use "get_cycles" to measure time otherwise "clock_gettime" is used (used by default)
- the __CLIENTDEBUG__ flag must be added in the makefile to activate client validation
- the SOCKET_RPC_POSIX_SEMA flag must be used to test POSIX named semaphore for server/client synchronization
- the following variables may have to be changed in common/JackConstants.h to use a ramfs for fifos and sockets.
#define jack_server_dir "/dev/shm"
#define jack_client_dir "/dev/shm"
After installation, qjackctl setting will have to be changed to use "jackdmp" instead of "jackd".
To remove jackdmp, go in the src/linux folder and do :
Various compilations options can be seed using scons -h.
make remove
Important compilation options :
This will remove jackdmp and (possibly) restore regular jack.
- the FULL_MIMIC flag must be defined so that jackdmp use the same exe and library naming than jackd. When compiled and installed with FULL_MIMIC=yes, jackdmp will *replace* regular jackd. When compiled and installed with FULL_MIMIC=no, a special "wrapper" library will be used so that jackd and jackdmp can be used side by side. The wrapper library will then cleanly redirect all jack API calls on the currently running server. If the "automatic start server option" is used by clients, the wrapper library will try to start the server (either jackd or jackdmp) that is currently described in the .jackdrc configuration file. By default FULL_MIMIC is "yes".
Using Jackdmp with Qjackctl :
......@@ -157,7 +132,7 @@ To activate loopback driver, use :
Validations tools
------------------
jackdmp can possibly validate client applications by checking they are using the API in a correct manner (calling functions in the right order, correctly desallocating ressources....) and produce a log file. By default jackdmp is compiled with client validation off. A __CLIENTDEBUG__ flag must be activated in the Makefile (or Xcode project) to activate validation.
jackdmp can possibly validate client applications by checking they are using the API in a correct manner (calling functions in the right order, correctly desallocating ressources....) and produce a log file. A JACK_CLIENT_DEBUG environment variable must be used to activate client validation : use "export JACK_CLIENT_DEBUG=on".
--------------
Documentation
......@@ -206,6 +181,7 @@ Note : To experiment with the -S option, jackdmp must be launched in a console.
0.68 : Internal loadable client implementation, winpipe version added. Reorganize jack headers. Improve Linux install/remove scripts. Use LIB_DIR variable for 64 bits related compilation (drivers location). More generic Linux script. Correct jack_acquire_real_time_scheduling on OSX. Merge of Dmitry Baikov MIDI branch. Correct JackGraphManager::GetPortsAux to use port type. Remove JackEngineTiming class: code moved in JackEngineControl. Add midiseq and midisine examples. Cleanup old zombification code. Linux Makefile now install jack headers. Use of JACK_CLIENT_DEBUG environment variable to activate debug client mode. Definition of JACK_LOCATION variable using -D in the Makefile. Restore jack 0.103.0 MIDI API version. Fix a bug in freewheel management in async mode: drivers now receive the kStartFreewheelCallback and kStopFreewheelCallback notifications. Server and user directory related code moved in a JackTools file. Client name rewritting to remove path characters (used in fifo naming). Correct ALSA driver Attach method: internal driver may have changed the buffer_size and sample_rate values. Add JackWinSemaphore class. Add an implementation for obsolete jack_internal_client_new and jack_internal_client_close. Add missing jack_port_type_size. Use of JackWinSemaphore instead of JackWinEvent for inter-process synchronization. Correct types.h for use with MINGW on Windows. Move OSX start/stop notification mechanism in Jackdmp.cpp. Correct CheckPort in JackAPI.cpp.
0.69 : On OSX, use CFNotificationCenterPostNotificationWithOptions with kCFNotificationDeliverImmediately | kCFNotificationPostToAllSessions for server ==> JackRouter plugin notification. On OSX, use jack server name in notification system. Correct fPeriodUsecs computation in JackAudioDriver::SetBufferSize and JackAudioDriver::SetSampleRate. Correct JackMachNotifyChannel::ClientNotify. Correct bug in CoreAudio driver sample rate management. Add a sample_rate change listener in CoreAudio driver. Correct sample_rate management in JackCoreAudioDriver::Open. Better handling in sample_rate change listener. Pieter Palmers FFADO driver and scons based build. Pieter Palmers second new build system: scons and Makefile based build. Tim Blechmann scons patch. Change string management for proper compilation with gcc 4.2.2. JackLog cleanup. Cleanup in CoreAudio driver. Tim Blechmann patch for JackGraphManager::GetPortsAux memory leak, Tim Blechmann patch for scons install. Dmitry Baikov MIDI patch : alsa_seqmidi and alsa_rammidi drivers. CoreAudio driver improvement : detect and notify abnormal situations (stopped driver in case of SR change...).
0.70 : Updated API to match jack 0.109.0 version. Update in usx2y.c and JackPort.cpp to match jackd 0.109.2. Latest jack_lsp code from jack SVN. Add jack_mp_thread_wait client example. Add jack_thread_wait client example. Remove checking thread in CoreAudio driver, better device state change recovery strategy: the driver is stopped and restarted. Move transport related methods from JackEngine to JackServer. Tim Blechmann sse optimization patch for JackaudioPort::MixAudioBuffer, use of Apple Accelerate framework on OSX. Remove use of assert in JackFifo, JackMachSemaphore, and JackPosixSemaphore: print an error instead. Correct "server_connect": close the communication channel. More robust external API. Use SetAlias for port naming. Use jackd midi port naming scheme. Notify ports unregistration in JackEngine::ClientCloseAux. Fix in JackClient::Error(): when RT thread is failing and calling Shutdown, Shutdown was not desactivating the client correctly.
0.71 : Add port register/unregister notification in JackAlsaDriver. Correct JACK_port_unregister. Add TimeCallback in JackDebugClient class. Correct jack_get_time propotype. Correct JackSocketClientChannel::ClientClose to use ServerSyncCall instead of ServerAsyncCall. Better documentation in jack.h. libjackdmp.so renamed to libjackservermp.so and same for OSX framework. Define an internal jack_client_open_aux needed for library wrapper feature. Remove unneeded jack_port_connect API. Correct jack_port_get_connections function (should return NULL when no connections). In thread model, execute a dummy cycle to be sure thread has the correct properties (ensure thread creation is finished). Fix engine real-time notification (was broken since ??). Implements wrapper layer. Correct jack_port_get_total_latency. Correct all backend playback port latency in case of "asynchronous" mode (1 buffer more). Add test for jack_cycle_wait, jack_cycle_wait and jack_set_process_thread API. RT scheduling for OSX thread (when use in dummy driver). Add -L (extra output latency in aynchronous mode) in CoreAudio driver. New JackLockedEngine decorator class to serialize access from ALSA Midi thread, command thread and in-server clients. Use engine in JackAlsaDriver::port_register and JackAlsaDriver::port_unregister. Fix connect notification to deliver *one* notification only. Correct JackClient::Activate so that first kGraphOrderCallback can be received by the client notification thread. New jack_server_control client to test notifications when linked to the server library. Synchronise transport.h with latest jackd version (Video handling). Transport timebase fix. Dmitry Baikov patch for alsa_rawmidi driver. Pieter Palmers patch for FFADO driver. Add an Init method for blocking drivers to be decorated using JackThreadedDriver class. Correct PortRegister, port name checking must be done on server side. Correct a missing parameter in the usage message of jack_midiseq. New SetNonBlocking method for JackSocket. Correct a dirty port array issue in JackGraphManager::GetPortsAux.
This is a work in progress but the implementation is now stable enough to be tested. jackdmp has been used successfully with the following applications : Ardour, Hydrogen, Jamin, Qjackctl, Jack-Rack, SooperLooper, AlsaPlayer...
......
# Type "make" or "make all" to compile ALSA driver, "make freebob" to compile FREEBOB driver and "make firewire" to compile FFADO driver.
# Choose the installation location
prefix := /usr/local
prefix := ${DESTDIR}${prefix}
libdir := lib
subprojects := ../common ../common/jack ../tests ../example-clients alsa freebob firewire ../linux ..
sources := $(wildcard *.cpp) $(wildcard */*.cpp) $(wildcard ../common/*.cpp) $(wildcard ../tests/*.cpp)
TARGET_LINUX_SERVER := jackdmp
TARGET_LINUX_SERVER_LIB := libjackservermp.so
TARGET_LINUX_CLIENT_LIB := libjackmp.so
TARGET_LINUX_WRAPPER_LIB := libjackwrapper.so
TARGET_LINUX_ALSA := jack_alsa.so
TARGET_LINUX_FREEBOB := jack_freebob.so
TARGET_LINUX_FIREWIRE := jack_firewire.so
TARGET_LINUX_DUMMY := jack_dummy.so
VPATH := $(subprojects)
LIB_LINUX := -lpthread -lrt -lasound
objects_common_server_lib := JackActivationCount.o JackAPI.o JackAudioDriver.o JackClient.o JackConnectionManager.o \
JackDriver.o JackEngine.o JackEngineControl.o JackError.o JackExternalClient.o JackFrameTimer.o \
JackFreewheelDriver.o JackGlobalsServer.o JackGraphManager.o JackInternalClient.o JackPort.o JackPosixSemaphore.o \
JackPosixThread.o JackFifo.o JackLoopbackDriver.o JackPortType.o JackAudioPort.o JackMidiPort.o JackMidiAPI.o \
JackServer.o JackShmMem.o JackThreadedDriver.o shm.o JackSocket.o JackSocketServerChannel.o JackSocketNotifyChannel.o \
JackSocketServerNotifyChannel.o JackTime.o JackServerAPI.o JackGlobals.o JackDriverLoader.o internal_metro.o JackDebugClient.o \
JackTransportEngine.o JackServerGlobals.o JackServerLaunch.o timestamps.o JackTools.o ringbuffer.o
objects_common_client_lib := JackActivationCount.o JackAPI.o JackClient.o JackConnectionManager.o ringbuffer.o JackServerLaunch.o\
JackError.o JackFrameTimer.o JackGlobalsClient.o JackGraphManager.o JackLibClient.o JackLibAPI.o JackPort.o JackPosixSemaphore.o \
JackFifo.o JackPortType.o JackAudioPort.o JackMidiPort.o JackMidiAPI.o JackEngineControl.o JackPosixThread.o JackShmMem.o \
shm.o JackSocket.o JackSocketClientChannel.o JackTime.o JackGlobals.o JackDebugClient.o JackTransportEngine.o timestamps.o JackTools.o
objects_linux_server := Jackdmp.o
objects_linux_alsamidi := alsa_rawmidi.o alsa_seqmidi.o alsa_midi_jackmp.o
objects_linux_alsa := JackAlsaDriver.o memops.o generic_hw.o hdsp.o hammerfall.o ice1712.o $(objects_linux_alsamidi)
objects_linux_freebob := JackFreebobDriver.o
objects_linux_firewire := JackFFADODriver.o
objects_linux_dummy := JackDummyDriver.o
CFLAGS := -g -O3 -fPIC -DJACKMP -DUSE_POSIX_SHM $(addprefix -I, $(subprojects)) $(CFLAGS)
CXXFLAGS := -g -O3 -fPIC -DJACKMP -DSOCKET_RPC_FIFO_SEMA -D__SMP__ -DADDON_DIR=\"$(prefix)/$(libdir)/jackmp\" -DLIB_DIR=\"$(libdir)\" -DJACK_LOCATION=\"$(prefix)/bin\" $(addprefix -I, $(subprojects)) $(CXXFLAGS)
#CFLAGS := -g -fPIC -DUSE_POSIX_SHM $(addprefix -I, $(subprojects)) $(CFLAGS)
#CXXFLAGS := -g -fPIC -DSOCKET_RPC_FIFO_SEMA -D__SMP__ -DADDON_DIR=\"$(prefix)/$(libdir)/jackmp\" -DLIB_DIR=\"$(libdir)\" -DJACK_LOCATION=\"$(prefix)/bin\" $(addprefix -I, $(subprojects)) $(CXXFLAGS)
# Use this line to compile with POSIX names semaphore
#CXXFLAGS := -g -O3 -fPIC -DSOCKET_RPC_POSIX_SEMA -D__SMP__ -DADDON_DIR=\"$(prefix)/$(libdir)/jackmp\" -DLIB_DIR=\"$(libdir)\" -DJACK_LOCATION=\"$(prefix)/bin\" $(addprefix -I, $(subprojects)) $(CXXFLAGS)
all : $(TARGET_LINUX_SERVER_LIB) $(TARGET_LINUX_CLIENT_LIB) $(TARGET_LINUX_WRAPPER_LIB) \
$(TARGET_LINUX_SERVER) $(TARGET_LINUX_ALSA) $(TARGET_LINUX_DUMMY) \
synchroClient synchroServer synchroServerClient testSem jack_test inprocess jack_load jack_unload jack_server_control
freebob : $(TARGET_LINUX_SERVER_LIB) $(TARGET_LINUX_CLIENT_LIB) $(TARGET_LINUX_WRAPPER_LIB) \
$(TARGET_LINUX_SERVER) $(TARGET_LINUX_ALSA) $(TARGET_LINUX_FREEBOB) $(TARGET_LINUX_DUMMY) \
synchroClient synchroServer synchroServerClient testSem jack_test inprocess jack_load jack_unload
firewire : $(TARGET_LINUX_SERVER_LIB) $(TARGET_LINUX_CLIENT_LIB) $(TARGET_LINUX_WRAPPER_LIB) \
$(TARGET_LINUX_SERVER) $(TARGET_LINUX_ALSA) $(TARGET_LINUX_FIREWIRE) $(TARGET_LINUX_DUMMY) \
synchroClient synchroServer synchroServerClient testSem jack_test
synchroClient: JackPosixSemaphore.o testSynchroClient.o JackPosixThread.o JackError.o JackFifo.o
$(CXX) $(CXXFLAGS) JackPosixSemaphore.o testSynchroClient.o JackPosixThread.o JackError.o JackFifo.o $(LIB_LINUX) -o synchroClient
synchroServer: JackPosixSemaphore.o testSynchroServer.o JackPosixThread.o JackError.o JackFifo.o
$(CXX) $(CXXFLAGS) JackPosixSemaphore.o testSynchroServer.o JackPosixThread.o JackError.o JackFifo.o $(LIB_LINUX) -o synchroServer
synchroServerClient: JackPosixSemaphore.o testSynchroServerClient.o JackPosixThread.o JackError.o JackFifo.o JackShmMem.o shm.o
$(CXX) $(CXXFLAGS) JackPosixSemaphore.o testSynchroServerClient.o JackPosixThread.o JackError.o JackFifo.o JackShmMem.o shm.o $(LIB_LINUX) -o synchroServerClient
testSem: JackPosixSemaphore.o testSem.o JackPosixThread.o JackError.o JackFifo.o
$(CXX) $(CXXFLAGS) JackPosixSemaphore.o testSem.o JackPosixThread.o JackError.o JackFifo.o $(LIB_LINUX) -o testSem
jack_test: jack_test.o
$(CXX) $(CXXFLAGS) jack_test.o -L. -ljackmp -o jack_test
inprocess: inprocess.o
$(CXX) $(CXXFLAGS) -shared inprocess.o -L. -ljackmp -o inprocess.so
jack_load: ipload.o
$(CXX) $(CXXFLAGS) ipload.o -L. -ljackmp -o jack_load
jack_unload: ipunload.o
$(CXX) $(CXXFLAGS) ipunload.o -L. -ljackmp -o jack_unload
jack_server_control: control.o
$(CXX) $(CXXFLAGS) control.o -L. -ljackservermp -o jack_server_control
$(TARGET_LINUX_SERVER_LIB) : $(objects_common_server_lib)
$(CXX) $(CXXFLAGS) -shared $(objects_common_server_lib) $(LIB_LINUX) -o $(TARGET_LINUX_SERVER_LIB)
$(TARGET_LINUX_CLIENT_LIB) : $(objects_common_client_lib) $(objects_linux_lib)
$(CXX) $(CXXFLAGS) -shared $(objects_common_client_lib) $(objects_linux_lib) $(LIB_LINUX) -o $(TARGET_LINUX_CLIENT_LIB)
$(TARGET_LINUX_WRAPPER_LIB) : JackAPIWrapper.o ringbuffer.o
$(CXX) $(CXXFLAGS) -shared JackAPIWrapper.o ringbuffer.o -ldl -o $(TARGET_LINUX_WRAPPER_LIB)
$(TARGET_LINUX_SERVER) : $(objects_linux_server)
$(CXX) $(CXXFLAGS) $(objects_linux_server) $(LIB_LINUX) libjackservermp.so -o $(TARGET_LINUX_SERVER)
$(TARGET_LINUX_ALSA) : $(objects_linux_alsa)
$(CXX) $(CXXFLAGS) -shared $(objects_linux_alsa) $(LIB_LINUX) libjackmp.so libjackservermp.so -o $(TARGET_LINUX_ALSA)
$(TARGET_LINUX_FREEBOB) : $(objects_linux_freebob)
$(CXX) $(CXXFLAGS) -shared $(objects_linux_freebob) $(LIB_LINUX) -lfreebob libjackservermp.so -o $(TARGET_LINUX_FREEBOB)
$(TARGET_LINUX_FIREWIRE) : $(objects_linux_firewire)
$(CXX) $(CXXFLAGS) -shared $(objects_linux_firewire) $(LIB_LINUX) -lffado libjackservermp.so -o $(TARGET_LINUX_FIREWIRE)
$(TARGET_LINUX_DUMMY) : $(objects_linux_dummy)
$(CXX) $(CXXFLAGS) -shared $(objects_linux_dummy) $(LIB_LINUX) libjackservermp.so -o $(TARGET_LINUX_DUMMY)
# Install jackdmp and overwrite jack installation
install:
cp jackdmp $(prefix)/bin
cp libjackmp.so $(prefix)/$(libdir)
cp libjackservermp.so $(prefix)/$(libdir)
install -d $(prefix)/$(libdir)/jackmp/
cp jack_alsa.so $(prefix)/$(libdir)/jackmp
cp jack_dummy.so $(prefix)/$(libdir)/jackmp
[ -f jack_freebob.so ] && cp jack_freebob.so $(prefix)/$(libdir)/jackmp || echo "freebob driver not installed"
[ -f jack_firewire.so ] && cp jack_firewire.so $(prefix)/$(libdir)/jackmp || echo "firewire driver not installed"
cd $(prefix)/bin && [ -f jackd ] && mv -f jackd tmp_jackd || echo "jackd server not found, continue..."
cd $(prefix)/$(libdir) && [ -f libjack.so.0.0.28 ] && mv -f libjack.so.0.0.28 tmp_libjack.so.0.0.28 || echo "libjack not found, continue..."
cd $(prefix)/include && [ -d jack ] && mv -f jack tmp_jack || echo "jack headers not found, continue..."
install -d $(prefix)/include/jack/
cp ../common/jack/*.h $(prefix)/include/jack/
cd $(prefix)/$(libdir) && rm -f libjack.so*
cd $(prefix)/$(libdir) && ln -s libjackmp.so libjack.so
cd $(prefix)/$(libdir) && ln -s libjackmp.so libjack.so.0
cd $(prefix)/bin && ln -s jackdmp jackd
/sbin/ldconfig
installwrapper:
cp jackdmp $(prefix)/bin
cp libjackmp.so $(prefix)/$(libdir)
cp libjackservermp.so $(prefix)/$(libdir)
cp libjackwrapper.so $(prefix)/$(libdir)
install -d $(prefix)/$(libdir)/jackmp/
cp jack_alsa.so $(prefix)/$(libdir)/jackmp
cp jack_dummy.so $(prefix)/$(libdir)/jackmp
[ -f jack_freebob.so ] && cp jack_freebob.so $(prefix)/$(libdir)/jackmp || echo "freebob driver not installed"
[ -f jack_firewire.so ] && cp jack_firewire.so $(prefix)/$(libdir)/jackmp || echo "firewire driver not installed"
cd $(prefix)/include && [ -d jack ] && mv -f jack tmp_jack || echo "jack headers not found, continue..."
install -d $(prefix)/include/jack/
cp ../common/jack/*.h $(prefix)/include/jack/
cd $(prefix)/$(libdir) && rm -f libjack.so
cd $(prefix)/$(libdir) && rm -f libjack.so.0
cd $(prefix)/$(libdir) && ln -s libjackwrapper.so libjack.so
cd $(prefix)/$(libdir) && ln -s libjackwrapper.so libjack.so.0
#/sbin/ldconfig
# Remove jackdmp and tries to restore jack
uninstall: remove
remove:
rm $(prefix)/bin/jackdmp
rm $(prefix)/$(libdir)/libjackmp.so
rm $(prefix)/$(libdir)/libjackservermp.so
rm $(prefix)/$(libdir)/libjackwrapper.so
rm -r $(prefix)/$(libdir)/jackmp
rm -r $(prefix)/include/jack
cd $(prefix)/$(libdir) && rm -f libjack.so*
cd $(prefix)/bin && [ -f tmp_jackd ] && mv -f tmp_jackd jackd || echo "jackd server not restored, continue.."
cd $(prefix)/$(libdir) && [ -f tmp_libjack.so.0.0.28 ] && mv -f tmp_libjack.so.0.0.28 libjack.so.0.0.28 \
&& ln -s libjack.so.0.0.28 libjack.so && ln -s libjack.so.0.0.28 libjack.so.0 || echo "libjack not restored, continue.."
cd $(prefix)/include && [ -d tmp_jack ] && mv -f tmp_jack jack || echo "jack headers not restored, continue..."
/sbin/ldconfig
clean :
rm -f *.o
rm -f $(TARGET_LINUX_SERVER) $(TARGET_LINUX_SERVER_LIB) $(TARGET_LINUX_CLIENT_LIB) $(TARGET_LINUX_WRAPPER_LIB) $(TARGET_LINUX_ALSA) $(TARGET_LINUX_FREEBOB) $(TARGET_LINUX_FIREWIRE) $(TARGET_LINUX_DUMMY) \
synchroClient synchroServer synchroServerClient testSem jack_test jack_load jack_unload inprocess.so jack_server_control
depend :
#makedepend -w120 -Y -- $(CXXFLAGS) -- $(sources)
dox:
doxygen
# DO NOT DELETE
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment