Commit graph

349 commits

Author SHA1 Message Date
Wim Taymans
e74c41bdf6 splitter: fix bpf
Number of channels does not influence bytes-per-frame for
non-interleaved audio.
Add layout to get_format
2018-04-26 09:29:10 +02:00
Wim Taymans
f9bda23e56 a2dp-sink: remove sources only once 2018-04-24 17:21:23 +02:00
Wim Taymans
08484b92f5 bluez5: handle remove of devices
Fix a2dp-sink for new scheduling
2018-04-24 17:02:19 +02:00
Wim Taymans
4c9c939527 alsa-monitor: keep track of cards and devices
Keep better track of cards and devices so that we can remove them
without having to open (the removed device).
2018-04-24 17:01:04 +02:00
Wim Taymans
0eb73f0f06 loop: add back the destroy loop
We need to keep the sources around until all sources are dispatched. If
not: source A and B are active after poll, A is dispatched first and
removes B, when B is then dispatched, the memory is gone. We don't
free the source but simply mark the fd invalid and move it do a
destroy list. After all sources are dispatched we destroy.
This is safe because removing a source is either done from the poll
context (with invoke) or when holding the right locks.
2018-04-20 16:28:47 +02:00
Wim Taymans
d165b3b842 pipewire: improve memory cleanup
Add method to unload a spa interface.
Various other memory cleanups
2018-04-20 16:27:19 +02:00
Wim Taymans
ebd13a2a74 loop: blocking wait
Release the locks before waiting.
2018-04-19 22:01:18 +02:00
Wim Taymans
64d1307684 alsa: do the wakeup differently
Directly write from the process thread, reduces potential latency.
2018-04-19 22:00:42 +02:00
Wim Taymans
06dd7095fc audioconvert: various fixes 2018-04-19 20:12:24 +02:00
Wim Taymans
e125f9a9a7 alsa: add format layout 2018-04-19 20:10:07 +02:00
Wim Taymans
30d8df7d25 add layout to format 2018-04-19 20:09:10 +02:00
Wim Taymans
e869d5bcb0 splitter: add channel splitter
Splits a buffer with multiple non-interleaved channels to multiple
buffers, each with 1 channel.
2018-04-13 20:00:30 +02:00
Wim Taymans
f4f2e4bf68 small cleanups 2018-04-13 19:57:34 +02:00
Wim Taymans
8b74a3c0d2 small cleanups 2018-04-12 09:42:19 +02:00
Wim Taymans
008df86c8f small cleanups 2018-04-11 10:54:47 +02:00
Wim Taymans
d88b88444d resample: use speex resampler for now 2018-04-10 16:54:15 +02:00
Wim Taymans
b3b47d3fe9 more work on audioconvert
Implement audioconvert as a complex element of fmtconver,
channelmix and resample.
Make copying resample just to test.
Plug the converter into pw_stream.
2018-04-10 15:54:29 +02:00
Wim Taymans
de36330917 handle: make method to get size 2018-04-09 10:06:17 +02:00
Wim Taymans
53e03019da buffer: more work on buffer allocation
Separate buffer sizes in the info. Make it possible to not set
data pointers for when we use memfd for the memory.
Improve format conversion.
Work on in-place conversion in test-convert2
2018-04-09 09:30:56 +02:00
Wim Taymans
142ef38df9 stream: more work on converter 2018-04-06 18:39:40 +02:00
Wim Taymans
b171361204 stream: for format conversion 2018-04-05 15:38:10 +02:00
Wim Taymans
ba518c0d9b small fixes 2018-04-05 15:37:34 +02:00
Wim Taymans
0b4cef586f audioconvert: improvements 2018-04-03 16:29:36 +02:00
Wim Taymans
2cfb206d7c add audioconvert beginnings 2018-04-03 16:29:36 +02:00
Wim Taymans
a7341ce583 node: fix support for remote driver nodes 2018-04-03 16:29:36 +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
9b0a880afb simplify things with just 1 process function
Make just one process function in spa node. With the io area states
we can do more complicated io patterns.
2018-04-03 16:29:36 +02:00
Wim Taymans
933635f63f WIP: work on per driver graphs
Make a graph per driver node and let nodes that link to this join this
graph
Work on an idea for an even simpler scheduling mechanism.
2018-04-03 16:29:36 +02:00
Wim Taymans
52efeb5181 alsa: only pull once 2018-04-03 16:29:36 +02:00
Wim Taymans
c018d27078 alsa-sink: cleanup 2018-04-03 16:29:36 +02:00
Wim Taymans
1fec67086d audiomixer: debug port id 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
5bff143eaf audiomixer: update io states more correctly 2018-04-03 16:29:36 +02:00
Giovanni Campagna
07f12c9713 v4l2: fix enumerating frame interval for continuous/step-wise devices
A device that supports continuous/step-wise frame interval will
report the correct frame intervals for index 0 and EINVAL for
every other index.
(https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/vidioc-enum-frameintervals.html)

Previously, the code would exit from the loop after successfully
reading index 0, without marking that the iteration of frame
interval completed. Therefore, the next time the function was
called the same frame intervals would be read, instead of advancing
to the next frame size or format type.
Instead, mark that we need to try and read the next format size.

Fixes #56
2018-04-03 16:28:23 +02:00
Philipp Zabel
e38cba4e13 v4l2: check device caps
If V4L2_CAP_DEVICE_CAPS is set, device_caps must be checked for the
V4L2_CAP_VIDEO_CAPTURE flag instead of capabilities.
2018-04-03 16:27:43 +02:00
Wim Taymans
187b6d4bf9 alsa: update the offset after each copy 2018-03-14 16:03:58 +01:00
Wim Taymans
638916e065 loop: remove the destroy_list
Don't use a destroy_list anymore, it's not safe anyway. Instead require
that sources be removed with (a blocking) invoke. Make sure we don't
dispatch sources that were removed from the loop.
2018-03-14 14:51:36 +01:00
Wim Taymans
8e2ceb773e Improve some debug 2018-03-01 09:01:52 +01:00
Wim Taymans
d3cc45c611 alsa: make some log as debug 2018-02-20 15:48:47 +01:00
Wim Taymans
2fe7197930 node: add option to pause-on-idle
v4l2 is slower to start when we pause in idle. Disable this
behaviour with an option on the node.
2018-02-20 12:28:19 +01:00
Wim Taymans
528d0a1c7d alsa: put device name in separate property 2018-02-20 09:59:52 +01:00
Wim Taymans
0e5a1b6327 props: use macro for property alternatives 2018-02-20 09:36:05 +01:00
Wim Taymans
c613ae4b40 v4l2: unset format, then close
v4l2 does not want to close unless the format is cleared
2018-02-16 18:14:24 +01:00
Wim Taymans
cafb22a6b9 alsa: only try to pull when out of buffers 2018-02-16 16:56:19 +01:00
Wim Taymans
7ffaaf66a7 v4l2: remove source on errors 2018-02-15 10:47:43 +01:00
Wim Taymans
f37f8ce70d v4l2: keep separate field for mapped fd
When mapping an input memfd, don't write the mapped pointer into the
buffer but keep a separate field for it.
2018-02-12 11:35:49 +01:00
Wim Taymans
29dbffea52 v4l2: map memfd when not already mapped 2018-02-12 11:04:28 +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
9d4b0d8358 dbus: move rtkit to module
Move the rtkit code to a module.
Make sure we don't need to include the dbus headers in the spa dbus
interface. This removes the dependency on dbus.
2018-02-08 10:02:17 +01:00
Wim Taymans
c5df05d3f3 v4l2: respect MAX_CONTROLS limit 2018-02-07 18:14:11 +01:00