Commit graph

6275 commits

Author SHA1 Message Date
Tom A. Wagner
eba38a33af readme: Link to Helvum for GUI tools 2021-05-10 06:51:02 +00:00
albanobattistella
3539b5ba12 Update it.po 2021-05-09 11:53:48 +00:00
Barnabás Pőcze
68f75bbd57 tools/pw-dump: fix parentheses around isatty() call
Previously,

  isatty(fileno(data.out) && getenv("NO_COLOR") == NULL))

would call `isatty()` with

  fileno(data.out) && getenv("NO_COLOR") == NULL

as its argument. This meant that, for example,

  NO_COLOR=1 pw-dump

would still produce colored output when run with
a TTY as its standard input.

Fix that by moving the parenthesis.

Fixes: af63d08453 ("tools/pw-dump: only print colors if we're connected to a terminal")
2021-05-08 03:57:34 +02:00
Wim Taymans
02decd9fba alsa: pause/resume when entering/exiting freewheel
When we start freewheeling, pause the device and resume when we
finish freewheel.
In freewheel mode, just discard samples in the sink and produce
silence in the source.
2021-05-07 11:51:22 +02:00
Wim Taymans
a80ec36ad5 node-driver: run as fast as possible in freewheel mode 2021-05-07 11:50:55 +02:00
Wim Taymans
7c91be47fb module-profiler: stop when freewheeling 2021-05-07 10:12:16 +02:00
Wim Taymans
9ce87aacd2 module-profiler: avoid large stack alloc
If the profiler manages to fill the complete buffer, we would have 8MB
of data that we need to allocate on the stack. Don't do that and instead
use a preallocated buffer large enough to copy things into.
2021-05-07 09:58:10 +02:00
Wim Taymans
830f52cbb1 jack: join the freewheel group when freewheeling 2021-05-07 09:03:34 +02:00
Wim Taymans
888612dc0f conf: add freewheel driver
Add freewheel driver and enable freewheel mode on it.
2021-05-07 09:03:34 +02:00
Wim Taymans
5c41131d6d node-driver: support node.freewheel property
To activate freewheeling when initializing
2021-05-07 09:03:34 +02:00
Wim Taymans
efc497a38a spa: make a new FREEWHEEL clock flag
When freewheeling, the clock is going faster than real time.
When freewheeling, skip samples in alsa sink/source.
2021-05-07 09:03:34 +02:00
Wim Taymans
fab199d5b9 impl-node: make the group a string
We are currently using strings for the node group so actually store
this as a string or else all strings will end up in group 0.
2021-05-07 09:03:33 +02:00
Peter Hutterer
cc4324cd30 spa/logger: only log in colors if we're logging to a tty 2021-05-07 06:57:31 +00:00
Peter Hutterer
af63d08453 tools/pw-dump: only print colors if we're connected to a terminal
We don't want ansi escape codes in the output of `pw-dump > log`. And where
colors are needed after the fact, it's easy to just run `jq . $file`.
2021-05-07 06:57:31 +00:00
Davide Beatrici
65e14548a3 stream: include <pipewire/port.h> instead of <pipewire/pipewire.h>
<pipewire/pipewire.h> includes many headers, but we only need <pipewire/port.h>.
2021-05-07 06:57:06 +00:00
Peter Hutterer
4456fd3e18 doc: fix a few doxygen warnings about invalid arguments 2021-05-07 10:27:26 +10:00
Peter Hutterer
f0d3f1f9d2 doc: remove trailing whitespace
My vim/git setup wants to fix those on every commit which gets a bit annoying,
let's just remove them: sed -i 's/ *$//g' $(git ls-files doc)
2021-05-07 10:27:26 +10:00
Peter Hutterer
ac05f6bb03 doc: add the various markdown prose docs to the doxygen output
Note that the order of the includes matters - that's how doxygen will sort
them. There is no specific structure other than the include order - one reason
why the headers are being changed. Without polluting the markdown files with
doxygen commands we cannot use \subpage, so all files convert to a regular
\page and are listed as flat hierarchy in the sidebar (and in Related Pages).

Changing the headers at least provides some visual grouping with comon
prefixes.
2021-05-07 10:27:26 +10:00
Peter Hutterer
d10381dfc3 dox: keep the doxygen input files as array in meson
Keep all files as strings in an array so we can add them to the custom command
input list - this way meson will correctly rebuild documentation on changes.
2021-05-07 10:27:26 +10:00
Peter Hutterer
1fd56a6d26 doc: reduce the Doxyfile to only non-default options
This provides a much easier overview of what the actual changes are to
doxygen's default values.
2021-05-07 10:27:26 +10:00
Peter Hutterer
68080ec531 doc: fix a typo 2021-05-07 10:27:26 +10:00
Peter Hutterer
3234037a71 doc/spa: add more markdown tags to render better 2021-05-07 10:27:26 +10:00
Peter Hutterer
2405f0942b spa/buffer: rename SPA_MEMBER to SPA_PTROFF
SPA_MEMBER is misleading, all we're doing here is pointer+offset and a
type-casting the result. Rename to SPA_PTROFF which is more expressive (and
has the same number of characters so we don't need to re-indent).
2021-05-06 09:39:39 +00:00
Wim Taymans
e598d0a422 0.3.27 2021-05-06 10:22:37 +02:00
Wim Taymans
1a0ad3d688 v4l2-utils: only allocate MemPtr when requested 2021-05-06 10:16:21 +02:00
Wim Taymans
2963d6e725 stream: improve fixup of dataType
Also handle choice flag types. Do some more error checking.
2021-05-06 10:03:37 +02:00
Wim Taymans
941620b733 v4l2: don't expose the internal fd
When allocating memory, just export the mmaped memory and mark the
memory as MemPtr, not MemFd. Set the fd to -1.

Otherwise we might send this fd to the client, making the complete
device accessible to the client.
2021-05-06 09:24:27 +02:00
Wim Taymans
ec331f4e4c gst: enable DMABUF explicitly to avoid mmap issues
PipeWire does not give DMABUF anymore to clients unless they
explicitly ask for it. This results in v4l2 sending an fd and
the mmapoffset + size fields in the buffer.

GStreamer does not handle the mmapoffset in the fd allocator and
thus runs into mmap problems when using the memory.

Enable DMABuf explicitly to work around the problem until
GStreamer is fixed.

Fixes #1115
2021-05-05 11:23:44 +02:00
Wim Taymans
44f49a3ea0 v4l2: add some more debug 2021-05-05 11:23:44 +02:00
Fabrice Fontaine
ce89ce3844 meson.build: fix build with uclibc-ng
Build with uclib-ng fails since commit
a4b0b9afe5 on:

FAILED: src/pipewire/libpipewire-0.3.so.0.326.0.p/impl-core.c.o
/srv/storage/autobuild/run/instance-2/output-1/host/bin/mips64el-linux-gcc -Isrc/pipewire/libpipewire-0.3.so.0.326.0.p -Isrc/pipewire -I../src/pipewire -Isrc -I../src -I. -I.. -Ispa/include -I../spa/include -fdiagnostics-color=always -pipe -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O3 -fvisibility=hidden -Werror=suggest-attribute=format -Wsign-compare -Wpointer-arith -Wpointer-sign -Wformat -Wformat-security -Wimplicit-fallthrough -Wmissing-braces -Wtype-limits -Wvariadic-macros -Wno-missing-field-initializers -Wno-unused-parameter -Wno-pedantic -Wold-style-declaration -Wunused-result -DFASTPATH -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -fPIC -pthread -DHAVE_CONFIG_H -D_GNU_SOURCE -D_POSIX_C_SOURCE -MD -MQ src/pipewire/libpipewire-0.3.so.0.326.0.p/impl-core.c.o -MF src/pipewire/libpipewire-0.3.so.0.326.0.p/impl-core.c.o.d -o src/pipewire/libpipewire-0.3.so.0.326.0.p/impl-core.c.o -c ../src/pipewire/impl-core.c
../src/pipewire/impl-core.c:54:9: error: conflicting types for 'getrandom'
 ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) {
         ^~~~~~~~~
In file included from ../src/pipewire/impl-core.c:34:
/srv/storage/autobuild/run/instance-2/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:28:12: note: previous declaration of 'getrandom' was here
 extern int getrandom(void *__buf, size_t count, unsigned int flags)
            ^~~~~~~~~

Fix this build failure by adding -D_GNU_SOURCE as getrandom is protected
by:

if defined __UCLIBC_LINUX_SPECIFIC__ && defined __USE_GNU

Extracted from:
 - https://github.com/wbx-github/uclibc-ng/blob/master/libc/sysdeps/linux/common/sys/random.h

Fixes:
 - http://autobuild.buildroot.org/results/a45f0ee009d90cef867dee4b1093225610fa10df

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-05-05 08:04:51 +00:00
Davide Beatrici
5f09b9f4d1 pod: fix "missing-field-initializers" warnings
/usr/include/spa-0.2/spa/pod/builder.h:90:13: error: missing field '_padding' initializer [-Werror,-Wmissing-field-initializers]
        *builder = SPA_POD_BUILDER_INIT(data, size);
                   ^

/usr/include/spa-0.2/spa/pod/builder.h:90:13: error: missing field 'state' initializer [-Werror,-Wmissing-field-initializers]
        *builder = SPA_POD_BUILDER_INIT(data, size);
                   ^

/usr/include/spa-0.2/spa/pod/builder.h:90:13: error: missing field 'callbacks' initializer [-Werror,-Wmissing-field-initializers]
        *builder = SPA_POD_BUILDER_INIT(data, size);
                   ^

/usr/include/spa-0.2/spa/pod/builder.h:248:33: error: missing field '_padding' initializer [-Werror,-Wmissing-field-initializers]
        const struct spa_pod_float p = SPA_POD_INIT_Float(val);
                                       ^

/usr/include/spa-0.2/spa/pod/parser.h:56:12: error: missing field '_padding' initializer [-Werror,-Wmissing-field-initializers]
        *parser = SPA_POD_PARSER_INIT(data, size);
                  ^

/usr/include/spa-0.2/spa/pod/parser.h:56:12: error: missing field 'state' initializer [-Werror,-Wmissing-field-initializers]
        *parser = SPA_POD_PARSER_INIT(data, size);
                  ^
2021-05-05 08:03:46 +00:00
George Kiagiadakis
bc1f9d304f audioconvert: handle S8/S8P raw audio formats 2021-05-05 08:56:59 +03:00
Wim Taymans
aabf879bb0 bluez5: avoid asserting when device existed
When a device as added in dbus but we already knew about the
device, don't assert but reuse the device we already have.

Seems to happen when resuming from suspend.

See rhbz#1948776
2021-05-04 15:39:34 +02:00
Wim Taymans
5a6967858e channelmix: improve soft volume state
When we have a soft Mute or Volume, use the soft volume.
When we get a volume update with only a channel Mute/Volume, use
the channel volumes.

See #1140
2021-05-04 13:05:38 +02:00
Wim Taymans
9ee55832e9 json: also escape \
Fixes #1141
2021-05-04 09:29:27 +02:00
Anders Jonsson
0b81314bde Update Swedish translation 2021-05-03 20:41:59 +02:00
Huang-Huang Bao
0c102b3e33
bluez5: emit SPA_PROP_softMute when route mute changed
Fixes #1137
2021-05-04 01:11:14 +08:00
Huang-Huang Bao
b0a1ae172c media-session: set bluetooth sample rate to default sample rate in graph
The bluez handle is now loaded after core info (containing 'default.clock.rate') is received.
2021-05-03 10:07:42 +00:00
Huang-Huang Bao
9384ba5500 bluez5: add properties for A2DP codec sample rate & channel mode configuration
Those properties are set as reference sample rate and channels number for A2DP configuration selecting.
2021-05-03 10:07:42 +00:00
Wim Taymans
15239ff74d channelmix: only run the LFE filter when upmixing
Only run the lowpass filter on the LFE channel when we are upmixing
and there is a valid cutoff frequency defined.

Otherwise we might filter away a valid LFE channel.

Fixes: rhbz#1941366
2021-05-03 11:50:47 +02:00
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