Commit graph

860 commits

Author SHA1 Message Date
Wim Taymans
5f70a2713e a2dp: fix audio
Don't just remove the buffer from the queue when it was only
partially written. To do this, return the error code from add_buffer
and only remove the buffer when there is a real error.
2020-01-10 09:55:02 +01:00
Wim Taymans
f026e95585 audioconvert: use position rate as default rate 2020-01-09 16:50:02 +01:00
Wim Taymans
c14881fbe2 Respect the rate from the position as the default 2020-01-09 16:43:08 +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
9ffa9c0b08 v4l2: handle suspend 2020-01-08 13:23:35 +01:00
Wim Taymans
8f3b2b9543 bluez5: implement sync, profile and enum_profile 2020-01-03 13:01:54 +01:00
Michael Tretter
8e6a5a1714 v4l2: print pixelformat as string
The pixelformats are actual 4 letter sequences. Print the letters
instead of the hex value to make the output more readable.
2019-12-19 15:43:13 +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
9657486a81 alsa-seq: update duration when slaved as well 2019-12-18 13:27:29 +01:00
Wim Taymans
24ab22db12 audioadapter: avoid infinite loop
Rewrite the slave/converter loop a little to avoid infinite loops.
2019-12-18 12:58:42 +01:00
Wim Taymans
d67d012362 audioadapter: loop until we have data
Keep caling the slave processing function until we have data from
the converter or until no process can be made.
2019-12-17 15:11:31 +01:00
Wim Taymans
58a7e18ed5 audioadapter: set data flags 2019-12-17 15:08:39 +01:00
Wim Taymans
49a4440692 audioadapter: pass slave properties directly 2019-12-10 12:48:18 +01:00
Wim Taymans
3131acea46 alsa-seq: close seq device
When we unload, close the seq device again so that the source is
removed from the main loop.
2019-11-28 11:21:41 +01:00
Gleb Popov
b73976ff10 logger: use CLOCK_MONOTONIC on freebsd 2019-11-21 17:55:59 +01:00
Wim Taymans
bca653198a audioadapter: emit param events only once
The events from the convert are already proxied to the audioadapter
so don't emit the event twice.
2019-11-21 13:07:16 +01:00
Wim Taymans
feb8dd3a34 Add include of keys.h 2019-11-21 09:34:08 +01:00
Wim Taymans
18974f90f6 pod: rename context to flags in spa_pod_prop
Flags are more useful when we can use them to describe how to
filter properties later.
2019-11-21 09:32:08 +01:00
Wim Taymans
f92775719a log: make timestamps configurable 2019-11-19 15:38:09 +01:00
George Kiagiadakis
53f93c2bde logger: print timestamps on logged messages
Timestamps have usec precision and the seconds are limited
to 9 digits. Usually what matters in these messages is to spot
delays between printouts and not really what is the absolute
time of the system.
2019-11-19 14:23:49 +00:00
Wim Taymans
ac24743b2e the epoll shim should only be used by the system library.
All other places should use the system library to get the right
fds.
2019-11-19 15:16:18 +01:00
Gleb Popov
da7eefd60e Implement get_count() from cpu.c for FreeBSD. 2019-11-19 13:41:40 +01:00
Gleb Popov
fd937fa378 On FreeBSD, add dependency on epoll-shim library.
FreeBSD doesn't provide timerfd and eventfd functions. These are implemented in
3rd party library called epoll-shim. Link targets requiring these functions to
this library.
2019-11-19 13:41:40 +01:00
Wim Taymans
68e94a2e7e system: use spa_system functions for fds 2019-11-19 13:41:40 +01:00
Wim Taymans
c67445c343 test: audioadapter 2019-11-03 10:39:48 +01:00
Julian Bouzas
9b2d34c04b audioadapter: store format on set_param and use it as a filter when negotiating 2019-10-29 22:44:24 +01:00
Wim Taymans
d94019ccd2 io: Add current video frame size to position
Add some padding, tweak some padding
Remove count in the clock, it's useless
For video frames we will want to use metadata to place
this on individual buffers.
2019-10-29 14:08:40 +01:00
Wim Taymans
f7d32e78f2 pod: remove SPA_POD_IS_OBJECT_TYPE
We have a safer version of that in iter.h
Use macros to get id and type of an object
Use safer checks in plugins.
2019-10-29 10:08:46 +01:00
Wim Taymans
241a6165d2 jack: also add rate to format 2019-10-28 22:02:10 +01:00
Wim Taymans
4f5a5fc917 vulkan: tag port as video DSP port 2019-10-28 13:20:42 +01:00
Wim Taymans
121586cfae fix build 2019-10-25 15:56:20 +02:00
Wim Taymans
8d512822cf fix the build 2019-10-25 15:54:42 +02:00
Wim Taymans
9ffec214b8 fix includes 2019-10-25 15:01:02 +02:00
Wim Taymans
af73585948 Increase max buffer size 2019-10-24 15:26:59 +02:00
Wim Taymans
81fc595e3d add defines for max buffer size 2019-10-24 12:51:34 +02:00
Wim Taymans
f30b4bf506 alsa-seq; remove latency property 2019-10-24 12:48:28 +02:00
Wim Taymans
2fa97daa24 add some constants for max samples 2019-10-24 12:35:00 +02:00
Wim Taymans
605a0a6f97 jack: increase max buffer size 2019-10-24 12:21:17 +02:00
Wim Taymans
3c9aa2e96c fmt: add sse2 optimized s32->f32d 2019-10-24 11:06:04 +02:00
Wim Taymans
38bc80a3b8 remote-node: implement suspend 2019-10-23 17:20:46 +02:00
Wim Taymans
9f4df5ee40 alsa: add some debug, tweak resync 2019-10-23 16:26:35 +02:00
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
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
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
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
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