Hi there,
Not sure if this is really a JACK question, but I'll ask it to find out.
I have a problem with an older piece of audio hardware (an M-Audio Projectmix) and a Windows 8 PC. The Windows 7 drivers partially work - ASIO works OK, but I can't get the normal Windows audio output to address the Projectmix properly. Applications will attempt playback, but nothing appears on the M-Audio software metering and no sound is heard. There aren't likely to be any further driver updates for this hardware.
One solution that occurs is to use a piece of software to create a virtual audio device that Windows could address successfully, and pipe the results to the ASIO driver.
Is that something JACK could do?
Thanks,
Phil
Branch: refs/heads/master
Home: https://github.com/jackaudio/jack1
Commit: 4492cea02fb46305632d19796460b91fd319ec96
https://github.com/jackaudio/jack1/commit/4492cea02fb46305632d19796460b91fd…
Author: Hanspeter Portner <dev(a)open-music-kontrollers.ch>
Date: 2015-05-04 (Mon, 04 May 2015)
Changed paths:
M drivers/alsa_midi/a2j.h
M drivers/alsa_midi/alsa_midi.c
M drivers/alsa_midi/port_thread.c
M drivers/alsa_midi/port_thread.h
Log Message:
-----------
[alsa_midi] fix hotplug device (de)enumeration
Issues:
- With a running JACK with enabled alsa_midi driver (-X alsa_midi), plugging in
a new MIDI device has no effect, e.g. no corresponding JACK ports are spawned
- With a running JACK with enabled alsa_midi driver (-X alsa_midi), deplugging
a MIDI device has no effect, e.g. the corresponding JACK ports stay around
Result:
- JACK only creates JACK ports of ALSA MIDI clients/ports found at startup
- JACK has to be restarted for any ALSA MIDI device (de)enumeration to take
place
Problem:
- There are some functions defined which actually should accomplish this in the
alsa_midi driver code (e.g. 'a2j_update_ports' and 'a2j_free_ports'), but they
are not called from any other function ;-)
Solution:
- Discriminate properly between ALSA PORT_START and PORT_CHANGE events
- 'a2j_new_ports' function has been added which recycles some code from
'alsa_input_thread'
- Actually call the already existing hot(de)plugging infrastructure
- 'a2j_update_ports' and 'a2j_new_ports' get called from the
'alsa_input_thread'
- 'a2j_free_ports' gets called from 'alsa_output_thread'
- 'alsa_out_thread' is woken up by 'a2j_jack_process_internal'
- Cleanup code that is not used:
- 'port_add' ringbuffer has no function, as 'new_ports' ringbuffer seems to be
implemented to accomplish the same
Signed-off-by: Hanspeter Portner <dev(a)open-music-kontrollers.ch>
Commit: 6685cc737eec2937f0fb9d3088be2efee95a910e
https://github.com/jackaudio/jack1/commit/6685cc737eec2937f0fb9d3088be2efee…
Author: Paul Davis <paul(a)linuxaudiosystems.com>
Date: 2015-05-04 (Mon, 04 May 2015)
Changed paths:
M drivers/alsa_midi/a2j.h
M drivers/alsa_midi/alsa_midi.c
M drivers/alsa_midi/port_thread.c
M drivers/alsa_midi/port_thread.h
Log Message:
-----------
Merge branch 'ventosus-fix_alsa_midi_hotplug'
Compare: https://github.com/jackaudio/jack1/compare/fb78f60db1db...6685cc737eec
Hi jack-devel list!
[This part is technical and can be skipped, if you like]
To ease packaging jack2, its build system has received a major update [1]. The initial intent was to simply remove automagic dependencies (on celt, opus, libsamplerate, libsndfile, readline), which are bad [2] for source based distributions, such as Gentoo, but after a discussion [3] the decision was taken to reimplement all options that have third-party dependencies using a special option class, so that the build system by default builds against foo if available, refrains from doing so if --foo=no is given and if --foo=yes the dependency is hard-required. To preserve backwards compatibility (and save time writing "=yes") --foo is the same as --foo=yes.
Apart from this change pkg-config is now used whenever possible instead of only header checks. (It is bad to just check for headers without checking for the accompanying library.) This eases packaging (and cross-compiling) somewhat. Also the check for readline has been improved (it now checks for header existence too instead of just library existence), in effect making it easier to compile jack2 on binary distros (where the library existence does not imply header existence). (Correct me if I'm wrong; I have not compiled jack2 on a binary distro.)
[End of skip part]
So apart from the above points, what are the goodies for actual users? Well, now users do not have to explicitly state --alsa, --firewire or such to get the correct backend built since it will be automatically detected if --alsa, --firewire, etc. is not given.
Now the important part. Like with all big software changes, this might introduce some bugs that I have not found during testing. (I did test the option I could with both --foo=yes and --foo=no!) Some option have not been tested at all since I lack the prerequisites, these options are --iio, --portaudio and --winmme, but since all option use the same class the logic should be the same, so they should work, but you can never be too sure.
In conclusion, I want you to be on the lookout for bugs or weird stuff (as always!) when building jack2. Report the bugs and I will do my very best to squash them!
Regards,
Karl Lindén (lilrc)
[1] https://github.com/jackaudio/jack2/pull/113
[2] https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependenci…
[3] https://github.com/jackaudio/jack2/pull/110
I'm having a DenverCoder9 week. I'm trying to do exactly what was asked here 2 years ago:
http://comments.gmane.org/gmane.comp.audio.jackit/25893
Unfortunately, the discussion never ends with a report of success. Is it even possible?
Between that and info here:
https://blogs.gentoo.org/mgorny/2015/01/16/surround-sound-over-network-with…https://github.com/jackaudio/jackaudio.github.com/wiki/WalkThrough_User_Net…
This is what my plan is:
JACK slave (on PC w/ speaker) Windows 7:
C: jackd.exe -R -S -d net
C: jack_load audioadapter
C: jack_connect netadapter:capture_1 system:playback_1
C: jack_connect netadapter:capture_2 system:playback_2
JACK master (Audio source/Line-In) Windows 7:
C: jackd.exe -R -S -d portaudio "ASIO::ASIO4ALL v2"
C: jack_load netadapter
In JackControl connect linein1->slave1
In JackControl connect linein2->slave2
In JackControl press the play button
I only get as far as the second step. When I try to jack_load audioadapter,
Jackd says Waiting for a master...
Ringbugger automatic adaptive mode size =4096
MMCSS API not used...
and then Jackd crashes within a second with
Problem signature:
Problem Event Name: APPCRASH
Application Name: jackd.exe
Application Version: 1.9.10.0
Application Timestamp: 53b56ef3
Fault Module Name: audioadapter.dll
Fault Module Version: 1.9.10.0
Fault Module Timestamp: 53b56ee4
Exception Code: c0000005
Exception Offset: 00003d46
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Jack seems like the perfect way to stream low latency audio around my house. I hope it's just something simple that I'm doing wrong. Thanks guys!
Hi *!
While I'm hunting the recent breakage of JACK on openSUSE Tumbleweed, I
found I can't build jack1 from source.
make distclean
git submodule update
git pull
./autogen.sh
./configure
make
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I.. -I../config -I.. -I.. -I../include -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math
-funroll-loops -march=native -mtune=native -msse -mfpmath=sse
-DJACK_LOCATION=\"/usr/local/bin\" -I../config -I.. -I.. -I../include
-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer
-ffast-math -funroll-loops -march=native -mtune=native -msse
-mfpmath=sse -MT libjack_la-metadata.lo -MD -MP -MF
.deps/libjack_la-metadata.Tpo -c -o libjack_la-metadata.lo `test -f
'metadata.c' || echo './'`metadata.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../config -I.. -I..
-I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3
-fomit-frame-pointer -ffast-math -funroll-loops -march=native
-mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/local/bin\"
-I../config -I.. -I.. -I../include -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math
-funroll-loops -march=native -mtune=native -msse -mfpmath=sse -MT
libjack_la-metadata.lo -MD -MP -MF .deps/libjack_la-metadata.Tpo -c
metadata.c -fPIC -DPIC -o .libs/libjack_la-metadata.o
metadata.c: In function 'jack_set_property':
metadata.c:202:15: error: 'DB' has no member named 'exists'
if (db->exists (db, NULL, &d_key, 0) == DB_NOTFOUND) {
^
metadata.c: In function 'jack_get_properties':
metadata.c:322:29: error: 'DBC' has no member named 'get'
while ((ret = cursor->get(cursor, &key, &data, DB_NEXT)) == 0) {
^
metadata.c:402:15: error: 'DBC' has no member named 'close'
cursor->close (cursor);
^
metadata.c: In function 'jack_get_all_properties':
metadata.c:441:29: error: 'DBC' has no member named 'get'
while ((ret = cursor->get(cursor, &key, &data, DB_NEXT)) == 0) {
^
metadata.c:532:15: error: 'DBC' has no member named 'close'
cursor->close (cursor);
^
metadata.c: In function 'jack_remove_properties':
metadata.c:615:29: error: 'DBC' has no member named 'get'
while ((ret = cursor->get(cursor, &key, &data, DB_NEXT)) == 0) {
^
metadata.c:636:34: error: 'DBC' has no member named 'del'
if ((ret = cursor->del (cursor, 0)) != 0) {
^
metadata.c:646:15: error: 'DBC' has no member named 'close'
cursor->close (cursor);
^
Makefile:547: recipe for target 'libjack_la-metadata.lo' failed
make[2]: *** [libjack_la-metadata.lo] Error 1
make[2]: Leaving directory '/local/build/jack1/libjack'
Makefile:544: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/local/build/jack1'
Makefile:430: recipe for target 'all' failed
make: *** [all] Error 2
I made sure my BDB is ok, here are the relevant lines from the output of
./configure:
[..]
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
[..]
checking for db_create in -ldb... yes
[..]
Any hints?
--
Jörn Nettingsmeier
Lortzingstr. 11, 45128 Essen, Tel. +49 177 7937487
Meister für Veranstaltungstechnik (Bühne/Studio)
Tonmeister VDT
http://stackingdwarves.net
Hi,
(I hope I am using email correctly. This is the first time I have used
an email list such as this)
First, let me say thanks to everyone that responded. The web page link
really helped. I have not investigated installing the Raspberry repo of
jack as of yet. I will look into that a bit later. For now I will
stick with using the source I have from the jack website.
OK, success (sort of).
I changed the shared memory size (/dev/shm) to 128M. Now the jackd
server starts and stay running. However when using qjackctl I still
receive the cannot lock memory message however as I said the server
actually stays running. Jackd message output:
07:36:18.155 Patchbay deactivated.
07:36:18.177 Statistics reset.
07:36:18.206 ALSA connection change.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
07:36:18.235 ALSA connection graph change.
07:36:20.455 JACK is starting...
07:36:20.458 /usr/local/bin/jackd -r -dalsa -dhw:0 -r48000 -p1024 -n2
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
07:36:20.530 JACK was started with PID=2680.
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in non-realtime mode
Cannot lock down 82278944 byte memory area (Cannot allocate memory)
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to
playback-only mode
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
07:36:22.657 JACK connection change.
07:36:22.667 Server configuration saved to "/home/ron/.jackdrc".
07:36:22.670 Statistics reset.
07:36:22.688 Client activated.
07:36:22.701 JACK connection graph change.
Cannot lock down 82278944 byte memory area (Cannot allocate memory)
BUT if I start jackd via a terminal session (cygwin terminal) and enter:
/usr/local/bin/jackd -r -dalsa -dhw:0 -r48000 -p1024 -n2
jackd responses with:
ron@squireoaksfarm-radio ~/Desktop $ /usr/local/bin/jackd -r -dalsa
-dhw:0 -r48000 -p1024 -n2
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in non-realtime mode
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to
playback-only mode
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
As you can see the jackd server does NOT report can not lock memory.
Why is this?
Also ASLA is reporting it can not open the device for capture. Why is this?
Sorry, but I'm really new to sound and sound device management on
Linux. My ultimate goal is to get an application running that requires
jack and this is my first stumbling block on on that path.
73
Ron / W4MMP
On 4/17/2015 06:00, jack-devel-request(a)lists.jackaudio.org wrote:
> Send Jack-Devel mailing list submissions to
> jack-devel(a)lists.jackaudio.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
> or, via email, send a message with subject or body 'help' to
> jack-devel-request(a)lists.jackaudio.org
>
> You can reach the person managing the list at
> jack-devel-owner(a)lists.jackaudio.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Jack-Devel digest..."
>
>
> Today's Topics:
>
> 1. Jack on Raspberry PI 2 (Ron)
> 2. running jackd from rc.local (Athanasios Silis)
> 3. Re: running jackd from rc.local (Jeremy Jongepier)
> 4. Re: Jack on Raspberry PI 2 (Jeremy Jongepier)
> 5. Re: running jackd from rc.local (Athanasios Silis)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 16 Apr 2015 21:20:46 -0400
> From: Ron <w4mmp(a)aol.com>
> To: jack-devel(a)lists.jackaudio.org
> Subject: [Jack-Devel] Jack on Raspberry PI 2
> Message-ID: <55305FEE.4050904(a)aol.com>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Hello,
> Sorry about that. My mistake.
>
> It's realtime safe as long as you know that those system calls pass
> control to the thread you want them to pass control to and not some
> other random thread that has nothing to do with JACK.
Ok, but how does JACK keep the OS from executing a completely different process as the next job?
Also, as you say, by using e.g., malloc(), the realtime app indeed passes the control to the kernel thread, which has to do a lot with JACK (it does exactly what the rt app need to get process). So why is calling malloc() not realtime then?
Many thanks for the help.
Hello,
it is often being said that JACK 2 is real time safe, for example in the JACK faq. I wondered how JACK 2 suspends a thread, so I checked what happens after the JackClient finished CallProcessCallback():
JackClient::CallProcessCallback()
-> JackClient::CycleWaitAux()
-> JackClient::WaitSync()
-> JackGraphManager::SuspendRefNum()
-> JackConnectionManager::SuspendRefNum()
-> virtual JackSynchro::TimedWait()
However, I found only two classes in the `posix' folder that implement this virtual function:
* JackPosixSemaphore: uses `sem_timedwait()' to block
* JackFifo: uses `read()' to block
However, both `sem_timedwait()' and `read()' are syscalls, so they contain context switch, which means they are non realtime. Actually, the JACK documentation warns to use function like these if you pass a process() callback to jack [1].
So how can JACK claim it would be realtime? (No objections, I just don't understand it)
Best,
Johannes
[1] http://jackaudio.org/files/docs/html/group__ClientCallbacks.html#gafb5ec9fb…