Commit graph

2541 commits

Author SHA1 Message Date
Wim Taymans 263adb45f4 audioconvert: fix compilation on armv7 2021-11-11 11:21:07 +01:00
Wim Taymans b75796054c spa: include dict.h
It causes a compiler warning on armv7
2021-11-11 10:59:23 +01:00
Pauli Virtanen 2329a4d323 bluez5: quirks for headset without a2dp duplex codecs
See #1756 (another headset with non-working, probably faststream duplex)
2021-11-08 08:25:55 +00:00
Barnabás Pőcze 01de0b966a spa: bluez: simplify and move handling of some AT commands
Simplify the key-value pair parsing for AT+IPHONEACCEV commands,
and move the handling of {key,indicator}-value pairs into
dedicated functions. Furthermore, fix a comment.
2021-11-04 18:42:29 +01:00
Barnabás Pőcze bdd7570c6f spa: bluez: simplify loop
`spa_list_for_each_safe()` is not needed as the list is not
modified during the traversal, so use `spa_list_for_each()`.
2021-11-04 17:16:14 +00:00
Barnabás Pőcze f71910c665 spa: bluez: rename variable
The `optlen` variable holds the size of a socket address,
so rename it to `addrlen`.
2021-11-04 17:16:14 +00:00
Barnabás Pőcze 6410a2dfa4 spa: bluez: fix spelling 2021-11-04 17:16:14 +00:00
Barnabás Pőcze 1f927838e2 spa: bluez: remove unnecessary return 2021-11-04 17:16:14 +00:00
Barnabás Pőcze 4bdf495747 spa: bluez: move profile selection to function
Move the profile selection from `profile_new_connection()`
into a separate function to avoid checking the string more
than necessary.
2021-11-04 17:16:14 +00:00
Barnabás Pőcze dd4587acef spa: bluez: change argument type
Take the `rfcomm` object directly instead of taking a `spa_source`
object and retrieving the `rfcomm` object via its `data` member.
2021-11-04 17:16:14 +00:00
Barnabás Pőcze 4cf889a5f0 spa: bluez: use switch
Use a switch statement instead of an `if` because it is more
suitable in the presence of `#ifdef`s, it avoids potential
unnecessary extra checks.
2021-11-04 17:16:14 +00:00
Barnabás Pőcze 73690d6662 spa: bluez: add missing else 2021-11-04 17:16:14 +00:00
Barnabás Pőcze 57ff7abc68 spa: bluez: use spa_startstartswith() where appropriate 2021-11-04 17:16:14 +00:00
Wim Taymans 86ca0f8466 acp: improve debug of channel map
Increase the size of the channel_map debug printf buffer.
Use a safer version of the snprintf that avoids buffer overruns.

See #1781
2021-11-04 16:41:32 +01:00
Wim Taymans abacea5ca0 libcamera: improve debug 2021-11-03 17:49:10 +01:00
Wim Taymans 0fd5e3fdb2 libcamera: implement allocation and dataflow
Keep track of the negotiated parameters and use those to construct
the Buffers param.

Use the FrameAllocator to allocate buffer memory. Keep a request for
each buffer and queue them.

In requestComplete, put the request metadata info into the buffer and
header and write the finished buffer id to a ringbuffer. Then wake up
the data thread to pop the finished buffer_id and push it in the
graph.

Remove some old files.
2021-11-03 17:49:10 +01:00
Wim Taymans b2c38a2b3b libcamera: work on rewrite
Use manager to hotplug devices
Use StreamConfig to enumerate formats
2021-11-03 17:49:10 +01:00
Wim Taymans 84ecebbd4e cpu: only run SSE code when supported
Check if we can run SSE instructions before executing the denormals
SSE code.

Fixes #1775
2021-11-02 20:12:35 +01:00
Aleix Pol 925644fbcc spa/meta: Expand the documentation of SPA_META_VideoDamage
A bit of explanation of how it's meant to be used.
2021-11-02 15:53:16 +01:00
Wim Taymans 859e95126b alsa-seq; use port_type to check port type
Don't use the capabilities for checking the port type.
2021-11-02 14:57:36 +01:00
Thomas Weißschuh 4921c5e94b defs: use intptr types where applicaple
Instead of doing pointer arithmetic through actual pointers, cast them
to the proper integer types.
This is functionally equivalent to the previous code but is clearer for
the compiler.

Fixes #1018
2021-11-02 09:54:10 +00:00
Pauli Virtanen bbc2136e89 meson: ensure all examples are included in doc
Move declaration of examples to use same file lists for build and docs.
2021-11-02 09:46:14 +00:00
Wim Taymans 9f134ee79d v4l2: add support for ParamBegin/End
To keep the device open while we perform a series of param
enumerations.
2021-10-29 15:41:27 +02:00
Wim Taymans 0ace131d72 audioconvert: add stereo deinterleave neon asm
This can take some shortcuts and convert twice as many samples in one
iteration as the strided stereo deinterleave one.
2021-10-28 11:30:04 +02:00
Wim Taymans 3471391e0e spa: add RequestProcess command and event
The event is emitted by a node that is not a driver but wants the graph
to be scheduled. The command is sent to the driver and suggest that the
graph be scheduled.
2021-10-27 11:16:53 +02:00
Wim Taymans eea6e7a1fb spa: add method to check if an object is fixated
See #1732
2021-10-25 18:08:10 +02:00
Wim Taymans 2cddd4a775 cpu: disable VFP asm when not available
Fixes #1746
2021-10-25 16:32:16 +02:00
Philippe Normand f0d3a7cf49 spa: alsa: Fix build warning
`type >=0` always evaluates to true, so remove this condition.
2021-10-25 07:26:15 +00:00
Philippe Normand 6b1c483cf7 spa: v4l2: Convert buf structure to union and fix alignment
The inotify_event field has a variable sized type, so it's recommended to store
it at the end of the storage unit. Fixes gnu-variable-sized-type-not-at-end warning.
2021-10-25 07:26:15 +00:00
Philippe Normand ec7ed1275e spa: alsa: Switch to explicit fallthrough
Use `__attribute__((fallthrough))` through the new FALLTHROUGH macro, if
supported.
2021-10-25 07:26:15 +00:00
Gleb Popov 12a4fbb425 Use uint16_t instead of int16_t to fix a compiler warning. 2021-10-22 19:05:18 +03:00
Gleb Popov e94adaac24 Don't include byteswap.h on FreeBSD, use sys/endian.h instead 2021-10-22 17:50:42 +03:00
Wim Taymans 651f0decea cpu: fix compilation on some architectures 2021-10-21 11:09:48 +02:00
Wim Taymans 1cacb64b19 node: make enum for TYPE_EVENT_Node properties 2021-10-19 15:21:10 +02:00
Wim Taymans 67209b9ecc resample: add some float math optimization
Multiplying and adding the smaller floats first will reduce the amount
of rounding errors.
2021-10-18 21:19:43 +02:00
Wim Taymans cc996b6292 resample: use blackman with 0.232 alpha
Gives much better results with less aliasing.
2021-10-18 21:09:16 +02:00
Wim Taymans e1898812b2 acp: remove duplicate AUX channels in pa channelmap
The pulseaudio channel map can only hold 32 AUX channels and we reuse
them when we need more. When we find a duplicate channel, map it to the
next AUX channels.
2021-10-18 10:53:07 +02:00
Wim Taymans a475926f87 acp: move pro channel init to init_auto 2021-10-18 10:51:48 +02:00
Wim Taymans 9dccd79191 acp: ensure we don't make invalid channels
There are only 32 AUX channels in pulseaudio so wrap around when we
have more.
2021-10-18 10:50:09 +02:00
Wim Taymans 6bb21d6abf acp: fix AUX13 channel mapping
Fixes #1727
2021-10-18 10:01:44 +02:00
Wim Taymans 061ab16415 resample: tweak params a little
Gives less aliasing in Sweep-float.wav.
2021-10-15 12:54:49 +02:00
columbarius 07d0b14955 spa: specify SPA_FORMAT_VIDEO_MODIFIER as DMA-BUF only
SPA_FORMAT_VIDEO_MODIFIER is only valid with DMA-BUF transport.
For using other types of buffers omit this property.
2021-10-14 20:19:21 +02:00
Wim Taymans 57b3fe537e v4l2: handle discrete and stepwize frame size enumeration 2021-10-14 10:15:34 +02:00
Pauli Virtanen 15d1ddfc6b bluez5: fix bugs in spa_bt_player
Fix uninitialized variable, error return.
2021-10-13 18:07:29 +00:00
Wim Taymans 54c0857d57 cpu: also pass the sse_args when compiling with SSE 2021-10-13 15:10:21 +02:00
Wim Taymans 14fd5425af cpu: use intrinsics to modify status register
For better portability. Also only use the code when we can compile with
SSE is available.
2021-10-13 15:00:09 +02:00
Wim Taymans c8c4923fcb spa: use log topics 2021-10-13 10:48:23 +02:00
Peter Hutterer c44d0a6bbc spa: declare a dependency for the dbus lib
When running meson test without a preceding ninja build, we end up with
missing libraries. This somehow happened to work until recently but now
it triggers an issue with libspa-dbus.so not being available during the
valgrind test run, causing a test case to fail.
2021-10-12 09:45:33 +10:00
Wim Taymans 85d5c8cd6c cpu: add zero_denormals method
Add a method to enable/disable the denormals flush-to-zero and
denormals-as-zero CPU options.

Add a config option to make it possible to disable this again.

Fixes high CPU usage when dealing with denormals, which can happen
in many DSP functions.

Fixes #1681
2021-10-11 14:57:02 +02:00
Wim Taymans 594f67ec04 a2dp: guard against transport NULL
The transport can become NULL so check that and don't try to
deref it.
2021-10-11 11:22:36 +02:00