Commit graph

971 commits

Author SHA1 Message Date
Wim Taymans
12b8e095c7 v4l2: log error when format doesn't match 2020-05-08 17:35:57 +02:00
Wim Taymans
8513150bdf resample: use calloc to make sure fields are 0 2020-05-08 16:13:34 +02:00
Wim Taymans
b53cc6feb8 improve debug
Log device name and stream direction
Don't log xrun errors in alsa, we signal the xrun signal, which should
take care of logging if any.
Log quantum in xrun.
ratelimit xrun messages.
2020-05-08 12:13:59 +02:00
Wim Taymans
6203fb967c log: make line==0 suppress the file/line/func output
Disable file/line/func output for pod debug
2020-05-07 20:42:52 +02:00
Wim Taymans
79fd4c941f debug: Don't debug EBUSY params
When a device returned EBUSY when enumerating params, don't try to
enumerate (and fail) them again.
2020-05-07 17:15:46 +02:00
Wim Taymans
995fafa5be alsa-seq: remove the queue for system announce port
The announce messages are not put in a queue so we don't need
to allocate one (and a timer). Without the timer, we avoid wakeups
and consume less power.

See #225
2020-05-06 11:19:46 +02:00
Wim Taymans
713f242853 audioadapter: handle -ENOENT from enum_param 2020-05-03 11:45:06 +02:00
Wim Taymans
2220d5b9b6 support: add dummy driver
Add a dummy driver node with high priority. All nodes not linked
to a device node will be linked to this when they require a driver.
2020-04-27 20:21:31 +02:00
Wim Taymans
93211549a4 log: add option to disable line numbers 2020-04-27 11:18:49 +02:00
Wim Taymans
aafd1e7298 improve debug
Improve log so that debug level 3 gives a reasonably readable overview
of what is going on.
2020-04-22 12:47:18 +02:00
Wim Taymans
e73431d541 resample: use right define to compile sse functions
See #220
2020-04-14 20:29:27 +02:00
Wim Taymans
d1beeeade0 loop: handle file fd with eventfd
epoll return EPERM for file fds like stdin/stdout because they are
always ready for IO. use an idle source to handle these cases.
2020-04-14 18:05:45 +02:00
Wim Taymans
c446dfb1d6 resample: improve debug 2020-04-12 20:46:59 +02:00
Wim Taymans
2bb2e50eef audioadapter: stop when the follower needs data 2020-04-12 20:44:56 +02:00
Wim Taymans
c1f3593ef0 audioadapter: small cleanup 2020-04-12 20:44:19 +02:00
Wim Taymans
b18dacde9a spa: improve draining
Make a new DRAINED status.
Place the DRAINED status on an input IO when a stream is out of
buffers and draining.
All nodes that don't have HAVE_DATA on the input io need to copy
it to the output io and return the status. This makes sure the
DRAINED is forwarded and nodes return DRAINED from _process()
DRAINED on the resampler flushes out the last queued samples and then
forwards the DRAINED in the next iteration.
Emit a new drained signal from the context when a node returns
DRAINED. Use this to trigger the drained signal in the stream.
2020-04-07 17:58:43 +02:00
Wim Taymans
fdb5911e86 resample: use a 0 sized buffer to drain 2020-04-06 18:01:38 +02:00
Wim Taymans
7febf7ea25 improve debug 2020-04-06 18:01:19 +02:00
Wim Taymans
95906ca52e audioconvert: fix compilation 2020-04-04 20:03:11 +02:00
Wim Taymans
a5b0553328 Fix some -Wenum-conversion errors
Make pw_direction and spa_direction the same
Explicitly cast some enums or use the right enums
2020-04-04 20:03:08 +02:00
Wim Taymans
6937ec5e63 audioconvert: compile c version with right flags 2020-04-03 18:12:04 +02:00
Wim Taymans
28b0da626e Add missing file 2020-04-03 18:05:29 +02:00
Wim Taymans
0d1cef6b3a audioconvert: move some things around
To make it easier to add other implementations later.
Improve selection of resampler function
2020-04-03 18:03:42 +02:00
Wim Taymans
bf3ebb67aa neon: add alignment hints 2020-04-03 14:26:02 +02:00
Wim Taymans
167460a9bc fmt-ops: add arm32 optimizations 2020-04-03 14:09:46 +02:00
Wim Taymans
a81e269a7e neon: fix neon detection and compilation 2020-04-03 13:30:08 +02:00
Wim Taymans
ab3a6d3441 Fix some compiler warnings on arm 2020-04-03 13:18:02 +02:00
Wim Taymans
df5721ff47 neon: fix taps arguments 2020-04-03 10:31:55 +02:00
Wim Taymans
a87337cae8 neon: fix fallback 2020-04-03 10:22:58 +02:00
Wim Taymans
22e590c7cc stream: somewhat implement drain better
Abuse the xrun callback in the adapter to emit the drained signal until
almost all data left the resampler. This needs more work with a proper
signal and a buffer flag to signal the drain.
2020-04-02 17:46:50 +02:00
Wim Taymans
1b3aaba206 fmt-ops: set the right flags on optimized functions
Or else we could select an avx2 version on a non-capable CPU.

Fixes #227
2020-04-02 17:34:47 +02:00
Wim Taymans
b87c0a9270 clean up options
make sure we can use -v for verbose mode
2020-04-02 14:34:02 +02:00
Wim Taymans
1fd5be7101 neon: fix resample interpolation 2020-04-01 13:07:52 +02:00
Wim Taymans
74665de68e alsa-seq: keep track of last port
Keep track of the last port and only iterate until that port.
2020-03-31 17:52:22 +02:00
Gleb Popov
b552863ec9 Don't include alloca.h on FreeBSD. 2020-03-31 12:16:45 +02:00
Wim Taymans
e6675ff2a8 alsa-seq: unsubscribe when paused/suspended
When we are suspended or paused, unsubscribe from the ports so that
we don't block the hardware devices.

See #225
2020-03-31 12:14:52 +02:00
Wim Taymans
9b24a84ce6 fmt-ops: fix copy/paste error 2020-03-30 11:02:13 -04:00
Wim Taymans
527dc89365 fmt-ops: add neon optimizations for format conversion 2020-03-30 10:59:21 -04:00
Wim Taymans
67a5dd35be resample: add neon optimizations 2020-03-27 08:27:11 -04:00
Wim Taymans
397787ec3e spa-resample: getopt_long returns an int 2020-03-26 18:10:11 +01:00
Wim Taymans
a1846c9780 udev: don't loop forever on errors
When we can't find the v4l2 device id, unref the device and continue
instead of looping forever and consuming all memory.

Fixes #219
2020-03-24 15:54:58 +01:00
Wim Taymans
a880012e72 fmtconvert: order formats better
Place float and higher resolution formats first so that they are
selected first.
2020-03-24 11:47:41 +01:00
Wim Taymans
b8a1ea1d3a fmt-ops: fix 32 bit compilation
_mm256_extract_epi64 is only for 64 bits, add workaround for 32
bits.

Fixes #220
2020-03-23 14:18:10 +01:00
Wim Taymans
c4cf5e6629 bluez5: protect against NULL transport
The transport can be destroyed at any time, make sure we don't
crash when it does.
2020-03-23 13:49:30 +01:00
Wim Taymans
3cb019de51 vulkan: only set flags when buffer is in the io area 2020-03-19 18:09:30 +01:00
Wim Taymans
a9b191971c v4l2: fix buffer recycle
Only set the OUTSTANDING flag when we placed the buffer in an
io area and need to recycle it later.
When we captured a frame, put it in the queue. Then dequeue it
into the io area after recycling buffers.

Fixes #217
2020-03-19 13:15:49 +01:00
Wim Taymans
441fdb2333 alsa: fix buffer recycle
We only set the OUT flag when we put the buffer on an io area and
might need to recycle later.
Before placing the output buffer into the io area, recycle any
buffer that might be left in there.
Only emit the ready callback when we have some data queued.
2020-03-19 13:12:49 +01:00
Wim Taymans
acccccd2c0 Use SPA_IO_BUFFERS_INIT when we can
We should not have to initialize the state to NEED_DATA, anything
that is not HAVE_DATA is good. Also we need to set the buffer to
INVALID because else it might be recycled.
2020-03-19 13:09:21 +01:00
Wim Taymans
07f935a5ed add some more debug 2020-03-19 13:00:35 +01:00
Wim Taymans
b6dde8d76f vulkan: use image height of current cycle for buffer size 2020-03-18 17:21:38 +01:00