Commit graph

1037 commits

Author SHA1 Message Date
Ashok Sidipotu
8d0542e968 main: Return transition error only once
When a plugin activation fails, it is supposed to fail the wireplumber init. To
be precise it fails the wp init transition and the init transition objected is
freed.

However the subsequent plugins added(as reported by the plugin object manager)
trigger double free, prevent this by avoiding calling the activation callback
after the transition object is freed.
2022-11-22 12:38:51 +00:00
Wim Taymans
3e63610bc5 access-portal: re-evaluate permission when a camera is added
When a new camera is added, go over all clients and update the
permissions for the new camera.

This makes it possible to plug in a new camera and make it visible to
the portal apps.
2022-11-14 13:08:09 +01:00
Ashok Sidipotu
e77ad8c0c0 alsa.lua: remove the disabled entities from the names table
entities here are the device cards and the device nodes.

sometimes null device objects are reported by monitor, this results in lua
exceptions handle this use case.

Fixes #361
2022-11-08 14:55:40 +00:00
Pauli Virtanen
f79a330849 scripts: policy-node: wait for unactivated links instead of removing
If a link is not activated, don't remove it. Instead, schedule a rescan
when a link activates, so that we'll handle it once it does.

This is a workaround for some problems, see
https://github.com/Audio4Linux/JDSP4Linux/issues/74
However, the underlying cause is not understood.
2022-11-07 11:45:21 +00:00
Frédéric Danis
7810196596 config: bluez: Add property for HSP/HFP native backend modem 2022-10-06 09:26:53 +02:00
George Kiagiadakis
8fa1693919 Apply 1 suggestion(s) to 1 file(s) 2022-09-28 14:39:30 +00:00
Dmitry Sharshakov
6002cea116 alsa-midi: move MIDI bridge properties into a table
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
2022-09-28 14:39:30 +00:00
Dmitry Sharshakov
b86847ec75 alsa-midi: add an option to disable longname/card number display
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
2022-09-28 14:39:30 +00:00
George Kiagiadakis
41a6a9d65a config: re-wrap media-role.applications and add "Skype" in the list 2022-09-27 16:01:31 +03:00
Frédéric Danis
d4f469fcec config: bluez: Update source-role property name
New version of PipeWire replaced a2dp-source-role property by more generic
media-source-role.
2022-09-27 07:57:50 +00:00
Pauli Virtanen
b32cb9c976 config: BT profile switching for chromium webrtc streams
E.g. Discord has input streams with application.name "WEBRTC
VoiceEngine".
2022-09-27 07:54:34 +00:00
Pauli Virtanen
40e7ad5ccc bluez: use device id instead of profile name in node names
Don't include profile name in node names for HFP and A2DP.  Instead,
append the id number from the spa.bluez5 backend.  The backend takes
care of choosing the unique id numbers appropriately.

This makes the sink/source names the same for A2DP and HFP.  This allows
outputs directed to the Bluetooth device to remain there when switching
profiles between A2DP and HFP, without needing to determine the new
sink/source name.
2022-09-27 07:49:52 +00:00
Pauli Virtanen
cafb048e70 config: bluez: add Opus encoding settings 2022-09-23 13:41:17 +00:00
Frédéric Danis
591f2e77e9 scripts: bluez: Autoconnect bap-sink stream on peripheral/acceptor 2022-09-15 13:21:37 +02:00
Frédéric Danis
57518ed2ce scripts: bluez: Autoconnect media.source stream
New version of PipeWire replaced a2dp.source stream by more generic
media.source stream.
Keep the former for compatibility.
2022-09-15 13:21:37 +02:00
Jason Nader
b1b5bf2f5f
wpctl: add option to limit set-volume final value 2022-08-16 23:57:20 +09:00
Pauli Virtanen
37c839b930 policy-node: fix potential rescan loop
SiLink activation might be delayed indefinitely under some error
conditions. Currently, policy-node schedules a rescan when it sees a
non-activated link on a stream to be moved, which produces busy loop if
the si-link doesn't activate.

Instead of rescheduling on non-active si-links, just remove and emit a
warning. The si-link then gets removed once it gets activated.

Reproducer:

1. Play audio from Rhythmbox and pause.
2. Switch default output with pactl between two different outputs
3. Links from the paused stream stay at "init"
2022-08-14 19:47:11 +00:00
Julian Bouzas
7a70b04237 policy-device-profile: set best profile even if it has not changed
We want to set the best profile even if it has not changed, because it can be
different than the active profile.

Fixes #329
2022-07-31 10:09:32 -04:00
Julian Bouzas
ccf1630f39 main: add --version flag to show current version
Fixes #317
2022-07-29 12:37:44 +00:00
Julian Bouzas
ca16201034 wpctl: accept 0 as ID in clear-default subcommand
Unlike the rest of subcommands, The ID for the clear-default subcommand must be
a setting ID, not a pipewire Object ID. This means we cannot use the parse_id()
and translate_id() helper functions because the setting ID 0 is acceptable, and
the @DEFAULT_AUDIO_SINK@, @DEFAULT_AUDIO_SOURCE@ and @DEFAULT_VIDEO_SOURCE@
strings are not acceptable.
2022-07-28 18:00:11 +00:00
Fabian Vogt
d5029697de Fix leftover use of module-reserve-device's state property
The move to the WpDbus API dropped the "state" property from the plugin,
but left the property enum and use of it in alsa.lua. Remove the enum and
port over the code in alsa.lua.
2022-07-14 13:02:19 +00:00
Wim Taymans
dca2ca2b3b config: add possible dither.method property 2022-07-13 13:08:22 +02:00
Pauli Virtanen
aee4fe2579 policy-device-routes: consider routes only for active profile
If a route specifies a set of profiles, it should not be used if the
profile is not in that list.

In findBest/SavedRoute, exclude routes that don't match the active
profile.

Currently in the SPA devices, the device id is different for different
profiles so this condition does not occur, but in general this might not
be so.
2022-07-07 18:28:24 +00:00
Pauli Virtanen
73b0dccb8d policy-default-routes: use different default volume for input direction
Input direction volume doesn't need a safety margin.
2022-07-07 18:10:11 +00:00
Pauli Virtanen
affdf36a29 policy-device-routes: change default volume to 0.4 on cubic scale
It's safer to have the default volume value at significant attenuation,
to mitigate situations where the output is at high gain.

Use linear scale 0.4^3 (-24 dB), which puts Pulseaudio volume sliders at
40%, as a better starting value than 0.4 (-8 dB / 74%).  E.g. for many
Bluetooth headphones, the volume at 74% is still uncomfortably high, and
a lower value is better.
2022-07-07 18:10:11 +00:00
George Kiagiadakis
c16e637c32 alsa: use "obj_type" as a variable name to avoid shadowing lua's "type" function
This causes a crash when running in a VM because the code tries to
execute lua's "type()" and ends up executing the local string variable...

Fixes: #303
2022-07-07 20:58:36 +03:00
George Kiagiadakis
180ecab04d wpctl: set-volume: improve the code, treat percentage as pactl does
10% should be written as 10%, not as 0.1%
and 0.7 + 10% in pactl translates to the volume becoming 0.8, not 0.77
2022-07-05 15:40:32 +03:00
George Kiagiadakis
d6241f7f0d wpctl: remove unused variables 2022-07-05 14:32:18 +03:00
George Kiagiadakis
e33922ff7b wpctl: remove double % sign printouts, fix the style of the set-volume summary 2022-07-05 14:30:33 +03:00
George Kiagiadakis
37bd392119 alsa: add mechanism to override node default properties for VMs
Fixes #162, #134
2022-06-28 14:31:17 +03:00
George Kiagiadakis
d7f17104bf policy-device-profile: always consider the stored default profile when re-evaluating
Fixes: #179
2022-06-28 08:30:10 +00:00
George Kiagiadakis
6954105589 wpctl: fix inspect for metadata objects
metadata objects do not implement WpPipewireObject
2022-06-28 10:57:09 +03:00
Wim Taymans
8ade19ac59 config: rename empty.noise -> dither.noise 2022-06-27 11:50:33 +02:00
Julian Bouzas
392bd81913 alsa.lua: remove node names from table when parent device is destroyed
Fixes #293
2022-06-27 08:52:36 +00:00
Wim Taymans
2536380a81 config: add more possible device properties 2022-06-24 14:11:26 +02:00
Varnit Singh
f53efaabf1 wpctl: allow modifying volume levels using percentage/step amount. 2022-06-08 09:25:45 +00:00
Varnit Singh
e192deb7bc wpctl: Add get-volume command and functionality 2022-06-08 09:18:34 +00:00
Julian Bouzas
46e7c5c144 m-reserve-device: use WpDbus API 2022-06-02 12:34:16 -04:00
George Kiagiadakis
2ac384711d libcamera: give higher priority to external cameras
if you have plugged an external camera, that probably means you
prefer using that instead of the internal one
2022-05-31 12:15:11 +03:00
George Kiagiadakis
334a134471 v4l2: append "(V4L2)" in node descriptions
This is to make it easier to work with V4L2 and libcamera simultaneously
2022-05-31 10:53:01 +03:00
George Kiagiadakis
b44759ec3f libcamera: improve the front/back camera descriptions 2022-05-31 10:41:20 +03:00
George Kiagiadakis
6931050b7f v4l2/libcamera: set node.nick on nodes 2022-05-31 10:40:56 +03:00
George Kiagiadakis
2299c389b5 libcamera: set a user-friendly description for internal cameras 2022-05-30 11:06:46 +03:00
George Kiagiadakis
b345468e82 wpctl: print link states in the status output 2022-05-30 11:06:46 +03:00
George Kiagiadakis
9ec2757d27 monitors: enable libcamera by default and set priority on all camera nodes
Currently v4l2 nodes will get higher priority than libcamera ones.
The default can be changed, of course, with wpctl.

Things are still not great if a camera is enumerated by both monitors.
The first node to be linked will grab the device and the second one
from the other subsystem will fail to negotiate.
2022-05-26 14:08:16 +03:00
Julian Bouzas
c00c5a6675 alsa.lua: fix device name deduplication when reservation is enabled
Fixes #241
2022-05-19 07:43:12 -04:00
George Kiagiadakis
1f04530920 config: fix enabled property to default to "true" when not defined
Fixes backwards compatibility with older config files

Fixes: #254
2022-05-12 12:19:38 +03:00
George Kiagiadakis
2eed279c9d i18n: remove the module and embed the gettext calls into the lua api
There is no need to have this as an optional module, since libintl
is a hard dependency of both PipeWire and GLib. This way we can keep
things a bit simpler and faster (no string copies and plugin lookups)

Bump meson dependency to 0.59 to benefit of the libintl lookup that
is now built into meson's dependency() function.
2022-05-10 15:16:09 +03:00
Sven Bartscher
8dc4c36dd4 Enable automatic bluetooth profile switching for Mumble
For some reason Mumble uses "game" as its media.role, but it is
actually a communication tool where a headset profile is apropriate.
2022-05-10 10:45:03 +02:00
Théo Lebrun
3bdacc414e config: add enabled property on monitors
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2022-05-05 08:22:08 +00:00