Commit graph

863 commits

Author SHA1 Message Date
Wim Taymans
caa3e83eb1 client-stream: link controls after profile was set 2018-10-08 18:19:59 +02:00
Wim Taymans
63333adca3 port: don't keep port_info around but make copy 2018-10-08 13:00:18 +02:00
Wim Taymans
e1ec1bad23 spa: add profile param
Make a profile param that can be used to configure a node with a
certain profile.
Use the profile to configure the ports on splitter and merger and
get rid of the dynamic ports.
Use the profile to configure the client-node and audio-dsp.
Don't try to link more ports than available between client-node and
dsp.
2018-10-08 11:45:52 +02:00
Wim Taymans
f81588f439 client-stream: there is always and adapter 2018-10-04 16:36:09 +02:00
Wim Taymans
8f1ebe0c7e client-stream: enum_params works to the client node 2018-10-04 16:32:42 +02:00
Wim Taymans
8de1d03feb audioconvert: use splitter/merger
Remove the split/merge functionality from fmtconvert.
Make audioconvert use the splitter/merger.
Let client-stream decide what mode to configure audioconvert in.
2018-10-04 16:03:14 +02:00
Wim Taymans
d8827e2109 client-stream: add started variable 2018-10-04 15:53:49 +02:00
Wim Taymans
0e2885b599 client-node: make the client parent 2018-10-03 20:09:47 +02:00
Wim Taymans
f3dfe61aa0 link: add link state and error to info
Notify when state changes
2018-10-03 19:29:11 +02:00
Wim Taymans
0358e8b480 client-stream: there is always an adapter 2018-10-03 19:27:46 +02:00
Wim Taymans
f46a83dcb7 resource: pass the resource id in the error 2018-10-03 19:24:53 +02:00
Wim Taymans
4401e479c6 small cleanups 2018-10-02 17:37:38 +02:00
Wim Taymans
8efabe051e remove obsolete modules
remove obsolete media-session and suspend-on-idle. This functionality
is to be handled by an external session manager
2018-10-02 17:34:31 +02:00
Wim Taymans
3d36755c4f audio-dsp: use type-info to get channel names 2018-10-02 10:17:12 +02:00
Wim Taymans
575e177a48 client-stream: run the driver graph 2018-10-02 07:11:45 +02:00
Wim Taymans
0f69a7b767 node: remove and add node from graph in idle/running
Add the node and all links to the graph when going to running and
remove them again when idle.
2018-10-02 05:10:55 +02:00
Wim Taymans
392b217f81 client-stream: make adapter port variable
We need this to add control ports later
2018-10-01 11:15:12 +02:00
Wim Taymans
8f7328173b utils: add another flag helper macro 2018-09-28 17:47:37 +02:00
Wim Taymans
6b0c28e717 client-node: don't try to add invalid memid 2018-09-28 05:49:38 +02:00
Wim Taymans
30316df5c8 fix some leaks 2018-09-24 09:33:09 +02:00
Wim Taymans
132ee30930 improve some debug 2018-09-24 09:32:27 +02:00
Wim Taymans
8a562c4427 module: remove resource listener in cleanup
Remove the resource listener before destroying the object because that
will trigger the resource cleanup again.
2018-09-24 09:30:14 +02:00
Wim Taymans
8a88c6da53 link-factory: add linger options
The linger option makes the link survive after the client is destroyed.
2018-09-21 16:45:52 +02:00
Wim Taymans
59f10ad453 Add proxy destroy
Make the current destroy method on the core for proxies to remove the
server side resource.
Make a new destroy method on the registry to destroy globals.
Remove the destroy method on the client-node
media-session: monitor the dsp and device node states to manage the
session state
2018-09-21 16:43:11 +02:00
Wim Taymans
5ba27a7dc1 add some more debug 2018-09-20 10:14:11 +02:00
Wim Taymans
b50482e346 fix cleanup
When the node is destroyed, remove it from the node list and mark
the reference to the node gone so that when the resource is cleaned
up we don't try to destroy the node again.
2018-09-20 10:13:00 +02:00
Wim Taymans
f57d1125f6 link-factory: clear links when client dies 2018-09-18 12:33:01 +02:00
Wim Taymans
aab69948b0 node: add set_param and send_command methods 2018-09-18 09:28:17 +02:00
Wim Taymans
c194c34326 audio-dsp: cleanup when the node is destroyed
Also clean up when the node is distroyed
2018-09-17 17:16:20 +02:00
Wim Taymans
fcd90b25d3 More work on multichannel
Reorder channels to a more common default order.
Only add channel layout when channels > 1
Don't try to link to a session that is still starting
Small sse fixes.
2018-09-14 15:23:12 +02:00
Wim Taymans
5196f7f053 audio: remove layout from audio
Make special format types for planar and interleaved instead of
having a field.
Add enum for audio channel positions
Add some default audio channel layouts
Place the channel layout in the audio format when possible
alsa: place audio channel positions in format
Add sse optimized channel mixing for some common cases
Remove name from port info, it's not mandatory and in the properties
Add direction to port info
2018-09-13 17:03:56 +02:00
Wim Taymans
fb3379e587 Pass channelmask around and use it to name ports
Use the channel name in the port names of the dsp
2018-09-11 18:09:45 +02:00
Wim Taymans
593daa36d4 connection: split messages to work around fd limit
Split messages in multiple parts when there are too many fds to
send in one message.
2018-09-11 12:01:19 +02:00
Wim Taymans
f3dec52fd2 audio-dsp: improve cleanup 2018-09-11 10:25:40 +02:00
Wim Taymans
dca37fe037 small cleanups 2018-09-11 10:24:48 +02:00
Wim Taymans
28be82029b connection: don't reset fds on refill
Only reset fds when we finished reading the message
2018-09-10 18:50:05 +02:00
Wim Taymans
3c76b150c7 link-factory: also create links when possible 2018-09-10 18:49:41 +02:00
Wim Taymans
d1a399aadd audio-dsp: fix user data 2018-09-10 18:49:04 +02:00
Wim Taymans
cc842cbdc8 Type changes
Only allow properties inside objects, this makes it easier to
iterate the object, which is needed for efficiently processing
control streams.
Add a choice type to mark variable properties.
SPA_TYPE_Enum -> SPA_TYPE_Id to avoid confusion with choice enum
Make it easier to allocate and initialize properties on the stack
Make more efficient methods to make objects.
2018-09-05 16:41:07 +02:00
Wim Taymans
61e4ad3b41 control: always link notify and control controls 2018-08-30 12:35:14 +02:00
Wim Taymans
7cdb980b1a debug: allow custom type root 2018-08-30 12:01:52 +02:00
Wim Taymans
05d3502c84 control: rework for spa_io_sequence
Put a pw_control object on all ports that support control messages.
Allow linking of control objects (and thus ports).
Make export-sink generate control messages to update the contrast
property.
2018-08-30 09:54:54 +02:00
Wim Taymans
ff6a244d8f Make media type and subtype properties
This is easier to debug and we only want properties in objects
in the future.
2018-08-29 18:08:52 +02:00
Wim Taymans
514528f2c7 format: make helper functions to create formats
Use helper functions to create a fully specified format.
2018-08-29 15:53:26 +02:00
Wim Taymans
80de83f38a format: make helper function to parse media type 2018-08-29 14:50:58 +02:00
Wim Taymans
c9526dc2bb Implement control streams
spa_io_control_range -> spa_io_range
Add helpers for sequence and control pod objects
Implement control properties in audiotestsrc, update test example.
2018-08-28 18:16:41 +02:00
Wim Taymans
90c1a95eef More type cleanups
SPA_ID_* -> SPA_TYPE_*. We use 'type' for all registered types.
ID refers to either a registered type or an enum.
Improve introspection of object ids. Make 0 an invalid enum and
use it to look up the object id type.
Move some type-info files together.
Swap type and id of the object, we first specify the type and then
the id because the meaning of the id depends on the object type.
2018-08-27 15:03:11 +02:00
Wim Taymans
d26aecfef2 More type fixes
Param ids and IO ids are now simple enums.
Move some type info in one place, delete some type-info files
Fix type debug
Make audio layout an enum
Mark more enums as enums in types so they show us with their names in
the debug.
2018-08-25 12:08:29 +02:00
Wim Taymans
805e3bb6c1 types: work on types
Move static pod types to type system
work on type info for types
Move the event and command ids to an enum to make it easier to extend
later.
2018-08-24 10:53:09 +02:00
Wim Taymans
fca3e1d85d Remove dynamic types
Do not use dynamic types anymore. The reason is that it's difficult:

- to maintain a shared type database over a network.
- the extra overhead when translating between processes and for
  maintaining the translation tables.
- race conditions in translating in RT-threads, this is a problem
  because we want to make event streams.

We now have simple enums with types and extension points for all
types. This is also nicer to use in general.
We don't need the mapper anymore or pass strings around as types.
There is a parallel type info system to get more info about ids and
enums and their hierarchy. It can also be used for debugging.
2018-08-23 17:47:57 +02:00