Commit graph

107 commits

Author SHA1 Message Date
Wim Taymans
3b1c40f17f pod: move compare and filter functions out of the library 2018-08-14 14:52:32 +02:00
Wim Taymans
d3c203b744 spa: use clock info
Use the port clock io area to get timing info and use this as
the time in the graph when we wake up.
2018-07-17 17:37:55 +02:00
Wim Taymans
fba00fb791 clock: remove clock interface
Remove the clock interface, we need to get timing information with an io
area to get the required precision and performance.
2018-07-17 09:50:51 +02:00
Wim Taymans
c98fbfe0a9 meta: make safer find_meta_data function 2018-07-09 12:04:23 +02:00
Wim Taymans
8f41031933 alsa: clamp threshold to configured max 2018-06-25 17:07:59 +02:00
Wim Taymans
bd3b7e8ee4 alsa: cleanups
Use a periodic timer to catch underruns
Small cleanups
2018-05-11 09:56:46 +02:00
Wim Taymans
b8a37381da alsa: adjust latency based on buffer size 2018-04-30 09:27:20 +02:00
Wim Taymans
60d74d442f alsa: fix capture 2018-04-26 17:22:17 +02:00
Wim Taymans
30d8df7d25 add layout to format 2018-04-19 20:09:10 +02:00
Wim Taymans
de36330917 handle: make method to get size 2018-04-09 10:06:17 +02:00
Wim Taymans
33a322b96e graph: new scheduling model
Make explicit links between elements that are used to activate the
next element in the graph.
Make subgraphs a special regular node. Make a link from the
subgraph children to the parent so that the subgraph completes when
all the children completed.
Implement a single process function in plugins
Remove many messages in the client node
2018-04-03 16:29:36 +02:00
Wim Taymans
e7bff4293d alsa: small cleanups
Use flags for buffers
2018-04-03 16:29:36 +02:00
Wim Taymans
0e5a1b6327 props: use macro for property alternatives 2018-02-20 09:36:05 +01:00
Wim Taymans
342f0d59d0 node: add some more port flags
Add port flags to mark physical and terminal ports
2018-02-09 18:05:35 +01:00
Wim Taymans
155243a27c spa: simplify start/pause
Use the sync option in invoke to implement stop.
2018-01-18 11:57:23 +01:00
Wim Taymans
e5e360d5df props: improve property introspection
Make a new PropInfo parameter that allows us to iterate all
properties. Make some new fields to set labels and names for
properties. We will be able to add more things to describe the
properties this way.
Use the Props param to simply query or set properties.
We can now make int enum properties and describe all possible
values with labels, we don't need to register types anymore.
This then makes it possible to enumerate the v4l2 controls and make
them available as control params.
2017-12-15 16:30:56 +01:00
Wim Taymans
541553be1c control: add control objects
Add control objects for all controllable properties on ports.
Try to link compatible control properties in autolink.
Allocate shared memory for the output property memory and configure
the io area on the ports when the controls are linked.
Send the shared memfd to clients when the io area is configured.
Add port_set_io support in remote.c, mmap the control io area and
set on the port.
Add some param helpers
Add volume control to export-source update the volume before
sending each buffer.
2017-11-30 16:36:29 +01:00
Wim Taymans
a092b9312a Add control properties to audiotestsrc
Add control properties to audiotestsrc for frequency and volume
and add a test program.
Add size parameter to set_io for additional checks and to make it
easy to know how much control data we can write.
2017-11-22 14:30:04 +01:00
Wim Taymans
8efea3e1ea node: Add id to set_io
Make it possible to configure multiple io areas on a port by giving
an id to set_io.
Add some types to enumerate the supported ids
Make an area to exchange buffers and one to specify pull ranges.
The idea is to make more area types for controlable properties.
Implement enumeration of IO areas in volume.
2017-11-21 19:38:48 +01:00
Wim Taymans
5bebfe022b cleanups
Follow the data/size argument order convention to make the api
more consistent.
2017-11-20 15:26:44 +01:00
Wim Taymans
52e1dad93e Improve pod filter
Reset the builder when the filter failed.
Make the plugins create their params in a temporary buffer, we
don't want to do in-place filtering because that is not always
possible. Because the filter now resets on error, we can remove
the reset from the plugins.
2017-11-14 10:17:45 +01:00
Wim Taymans
440f681f4b Improve enum_param
Add an argument to pass the result param to the caller instead of
having the caller have to pick it up from the builder.
Improve docs for node, clock and monitor
Pass spa_pod everywhere instead of spa_pod_object.
Pass result argument to spa_pod_filter to make things a little
nicer.
2017-11-13 17:57:38 +01:00
Wim Taymans
cd5e697e9f builder: make methods to save and restore state 2017-11-13 12:30:48 +01:00
Wim Taymans
6fb0f580ea Use errno for result errors
Make new enumeration for data transport status and use errno
style error numbers for errors.
2017-11-13 09:41:41 +01:00
Wim Taymans
dda28b1589 cleaup up the result codes 2017-11-10 16:11:53 +01:00
Wim Taymans
caaeaff223 Reorganise SPA tree
Reorganise the SPA includes to make it more extensible later
Simplify the naming of the buffer and meta params
2017-11-10 13:36:14 +01:00
Wim Taymans
58451d626c Implement param filtering
Make a new pod filter function and use it in the plugins to filter
in enum_params.
Small tweaks to the pod_builder
2017-11-09 17:16:54 +01:00
Wim Taymans
30a4651c51 Various fixes and improvements to enum_params 2017-11-08 11:22:42 +01:00
Wim Taymans
4d890a2d98 small cleanups
Remove the temp storage for formats and props now that we get a builder
from the host to write into.
2017-11-07 20:28:07 +01:00
Wim Taymans
f3bca48398 Unify props, params and formats
Make enum_params and set_param to configure properties, format
and other parameters. This allows us to remove some duplicate
code and make the properties and parameters much more extensible.
Use the object id to mark the id of the parameter.
Remove the spa_format and spa_props.
We can now make the client-node easier by merging the various
format methods into the params.
Make the stream API more powerful now that we can pass params
around.
2017-11-07 17:48:40 +01:00
Wim Taymans
0662f3a3ea Small fixes for error handling 2017-10-26 15:13:33 +02:00
Wim Taymans
a691d07531 use spa_list_append when we can 2017-10-24 12:58:10 +02:00
Wim Taymans
24d80e5c00 Add new pod parser and builder
Add a new pod builder and parser that is less verbose and
a little more powerful.
2017-09-28 17:00:51 +02:00
Wim Taymans
304a6d1796 alsa-source: fix class 2017-09-18 19:15:09 +02:00
Wim Taymans
dc85a79786 Add more generic export-spa example
Replace the v4l2 example with a more generic version that can add
any spa node to a remote graph
Make the dictionary items const
Add some info to nodes and factories. Add the node info to the node
properties. We can then set the media.class directly on the node,
instead of letting the monitor set it.
Debug node info in spa-inspect.
Do async operation on the audiotestsrc and videotestsrc differently.
2017-09-07 19:55:22 +02:00
Marcos Paulo de Souza
b0c3936477 Fix clang warnings about comparing uint32 < 0 (#10)
* Fix clang warnings about comparing uint32 < 0

clangs complains about an uint32 compared to < 0:
warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]

So remove these comparisos and an uint32 never will be less than 0.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>

* module-jack.c: Differentiate error msg from protocol-native

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2017-09-04 11:09:08 +02:00
Wim Taymans
6953642ed5 small cleanups 2017-08-27 09:16:03 +02:00
Wim Taymans
0602d76b9e Cleanups
Only pass data to callbacks.
Rename some structs
Provide methods to access structs
2017-08-06 06:42:26 +02:00
Wim Taymans
3d9f28c676 Use remote to join nodes on remote graphs
Make a new method that can take a local node and run it in a remote
pipeline. This basically replaces all functionality of the streams
and more.
Add 2 examples for exporting a sink and a v4l2 node
Make some more things const
Cleanups
Make it possible to do things when the node needs scheduling. The
default node will schedule the local pipeline but the remote node might
also schedule the remote pipeline.
2017-07-25 19:52:31 +02:00
Wim Taymans
bc56c59597 loop: add block flag to invoke
Remove async shutdown and block instead.
2017-06-26 10:41:19 +02:00
Wim Taymans
763bd1100e Add user_data to callbacks
Add user data to callbacks, it's more flexible and natural
2017-06-18 19:48:31 +02:00
Wim Taymans
c3b73ba47d Add versions to structures
Use versions instead of size
Remove user_data from callbacks, we can simply pass the callback struct.
2017-06-14 18:32:39 +02:00
Wim Taymans
34450ed7ed Make done event on node
Replace the AsyncDone event with an explicit done callback in the node
to signal completion of an async operation.
Pass read and write fd together with the transport
2017-06-09 17:24:18 +02:00
Wim Taymans
ded1ea69a1 indent 2017-05-26 18:19:51 +02:00
Wim Taymans
5b037661d9 indent 2017-05-26 08:05:01 +02:00
Wim Taymans
11f23a3ffa spa: don't use typedef for struct and enum 2017-05-25 13:28:15 +02:00
Wim Taymans
f12a5ffc80 Remove redundant fields from PortInfo 2017-05-22 18:02:31 +02:00
Wim Taymans
d1a6d6e03f param: add more generic port params
Remove port properties and replace them with port params. Move the
params from the PortInfo to enum_params.
Use the Param ranges to specify possible sizes etc.
2017-05-22 13:06:18 +02:00
Wim Taymans
6691eb7845 graph: add graph datastructure and scheduler
Improve event and command init so that it can be used more easily
as compound literals.
Improve volume
Make it possible to use graph scheduler in test-mixer
2017-05-18 17:16:48 +02:00
Wim Taymans
3b33e3d362 node: improve callbacks
Make separate callbacks for events and RT notifications.
2017-05-11 10:29:20 +02:00