Commit graph

6385 commits

Author SHA1 Message Date
Wim Taymans
3c11b75e32 pw-cli: allow setting keys by their value.
Makes things like:

  pw-cli s 102 Props '{ 16777216: 1.2 }'

work. Useful when dealing with custom properties that don't have a name
in the type array.
2021-05-03 11:50:42 +02:00
Wim Taymans
9206fb019f stream: add support for Props param
Rework the node and port info management a little.
Make sure we emit a node info event when the Props param changed.
Implement enum_param on the node.
2021-05-03 11:50:36 +02:00
Wim Taymans
8bbb78d2bd filter: the node only has a Props param 2021-05-03 11:50:27 +02:00
Wim Taymans
e1fee18148 stream: support setting properties
Setting Props param will then be forwarded to the stream param_changed
signal and the stream can implement custom properties.
2021-05-03 11:50:18 +02:00
Andreas Schnebinger
61dd645c63 Fix shellcheck warnings 2021-05-02 10:38:51 +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
7145b2becf pw-cli: add support for creating Struct in pod
Support creating Struct as well. When an object property is marked as
Struct, use [] to start the struct and copy each item with its type into
the struct:

pw-cli s 0 Route '{ info = [ "foo": 0.1  "bar": null [ 0.1 10 "hat" ]] }'
2021-04-30 17:21:42 +02:00
Wim Taymans
ca72738fee dbus: add some more debug in the plugin 2021-04-30 12:23:10 +02:00
Wim Taymans
c1ec10c252 i18n: install header 2021-04-30 10:03:49 +02:00
Wim Taymans
aea55f662a i18n: move to separate .h file
So that we can include it where needed and don't cause redefined _()
macros for other projects.

Fixes #1120
2021-04-30 09:57:30 +02:00
Andrea Gelmini
f489e32e44 Fix typo in code 2021-04-30 07:40:20 +00:00
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