Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 571388 - jack-audio-connection-kit-2 (jackd2) has no oss driver support
Summary: jack-audio-connection-kit-2 (jackd2) has no oss driver support
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-09 16:47 UTC by ossdriver
Modified: 2016-04-13 11:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ossdriver 2016-01-09 16:47:53 UTC
We managed to activate that support. The procedure is described at https://bpaste.net/show/04ef35c14e3b
Namely:
1. Get source code of jackd2 1.9.10 for linux from jackaudio.org/downloads/
2. Unpack the source code and cd into the unpacked folder.
3. Make a file inside the folder called patch.patch and paste the following code inside that file:
diff -ur jack-1.9.10/linux/wscript jack-1.9.10.oss/linux/wscript
--- jack-1.9.10/linux/wscript	2014-07-18 12:28:13.000000000 +0000
+++ jack-1.9.10.oss/linux/wscript	2016-01-08 23:26:41.000000000 +0000
@@ -20,6 +20,8 @@
conf.check_cfg(package='eigen3', atleast_version='3.1.2', args='--cflags --libs', mandatory=False)
conf.env['BUILD_DRIVER_IIO'] += conf.is_defined('HAVE_EIGEN3')

+ conf.env['BUILD_DRIVER_OSS'] = True
+
def create_jack_driver_obj(bld, target, sources, uselib = None):
driver = bld(features = ['c', 'cxx', 'cxxshlib', 'cshlib'])
driver.env['cxxshlib_PATTERN'] = 'jack_%s.so'
@@ -74,6 +76,8 @@
'alsarawmidi/JackALSARawMidiUtil.cpp'
]

+ oss_driver_src = ['oss/JackOSSDriver.cpp', '../common/memops.c']
+
ffado_driver_src = ['firewire/JackFFADODriver.cpp',
'firewire/JackFFADOMidiInputPort.cpp',
'firewire/JackFFADOMidiOutputPort.cpp',
@@ -88,6 +92,9 @@
create_jack_driver_obj(bld, 'alsarawmidi', alsarawmidi_driver_src,
["ALSA"])

+ if bld.env['BUILD_DRIVER_OSS'] == True:
+ create_jack_driver_obj(bld, 'oss', oss_driver_src, "OSS")
+
if bld.env['BUILD_DRIVER_FREEBOB'] == True:
create_jack_driver_obj(bld, 'freebob', 'freebob/JackFreebobDriver.cpp', ["LIBFREEBOB"])

diff -ur jack-1.9.10/solaris/oss/JackBoomerDriver.cpp jack-1.9.10.oss/solaris/oss/JackBoomerDriver.cpp
--- jack-1.9.10/solaris/oss/JackBoomerDriver.cpp	2014-07-18 12:28:13.000000000 +0000
+++ jack-1.9.10.oss/solaris/oss/JackBoomerDriver.cpp	2016-01-08 23:27:31.000000000 +0000
@@ -30,7 +30,7 @@
#include "memops.h"

#include <sys/ioctl.h>
-#include <sys/soundcard.h>
+#include "/usr/lib/oss/include/sys/soundcard.h"
#include <fcntl.h>
#include <iostream>
#include <assert.h>
diff -ur jack-1.9.10/solaris/oss/JackOSSAdapter.cpp jack-1.9.10.oss/solaris/oss/JackOSSAdapter.cpp
--- jack-1.9.10/solaris/oss/JackOSSAdapter.cpp	2014-07-18 12:28:13.000000000 +0000
+++ jack-1.9.10.oss/solaris/oss/JackOSSAdapter.cpp	2016-01-08 23:27:52.000000000 +0000
@@ -23,7 +23,7 @@
#include "memops.h"

#include <sys/ioctl.h>
-#include <sys/soundcard.h>
+#include "/usr/lib/oss/include/sys/soundcard.h"
#include <fcntl.h>
#include <iostream>
#include <assert.h>
diff -ur jack-1.9.10/solaris/oss/JackOSSDriver.cpp jack-1.9.10.oss/solaris/oss/JackOSSDriver.cpp
--- jack-1.9.10/solaris/oss/JackOSSDriver.cpp	2014-07-18 12:28:13.000000000 +0000
+++ jack-1.9.10.oss/solaris/oss/JackOSSDriver.cpp	2016-01-08 23:28:11.000000000 +0000
@@ -30,7 +30,7 @@
#include "memops.h"

#include <sys/ioctl.h>
-#include <sys/soundcard.h>
+#include "/usr/lib/oss/include/sys/soundcard.h"
#include <fcntl.h>
#include <iostream>
#include <assert.h>

Save the file.
4. Apply the patch by command:
patch -p1 < patch.patch
5. cd into linux folder within the source code folder and give the command:
ln -s ../solaris/oss
6. Return to the previous directory. And compile jackd2 USING GCC4 by the following commands:
./waf configure --portaudio --dbus --classic
./waf build
su -c './waf install'
7. Now the command:
ls /usr/lib64/jack/
should print the file jack_oss.so
If the name of that file is not printed, manually copy this precious file into the needed folder:
su -c 'cp build/linux/jack_oss.so /usr/lib64/jack/'

8. Now you can try to run jackd2 with oss support. Close all audio programs running. Activate vmix in ossxmix. Deactivate src and ratelock. Issue:
/usr/local/bin/jackd -S -v -doss -r48000 -C/dev/dsp -P/dev/dsp -p1024 -n2 -w16 
(Don't try to run jackd2 with -w32 when vmix is enabled - you will get terrible hissing sound from the left speaker which can burn your tweeter!!!)

Set master volume in ossxmix to the low level. Start carla and load some soundfont. Press the wrench button in carla to see virtual keyboard. Press the keys on virtual keyboard. You will get sounds which confirms that jackd2 now works with oss.

You may try to run jackd2 with vmix disabled. Enable ratelock in this case in ossxmix. Set sampling rate to that of jackd2 in ossxmix (for juli@ soundcard). Close carla if it's running. Issue:

/usr/local/bin/jackd -S -v -doss -r48000 -P/dev/dsp -p512 -n3 -w32

Check if you have sound via carla the same way.

Please, modify ebuilds to activate oss driver support in jackd2.
Comment 1 Alex Xu (Hello71) 2016-01-13 01:00:34 UTC
shit, people still use OSS?

also, there appear to be no jack2 ebuilds in the main portage tree. which overlay are you using?