It seems few devices support the Device Id via bluez.
Try to figure out vendor/product ids for usb devices also via sysfs.
Also try to figure out the adapter bus type.
Keep track of Latency params on ports. When adding a latency param,
parse and update the port latency info.
Add both input and output latency params on the port, even when only
one changed. Use the stored info to do this.
Implement a default latency handler that simply combines and forwards
the Latency settings on ports.
Add a CUSTOM_LATENCY flag that allows you to bypass the default
handler and implement custom logic.
See #911
First initialize the port and node info, then add the params so that
the param_info flags are updated correctly. Otherwise, adding the
params would make the param readable but the init of the param_info
later would reset it back to 0 and the param would not be visible.
Keep track of the number of updates in the user field and before
emiting the info, flip the serial flag. This makes it possible to
even emit updates when setting an even number of params.
When a user plugs in headphones, they expect to hear an audio through
them. Currently, that usecase might or might not work with pipewire
depending on the user's luck, because pipewire instead uses port
priorities, and those apparently rarely have sane default values.
PulseAudio ignored priorities here, instead it made use of the port
right away. This should better match user expectations (who plugged in
headphones and is expecting to hear sound), so let's do the same in
pipewire.
Fixes: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1170
For cases where auto has an always known value, explicitly set it for
the sake of clarity. This commit only deals with the most trivial uses
that do not require rewriting the internal logic and where auto is not
behaving in a third way that's distinct from both enabled and disabled.
Keep separate counters for the ringbuffer and stream read/write
indexes.
The ringbuffer has 32 bits indexes while the pulse server is required
to keep 64 bit read/write indexes.
Also handle invalid seek flags.
Fixes#1331
This is obsolete since the move to doxygen groups and having \memberof blocked
the documentation in the source file from being merged with the header file.
Keep all types of devices, only emit device info if device has audio profiles.
Heuristically add profiles based on bluez actions so device can still be connected
even without initial UUIDs info from signal InterfaceAdded for org.bluez.Device1.
Fixes#1330
SPA_PLUGIN_DIR is exported in pkgconfig as 'plugindir'
PIPEWIRE_MODULE_DIR is exported as 'moduledir'
PIPEWIRE_CONFIG_DIR is exported only in uninstalled environments
as 'confdatadir' (not making this public due to the possible upcoming
configuration changes in pipewire)
All variables are also exported on the meson dependency objects,
so that subprojects can find them.
Wireplumber can then find them like this:
pipewire_moduledir = pipewire_dep.get_variable(
pkgconfig: 'moduledir', internal: 'moduledir', default_value: '')
... and this works regardless of whether wireplumber is being
configured as a subproject or using the uninstalled pkgconfig files
or using the system installation of pipewire.
This is required in order to run wireplumber tests in the
uninstalled environment with 'meson test'
This allows building wireplumber as part of the pipewire build
and running it in the uninstalled environment instead of media-session.
Building each session manager is individually contolled by the options:
-Dmedia-session=auto/enabled/disabled
-Dwireplumber=auto/enabled/disabled
And controlling which one is used in pipewire.conf is done with:
-Dsession-manager=media-session/wireplumber
Wireplumber's source tree must be in subprojects/wireplumber/
If this is missing, the .wrap file ensures that the latest git
master is downloaded while meson configures the build.
This git tree will not be automatically updated later, you need
to ensure that it is up-to-date on your own.
This allows meson subprojects (or projects using pipewire as a meson
subproject) to be able to use dependency('libpipewire-0.3') and
dependency('libspa-0.2') to find the uninstalled versions of these
libraries directly from the build dir instead of going through pkg-config
pkgconfig.generate() takes a positional argument, which
is the library target for which to generate a pkgconfig file
The previous way of adding the libpipewire target in
the libraries list is deprecated in recent meson
This also brings the advantage that all tools, examples, modules, components
can also be compiled standalone out-of-tree using libpipewire from the system
This allows having the same directory structure for headers as it
is in $prefix/include when installed, so that we can build other
projects using pipewire uninstalled (via the -uninstalled.pc or
by using meson subprojects). Otherwise, external code that reasonably
includes <pipewire/extensions/foo.h> fails to compile.
Write the profiler data to an allocated buffer instead of the stack
so that we can make it a little larger.
Don't try to process the data when the builder had to truncate it
because it didn't fit.
When we don't have enough files to accept the connection, clear the
_IN flag so that we don't try to accept if over and over again.
When a client disconnects, set the flag again so that we try to
accecpt new connections again.
See #1305
We can't recover from truncated control data so return a fatal error
that should stop the client. Truncated control data can happen when
there are no more fds available, for example.
See #1305
This is not too useful while looking at pipeline graphs, etc. We will
likely want to expand this to also include the module id or something to
distinguish multiple echo-cancel instances (which we can currently do
via the factory ID).
Always set the HAVE_OUTPUT flag because we always consume the
input and produce output, either to a buffer or an error.
This makes sure processing never stalls when something is wrong
on the output side.
See #1305