73
Ron / W4MMP
On 4/17/2015 08:23, 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. Re: running jackd from rc.local (Adrian Knoth)
> 2. alsa_* device or resource is busy (Athanasios Silis)
> 3. Re: alsa_* device or resource is busy (Adrian Knoth)
> 4. Re: Jack on Raspberry PI 2 (Ron) (Ron)
> 5. Re: Jack on Raspberry PI 2 (Ron) (Jeremy Jongepier)
> 6. Re: alsa_* device or resource is busy (Ralf Mardorf)
> 7. Re: alsa_* device or resource is busy (Athanasios Silis)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 17 Apr 2015 12:04:32 +0200
> From: Adrian Knoth <adi(a)drcomp.erfurt.thur.de>
> To: Athanasios Silis <athanasios.silis(a)gmail.com>, Jeremy Jongepier
> <jeremy(a)autostatic.com>
> Cc: Developers JACK <jack-devel(a)lists.jackaudio.org>
> Subject: Re: [Jack-Devel] running jackd from rc.local
> Message-ID: <5530DAB0.9050804(a)drcomp.erfurt.thur.de>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> On 04/17/15 12:00, Athanasios Silis wrote:
>
>> that did it.
>> I know little about pam.d because I mostly use slackware. so may I ask:
>>
>> if this code snippet was commented out up until now, who/what givew me
>> elevated permissions when I log into my ubuntu session?
> The same line, just in a different file under /etc/pam.d/ - most likely
> named after your logon manager (gdm I guess).
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 17 Apr 2015 14:16:51 +0300
> From: Athanasios Silis <athanasios.silis(a)gmail.com>
> To: Developers JACK <jack-devel(a)lists.jackaudio.org>
> Subject: [Jack-Devel] alsa_* device or resource is busy
> Message-ID:
> <CADgchnvUANaho4R5ch+4mz=CKzeSJ=m11ia5wOCNZca5j4SRcw(a)mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> hi all, continuing from a previous email where I try to start up several
> audio applications from a custom init script , which is run from rc.local,
> I noticed that I get several
> Capture open error: Device or resource busy
> error messages for the alsa_(in|out) instances I set up:
>
> alsa_out -d hw:DSP24,0 -c 10 -j dsp_out -r 48000 -p128 -n2 &
> alsa_in -d hw:DSP24,0 -c 12 -j dsp_in -r 48000 -p128 -n2 &
> alsa_out -d hw:Intel -c 8 -j hda_out -r 48000 -p128 -n3 &
> alsa_in -d hw:Intel -c 2 -j hda_in -r 48000 -p128 -n3 &
>
> These work when I use the script manually by logging in the pc.
> but from rc.local the seems to be a problem with alsa.
> on some reboots, perhaps one (random) of these will work , but usually non
> of the 4 will be loaded correctly.
>
> what could be conflicting here?
>
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…
Hi Len,
i am using ubuntu studio.
the pc i refer to is used for audio processing and routing primarily - it
is a jack client server.
so without any user intervention apart from powering it ON , it gets audio
through ethernet from the jack master, processes it and sends it out
through its local soundcards.
on occasions I want to log on and use this computer for local audio
capturing and / or playback. so jack would ideally run independent of a
user session. Having said that, I usually don't need to log out and back
in, I tend to lock the system as I am a single user. no need to deal with
multiple user case now.
I use a locally compiled jack2 version without dbus support because I had a
version mismatch between windows and linux jack.
some audio applications (namely calf) need an X server so in my custom
startup scripts I start a vnc session as well.
The problem as I understand it is that after log on, pam.d elevates logged
in user's privileges to access hardware. The main problem is that
alsa_(in|out) is can not grab the local soundcards... and I do not know
what could be the conflict. people over at jack-devel mailing list said it
could bea number of things like pulseaudio or lightdm....
there seems to be a conflict or ideologies because some one suggests I
make a system init script and another says jack is not designed to run as a
system service.
Personally, I think that jack is indeed not designed as a system service,
but I could be wrong. what is more a jack run as root, would never be
available to applications that I would start as a user. is that so?
I think I replied to everything :)
On Sat, Apr 18, 2015 at 6:01 PM, Len Ovens <len(a)ovenwerks.net> wrote:
> On Sat, 18 Apr 2015, Athanasios Silis wrote:
>
> Hi Len,
>> unfortunately the .desktop file is not good for me.
>> it is only run after I have logged in, whereas I want my script to be
>> started as
>> me, but before I log in.
>> Is there a way to achieve that, without resorting to autologin ?
>>
>
> OK, perhaps a full description of what you are trying to acheive would
> help. little bits of info I think I have put together include:
> - You will be using a DE at some point.
> - You want to be able to access jack after logging in as well as before
> - jack is still to be used only by one user
> - jack2 is prefered?
> - what would jack be doing while logged out I don't know
> - should jack continue to run after logout?
> (that is do you normally logout and in)
> - Is most of the running done by script anyway and loggin in is used
> mostly for other things besides audio? Can all audio stuff be done by
> command line?
> - will jack be used as a device for pulseaudio...
> - will pulse run at all? if so will it ever touch the same device as jack
> has?
> - is your machine using sysv init, systemd, upstart? (upstart is going
> away BTW, leaving one to wonder about the future of MIR)
>
> As Jeremy has already suggested have you tried:
>
> export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket
> jack_control start
>
> in the script run by your su user?
>
> --
> Len Ovens
> www.ovenwerks.net
>
>
> _______________________________________________
> Linux-audio-user mailing list
> Linux-audio-user(a)lists.linuxaudio.org
> http://lists.linuxaudio.org/listinfo/linux-audio-user
>
Hi Len,
unfortunately the .desktop file is not good for me.
it is only run after I have logged in, whereas I want my script to be
started as me, but before I log in.
Is there a way to achieve that, without resorting to autologin ?
On Fri, Apr 17, 2015 at 4:10 PM, Len Ovens <len(a)ovenwerks.net> wrote:
> On Fri, 17 Apr 2015, Athanasios Silis wrote:
>
> Hi all,
>> I am trying to run jackd instance from /etc/rc.local (along with a few
>> other
>> applications) from a custom made init script.
>>
>> The system is ubuntustudio and I have setup everything to have elevated
>> permissions when executing applications from the @audio group.
>>
>
> Are you really wanting to run audio while you are logged out? It would be
> much easier to add a desktop file to ~/.config/autostart/ Like
> jackstart.desktop with something like:
>
> [Desktop Entry]
> Encoding=UTF-8
> Version=0.9.4
> Type=Application
> Name=AutoJack
> Comment=Jackdbus starter
> Exec=jack_control start
> StartupNotify=false
> Terminal=false
> Hidden=false
>
>
> Change the Exec to point to a script if you want to add config options, or
> use jackd instead of jack_control if you don't care about PA-jack bridging.
>
> This will have jack runnning from login.
>
> If you want to headless operation then have rc.local do it as the user
> that will run this stuff.
>
> --
> Len Ovens
> www.ovenwerks.net
>
>