Commit graph

6222 commits

Author SHA1 Message Date
Andrea Gelmini 47ef2b6b09 Fix typos 2021-04-30 07:40:20 +00:00
Sebastian Goth 379068c31d Clarify alsa device.profile-set setting
Missing the .conf changes the profile name reported by pactl
but has no effect
2021-04-29 16:27:58 +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 620c863b6d pulse-server: track and set monitor volume on monitor sources 2021-04-29 15:25:04 +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 a76032a637 client-node: use the right port for io
To set the io on the mixer ports, we need to use the same id that
was used to add the port, not the id we use to identify the mixer
structure.

Fixes #759
2021-04-28 17:04:36 +02:00
Wim Taymans b3d94bf019 improve debug 2021-04-28 17:04:16 +02:00
Evgeniy Khramtsov 093a427b11
cirrus: build media session on FreeBSD
FreeBSD ports tree does not have alsa-lib >=1.1.7 yet,
build the newer one locally in CI until a newer version
of alsa-lib lands to the FreeBSD ports tree.
2021-04-27 20:05:29 +03: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 407489cd71 conf: remove X bit from config files
Fixes #1107
2021-04-27 15:38:59 +02:00
Wim Taymans 3496327e69 Add echo-cancel module
Only implement the null echo cancel implementation for now.
And skeleton webrtc echo cancel implementation

It uses 4 streams arranged as:

 input ---+---> source
          ^
	  |
 sink  ---+---> output

The output of the source is the filtered input of the input stream
(linked a master source) based on the data going from sink to
the output (linked to a master sink).

All streams are arranged in the same group so that the echo canceler
does not have to deal with clock drift. For echo cancelers that can
handle clock drift we might want place the source and sink chains
in different groups.
2021-04-27 09:56:54 +02:00
Evgeniy Khramtsov 684c1b10f7 cirrus: add gettext on FreeBSD
Add gettext on FreeBSD via localbase.
This fixes the Cirrus CI FreeBSD job.
2021-04-26 15:37:55 +00: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
Wim Taymans 27d98478ab modules: set right library variable 2021-04-26 10:45:44 +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
Pauli Virtanen 20c8d7b29e pulse-server: keep track of seq in pw_*_enum_params
If multiple async enum param are running at the same time, take results
only from the latest one.
2021-04-25 20:56:57 +03:00
Pauli Virtanen 462c50acd6 media-session: keep track of seq in pw_*_enum_params
If multiple async enum param are running at the same time, take results
only from the latest one.
2021-04-25 20:56:57 +03:00
Piotr Drąg 5c23dd6311 Update Polish translation 2021-04-25 11:48:35 +00:00
Wim Taymans a611128a79 media-session: fix match rule
When matching without regex, don't just to a startswith check but also
check that the sizes of the strings match.

Fixes #1098
2021-04-25 13:47:23 +02:00
Wim Taymans 53cd601869 pulse-server: apply node.name to all streams
Pass properties as global properties so that they are applied
to both streams. Make sure node.name is set on both streams so that
they look good in tools like carla.
2021-04-25 10:37:51 +02:00
Wim Taymans 5d104994c0 pulse-server: mark remap source and sink passive
Make sure the links to the real source/sink are passive links so that
the virtual sink is suspended with the real sink when unused.
2021-04-24 19:46:06 +02:00
Wim Taymans 5df0f6b4ad media-session: make passive links when requested 2021-04-24 19:45:45 +02:00
Wim Taymans 28ea5b794d node: make node.passive property
This can be used to instruct the session manager to create passive
links on input/output/all ports.
2021-04-24 19:44:49 +02:00
Eric S. Edstrom d2de4a2248 Fix typo and remove unnecessary capitalization 2021-04-24 14:06:35 +00:00
Evgeniy Khramtsov 4d064a3718 meson: prefer libintl on FreeBSD
FreeBSD does not have gettext in libc.
It is implemented in the third-party library.
2021-04-23 22:57:51 +03:00
Evgeniy Khramtsov 097510cffe examples: depend on libinotify on FreeBSD
FreeBSD does not have inotify in the base.
It is implemented in the third-party library.
2021-04-23 21:00:44 +03: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 962d3b9127 modules: don't add CLIENT_ID when lingering
Because the object is not destroyed when the client is destroyed
and so the client.id might become invalid.
2021-04-23 11:19:25 +02:00
Wim Taymans d560628e2a module-loopback: copy name and description
Also copy name and description to streams when speficified globally.
2021-04-23 11:00:47 +02:00
Wim Taymans ab7bc6ed27 pulse-server: add remap sink and source modules 2021-04-22 20:44:55 +02:00
Jonas Holmberg 1e6b7b8a83 module-protocol-native: Handle pending connect
Do not return an error immediately if connect() fails with EAGAIN. Check
if it completed successfully with getsockopt() when the socket becomes
writable instead.

This is the way to handle non-blocking connect() by the book but after
testing it seems that the case when connect() fails with EAGAIN is when
the listen backlog is full on the server side and in that case the
server socket is closed. So even though connect() completes successfully
according to getsockopt() the client socket is no longer usable
(on_remote_data() will get both SPA_IO_OUT and SPA_IO_HUP in mask on the
first call after connect() returned EAGAIN).
2021-04-22 17:46:00 +00:00
Wim Taymans 330e694e63 module-loopback: handle per stream channels and positions
Make it possible to specify different channels and positions
per stream so that we can do remapping as well.
Make sure we only copy available input channels and set the remaining
channels empty.
2021-04-22 18:38:16 +02:00
Wim Taymans 74430871fb pulse-server: implement the loopback module with module-loopback 2021-04-22 17:26:04 +02:00
Wim Taymans 115be6d5fc module-loopback: cancel pending work items when destroying 2021-04-22 17:24:59 +02:00
Wim Taymans c52637f783 pw-loopback: implement with the module
Implement pw-loopback by loading the module-loopback.

Fixes #1061
2021-04-22 16:16:21 +02:00
Wim Taymans 7d79c71178 module-loopback: parse node.latency 2021-04-22 15:46:09 +02:00
Wim Taymans 93d1c8f31d modules: improve loopback module
Handle error when loading and fix leaks.
Mark streams as virtual if nothing else is specified.
Try to reuse an existing core connection if possible.
unload the module when the core is in error or when it is destroyed.
2021-04-22 15:34:21 +02:00
Wim Taymans 3b021cc4ed modules: add module-loopback
Add a new loopback module that can also create virtual-sink and
virtual-source.
2021-04-22 13:08:20 +02:00
Wim Taymans 0e8e1de17d media-session: make sample-rate optional in policy-node
When deciding on the number of channels to use for the node,
ignore parsing the sample rate. This makes it possible to activate the
node with a missing rate property, like when the node can do all
possible rates.
2021-04-22 13:07:19 +02: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
Wim Taymans f0fc4f7fc6 0.3.26 2021-04-22 11:58:59 +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 0ddfbc0f62 systemd: Increase backlog for unix sockets
Use the default backlog size, SOMAXCONN (128), which is the same as for
the unix socket in module-protocol-native. If the backlog queue gets
full incoming connections will be closed before they can be accepted.
This causes connect() to fail with EAGAIN on the client side and since
the server socket is closed it will not be possible to use the client
socket further.
2021-04-22 07:30:51 +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
haval0 0c6016c0c0 fix tools > tool typo 2021-04-21 14:40:56 +00:00
Wim Taymans 8294a4f42c Add vm.overrides property in pipewire and pulse-server
Apply vm.override properties when running in a VM. Increase the
default quantum to 1024 when running in a VM to cause less
dropouts.
2021-04-21 15:58:30 +02:00