Commit graph

136 commits

Author SHA1 Message Date
Wim Taymans
b070752add context: don't load rtkit by default
Don't load and use rt-kit by default because it can cause sigkill in
the app, which is not good when it happens in a compositor.

Make the module profile a comma-separated list of profiles and make
it possible to explicitly load rtkit as well.

load the rtkit profile as well in jack.
2020-03-05 12:12:46 +01:00
Wim Taymans
c4b2be2aad use true and false for boolean properties
So that it's easier to convert them to booleans in introspection
code later.
2020-03-03 18:17:46 +01:00
Wim Taymans
37a1dc5265 jack: use constant for type_id 2020-03-02 16:50:37 +01:00
Wim Taymans
73da0f8878 jack: use pthread cancel to stop the data thread
Activate the new option to pthread_cancel the data thread because
that is what jack apps expect.

Fixes #211
2020-03-02 15:47:52 +01:00
Wim Taymans
bcdd47273d jack: call buffer_size callback right after activate
Some jack clients expect this callback right after activate.
Should fix jackaudiosink in gstreamer.
2020-02-25 18:02:49 +01:00
Wim Taymans
a4d744e3cf jack: improve sample_rate callback
Call the sample rate callback when we install it and we know the
sample rate. Otherwise, the sample rate callback might never be
triggered.
2020-02-24 15:39:19 +01:00
Wim Taymans
cde7fa797c jack: improve timemaster install
When we get the driver activation try to install ourselves as
timemaster.
2020-02-24 15:38:21 +01:00
Wim Taymans
9e44b957f0 jack: check arguments
Guard against some evil jack clients
2020-02-24 11:25:31 +01:00
Wim Taymans
ea911f2e3f tweak buffers a little
JACK can handle 2 buffers at most, make the default buffer allocator
allocate 2 buffers when no params are given.
Prefer 2 buffers, it allows some form of async fill/consume
2020-02-19 10:17:00 +01:00
Wim Taymans
b3d94cde87 jack: fix stride of midi
Midi has a stride of 1
Error when the number of buffers is too big
2020-02-18 18:03:30 +01:00
Wim Taymans
1f3cb3d207 jack: fix invalid unlink
Don't unlink the mix->link when freeing, it is only linked when
in the free pool.

Protect against invalid number of buffers that could corrupt our
state.
2020-02-18 17:37:02 +01:00
Wim Taymans
e6c3619521 jack: don't try to consume port without data
Or else we handle old data.
2020-02-18 13:38:25 +01:00
Wim Taymans
905e5af058 jack: implement the jack_info_callback and function 2020-02-10 10:59:24 +01:00
Jan Koester
656c58fd98 jack: add error callback 2020-02-10 10:48:49 +01:00
Wim Taymans
ee67ab9c04 client-node: keep target links in list
Don't allocate the links in an array because they might be moved
when the array is resized. Instead just use calloc and add them
to a list.

Make sure we update the list used in the real-time thread from a
safe context.
2020-02-07 16:45:58 +01:00
Wim Taymans
936c290cc1 plugins: fix the licence of alsa and jack libraries
It's all MIT
2020-02-07 15:43:13 +01:00
Wim Taymans
9acf592e9c jack: remove leftover printf debug 2020-02-07 13:33:59 +01:00
Wim Taymans
ed1cf46c31 jack: add jack_get_video_image_size extension
Add a JACK PipeWire extension to get the video size of the DSP
pipeline and use this instead of the hardcoded values in the example.
2020-02-07 13:31:49 +01:00
Wim Taymans
14fbd4f520 jack: wait for transport
Wait for the transport to be configured before we exit from
client_open. We then have at least an activation or even a driver
set.
2020-02-07 13:30:24 +01:00
Wim Taymans
ae4e17e9a2 Remove old LICENSE files and README 2020-02-07 13:24:06 +01:00
Wim Taymans
5c4be385ad jack: only append node id when name already taken 2020-02-05 10:27:37 +01:00
Wim Taymans
41b47e726e context: add some more defaults
Make a property to allow mlock and use it.
mlock in stream and filter when asked to mmap mem.
2020-02-04 17:09:41 +01:00
Wim Taymans
5e5bab4680 jack: don't take clock time as awake timestamp
Take a sample from the monotonic clock to generate the AWAKE
timestamp.
2020-01-31 13:35:39 +01:00
Wim Taymans
7450bfd88b Improve mlock failure warning message 2020-01-29 11:07:26 +01:00
Wim Taymans
8de267cf02 jack: handle plugins that cache jack_port_get_buffer()
Some plugins (calfjackhost) only call jack_port_get_buffer()
once and cache the pointer. This behaviour has been deprecated
in JACK2 but still works.

Add a workaround for this by getting a buffer ourselves and memcpy
into it from the scratch buffer.
2020-01-29 10:29:26 +01:00
Wim Taymans
84258c9078 jack: fix set_sync_timeout
It needs to update the node activation, not the driver activation.
2020-01-28 20:49:21 +01:00
Wim Taymans
6ac9b7b3a7 spa: add spa_aprintf helper
Add a asprintf helper function that handles errors correctly.
Use this in places where we use asprintf to avoid warnings when we
don't check the return value.
2020-01-27 12:19:21 +01:00
Wim Taymans
ae51b0acf1 jack: stop data thread when closing client
Make sure we deactivate and stop the data thread when closing a
client or we might get segfaults.
2020-01-16 13:29:56 +01:00
Wim Taymans
ded3a2a58f append -pw and version to .so libraries
So that we can place them next to the real ones and use a symlink
to switch.
2020-01-16 12:57:25 +01:00
Wim Taymans
1f03d26e53 install the jack and pulseaudio libraries 2020-01-15 17:01:48 +01:00
Wim Taymans
9b41e4dfd9 jack: use sample rate from position
Use the sample rate from the position io area as soon as we get it.
2020-01-09 16:06:28 +01:00
Wim Taymans
852ac043d3 Use the DSP format for dsp formats
Use the DSP media subtype to describe DSP formats. DSP formats
don't include the rate, channels and channel position in the
format and must use the rate and duration from the position io. This
makes it possible to later change the samplerate dynamically without
having to renegotiate the graph.

The same goes for the video DSP format, which uses the io_video_size
from the io_position to get the size/stride. Set this up in the node
based on the defaults from the context.

Make it possible to define defaults in the daemon config file, such
as samplerate, quantum, video size and framerate. This is stored in
the context and used for the DSP formats.
2020-01-09 15:18:59 +01:00
Wim Taymans
f391353c7f Make interface types a string
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
2019-12-19 13:36:04 +01:00
Wim Taymans
698ab911c3 loop: pass spa_dict to *_loop_new
Make the thread_loop alloc its own loop by default to simplify
some core. Add extra new_full method to pass a custom pw_loop.
Make other loop implementations ready to support custom loops
if we want that later.
2019-12-13 11:34:25 +01:00
Wim Taymans
743450a19f pw_client_node_proxy -> pw_client_node 2019-12-11 16:13:46 +01:00
Wim Taymans
e633e205c2 pw_link_proxy -> pw_link 2019-12-11 15:11:56 +01:00
Wim Taymans
49d736bbb7 pw_registry_proxy -> pw_registry 2019-12-11 09:44:48 +01:00
Wim Taymans
ecc6b27cd7 rename core_proxy -> core
Rename core_proxy to core and move the introspect and interface
contents to core.h

In an effort to promote the proxy API.
2019-12-11 07:46:59 +01:00
Wim Taymans
8ea78c2e3f pw_core -> pw_context
The proxy API is the one that we would like to expose for applications
and the other API is used internally when implementing modules or
factories.

The current pw_core object is really a context for all objects so
name it that way. It also makes it possible to rename pw_core_proxy
to pw_proxy later.
2019-12-10 18:19:56 +01:00
Wim Taymans
8a959ea7a1 core_proxy: prepare to rename pw_remote -> pw_core_proxy
The pw_remote object is really a wrapper around the pw_core_proxy.
The events it emits are also available in the core proxy and are
generally awkward to use.

With some clever new pw_core_proxy_* methods and a pw_core_connect
to create the core_proxy, we can convert all code away from pw_remote.

This is a first step in this conversion, using the pw_remote behind
the scenes. It leaks into some places because it really needs to become
its own struct in a next step.
2019-12-06 11:48:40 +01:00
Wim Taymans
c9a54112e4 client-node: use bound id from the proxy
Remove the obsolete node_id from the transport. We get this info
now from the proxy.
2019-11-29 13:34:06 +01:00
Wim Taymans
a1801b690f jack: use explicit variable to keep track of transport 2019-11-29 13:34:06 +01:00
Wim Taymans
e40fbf8cc4 Add printf checks for proxy_error and resource_error
Add an error variant without checks.
2019-11-21 16:09:05 +01:00
Wim Taymans
40e837555d jack: improve port sort order
Sort by object path before attepting by id.
2019-11-21 09:33:16 +01:00
Wim Taymans
cd1ec41253 jack: use metadata when available 2019-11-05 10:03:35 +01:00
Arun Raghavan
863a642e08 Merge pipewire-jack subtree 2019-11-03 15:20:56 +01:00
Arun Raghavan
59bdab94bc Drop git submodule structure
The workflow is getting a little messy with these, so we're just going
to merge those repositories in.
2019-11-03 15:19:43 +01:00
Wim Taymans
612bfe9a64 jack: update 2019-11-03 10:41:26 +01:00
Wim Taymans
b179b11e66 jack: update 2019-10-29 12:03:57 +01:00
Wim Taymans
2728babc85 jack: sync 2019-10-28 18:05:37 +01:00