Commit graph

2676 commits

Author SHA1 Message Date
Wim Taymans
5383782336 alsa: Disable rate matching for the same card
Add a clock name to the clock, remove the old api/clock_id. This makes
it easier to add descriptive names

Place the alsa card number in the clock name.

Check the clock name of the master clock and if it matches our own
clock, disable rate matching.
2019-10-23 16:04:03 +02:00
Wim Taymans
54f6834de4 io: add clock_id to clock
Can be used to determine if we need to slave or not.
Add node abi test
Fix some headers
2019-10-23 13:13:01 +02:00
Wim Taymans
2ac8be4ac7 audioconvert: negotiate when starting
Don't try to negotiate from set_param and use_buffers, instead
negotiate when we Start and clear on Suspend.
2019-10-23 10:34:05 +02:00
Wim Taymans
0500454ac9 jack-device: improve device name 2019-10-23 10:33:42 +02:00
Wim Taymans
ff96165035 Improve debug 2019-10-22 13:06:20 +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
fa25900682 alsa-seq: fix for being a slave 2019-10-22 12:24:04 +02:00
Wim Taymans
e10a74785c pcm: don't complain on Suspend 2019-10-22 12:20:29 +02:00
Wim Taymans
659152d392 list: improve spa_list_for_each_safe_next 2019-10-22 12:20:02 +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
34a1a988ba session: make a jack device
Add a jack device and activate it when we release the device (for JACK
presumably). We need to work around some issues, jack does not allow
us to connect yet when it asks to release the device so we need to
wait a little and then connect.
2019-10-21 16:39:08 +02:00
Wim Taymans
b3d72fb82d jack: improve properties 2019-10-21 16:37:52 +02:00
Wim Taymans
b284988755 jack: improve shutdown 2019-10-21 16:07:33 +02:00
Wim Taymans
128a8e6c3c cli: add create-device command
Add create-device command
Add short command aliases
2019-10-21 16:00:43 +02:00
Wim Taymans
116676e149 node: add active flag for rate match
Add flags to the rate match io area
Add flag to activate/deactivate rate match
Set active flag in rate match when slaved
Update rate before starting resample
2019-10-21 10:13:56 +02:00
Wim Taymans
f5b9862a89 alsa: tweak xrun recovery
Don't try to resync right after a xrun.
Init the dll after reslaving.
2019-10-18 22:53:02 +02:00
Wim Taymans
2e3608a34f Improve some debug 2019-10-18 21:54:44 +02:00
Wim Taymans
1eca773145 media-session: only deal with state when it changed
Look at the change_mask and only deal with the state when it changed
or else we might start the idle timer again when something unrelated
changed.
2019-10-18 21:52:24 +02:00
Wim Taymans
92d5c179d6 tests: set the samplerate in the format
This works for now without a samplerate because we ignore it but
it might not in the future..
2019-10-18 21:51:07 +02:00
Wim Taymans
566640a21b audioadapter: fix switch between master and slave
When we get worken up with a callback, mark ourselves as a master
because we then need to avoid running the converter again in the
process callback. After we perform the process callback, unmark
ourself as master and wait for the next cycle.

This fixes switch from master to slave for sources.
2019-10-18 21:47:37 +02:00
Wim Taymans
2758a4555f meson: enable mixer 2019-10-17 13:04:30 +02:00
Wim Taymans
102bd21d0e alsa: lower priority of cards with device not starting from 0 2019-10-17 13:03:28 +02:00
Wim Taymans
ecd8dbc7f0 node: add node.priority
Add a simple priority to nodes.
2019-10-17 12:43:23 +02:00
Wim Taymans
e2f6a7a34e audiomixer: add AVX optimized mixer functions 2019-10-17 09:36:18 +02:00
Wim Taymans
d8eb7ce81f audioconvert: fix avx flags 2019-10-17 09:35:24 +02:00
Wim Taymans
7798cf7364 core: improve alignment
Use the CPU alignment to align memory of allocated buffers. This makes
it more likely that all CPU optimizations can be done.
2019-10-17 09:34:27 +02:00
Wim Taymans
c8ffcaaefe plugins: just check the data pointer
We don't need to look at the data type, we just just be happy when
the data pointer is filled in.
2019-10-16 12:23:42 +02:00
Wim Taymans
8899d00bfc control: add control mixer plugin
Add a mixer plugin for control messages and plug it in ports with
control messages.
2019-10-16 11:13:23 +02:00
Wim Taymans
0978343e44 buffers: make max buffers a config option 2019-10-16 11:12:03 +02:00
Wim Taymans
e0f79bcbb8 io: add some more docs and memory io area 2019-10-16 11:10:57 +02:00
Wim Taymans
b37bf7e068 alsa-seq: ask for more data when consumed 2019-10-16 10:44:40 +02:00
Wim Taymans
6ad52b1a11 iter: check if size can hold a spa_pod 2019-10-16 10:44:12 +02:00
Wim Taymans
e28b5b8232 pipewire: return better errno symbol not found 2019-10-16 10:43:36 +02:00
Wim Taymans
2b75f28d8b remote: create/destroy mempool with the core proxy 2019-10-09 00:03:57 +02:00
Wim Taymans
e18ca6e9c8 protocol-native: don't try to flush when the source is gone
When the connection is broken, we destroy the source avoid trying
to flush when the source is gone.
2019-10-08 23:47:02 +02:00
Wim Taymans
082463efd0 protocol: add v0 compatibility
For flatpaks we need to be able to support older v0 protocol clients.
To handle this we have:

- the connection detects an old client when it receives the first
  message. It can do this by checking the sequence number, on old
  versions it contains the message size and is never 0, on new
  clients the sequence number is 0.

- We add a new signal at the start of the connection with the detected
  version number. This installs the right version of the core proxy.
  We also move the binding of the client until the hello message is
  received. This way we can have a new client connect (portal),
  hand over the connection to an old client, which then removes the
  client binding again in the hello request with a v0 version.
  There are some changes to the passing of fds in v0 vs v3 which need
  to investigated some more.

- bump version of our interfaces to 3. This makes it possible to
  have v0 and v3 protocol marshal functions.

- Add version number in the proxy. This is mostly automatically done
  internally based on the version numbers the library is compiled
  with. Where the version number was in the API before, it is now
  actually used to look up the right protocol marshal functions. For
  Proxies there is usually just 1 version, the current one. It is the
  server that will support different versions.

- Add v0 compat marshal functions to convert from and to v0 format.
  This has some complications. v0 has a type map it keeps in sync
  with the server. For this we have a static type map with mappings
  to our own v3 types. Pods are mostly the same except for objects
  that used to have arbitrary pods in v0 vs spa_pod_prop in v3. Also
  convert between v0 spa_pod_prop and v3 spa_pod_choice.
  Formats and commands are also slightly different so handle those
  mappings as well.
  We only have marshal functions for the server side (resource)
  v0 functions.

- Add v0 compatible client-node again. It's a bit tricky to map, v0
  client-node basically lets the server to the mixing and teeing
  and just does the processing of the internal node.
2019-10-08 23:20:18 +02:00
Wim Taymans
d99350635a protocol-native: add flags for future extensions 2019-10-08 22:46:25 +02:00
Wim Taymans
117db11f7e Remove some unused fields 2019-10-08 22:44:56 +02:00
Wim Taymans
9d842fb5eb improve debug and error reporting 2019-10-08 22:33:31 +02:00
Wim Taymans
9aadc753c0 type: add missing type-info for MemId 2019-10-08 22:30:00 +02:00
Wim Taymans
5693d72fcb audioadapter: expose parameter in port_info 2019-10-03 16:23:23 +02:00
Wim Taymans
0ecbe4844e mixer: Move floatmix to the audio mixer plugin
Move floatmix to the audiomixer plugin and change the name to
AUDIO_MIXER_DSP.
Add runtime selectable sse and sse2 optimizations.
Load the port mixer plugin dynamically based on the factory_name.
Add some more debug
2019-10-03 16:20:12 +02:00
Wim Taymans
27eabede35 volume: fix build 2019-10-03 09:38:41 +02:00
Phi|eas |ebada
1c23310595 Fix typo 2019-10-03 09:36:55 +02:00
Wim Taymans
36904e1612 dict: add function to sort 2019-10-03 09:31:34 +02:00
Wim Taymans
1f700e7cdd dict: add SORTED flag and faster lookup in that case 2019-10-03 09:29:51 +02:00
Wim Taymans
fb95e7660a media-session: start the midi bridge from the session 2019-10-02 21:12:42 +02:00
Wim Taymans
0a6ad1adec alsa: only emit PCM device when available
Only emit a PCM device if the device actually has one. Otherwise we
end up with a useless PCM device for a pure midi device.
2019-10-02 21:10:43 +02:00
Wim Taymans
6e0c279bc1 improve properties on objects 2019-10-02 20:16:12 +02:00
Wim Taymans
9c4e5f4e27 port: improve buffer handling
Remove the buffers_move method, it's not needed.
2019-10-02 18:34:03 +02:00