Wim Taymans
af686653a9
jack: add option to merge monitors
...
Make a different name for the monitor port prefix so that they
appear as different clients.
Add an option to restore the previous behaviour.
See #736
2021-02-16 13:23:47 +01:00
Wim Taymans
0945b10227
jack: handle bridge nodes
...
Bridges have the device name in the port names so use this info
to construct better port names. Makes midi devices show up
as separate clients.
2021-02-12 21:15:14 +01:00
Wim Taymans
ac910c7c1c
Revert "jack: improve short name"
...
This reverts commit 8101334b1e .
We should use the same logic as jack1 and jack2 to improve
compatibility.
2021-02-12 20:46:34 +01:00
Wim Taymans
1e89b7cdc4
Revert "jack: sanitize client and port names"
...
This reverts commit 0ad8f0a6aa .
We should not do this here. We should instead sanitize the names
at the source.
2021-02-12 20:45:33 +01:00
Wim Taymans
0ad8f0a6aa
jack: sanitize client and port names
...
Avoid : in client names and port names.
See #714
2021-02-12 12:29:45 +01:00
Wim Taymans
8101334b1e
jack: improve short name
...
Search the : backwards so that we can deal with client names with :
in them.
See #714
2021-02-12 11:57:27 +01:00
Wim Taymans
80825aeaea
conf: more work on config changes
...
Add -c option to pipewire to select config file. Use this to select
the uninstalled conf file.
Rename conf properties, prefix with context.
Simplify the main daemon now that everything can go in config.
Simplify pipewire-pulse now that we can put everything in config, it's
now virtually the same as pipewire but with a differenct config file.
Parse server addresses as array of strings.
2021-02-12 10:31:29 +01:00
Wim Taymans
fc90a4e48a
Implement config/state file handling
...
Make methods to load_config and load/save state. For now the config
and state directories are the same but it might not be. Implement
the search path for all config/state files as:
$XDG_CONFIG_HOME/[$prefix]/$name
$HOME/.config/[$prefix]/$name
$PIPEWIRE_CONFIG_DIR/pipewire/[$prefix]/$name
/etc/pipewire/[$prefix]/$name
Make some config files for jack and RT clients. Make pw-cat use the
client-rt config.
Use core state and config management in media-session.
Move all session manager state and config files to the build dir and
set the PIPEWIRE_CONFIG_DIR to this build dir.
2021-02-12 10:25:11 +01:00
Wim Taymans
83c403ed1c
jack: use PIPEWIRE_PROPS for the context as well
...
Use PIPEWIRE_PROPS to create and connect the context as well. This
makes it possible to pass configuration to the modules loaded by
the context such as:
PIPEWIRE_PROPS="context.modules.args={nice.level=-14}" jack_simple_client
To set the nice level of the jack app.
See #698
2021-02-10 11:23:52 +01:00
Wim Taymans
51cfb98ea6
jack: Pass custom flags as port.extra info
...
Make a port.extra property that contains API specific extra port
information that is passed in the global object properties.
Use this to pass the custom jack flags for a port. Carla uses this
to mark CV ports.
2021-02-09 16:09:53 +01:00
Wim Taymans
ef150bfb3c
jack: return an empty session command
...
We need to return an empty message because apps don't expect a
NULL pointer.
2021-02-09 10:26:14 +01:00
Wim Taymans
19b6942965
jack: use PIPEWIRE_PROFILE_MODULES first
...
We want to respect the PROFILE_MODULES settings if any or else
we use the default,rtkit profile.
See #683
2021-02-08 18:02:58 +01:00
Wim Taymans
0f028dab40
jack: use the context data thread
...
Configure the data thread as cancelable, there is no need to make
another thread.
See #683
2021-02-08 15:29:48 +01:00
Wim Taymans
210950dc0a
context: disable mlock warnings by default
...
Make this a tunable option instead.
2021-02-08 10:59:02 +01:00
Wim Taymans
3450bea416
jack: implement some missing methods
...
to make qjackctl 0.9.0 work
2021-02-04 15:48:36 +01:00
Wim Taymans
2b44f42845
pass the complete buffer size to snprintf
...
There is no reason to pass size-1, snprintf will always put a \0
at the end.
2021-02-02 12:09:29 +01:00
Wim Taymans
abfc67a3ca
Revert "remove mlock and use MAP_LOCKED"
...
This reverts commit ab91e94b59 .
When no memory can be locked, the mmap fails with -EAGAIN.
Fixes #592
2021-01-19 14:47:52 +01:00
Wim Taymans
ab91e94b59
remove mlock and use MAP_LOCKED
...
The warnings are confusing and a properly tuned system would have
the limits set correctly.
2021-01-19 11:59:21 +01:00
Wim Taymans
c430b1de58
jack: move monitor ports after playback ports
...
Enumerate monitor ports after their playback ports, like how
jack does this.
See #527
2021-01-05 15:38:52 +01:00
Wim Taymans
776147c125
jack: also find port by aliases
...
one can also use the aliases to connect ports, qjackctl does this.
Fixes #527
2021-01-03 21:25:55 +01:00
Wim Taymans
2b507cbe79
jack: use the node activation position after connecting
...
Until we get assigned to a driver, use our own activation position
to report samplerate and buffer size.
2020-12-09 20:48:59 +01:00
Elliott Sales de Andrade
86fd6a0d3e
Fix some possible-NULL pointer usage.
2020-11-23 15:36:08 +00:00
Wim Taymans
fb44d3428c
jack: block some cases
...
Refuse to run when we run in the daemon, we can't really do a blocking
connect to the daemon from its main thread.
Also refuse to run when we detect an old pipewire libaray. Blocks the
case where some app linked against 0.2 wants to use the replacement
libjack.so.
2020-11-19 12:37:10 +01:00
Wim Taymans
f42da492f9
warn about lock just once
2020-11-14 21:21:20 +01:00
Wim Taymans
38bcab4610
jack: handle connect errors
...
Listen on the proxy for errors and report this to the caller. This
avoids hanging in jack_connect.
2020-11-04 21:05:45 +01:00
Wim Taymans
c43026d93e
don't handle EINTR and EAGAIN as the same
...
EAGAIN means a non-blocking operation would block and we should not
try again right away but leave the loop and wait instead.
See #358
2020-11-02 16:43:56 +01:00
Wim Taymans
e094640c7b
handle EINTR and EAGAIN
...
Just do the call again instead of failing or logging an error.
Fixes #358
2020-11-02 14:51:07 +01:00
Wim Taymans
acfb48e3da
pulse: improve debug
2020-10-27 16:46:12 +01:00
Wim Taymans
70e9e622eb
jack: declare constants like jack does again
2020-10-22 15:23:56 +02:00
Wim Taymans
4dd1e02526
jack: return error when out of midi events
...
Fixes #334
2020-10-19 23:30:44 +02:00
Wim Taymans
68bff629b3
jack: optimize get_buffer
...
Keep track of global mix port.
Calculate the get_buffer function beforehand.
2020-09-30 11:59:41 +02:00
Wim Taymans
2a630dbecd
jack: move some debug to fastpath
2020-09-29 16:57:50 +02:00
Wim Taymans
c2fc8423eb
jack: move metadata to exports file
...
So that we don't have to depend on the header file.
Fixes #306
2020-09-25 17:39:26 +02:00
Wim Taymans
136f556d79
jack: lock for accessing the globals
2020-09-22 13:10:58 +02:00
Wim Taymans
c979f181a5
jack: return useful version number (major version 3)
...
Also add the PipeWire string in there to give apps a chance to
report this.
2020-09-11 11:28:04 +02:00
Wim Taymans
dc2cfb2bd2
jack: only report latency for terminal ports
...
Only report latency for terminal ports for now and use the buffer
size as the latency.
2020-09-10 09:15:47 +02:00
Simon McVittie
b8c58c74d8
Link pipewire-jack to libatomic if required
...
This is necessary on some 32-bit architectures that implement atomic
operations on 64-bit quantities as library calls, including Debian's
armel and mipsel ports.
Signed-off-by: Simon McVittie <smcv@debian.org>
2020-09-07 15:17:57 +00:00
Wim Taymans
d995df95f8
jack: small cleanup
2020-09-07 16:16:26 +02:00
Wim Taymans
4c372a87ca
pw-jack: add samplerate and period options
2020-09-03 11:14:29 +02:00
Wim Taymans
0c04481ba7
metadata: improve default sink/source
...
Only check defaults when subject is PW_ID_CORE
Handle NULL keys: remove the defaults
2020-08-18 17:56:05 +02:00
Wim Taymans
759e1ccb6b
jack: fix default source and sink handling
2020-08-18 17:18:37 +02:00
Wim Taymans
8c893cbc4a
jack: improve debug
2020-08-18 16:52:27 +02:00
Wim Taymans
36c10046da
metadata: fix string compare
2020-08-12 18:58:48 +02:00
Wim Taymans
cc044b0e08
jack: don't overwrite any PIPEWIRE_PROPS values
2020-08-11 12:12:37 +02:00
Wim Taymans
f73a0c97e3
jack: use empty area when get_buffer frames is 0
...
Client that call port_get_buffer with 0 frames get the empty scratch
buffer because we can't know the final output size.
2020-08-11 12:09:50 +02:00
Wim Taymans
753af7c7b3
jack: improve buffer size callbacks
...
Make sure we emit the buffer callback either from the calling thread
or from the thread_loop. Mark the callback as pending and don't call
the process function until the callback has been handled.
2020-08-11 11:11:00 +02:00
Wim Taymans
e71936f870
Improve naming
...
master -> driving
priority_master -> priority_driver
segment_master -> segment_owner
2020-08-06 13:49:33 +02:00
Wim Taymans
3abd46b619
jack: Use out node name from the server
...
Get the node name from the global info when we see it.
Check if the name changed and set the right result flag for the app.
2020-08-05 12:26:59 +02:00
Wim Taymans
d76b509995
jack: prefer nick for node name
...
The nick is shorter and nicer for jack applications. We have the
full description in the port alias 2.
2020-08-03 18:13:31 +02:00
Wim Taymans
407ea74513
don't use qsort_r, it's not implemented everywhere
...
Fixes #260
2020-08-02 12:50:56 +02:00