Commit Graph

98 Commits

Author SHA1 Message Date
Nedko Arnaudov ebce813997 Fix unused-parameter warnings in plain C code 2012-12-02 23:50:05 +02:00
Nedko Arnaudov 9bbfff1608 Fix log calls
* Remove useless ifdefs for LADISH_DEBUG
 * Fix formatting errors
2012-12-02 20:24:22 +02:00
Nedko Arnaudov 702b287d35 Fix memory leak when a2j mapping fails
alsa_client_name and alsa_client_port are set but is_a2j is set to false
2012-11-19 06:54:49 +02:00
Nedko Arnaudov 84a338dfd2 Don't set garbge pid to ports (either new or existing ones) 2012-11-19 06:42:13 +02:00
Nedko Arnaudov 2b66a82e9a ladishd: new function - ladish_js_save_app() 2011-09-03 03:17:49 +03:00
Nedko Arnaudov 026659406a LASH support in ladishd 2011-08-04 02:59:01 +03:00
Nedko Arnaudov beef6e7d44 join vclients functionality 2011-06-01 05:37:02 +03:00
Nedko Arnaudov e0ec247159 split vclient functionality
vgraph manipulation is going to be able to do more than split
2011-06-01 03:04:18 +03:00
Nedko Arnaudov 90b5b6d881 ladishd: fix use of uninitialized memory (app_guid again)
For app-less clients, app_uuid is not initialized
2011-06-01 00:14:52 +03:00
Nedko Arnaudov 03d8d0c52e ladishd: fix the previous commit
The previous commit accidentally removed a log dump call.
2011-05-19 23:17:46 +03:00
Nedko Arnaudov 62a15d55e2 ladishd: fix use of uninitialized memory
For app-less clients, app_uuid is not initialized
2011-05-16 06:57:01 +03:00
Nedko Arnaudov 91b87783d7 ladishd: workaround for bug in jack2/jackdbus
http://trac.jackaudio.org/ticket/209
2011-01-02 05:04:29 +02:00
Nedko Arnaudov 891805634d ladishd: better handling for L1 apps with a2j ports. Fix for #62 2011-01-02 04:27:21 +02:00
Nedko Arnaudov 6cb1de6104 when appless ports are reused for appful puposes, set the app uuid. Fixes #160 2010-12-30 01:55:20 +02:00
Nedko Arnaudov 9575aefbb4 URI_CANVAS_A2J renamed to URI_A2J_PORT 2010-12-29 23:43:16 +02:00
Nedko Arnaudov b49d1ef23d ladishd: set a port property that indicating whether the port is a2j one. Partial fix for #154 2010-12-29 23:21:52 +02:00
Nedko Arnaudov 1d029ffd76 Move graph iteration filtering to callbacks 2010-12-26 21:21:36 +02:00
Nedko Arnaudov 5559811205 ladishd: fix occasional crash on app stop (#141)
vgraph clients that are created by a2j port appear and are later
reused for native jack ports are now interlinked with the jack
client when the first jack port appears.
2010-12-25 01:44:55 +02:00
Nedko Arnaudov 68049ee6cb ladishd: don't create two vclients with same name
If the app first creates alsa (a2j) port, the created vclient is
not intrelinked because there is no jack client to interlink.
When the first jack port appears, because the jack client has
no interlinked client, a new vclient with same name was created.

This changeset implements a search by app uuid before new vclient
is created.
2010-12-02 05:40:28 +02:00
Nedko Arnaudov e8f9b6b02e ladishd: Deassociate pids of disappearing clients. Fix for #119 2010-11-30 00:13:11 +02:00
Nedko Arnaudov 416c65254b ladishd: use app name for a2j ports
This fixes handling of apps that use random alsa client names.
jack-rack for example, by default, uses PID as part of its
alsa client name.

This breaks backward compatibility.
2010-11-22 15:25:59 +02:00
Nedko Arnaudov 36370e2942 ladishd: initialize the vclient_name var even when a2j mapping fails 2010-11-14 00:53:53 +02:00
Nedko Arnaudov a608c373e6 ladishd: properly handle a2j ports for apps with same names
For real jack ports it works because different apps have different jack client.
For a2j ports, it did not work because the jack client is same and the
a2j_fake_jack_port_name is same too, because the instead of alsa client name,
the app name is used now
2010-11-08 02:39:53 +02:00
Nedko Arnaudov ee830a52ee ladishd: actually remove app ports, simply logging does not make it happen 2010-11-08 02:17:39 +02:00
Nedko Arnaudov 6c2201b933 ladishd: save [only] relevant a2j ports for the vgraph being saved
For studio saves, save only studio vgraph a2j ports.
For room project saves, save only room vgraph a2j ports.
If there is not a2j ports for the vgraph being saved, an empty a2j client will not be saved anymore
2010-11-08 01:19:02 +02:00
Nedko Arnaudov 8aebce6821 ladishd: remove special a2j handling in remove/is_hidden[_app] virtualizer functions
a2j client has not app associated and thus should never be returned by ladish_graph_find_client_by_app()
This was somewhat possible in past, when the client was searched by name and not by uuid.

Also is_empty var is removed for ladish_graph_find_client_by_app(). For ladish_virtualizer_remove_app(),
the is_empty var is kept, because ladish_graph_client_is_empty() cannot be called after the client is removed
from the jack graph.
2010-11-07 23:43:45 +02:00
Nedko Arnaudov 79c75fd07b ladishd: properly handle stopping and removal of apps with a2j ports 2010-11-07 19:52:08 +02:00
Nedko Arnaudov 7d3acd7331 ladishd: set vgraph for new ports and use it when port disappears or gets renamed 2010-11-07 19:52:08 +02:00
Nedko Arnaudov f3a59a3561 ladishd: detect alsa client of app and use the app name for corresponding vgraph client 2010-11-07 19:51:51 +02:00
Nedko Arnaudov 7b1baf033d ladishd: Use app_uuid for identifying appless clients
* normal jack clients have both app_uuid set and non-zero pid
 * jmcore clients have only non-zero pid, their app_uuid is null
 * clients of unmanaged apps (externally started aps, inprocess clients
   and the a2j client) have zero pid and zero app_uuid
2010-11-06 15:34:54 +02:00
Nedko Arnaudov 2eac623818 ladishd: properly handle ports with same uuids but in different room vgraphs. Fixes #115
Same or derivate project can be loaded in more than one room. This will cause more than one port
with given uuid to be added to the jack graph. This changeset uses vgraph-port_uuid pair when searching
for port that was added at earlier project load stage. For this to work, when ports are created and added
to the jack graph, the vgraph handle is stored in the port object.
2010-11-03 00:29:08 +02:00
Nedko Arnaudov 1b66932459 ladishd: properly detect connect failures
This fixes a bug when port is appearing, connect attempt is made,
connect fails because port has just disappeared, port reappears then
but new connect attempt was not made. Happens quite easily with
wineasio apps that "probe" (nuendo2 for example).
2010-11-01 21:28:28 +02:00
Nedko Arnaudov 698bf81a3b daemon: better handling for non-direct childs. Fixes #62
If the first JACK client that appears has pid different from the one
of the child process, send SIGUSR1 on L1 save to this first
grandchild.

This changeset fixes the "run L1 app in terminal" issue and the
similar issue with dash (the default shell on Debian and Ubuntu, that
for simple commandlines does fork() and exec() instead of just exec(),
like bash does. This changeset also fixes the situation with complex
commandlines that result in only one JACK client.

The complex commandlines that result in multiple processes creating
JACK clients are handled by sending the SIGUSR1 to the first process
that creates JACK client. In future this could be improved by sending
SIGUSR1 to all of them but it is probably better to avoid such
situations by creating one app per JACK-creating process.
2010-10-24 03:03:25 +03:00
Nedko Arnaudov 1ee3607bd8 Merge branch 'confd' 2010-09-28 00:21:13 +03:00
Nedko Arnaudov 905ccfbb10 ladishd: remove unused function parameter 2010-09-22 00:29:39 +03:00
Nedko Arnaudov ef3a3891db move catdup to common/ 2010-09-19 17:15:11 +03:00
Nedko Arnaudov e06f5b73dd daemon: save connections of stopped apps. #100 2010-08-30 04:14:25 +03:00
Nedko Arnaudov ac1de1cc6a daemon: handle rename of apps that have non-unique names 2010-08-30 00:40:17 +03:00
Nedko Arnaudov 76a8b6161b daemon: handle apps with same name in different vgraphs 2010-08-30 00:05:57 +03:00
Nedko Arnaudov 399aaeaaf1 daemon: Fix for #97
Try to supply alternative fake strings if mapping fails
2010-07-23 03:59:12 +03:00
Nedko Arnaudov 229c4f2c0d daemon: more fixes for #94
* properly handle removal of apps with portless JACK clients
 * properly handle removal of a2j
2010-05-29 23:13:30 +03:00
Nedko Arnaudov 892c22d7ea Properly handle stop of apps with jack clients without ports. Fix for #94 2010-05-29 15:36:53 +03:00
Nedko Arnaudov 46bcf78914 daemon: fix removing of apps without jack client
see previous commit as well
2010-05-26 00:53:36 +03:00
Nedko Arnaudov 45fc0336c2 daemon: Properly handle apps without JACK clients
Fixes #94
2010-05-26 00:34:20 +03:00
Nedko Arnaudov 8925772da6 daemon: ladish_studio_get_jack_graph()
For use instead of ladish_studio_get_virtualizer()
because the later will return NULL when JACK server is stopped
2010-05-16 11:17:09 +03:00
Nedko Arnaudov 18ba50dafb daemon: on app stop, wait its client to disappear 2010-05-13 03:18:23 +03:00
Nedko Arnaudov 76aba4487b daemon: Interlink clients when loading studio from disk 2010-05-13 03:14:43 +03:00
Nedko Arnaudov 046563f840 daemon: Partial fix for #86
Don't use jack ids for associating client in jack graph with client in vgraph
because jack ids can change (apps can create clients in random order).
jack ids are not valid after jack server stop

This changeset switches to interlinking the two client by each one storing uuid of the other.
2010-05-12 04:25:39 +03:00
Nedko Arnaudov 3126bbdb5d daemon: when destroying room, remove its hidden app ports. Fixes #87
If ports stay hidden in JACK graph and they get reused, no vgraph will exist
2010-05-10 22:33:40 +03:00
Nedko Arnaudov d8135a5117 daemon: wait room cleanup before destroying it. Fix for #81 and #83 2010-05-09 16:00:28 +03:00