Commit graph

2094 commits

Author SHA1 Message Date
Huang-Huang Bao
9384ba5500 bluez5: add properties for A2DP codec sample rate & channel mode configuration
Those properties are set as reference sample rate and channels number for A2DP configuration selecting.
2021-05-03 10:07:42 +00:00
Wim Taymans
15239ff74d channelmix: only run the LFE filter when upmixing
Only run the lowpass filter on the LFE channel when we are upmixing
and there is a valid cutoff frequency defined.

Otherwise we might filter away a valid LFE channel.

Fixes: rhbz#1941366
2021-05-03 11:50:47 +02:00
Wim Taymans
ebe5fa7809 dbus: clean up sources and connections
Set source user data for all dbus sources and set a destroy notify
when removed.
Remove the dbus user data to remove the source user data.
Clean up remaining sources when destoying a connection
Clean up remaining connections when freeing the dbus plugins.

Fixes #1114
2021-05-01 09:33:06 +02:00
Andrea Gelmini
85b136d8ce Fix typos
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-04-30 16:27:34 +00:00
Andrea Gelmini
36ebbfa71c
Removed duplicated includes
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-04-30 18:16:25 +02:00
Wim Taymans
ca72738fee dbus: add some more debug in the plugin 2021-04-30 12:23:10 +02:00
Andrea Gelmini
47ef2b6b09 Fix typos 2021-04-30 07:40:20 +00:00
Wim Taymans
3af6e248da acp: emit softMute values, not monitorMute
We don't want to influence the monitor mute, just the
real mute and softMute.
2021-04-29 17:18:25 +02:00
Wim Taymans
664df03bbb audioconvert: track and emit all volume
Let both channelmix and merger remember all volumes so that they can
be emited when they change.
2021-04-29 15:23:33 +02:00
Wim Taymans
5bf2144438 spa: improve volume handling
Make a new softVolume property that contains only the soft volume
to apply.

In the case of HW/SW volume, we pass the real volume in the
channelVolume and the leftover volume in softVolume. We don't
use the monitorVolume for this anymore because it is a completely
separate volume handled by the merger node.

This way, channelVolume always represents the effective volume
set on routes, channelmix and merger and only the softVolume (when
available) is applied as software volume by channelmix.

This makes things map a bit better to what is actually happening with
the real volume and leftover software volumes after applying the
hardware volumes in the device.

With this change, the volume on the monitor is not affected by the
sink volume anymore and we can use the monitorVolume for this later.

This also means that the monitor volume in pavucontrol of the sinks
does not change when the sink volume changes. PulseAudio is inconsistent
here: If the volume is HW, the monitor volume is not affected, if the
volume is SW, it is. In PipeWire there is an option in merger to
let the volume affect the monitor with monitor.channel-volumes = true.
2021-04-29 12:46:29 +02:00
Wim Taymans
48a6cc2575 audioconvert: refactor the volume items in a struct 2021-04-29 11:36:05 +02:00
Wim Taymans
b3d94bf019 improve debug 2021-04-28 17:04:16 +02:00
Wim Taymans
3424d10231 Revert "acp: use the right profile name and description"
This reverts commit 09106151d3.

We need the actual name and description of the mapping, not the
profile or else we end up with the full profile description in the
node description instead of the part of the profile that applies to
the device.
2021-04-27 16:43:13 +02:00
Wim Taymans
5724093343 audioconvert: run lr4 on tagged channels in generic case
Mark the LFE channels and run the lowpass filter on them in
the generic case. Generates LFE correctly in 2.1 upmix case.

See #1095
2021-04-26 17:34:14 +02:00
Wim Taymans
71824d0b03 audioconvert: debug selected function name in channelmix 2021-04-26 17:33:45 +02:00
Pauli Virtanen
34e78611ac bluez5: don't unregister HFP/HSP profiles when shutting down
This apparently causes delays in shutdown under some conditions, and
closing the DBus connection should be enought to tell BlueZ that we are
shutting down.
2021-04-26 08:23:29 +00:00
Evgeniy Khramtsov
7888be6eb3 alsa: depend on epoll-shim and libinotify on FreeBSD
FreeBSD does not have epoll or inotify in the base.
They are implemented in third-party libraries.
2021-04-23 20:52:24 +03:00
Wim Taymans
3fd8f62e21 acp: sync with pulseaudio
Remove our custom hack to work around missing duplex and use
upstream fix.
2021-04-22 12:25:48 +02:00
Huang-Huang Bao
8129b6658e bluez5: rename 'bluez5.reconnect-profiles' property to 'bluez5.auto-connect'
Avoid confusion with 'ReconnectUUIDs' in bluez policy config. See #1081.
2021-04-22 07:36:47 +00:00
Huang-Huang Bao
f44d00424f bluez5: don't clear dynamic node flag from node id in volume changed handler
It causes transport state handler don't emit node removing info.
Fixes #1080.
2021-04-22 07:34:02 +00:00
Jonas Holmberg
ad0d7ef9f2 spa: Fix build without v4l2
libudev_dep was not required if only alsa was enabled.
2021-04-22 07:27:14 +00:00
Huang-Huang Bao
01f2c91b89 bluez5: fix HSP HS profile enumeration
HSP don't supports codec switching.
2021-04-21 08:58:48 +00:00
Huang-Huang Bao
30e4e56852 bluez5: enable HSP HS volume control
It's only enabled for HSP AG previously.
2021-04-21 08:54:10 +00:00
Huang-Huang Bao
f56d08297d bluez5: correct RFCOMM command to set HSP HS volume 2021-04-21 08:54:10 +00:00
Huang-Huang Bao
0dde4f8774 bluez5: cache a2dp volumes activation info
So we don't get a sudden boost on soft volumes when switching profile/codec.
2021-04-21 08:54:10 +00:00
Wim Taymans
5240850bc1 bluez: set device description to the bluez alias
Just like how PulseAudio does it.

Fixes #1064
2021-04-20 16:57:44 +02:00
Wim Taymans
a9b8aa27c1 media-session: improve bluetooth icon name
Move the icon we get from bluez to a separate property, it is not
a good icon to show.
Copy form factor from device to node properties.
Set device.bus in the device properties and copy it to the node
properties.
Use form factor and bus to make a nice icon-name for the node and
device.

Fixes #1064
2021-04-19 13:21:32 +02:00
Wim Taymans
18c4af9add libcamera: fix compilation
Fixes #1068
2021-04-18 20:34:24 +02:00
Huang-Huang Bao
98d1a3cb16
bluez5: improve bluetooth profile descriptions, make them more translatable 2021-04-18 16:53:45 +08:00
Nils Tonnätt
f47a7a8ea3 Rearrange libudev dependency
Make libudev dependency required if v4l2 feature option is set to enabled or
auto, or if alsa dependency is found or enabled through pipewire-alsa or alsa.
2021-04-18 07:58:49 +00:00
Wim Taymans
f95ecf95ba spa: don't overrun the input array
Read one byte less than the size of the buffer so that we still have
room in the buffer to append the 0 byte.
2021-04-17 19:43:55 +02:00
Huang-Huang Bao
edee633f96
bluez5: add property to enable hardware volume control 2021-04-17 19:35:46 +08:00
Huang-Huang Bao
387f7e327f
bluez5: add support for HSP/HFP hardware volume control
Only native backend is fulfilled.
2021-04-17 19:07:35 +08:00
Huang-Huang Bao
80f6ddf526
bluez5: add hardware volume support
Add necessary apis to bluez transport.
Add A2DP(AVRCP) absolute volume support. Source volume can only update to adapter node but not from due to AG nodes don't have route.
Since A2DP/HSP/HFP volume is already percentage itself, it has been mapped to pulseaudio volume then converting to linear volume.
2021-04-17 19:07:35 +08:00
Wim Taymans
f27ad659f8 spa: add property to force VM
Also add PIPEWIRE_VM to force a VM type.
2021-04-16 16:50:34 +02:00
Wim Taymans
ce828af9e1 spa: add cpu method to get the VM type
Make a method to query the VM we are running on.
2021-04-16 16:50:34 +02:00
Wim Taymans
fa3bd6b0e1 channelmix: support more than 19 channels
The channelmatrix was limited to the 19 known channels, leaving
only the first 19 channels usable.

Use the full 64x64 matrix instead and make sure to fill all 64
channels with the identity matrix in the case we need to copy or
distribute the matrix to unknown positions.

See #57
2021-04-16 10:56:24 +02:00
Wim Taymans
9c8a578e21 v4l2: don't select DmaBuf when the type mask is invalid
an invalid data type mask means that the caller did not explicitly
allowed DmaBuf so fall back to memptr or memfd.

Fixes #1054
2021-04-15 20:42:11 +02:00
Wim Taymans
cd79cdfb40 libcamera: use the data type mask to select a type
In alloc_buffers we need to look at the data types mask.
Select DmaBuf when not invalid and the DmaBuf flag is set, otherwise
select memptr.

See #1054
2021-04-15 20:40:16 +02:00
Wim Taymans
6e0ba50a9c libcamera: use the buffer datatype as the port type
In use buffers we need to respect the buffer data type.
2021-04-15 20:39:12 +02:00
Wim Taymans
036c54b043 Add i18n support for some more user-visible strings 2021-04-15 17:56:40 +02:00
Wim Taymans
c90332a6bf acp: make sure all descriptions are translated 2021-04-15 17:56:40 +02:00
Wim Taymans
09106151d3 acp: use the right profile name and description 2021-04-15 17:56:40 +02:00
Wim Taymans
043178e16b spa: improve i18n method
Make the method names match the fields in the method.
2021-04-15 17:56:40 +02:00
Huang-Huang Bao
d44955a199 a2dp: handle source transport destroy
Fix a use-after-free to transport if node is still running.
This revert part of a75fe69c8e.
2021-04-15 06:59:19 +00:00
Peter Hutterer
3de2d1c99c spa: use meson's install_subdir to install our header files
All files in spa/include are being installed anyway, so to avoid having to
list each file one-by-one let's use meson's install_subdir() to install all
of them in one go.
2021-04-15 06:57:00 +00:00
Peter Hutterer
223f20709d meson: replace join_paths(a, b) with a / b
More readable and from the meson reference manual:
(since 0.49.0) Using the/ operator on strings is equivalent to calling join_paths.
2021-04-15 06:57:00 +00:00
Peter Hutterer
8c369b0a58 spa: install i18n header
Added in 01fe9100e2, fails the ci's
check-missing-headers script
2021-04-15 13:48:25 +10:00
Wim Taymans
3babedec9c acp: get i18n interface from support and use it
Save the i18n interface in a global variable. Make acp use the support
interface when translating strings.
2021-04-14 18:03:46 +02:00
Wim Taymans
7ee23a046c acp: avoid warning for i18n string
spa/plugins/alsa/acp/channelmap.h:466:9: warning: format not a string
literal and no format arguments [-Wformat-security]
  466 |         pa_snprintf(s, l, _("(invalid)"));
2021-04-14 18:03:45 +02:00