Commit graph

113 commits

Author SHA1 Message Date
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
Wim Taymans
96ff726666 jack: update 2019-10-28 15:04:18 +01:00
Wim Taymans
4f5a5fc917 vulkan: tag port as video DSP port 2019-10-28 13:20:42 +01:00
Wim Taymans
aab72a70e6 submodule update 2019-10-24 11:05:49 +02:00
Wim Taymans
eb1d675cb0 node: add master priority
Change node.priority to priority.session to indicate that this
is the priority that the session manager uses to select the node.

Add another priority.master that the core uses to select a master
driver. Keep the driver nodes sorted by master priority.

Let jack always prefer to connect to the master driver nodes.
2019-10-22 12:25:25 +02:00
Wim Taymans
3aa19dd38a node: send Suspend to the node
Send suspend to the node when suspending. This is usually the same
as puse for all nodes.
Implement negotiation when we Start audioadapter. This makes it
easier that to track the ports that are negotiated for now.
Use Suspend to clear the audioadapter negotiation.
2019-10-21 17:24:51 +02:00
Wim Taymans
6e0ffb0c47 flags: change flag macros
SPA_FLAG_CHECK -> SPA_FLAG_IS_SET
SPA_FLAG_UNSET -> SPA_FLAG_CLEAR
Add SPA_FLAG_UPDATE
2019-10-02 18:00:42 +02:00
Wim Taymans
f539b42a03 alsa: improve midi
Add some debug
Ignore ports without buffers.
2019-09-26 11:57:25 +02:00
Wim Taymans
db341a6450 improve properties on node and port
Rename some alsa filenames.
2019-09-23 20:51:34 +02:00
Wim Taymans
ab0d1b7fad alsa: cleanups
Avoid getting the clock time just for debug.
Improve time at startup.
2019-09-19 16:55:02 +02:00
Wim Taymans
322ccb452c small cleanups 2019-09-19 13:17:30 +02:00
Wim Taymans
49a5e97d69 format: add application/control media type
Add a new application/control media type that can be used to negotiate
control streams between ports.
2019-09-16 21:09:52 +02:00
Wim Taymans
8b85cc225e rename HAVE/NEED_BUFFER -> HAVE/NEED_DATA
It is more generic and works with control-only ports as well
2019-09-16 12:55:23 +02:00
Wim Taymans
d648ea4ad3 control: don't fail on async port_set_io 2019-09-10 18:50:28 +02:00
Wim Taymans
80ba0b2dcf node: only put async state changes to work queue 2019-09-10 12:13:26 +02:00
Wim Taymans
3142d3b979 mem: add private mapping flag 2019-09-10 09:59:31 +02:00
Wim Taymans
9c9bff8fe9 data-loop: add _wait function
Add function to wait for one iteration of the loop. This can be used
by specialized implementations of the data loop, like jack.
2019-09-09 17:17:03 +02:00
Wim Taymans
4a4fa57efc alsa: handle target better
Rework how we handle the current device fill level and our desired
fill level so that we handle it more consistently.
2019-09-05 13:45:37 +02:00
Wim Taymans
73628c91de audioconvert: refuse invalid channels and rate 2019-09-03 13:49:38 +02:00
Wim Taymans
6341469456 jack: update 2019-09-02 17:19:00 +02:00
Wim Taymans
faaf84286b node: improve position and transport
Reorganize some things, let the clients update the segment info
in their own activation, then let the server merge it. This avoids
clients stepping on eachother. When looping through the clients,
copy the segment info when we encounter its owner.

Remove the list of segment owners to the activation. This is better
than in the activation because we can then just keep one list of
owners.

Remove the NONBLOCK flag from the eventfd so that we can do blocking
reads as well.

Just keep a reposition owner in the driver activation. This points
to the node that has the reposition info. This avoid complicated
synchronization to keep multiple nodes from stepping on eachother.
Now they can just prepare the reposition info in their activation and
set themselves as the reposition owner. The last one who succeeds
wins.
2019-09-02 12:05:05 +02:00
Wim Taymans
0f9594e119 node: add suport for quantum updates
When the node latency property is changed, trigger a graph recalc
to set the new quantum if needed.

Also update the driver quantum when unassigned nodes are assigned
to a driver.
2019-08-30 17:00:26 +02:00
Wim Taymans
aaa6821052 jack: update 2019-08-30 15:41:49 +02:00
Wim Taymans
fc770a5fbb jack: update 2019-08-30 15:30:49 +02:00