Commit graph

6064 commits

Author SHA1 Message Date
Wim Taymans
d8f86ca6e5 pulse-server: make name in create_server const
constify the name in create_server() and make a copy of the name
were it is needed instead of modifying the argument in-place.
2021-04-10 11:22:41 +02:00
Wim Taymans
47bf30d734 pulse-server: create pid file only once
Only try to create the pid file once, not for every socket
we listen to.
2021-04-10 11:06:18 +02:00
Huang-Huang Bao
4292e8fe7e
a2dp: set marker bit on AAC header 2021-04-10 04:51:16 +08:00
Huang-Huang Bao
b874362c8e
a2dp: don't reset buffer on EAGAIN
Allow it to resend packet until next port data is received.
2021-04-10 04:50:34 +08:00
Wim Taymans
225c9ebc2d pulse-server: limit the aux channels to 32
PulseAudio does not have more than 32 AUX channels so when we generate
them from unknown positions, make sure we wrap around.

See #1033
2021-04-09 19:20:46 +02:00
Wim Taymans
33ddd5f760 pulse-server: implement module-native-protocol-tcp
The module creates a tcp server on the given ip/port pair.
2021-04-09 18:27:30 +02:00
Wim Taymans
378f655a3d context: report ENOENT when a spa lib is not found 2021-04-09 17:26:22 +02:00
Wim Taymans
ca4b549472 pw-cli: handle properties without type info
Some properties don't have type info and then we want to skip
constructing the pod instead of crashing. This makes it possible to
cut and paste the output of pw-dump Route into pw-cli s <card> Route,
for example.
2021-04-09 16:14:50 +02:00
Wim Taymans
d57979517e pw-loopback: fix help text
The id in the help text is not supported
2021-04-09 15:56:00 +02:00
Wim Taymans
6217f20c04 pw-cli: allow param names in enum-params
So that "pw-cli e <object.id> Props" works
2021-04-09 15:55:04 +02:00
Wim Taymans
87706c7442 pw-cli: use more powerful pw_properties_new_string()
Remove our custom property parsing code and use
pw_properties_new_string() for more powerful syntax.
2021-04-09 15:53:33 +02:00
Wim Taymans
59ed07864d media-session: log info when loading monitor fails
Log info in all monitor plugins instead of an error.
2021-04-09 11:55:55 +02:00
Wim Taymans
5d20f50df8 pulse-server: use the right config property 2021-04-09 11:45:06 +02:00
Wim Taymans
8251dc11cc spa: add type mappings for F32 and F32OE
so that we can refer to the native float32 format with F32 and the
other endian one with F32OE.
2021-04-09 11:38:54 +02:00
Wim Taymans
44e6e7f5c8 pulse-server: use PipeWire format and channel names
Use the PipeWire format and channel names in the config to avoid
confusion.
2021-04-09 11:30:57 +02:00
Wim Taymans
b305f57e4d pulse-server: make sample format and channel_map configurable
Add an entry in the config file for default format and channel map.
Use the defaults in the server_info request
Use the defaults for the default channels and map in the modules.
2021-04-09 11:12:13 +02: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
Frédéric Danis
136511fbc8 bluez5: backend-ofono: Enable SCO deferred socket
The incoming SCO socket should be first read to authorize the connection.
2021-04-08 14:18:17 +00:00
Wim Taymans
2e18d8d005 module-loopback: fix connecting to the .monitor source
When a pulseaudio clients asks to be connected to a monitor of a sink
we need to specify the sink to the session manager as the target.

Fixes #1024
2021-04-08 16:02:28 +02:00
Wim Taymans
9019edec31 pw-link: improve unlink
When we only have one argument, just check the link id and if that
fails don't try to check the second argument because we would crash.
2021-04-08 15:32:06 +02:00
Wim Taymans
1b29531336 pw-link: make it possible to use ids
Make it possible to link/unlink using port ids
Make it possible to unlink using the link id
2021-04-08 13:09:51 +02:00
Wim Taymans
40194833ce pw-link: add option to print ids
Add an option to print the object ids
Improve monitor output
2021-04-08 12:54:53 +02:00
Wim Taymans
a296007ed9 pw-link: implement monitor 2021-04-08 12:08:04 +02:00
Wim Taymans
a57dae918a link-factory: improve the link factory
Make it possible to use object.id, node.name, node.nick,
node.description and object.path to select nodes and object.id,
port.name, port.alias and object.path to select ports when linking.

This makes it possible to use pw-cli creat-link to make nodes
without having to deal with the ids.
2021-04-08 11:06:44 +02:00
Wim Taymans
67a3f28bdf tools: add new pw-link tool
pw-link can be used to list, link and unlink ports.
2021-04-07 18:56:44 +02:00
Wim Taymans
3dfd7f26b9 meson: improve tools build
Build the tools and sources from a list.
2021-04-07 18:56:44 +02:00
Barnabás Pőcze
923d88bd35 spa: support: log-impl: check the return value of strrchr()
Previously, the return value of `strrchr()` was not checked
in `spa_log_impl_logv()` which could cause a segmentation fault
in `snprintf()` if the `file` string argument does not contain
any directory separators ('/').

For example,

  ./build/spa/tools/spa-inspect ./build/spa/plugins/alsa/libspa-alsa.so

could run into this problem:

  Program received signal SIGSEGV, Segmentation fault.
  0x00007ffff7f1d505 in __strlen_avx2 () from /usr/lib/libc.so.6
  (gdb) bt
  #0  0x00007ffff7f1d505 in __strlen_avx2 () from /usr/lib/libc.so.6
  #1  0x00007ffff7e29408 in __vfprintf_internal () from /usr/lib/libc.so.6
  #2  0x00007ffff7e3a19a in __vsnprintf_internal () from /usr/lib/libc.so.6
  #3  0x00007ffff7e146f6 in snprintf () from /usr/lib/libc.so.6
  #4  0x0000555555558818 in spa_log_impl_logv (object=<optimized out>, level=SPA_LOG_LEVEL_INFO,
      file=0x7fffffffd4d0 "[I][", line=260, func=0x7ffff7ce8090 "error_node", fmt=<optimized out>,
      args=0x7fffffffd920) at ../spa/include/spa/support/log-impl.h:49
  #5  0x00007ffff7d8c69e in alsa_error_handler (file=<optimized out>, line=<optimized out>,
      function=<optimized out>, err=<optimized out>, fmt=<optimized out>)
      at ../spa/plugins/alsa/acp/alsa-util.c:866
  #6  0x00007ffff7cd6a8f in ?? () from /usr/lib/libasound.so.2
  #7  0x00007ffff7cdb55e in snd_use_case_mgr_open () from /usr/lib/libasound.so.2
  #8  0x00007ffff7d8940f in pa_alsa_ucm_query_profiles (ucm=ucm@entry=0x55555556ba28, card_index=0)
      at ../spa/plugins/alsa/acp/alsa-ucm.c:752
  #9  0x00007ffff7d6e3c2 in acp_card_new (index=0, props=props@entry=0x7fffffffdc50)
      at ../spa/plugins/alsa/acp/acp.c:1508
  #10 0x00007ffff7d29b7a in impl_init (factory=<optimized out>, handle=0x55555556b540,
      info=<optimized out>, support=<optimized out>, n_support=<optimized out>)
      at ../spa/plugins/alsa/alsa-acp-device.c:963
  #11 0x0000555555558429 in inspect_factory (factory=0x7ffff7daefa0 <spa_alsa_acp_device_factory>,
      data=0x7fffffffdcf0) at ../spa/tools/spa-inspect.c:231
  #12 main (argc=<optimized out>, argv=<optimized out>) at ../spa/tools/spa-inspect.c:309

as in that particular case, the filename was returned by libasound,
and it was just "parser.c".

Furthermore, separate the static variable from the rest, and apply
the `const` qualifier to the pointers in the `levels` array.
2021-04-07 15:55:44 +02:00
Wim Taymans
c324107211 0.3.25 2021-04-06 15:51:02 +02:00
Wim Taymans
09243d55ae pulse-server: fix leak in flatpak detection 2021-04-06 11:26:02 +02:00
Wim Taymans
78db493d0d pulse-server: depend on pipewire.service
Make sure we only start after the main pipewire.service is started.

See https://bugzilla.redhat.com/show_bug.cgi?id=1943867
2021-04-06 10:24:25 +02:00
Wim Taymans
bdbd3e3f2e pulse-server: Make sure we don't send null name and description
We can't send a null name or description because that makes clients
crash.
2021-04-05 17:36:38 +02:00
Pauli Virtanen
026e3882d2 bluez5: remove battery when RFCOMM connection drops
There won't be further battery level updates when RFCOMM connection is
down, so remove the battery then.

Fix minor things with canceling the provider registration.
2021-04-05 15:04:16 +00:00
Pauli Virtanen
eb396f1ea8 pipewire: add environment variable for disabling journald logging
Logging to journald can be annoying at high debug levels, so add an easy
way to disable it.
2021-04-05 14:36:21 +03:00
Wim Taymans
68804a3082 gst: remove volatile, it causes a warning with newer gcc
See #1018
2021-04-05 10:28:54 +02:00
Wim Taymans
7bd6b725dc Fix some warnings
When memfd and systemd are disabled.

See #987
2021-04-04 21:09:39 +02:00
Dmitry Sharshakov
97b01ed9b0 bluez5: add a property to select default profile 2021-04-04 08:43:09 +00:00
Erkki Seppälä
6a10ac36aa pw-dot: added -9/--90 for outputting using 'splines = ortho'
This results in always drawing edges with 90-degree angles instead of
smooth splines. Graphs laid out this way may be look nicer sometimes,
but it is slower to lay out with large graphs.
2021-04-02 12:04:32 +03:00
Erkki Seppälä
71b53f1590 pw-dot: added -L/--lr for outputting the graph using 'rankdir = "LR"'
Graphs laid out this way may be look nicer sometimes.
2021-04-02 12:04:32 +03:00
Erkki Seppälä
21a36f3c51 pw-dot: using output - will write the output to stdout
This enables single-liners for viewing the graph in applicable shells.
2021-04-02 12:04:32 +03:00
Erkki Seppälä
4a0b7fa9b8 pw-dot: send diagnostic messages to stderr, not stdout
This will help when using stdout for other purposes in the
future (e.g. next commit).
2021-04-02 12:04:32 +03:00
Wim Taymans
8cf6da467f pulse-server: use the name of the default sink
When setting a new default sink/source, use the name of the object
instead of the name used for selecting the sink/source. This makes
it possible to use the id to search for the device but still have
the device name in the metadata as is expected.

Fixes #1004
2021-04-02 10:07:39 +02:00
Kraus Shusha
63e7a5c5d4 Update INSTALL.md, typo 2021-04-02 05:40:12 +00:00
Wim Taymans
9562cd56a2 alsa-seq: tweak port names some more
Remove the client id, it can change and is otherwise not generally
useful. Move the direction with the port.

Fixes #1007
2021-04-01 19:43:28 +02:00
Dmitry Sharshakov
e3f344b3fa bluez5/native: send correct AT+CMER HFP HF command
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
2021-04-01 19:12:49 +03:00
Wim Taymans
90de408e31 loopback: use _raw_build helpers
Now that the raw_builder supports wildcard for rate, use it in loopback
and add an option to force resampling as well.
2021-04-01 10:47:23 +02:00
Wim Taymans
b318a9e1d3 support: add right property id 2021-04-01 10:08:47 +02:00
Wim Taymans
339927ac76 spa: allow variable format, rate, channels, size, framerate
Use 0 values to skip adding the values to the format param, which
leaves them variable.
2021-04-01 09:58:08 +02:00
Wim Taymans
7afb3bc1a4 pulse-server: add module properties 2021-04-01 09:35:31 +02:00
Wim Taymans
27e00d1be4 pulse-server: don't fix sample rate
Use the builder directly to leave the samplerate undefined so that we
adapt to the graph samplerate instead of forcing resampling.
2021-04-01 09:32:00 +02:00
Wim Taymans
4aa817771a pulse-server: arguments can be NULL
And module-null-sink does not have mandatory arguments.
2021-04-01 09:04:55 +02:00