Commit graph

28 commits

Author SHA1 Message Date
Wim Taymans
3215b58bae alsa: save volumes
Instruct the session manager to save the volumes when set with the
ALSA ctrl API.
2022-09-01 09:43:10 +02:00
Quentin Wenger
22fc9eec35 Cleanup argument names in methods and events interfaces
First method argument is object, first event argument is data.

Closes !963
2022-04-15 10:11:49 +02:00
Wim Taymans
c46113faa3 json: spa_json_get_string() writes up to len chars or fail 2022-01-04 10:42:32 +01:00
Wim Taymans
5ed4977b38 destroy proxies when global is removed
When a global is removed, also remove the proxies. We can have multiple
proxies to a global otherwise when a client has a sequence of events
queued from the server like this:

Global 1 added
Global 1 removed
Global 1 added

The proxy we added in the firt event would not be destroyed because the
server did not know about it when global 1 was removed and then a
second one would be made.
2021-11-08 12:55:41 +01:00
Wim Taymans
cefcc2e874 alsa-plugin: store the right value in last_seq
last_seq needs to contain the last received seq, not the last one that
we requested to sync on.
2021-10-08 09:21:32 +02:00
Wim Taymans
f562b16706 alsa-plugin: use log topics 2021-10-03 08:17:43 +02:00
Wim Taymans
3348fd9885 alsa-plugin: make sure we don't deref NULL
Also fixes a warning.
2021-10-01 15:33:51 +02:00
Wim Taymans
64f83158f4 alsa-plugin: improve error handling and recovery
Ignore -ENOENT errors, they are likely because some device was
removed.
Make sure we clear the poll descriptor when nothing is pollable, even
in the error case.
Clear the error after we reported it instead of reporting it forever.

Fixes #1627
2021-09-20 15:48:04 +02:00
Wim Taymans
d88e8edd11 avoid shadowing arguments 2021-07-06 17:55:16 +02:00
Wim Taymans
91f4e4d3c8 alsa: catch and handle some more errors 2021-07-06 17:54:08 +02:00
George Kiagiadakis
df8bd85277 alsa-ctl: filter for and use only the "default" metadata object
Fixes #1384
2021-07-02 17:44:35 +03:00
Barnabás Pőcze
f5d51162c4 treewide: mark things static and const
Mark some structures, arrays static/const at various places.
In some cases this prevents unnecessary initialization
when a function is entered.

All in all, the text segments across all shared
libraries are reduced by about 2 KiB. However,
the total size increases by about 2 KiB as well.
2021-06-30 14:44:08 +02:00
George Kiagiadakis
59407d2f08 includes: update all references to extensions to point to pipewire/extensions
This also brings the advantage that all tools, examples, modules, components
can also be compiled standalone out-of-tree using libpipewire from the system
2021-06-18 17:54:18 +03:00
Peter Hutterer
522f87d5ea treewide: replace strcmp() != 0 with !spa_streq
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Peter Hutterer
95a84e797a treewide: replace !strcmp() with spa_streq()
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Peter Hutterer
7697ed0757 treewide: replace strcmp() == 0 with spa_streq()
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Wim Taymans
877309bfbe use priority.session to select the default sink/source
priority.session is meant to be used to set routing priorities.

priority.driver is meant to be used by the scheduler to select what
nodes is best for driving the graph. This usually depends on the
hardware quality and the use case (Pro Audio devices are likely
to be used as driving the graph).

See #1028
2021-04-08 17:48:13 +02:00
Wim Taymans
f314119aa9 alsa-plugin: add some checks to avoid using invalid values 2021-03-27 20:44:21 +01:00
Wim Taymans
c8fd34a41d metadata: store default-nodes as JSON
Don't just store the id in the metadata but a JSON object with
the node name. This makes it possible to easily introspect the
metadata and also extend the metadata with more fields later.

Instead of matching the metadata id to the global ids we now
have to match it against the name.
2021-03-05 17:37:12 +01:00
Wim Taymans
7053936ffd don't attempt to connect to empty remote name
Fixes jconvolver startup.

See #744
2021-02-18 10:22:39 +01:00
Wim Taymans
62cf8c6130 alsa-plugin: improve client name 2021-02-04 12:52:23 +01:00
Wim Taymans
5817b66a20 alsa-plugin: only parse props when updated
Check if the properties got update before we try to parse them.
If they are not updated, they might be empty and we would lose
our previously parse values.

Fixes default volume in alsa-mixer.
2021-01-15 10:29:32 +01:00
Wim Taymans
b8300c663b improve some errors
Silence some -ENOENT warnings, they can happen when the object we
are introspecting is destroyed
2020-11-29 16:22:50 +01:00
Elliott Sales de Andrade
0a30eb6329 Fix a possible uninitialized variable.
Also, change the type to more accurately reflect its usage.
2020-11-23 15:36:08 +00:00
Wim Taymans
0c04481ba7 metadata: improve default sink/source
Only check defaults when subject is PW_ID_CORE
Handle NULL keys: remove the defaults
2020-08-18 17:56:05 +02:00
Wim Taymans
e71936f870 Improve naming
master -> driving
priority_master -> priority_driver
segment_master -> segment_owner
2020-08-06 13:49:33 +02:00
Wim Taymans
5bf6acad06 alsa: use PIPEWIRE_REMOTE env variable 2020-08-04 14:13:07 +02:00
Wim Taymans
37f43aba35 alsa: add mixer plugin
Add plugin to manage the volume of default source and sink
2020-07-24 17:13:51 +02:00