Commit graph

9807 commits

Author SHA1 Message Date
Wim Taymans
b46d8a8c92 alsa: force playback start when buffer is full
When we try to play data but the ringbuffer is full, we need to start
the device or else we will stay in this situation forever and stay
silent.

Fixes #2830
2022-11-16 20:45:38 +01:00
Wim Taymans
50a24ac69e acp: do probing in 44100 Hz again
Some devices don't seem to work when probed in 48000 so bring it back
to 44100 until we figure out what is going on.

Fixes #2718
2022-11-15 16:30:26 +01:00
Wim Taymans
086ad336ad audioconvert: redo setup when format changes 2022-11-15 16:29:46 +01:00
Wim Taymans
bf3516ba04 audioadapter: perform setup again after a PortConfig
After the ports are reconfigured, we need to perform the setup again so
that buffers and processing can happen with the right settings.

This fixes an issue when autoswitching between A2DP and HFP with
bluetooth headsets when there is also a stereo capture device available.
The input stream of the browser is quickly reconfigured between stereo
and mono with only a Pause command in between, clearing the setup state
is enough to redo the setup when going back to Playing.

Fixes #2764
2022-11-15 15:40:47 +01:00
Wim Taymans
88dec1d378 impl-module: turn warning into info
Errors while loading a module does not have to be fatal, it depends on
the config flags. Turn an error into info and log an error only
when needed.
2022-11-15 09:41:48 +01:00
Gleb Popov
525e7aa734 FreeBSD build fixes. 2022-11-14 21:03:22 +03:00
Gleb Popov
018058ea35 Fix copy-paste typo in the warning message. 2022-11-14 20:58:14 +03:00
Gleb Popov
781b7b187a Add a type cast necessary to compile on FreeBSD. 2022-11-14 19:57:08 +03:00
Barnabás Pőcze
14e044a92c spa: bluez: backend-native: fix filtered number memory leak
The `number_filtered` variable was dynamically allocated but never freed.
2022-11-14 16:15:21 +00:00
Wim Taymans
93d2571b30 libcamera: fix device id assignment
Find a free id from the available ids instead of just taking the current
number of devices, which would give assign the same id to multiple
cameras when: added 0, added 1, removed 0, added 1.
2022-11-14 16:04:21 +01:00
Wim Taymans
a57590e334 libcamera: emit device removal event
We need to emit the device id with NULL info to emit a device remove
event.

Also indent some code properly.
2022-11-14 15:38:16 +01:00
Wim Taymans
4da154c3a9 libcamera: handle errors better
Make sure we disconnect the request complete handler when we failed
to start.
Stop the camera when we failed to queue our requests.
2022-11-14 13:24:07 +01:00
Wim Taymans
b913f1b1a7 add some more debug 2022-11-14 11:23:12 +01:00
Wim Taymans
bf8981ef61 libcamera: fix setting controls
Use the set_control function of v4l2 and libcamera also to set
properties from a sequence.
2022-11-14 11:22:53 +01:00
Wim Taymans
cfb226b0fb v4l2: improve debug
Add device path to debug lines.
2022-11-14 11:22:53 +01:00
Dmitry Sharshakov
e0c9f87d78 bluez5: backend-native: prevent string overflow
Fixes -Wfortify-source when building
2022-11-13 15:13:33 +03:00
Wim Taymans
41d8afa404 pipewire: increase max-rates to 32 2022-11-13 09:40:49 +01:00
Wim Taymans
ea4e5cf364 context: avoid useless graph recalculations
Only recalculate the state of the graph when we actually managed to
suspend a driver node.
2022-11-11 19:41:49 +01:00
Wim Taymans
04aa803d7e test: avoid compiler warnings when SSE is not enabled
Refactor the sample test and run the test against itself to make
sure we use all variables at least once.
2022-11-11 12:09:22 +01:00
Wim Taymans
518ccdf624 jack: add jack.filter-char to specify the filter character 2022-11-10 17:40:25 +01:00
Wim Taymans
b720da771e pulse-server: also advance read pointer in underrun
So that we ask for more data from the client.

Also retested with #2799 that caused this regression.

Fixes #2821
2022-11-10 16:13:33 +01:00
Wim Taymans
38382d002d 0.3.60 2022-11-10 10:07:28 +01:00
Wim Taymans
e3ece6db54 gst: hide the libcamera device provider 2022-11-10 09:38:46 +01:00
Wim Taymans
8d6ff6137d audioadapter: remove checks for format
This is meant to be a filter for the follower format and can thus
contain wildcards.
2022-11-09 16:29:04 +01:00
Wim Taymans
85ffe68ea3 Revert "adapter: removed unused follower_current_format"
This reverts commit 6c963ed933.

This code was meant to set a filter on the format for the follower
but is not implemented yet.

Problem is that the unit tests and wireplumber call this code and would
need to be patched.
2022-11-09 16:24:49 +01:00
Wim Taymans
6c963ed933 adapter: removed unused follower_current_format 2022-11-09 16:03:18 +01:00
Wim Taymans
b07e0c1445 audioconvert: debug in and out positions 2022-11-09 15:19:46 +01:00
Wim Taymans
bb002a3eef test: add test for 6p1 to 5p1 with remapped REAR
See #2809
2022-11-09 09:41:21 +01:00
Wim Taymans
39bfc0cb56 test: add more 5p1 to 6p1 tests
See #2809
2022-11-09 09:24:03 +01:00
Wim Taymans
25e3144887 audioconvert: skip upmix when moving channels
When we use SIDE for REAR, don't try to upmix REAR channels and vice
versa.
2022-11-09 09:24:03 +01:00
Dmitry Sharshakov
bb24c8545d pw-uninstalled: make v4l2 easily available 2022-11-08 20:45:50 +00:00
Wim Taymans
a500abaf90 tests: add some more 6p1 conversion tests
Also add a 6p1 to 5p1 downmix test.

See #2809
2022-11-08 18:10:11 +01:00
Wim Taymans
cadb7b4910 audioconvert: set SSE flag on SSE function
Or else it might be selected even when we don't run on an SSE capable
machine.
2022-11-08 18:09:02 +01:00
Wim Taymans
c8e2c4fcd6 audioconvert: debug the conversion matrix with info level 2022-11-08 17:39:16 +01:00
Wim Taymans
9cfc0eff48 audioconvert: upmix RC 2022-11-08 17:38:55 +01:00
Wim Taymans
8a2e154bae v4l2: turn some info to debug again 2022-11-08 16:37:22 +01:00
Wim Taymans
0d24f6b35f v4l2: Use the node format when available
When the node we try to link to already has a format, return that to the
application because we can't renegotiate to a new format.
2022-11-08 16:25:21 +01:00
Wim Taymans
f6d7d4372b libcamera: add Format to node params as well 2022-11-08 16:24:27 +01:00
Wim Taymans
53796a45cd v4l2: mark the fd as closed instead of -1
Or else we won't be able to close the fd later.
2022-11-08 15:47:55 +01:00
Wim Taymans
67dcb72295 loop: don't assert in cleanup
Just issue a warning instead of asserting. Firefox does strange things
to the fds that make things crash otherwise.
2022-11-08 15:45:55 +01:00
Wim Taymans
cb18c5877b libcamera: check for item in map correctly
Fixes #2817
2022-11-08 10:41:18 +01:00
Pauli Virtanen
e96b0ed4a8 alsa: minor fixes in seq code
port_enum_params should use right param id for SPA_PARAM_Format.

Fix typoed , instead of ; at end of line. Pop frame before putting
state.offset, in case there would be padding added (apparently usually
no).
2022-11-08 09:33:56 +00:00
Pauli Virtanen
e381a26de9 bluez5: don't put side effects into spa_log_* arguments
spa_log_* are macros such that their arguments don't get executed if the
log topic is not enabled.
2022-11-07 20:22:45 +02:00
Julian Bouzas
bc2a02c283 echo-cancel: add option to make echo-cancel sink node a monitor
The monitor mode does not create a echo-cancel-playback node, and makes the
echo-cancel-sink node to be a monitor node with media class Stream/Input/Audio
(instead of Audio/Sink).

Some applications get confused when their output stream node is not linked
directly to the actual device node. Having echo-cancel-sink as a monitor node
avoids this problem, allowing those applications to work properly even if echo
cancel is enabled.

This mode is disabled by default. You can enable it by passing the specific
option  (monitor.mode = true) in the args when loading the module in the
pipewire context.modules configuration section.
2022-11-07 17:21:21 +00:00
Wim Taymans
34db6b80c6 context: improve graph rate selection
If a node suggests a graph rate that is not in the list of allowed
rates, find the closest matching rate in the allowed rate instead of
just using the default.

When playing a file with a rate of 352800 and allowed rates of 44100,
48000, 96000 (default rate 48000) this will switch the graph to 96000
instead of the default 48000, which requires less resampling.
2022-11-07 17:58:16 +01:00
Dmitry Sharshakov
02a4758043 bluez5: aac, lc3plus: report bitpool changes
Behavior similar to SBC. This makes return value useful for media-sink logger.
2022-11-07 16:32:53 +00:00
Dmitry Sharshakov
1bea58c20b bluez5: media-sink: fix bitpool increase
The free buffer check must happen before writing to check for leftover data in buffers. In case data is left over from previous submission, bitpool mustn't be increased.
Also improved logging by adding bitpool to the log message.
2022-11-07 16:32:53 +00:00
Dmitry Sharshakov
79b95e083a bluez5: backend-native: report HFP AG battery indicator to UPower 2022-11-07 16:32:17 +00:00
Jonas Holmberg
bac7b10226 gitlab-ci: Add readline dependency 2022-11-07 16:30:40 +01:00
Jonas Holmberg
050a51aab3 meson_options: Add readline option
Make it possible to disable code that depends on readline even if
readline is pulled in by another dependency, like bluez.
2022-11-07 16:16:12 +01:00