Commit graph

24 commits

Author SHA1 Message Date
Barnabás Pőcze
ab2907c699 spa: alsa: avoid potential uninitialized variable use
In both funtions `ctl_hndl` could be passed to `snd_ctl_close()`
while being unitialized if `this->device_info.change_mask` is zero.
2024-09-18 19:54:13 +00:00
Martin Geier
d6184bd9bb alsa-pcm-device: notify observers when profile changes
Signed-off-by: Martin Geier <martin.geier@streamunlimited.com>
2024-04-09 09:03:49 +00:00
Wim Taymans
5a37c97f3d alsa: allow setting profile by name 2024-02-13 15:37:10 +01:00
Carlos Rafael Giani
ae4bff78a3 alsa-pcm-device: Minor logging improvements 2023-09-02 08:28:22 +00:00
Carlos Rafael Giani
61518e71fc alsa: Rename spa_alsa_device_factory to spa_alsa_pcm_device_factory
This makes it clear that this is specifically a factory for PCM nodes.
2023-09-02 08:28:22 +00:00
Barnabás Pőcze
934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Wim Taymans
6207d98ff1 spa: add debug log context
Make a real debug context with a log function and move it to a new file.
This way we don't need to redefine a macro.
Make a new context for debugging to a log file. Make new functions to
debug to a log file.
Move the stringbuffer to string utils.
Integrate file/line/func and topics into the debug log.
We can remove some more things from the pipewire log_object function and
also add support for topics.
2023-01-18 17:51:16 +01:00
Wim Taymans
3c67821c4a spa: add context to debug functions
Add new spa_debugc_ funnctions that take a context. The user should also
redefine the spa_debugc macro to handle the context.

Use this to let some plugins log the pod and format to the log without
using the global logger.

Also use this to remove our custom pod logger function by reusing the
spa one with a custom context.
2023-01-18 13:12:16 +01:00
Wim Taymans
f472fd736d fix includes
Only include debug we need. We usually only need the debug types.
2023-01-18 13:12:16 +01:00
Wim Taymans
dfdd9a6b3b alsa: don't prefix NAME, log topics are enough 2021-10-03 08:05:40 +02:00
Peter Hutterer
e9d869b46f spa: implement a log topic for alsa 2021-09-28 09:35:39 +02:00
Wim Taymans
d88e8edd11 avoid shadowing arguments 2021-07-06 17:55:16 +02: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
8a4d2ed7ce pipewire-pulse: set correct errno values
errno should be set to the positive errno value.

This does not cause problems except for the pulse-server where the
errno value is negated and returned as an error result.
2021-03-19 12:46:05 +01:00
Wim Taymans
5a98a9b1cd alsa: reload alsa configuration
Fixes #332
2020-11-05 10:00:25 +01:00
Wim Taymans
dadb3a884d profile: refactor code to make EnumProfile and Profile params
Use the same code to enumerate the profiles and the current profile,
this makes sure we have all info in the Profile param as well and
don't need to do a lookup in the EnumProfile.
2020-08-17 11:08:26 +02:00
Wim Taymans
698509ef55 alsa: set classes in the profile
parse classes in the pulse layer
2020-07-01 13:39:10 +02:00
Wim Taymans
aafd1e7298 improve debug
Improve log so that debug level 3 gives a reasonably readable overview
of what is going on.
2020-04-22 12:47:18 +02:00
Wim Taymans
1404cb4182 alsa-pcm: add device to object path
Use card id and device in the object path.
2020-02-04 18:01:48 +01:00
Wim Taymans
82e099ed37 alsa: use the card name in the object.path
The card name (id) can be configured with udev rules to remain
constant based on where the device is plugged in even when there
mulitple of the same devices.
2020-01-29 13:37:35 +01:00
Wim Taymans
f391353c7f Make interface types a string
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
2019-12-19 13:36:04 +01:00
Wim Taymans
82ee139f65 spa: improve object properties 2019-10-01 10:04:22 +02:00
Wim Taymans
dc83c10c9a media-session: add device reservation for alsa
Implement the device reservation DBus API.

When we acquire the device name, set our device profile to 'On'. This
adds our sources and sinks to the graph.

When we lose the name, switch back to 'Off' and remove our nodes
again.

Move the session mamager stuff in a directory.

Fixes #191
2019-09-30 21:51:46 +02:00
Wim Taymans
db341a6450 improve properties on node and port
Rename some alsa filenames.
2019-09-23 20:51:34 +02:00
Renamed from spa/plugins/alsa/alsa-device.c (Browse further)