Commit graph

2508 commits

Author SHA1 Message Date
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
Pauli Virtanen 4b831021fb bluez5: add a dummy AVRCP player as a workaround
Some devices (Bose Mini Soundlink II, Air 1 Plus, ...) don't enable
AVRCP volume control, or fail to enable it before a hardware button is
pressed.  However, these devices appear to enable it, if an AVRCP player
is present.

As a workaround, register a dummy AVRCP player for each adapter. It only
displays the current transport acquisition state as playing/stopped, but
just its presence appears to be enough to make devices behave.

Multiple AVRCP players interfere with each other, as BlueZ uses the one
registered earliest as the default player. So add also a config option
for disabling this. (It's not common to have mpris-proxy etc. running,
so defaulting to true should be OK.)

See pipewire#1157
2021-10-10 16:24:41 +03:00
Pauli Virtanen 98a0e54d5f doc: link examples to Doxygen docs
Include examples to the documentation, using Doxygen's example system.
2021-10-10 00:35:46 +03:00
Wim Taymans f6d69f9bcd resample: avoid NULL deref
The function is NULL when the resampler was not initialized.

Fixes #1706
2021-10-09 15:53:40 +02:00
Pauli Virtanen d28b36bb93 bluez5: fix HFP backend behavior when BlueZ goes away
Ensure unavailable backends get unregistered.

Don't log error-level messages on HFP unregistration failures.
2021-10-09 13:03:08 +00:00
Wim Taymans 5f7c4dec34 meson: make it possible to compile without dbus
Make an option to disable dbus and all the code that depends on
it.

Fixes #1685
2021-10-09 15:00:04 +02:00
Wim Taymans 04344dad20 spa: add mjpg and h264 format build helpers 2021-10-08 13:21:07 +02:00
Björn Daase cf38b7bdc4 fix codespell issues 2021-10-07 15:26:18 +00:00
Björn Daase 10ededf5d4 bluez5: fix mSBC probing documentation 2021-10-07 15:25:29 +00:00
Wim Taymans 466715672e log: fix logger fallback
The logt function should fall back when both the logger implementation
version is too low or when the method is not implemented.

We can use the new spa_callback_call return value to efficiently
handle this.
2021-10-07 10:15:21 +02:00
Wim Taymans 2435f0d7ff hook: we can use the spa_callbacks_call return value now
instead of reimplementing the check.
2021-10-07 10:14:43 +02:00
Wim Taymans 68748895ea hook: add spa_callbacks_check
That does a version and method check on the callbacks.
2021-10-07 10:13:06 +02:00
Wim Taymans bb950976da hook: make spa_callbacks_call return true
Make spa_callbacks_call return true when the method could be called
succesfully. This means the callbacks version was correct and the
method existed.

This can then be used to implement a fallback.
2021-10-07 10:10:53 +02:00
Pauli Virtanen ff8c3d208e bluez5: fix msbc connect probe again
There's a report that on Intel 8086:2723 + Sony WH-1000XM4, the connect
probe shuts the device down.

So, use an invalid dst address instead, since we don't need the host to
be up.

Fixes: 84bc0490a5
Fixes: 717004334b
2021-10-06 19:33:54 +03:00
Dennis D 3512444296 bluez5: update bluez-hardware.conf
Closes https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1686
2021-10-05 18:23:56 +00:00
Pauli Virtanen 49901f2d61 doc: add brief explanations for all groups 2021-10-04 20:55:04 +03:00
Pauli Virtanen c620121529 bluez5: add faststream quirks
For some devices FastStream causes problems. Add quirk for disabling it.
2021-10-03 20:55:02 +03:00
Pauli Virtanen 84bc0490a5 bluez5: tweak msbc adapter probe for Intel adapters
The msbc capability connection probe seems to cause problems on Intel
Bluetooth 8087:0a2b (Intel 8265), resulting to subsequent connections
apparently ending up with wrong altsetting.

According to testing, the problem is connecting to self, so connect to
device instead.

Fixes #1671
2021-10-03 17:27:42 +00:00
Pauli Virtanen 8159797f89 doc: reorganize Doxygen groups/modules to make more sense
The Doxygen "Modules" page is not very illuminative, as different parts
of the API are mixed together and not all parts are included.

Try to address this:

Put all parts of the public API to some Doxygen group, usually one group
per header file. Use short, systematic names.

Make these groups sub-groups of a few top-level groups, roughly
corresponding to the different logical parts of the API (core, impl,
stream, filter, spa, utilities).
2021-10-03 15:39:27 +03:00
Pauli Virtanen de7f78f4bd doc: add \copydoc, \sa links for (struct methods) function/macros
Add manually cross-references for struct methods callback
macros/functions, in cases where they're too hard to parse for the
Doxygen input filter.
2021-10-03 14:12:49 +03:00
Wim Taymans 392b2f1f96 dbuf: use log topic 2021-10-03 12:27:20 +02:00
Wim Taymans 783ae4d4e9 libcamera: use log topic 2021-10-03 12:26:00 +02:00
Wim Taymans 865635ef10 v4l2: use log topic 2021-10-03 12:12:09 +02:00
Wim Taymans dfdd9a6b3b alsa: don't prefix NAME, log topics are enough 2021-10-03 08:05:40 +02:00
Pauli Virtanen a86ff85444 bluez5: tolerate devices sending incorrect AAC caps
There is a report (#1342) of a device setting multiple bits for AAC
object type in SetConfiguration, although this appears to be forbidden.

It's not completely clear if this was due to e.g. some BlueZ bug, but it
should be safe to be lax and try to guess what is wanted in such case,
instead of being strict, in case it was due to device bug.
2021-10-02 10:29:48 +00:00
Pauli Virtanen 3092e4a7be bluez5: implement validate_config for AAC
Allows bailing out earlier on invalid config, and setting transport
channel info.
2021-10-02 10:29:48 +00:00
Pauli Virtanen 58c7caf1bc bluez5: use log topics
Use log topics instead of prepending NAME: to log messages.
2021-10-02 12:46:02 +03:00
Wim Taymans 9a76feb913 libcamera: handle MemFd buffers
Use EXPBUF when requesting MemFd buffers because it is mostly correct
for v4l2.
2021-10-01 13:19:14 +02:00
Wim Taymans 487792941d libcamera: remove \n in log lines 2021-10-01 12:28:53 +02:00
Pauli Virtanen d6509a243d bluez5: fix device.profile setting
Only keys with names starting with "bluez" are passed on to device
settings dict. Rename device.profile to match this.

Also add some debug.
2021-09-30 22:39:34 +03:00
Pauli Virtanen e84f1c6eed bluez5: update bluez-hardware.conf
Closes #1592
2021-09-30 20:01:06 +03:00
Wim Taymans d71a10b7fa libcamera: handle failure gracefully
Don't try to access NULL pointers
2021-09-30 12:54:29 +02:00
Wim Taymans f8817b4394 cpu: fix compilation on ARM 2021-09-30 11:12:27 +02:00
Peter Hutterer abd5f9fbe8 Remove remaining tabs from meson.build files
No changes, just tab-to-space replacement and a little bit of manual
twiddling.
2021-09-30 00:08:27 +00:00