Commit graph

8846 commits

Author SHA1 Message Date
Jonas Holmberg
64c1b62aa8 alsa-pcm: Do not log warning when resync was expected
Log as info instead of warning when alsa sync was expected.
2022-05-11 17:45:27 +02:00
Wim Taymans
6ad59e0117 pulse-server: parse bool using pulseaudio rules 2022-05-11 17:06:33 +02:00
Wim Taymans
1fad806b8d pulse-server: add auth-anonymous option
Add the auth-anonymous option to module-native-protocol-tcp.

It does not exactly do what pulseaudio does but it will enable
unrestricted access instead.

Fixes #1899
2022-05-11 17:01:04 +02:00
Marcin Radomski
aa33c2841c pulse-server: avoid skipping more ringbuffer data than available
This prevents the ringbuffer from advancing the read pointer more than
the size of data actually available. It prevents the "avail" value from
keeping to drop when no audio is being played by the client.

Applying this patch seems to prevent the "randomly playing music after
a couple hours of silence" issue

Fixes #2366
2022-05-11 15:34:21 +02:00
Pauli Virtanen
9240a7b6f3 pipewire: don't setlocale in pw_init
Remove the backward compat workaround. Avoids threadsafety etc. issues.

New WP release sets the locale itself.
2022-05-11 13:19:09 +00:00
Wim Taymans
a3e10d6023 audioadapter: add some more debug 2022-05-11 15:13:46 +02:00
Wim Taymans
416dec530c audioconvert: debug result code 2022-05-11 14:55:37 +02:00
Wim Taymans
c2dbe1d64d audioconvert: remove props from info
After emiting the node info, remove the properties from the info again
so that we don't accidentally emit them again later, when the
info and properties are out of scope.
2022-05-11 14:51:14 +02:00
Wim Taymans
daf53b94ed adapter: pass spa_node to adapter
Make it possible to pass a spa_node as the follower of the adapter. This
avoids us having to wrap it in a pw_impl_node in order to unwrap it
again for the adapter spa_node.
2022-05-11 12:28:26 +02:00
Wim Taymans
9d186cf622 alsa-pcm: scale max_error with quantum size
Adjust the max-error between the hardware delay and the quantum. Limit
this between 256 and quantum/2 to make sure we are not too sensitive.
2022-05-11 10:34:27 +02:00
Wim Taymans
e6c2ac3450 stream: handle set_control when not connected
When we are not connected, return -EIO from set_control instead
of crashing later.
2022-05-10 15:36:00 +02:00
Wim Taymans
4efb1a03cb stream: don't emit param_changed from set_control
When we set a control, don't emit the param_changed event. We will
already receive the control_info as a result of the change.
Reserve the param_changed event for things that got changed by
something else.
2022-05-10 15:32:25 +02:00
Barnabás Pőcze
f24250da66 spa: bluez: ignore unsupported indicators
Do not emit a warning when a known, but
otherwise unsupported indicator is received.

Fixes wireplumber#253
2022-05-10 12:09:18 +02:00
Yuri Chornoivan
e6d762f4ba po: Update Ukrainian translation 2022-05-09 10:54:11 +00:00
jasker5183
c71db353f1 Documentation Updates 2022-05-08 17:06:28 +00:00
Wim Taymans
8afe5fe0f0 filtet-chain: handle empty nodes
When there are no nodes, we can't make links. This avoids getting into
an infinite loop when trying to find ports.
2022-05-07 15:58:39 +02:00
Wim Taymans
0c8cd4ab52 filter-chain: improve filter.graph parsing
First collect all the graph objects and then parse them in the
right order. Otherwise, we might try to parse links before the nodes if
they are first in the JSON string.

Fixes #1950
2022-05-07 15:53:10 +02:00
Barnabás Pőcze
211abaef5e protocol-native: remove destroyed client from client list
When the client destroys the protocol-native module, the server
and the client are destroyed but the client is still reffed (not freed).
It will be unreffed after its messages are processed, after which point
it will be freed and removed from the server client_list that is already
destroyed.

Fix this by removing the client from the server list when it is
destroyed.

See #565
2022-05-07 14:08:55 +02:00
Wim Taymans
d506781619 pulse-server: do a guess for the latency when starting
Guess the expected latency with the stream info we have and use that as
the node.latency. This way, the graph can attempt to start with some
sort of latency setting.

After we know the exact format, we can calculate the real latency and we
will update the node latency accordingly.
2022-05-06 16:54:22 +02:00
Wim Taymans
3f3e1352ae modules: update docs 2022-05-06 15:46:45 +02:00
Wim Taymans
eaf9a4feb0 pw-loopback: add -n option to set a node.name 2022-05-06 15:39:43 +02:00
Wim Taymans
37ba52005b module: also support global node.name
Support a global node.name and prefix it with input. and output.
if no per-stream node.name is given.
This might be less confusing.
2022-05-06 15:38:43 +02:00
Wim Taymans
32e957345d audioadapter: don't loop forever
Try 8 times to make progress, if nothing after that, xrun.

A stream that keeps sending 0 sized buffers would otherwise get into
an endless loop.

See #2359
2022-05-06 15:33:28 +02:00
Wim Taymans
19e3e20c47 protocol-native: improve client and resource refcounts
Add a refcount to resource and client so that we can keep them alive
while the native protocol is using them.

One problem might be that the protocol destroys the client or resource
while handling it and that would cause errors.

Fixes #565
2022-05-06 13:25:57 +02:00
Wim Taymans
383df85466 modules: handle factory destroy
Listen for factory destroy and clean up the module.

See #565
2022-05-06 12:11:20 +02:00
Wim Taymans
95f8c569a0 module-metadata: handle factory destroy
Destroy the module when the factory is destroyed.
2022-05-06 11:33:00 +02:00
Wim Taymans
8374c93e40 module-adapter: handle factory destroy
When the factory is destroyed, clean up and destroy the module as well.
2022-05-06 11:29:21 +02:00
Hagen
cb81e49f7d Remove unnecessary } in src/modules/module-raop-discover.c docs 2022-05-06 09:03:04 +00:00
Wim Taymans
15431570f4 module: handle global destroy properly
When the global is destroyed, we remove our listeners and set the global
to NULL.  We then destroy the module but because the global is NULL, we
don't remove ourselves from the list of modules, causing a crash later.

Fix this by always adding ourself to the list of modules and always
removing ourselves on destroy.

See #565
2022-05-06 10:16:37 +02:00
Wim Taymans
73694f72ee filter-chain: improve error reporting 2022-05-05 15:24:51 +02:00
Wim Taymans
6458df3678 filter-chain: fix some typos 2022-05-05 09:05:32 +02:00
Wim Taymans
43fec3ee3b jack: check properties after we configured them
Or else PIPEWIRE_PROPS will not have any effect.
2022-05-04 15:04:33 +02:00
Wim Taymans
ad130d0cd6 audioconvert: fix param counter 2022-05-03 10:41:02 +02:00
Wim Taymans
7b9321dea9 audioconvert: don't forward node results
Don't just always forward node results but use port_enum_param_sync.

Avoids duplicate param results in pw-dump for ports.
2022-05-03 10:10:09 +02:00
Wim Taymans
94dd797aa5 audioconvert: remove unused port param 2022-05-03 10:10:09 +02:00
Pauli Virtanen
6ccb939267 bluez5: use lc3plus.h instead of lc3.h
The file name "lc3.h" in the ETSI LC3plus package may conflict with the
actual LC3 codec, so try to find a file "lc3plus.h" instead.  Also try
to find a pkg-config dependency for it first (in which case use lc3.h,
assuming it's in different directory).  This can be fine tuned, if
something starts to package that library.
2022-05-03 00:29:47 +03:00
Pauli Virtanen
7f67dedac6 bluez5: fix lc3plus initial bitrate 2022-05-02 23:14:45 +03:00
jasker5183
8358f020db Add --volume description 2022-05-02 15:42:09 +00:00
Wim Taymans
777a8c687b audio-src: queued only requested frames
Use the new requested buffer field to only queue the amount of samples
required by the resampler for the current quantum. This avoid spikes
when the maxsize block of samples is processed.

Fixes #2353
2022-05-02 16:55:53 +02:00
Pauli Virtanen
6a8bdf1bfe ci: don't require lc3plus
The lc3plus codec isn't packaged, so don't try to check if it builds.
2022-05-01 15:09:00 +03:00
Pauli Virtanen
9e59a56894 bluez5: add LC3plus A2DP vendor codec
Implement codec plugin for the LC3plus codec, supporting the LC3plus
encoder/decoder from Fraunhofer.
2022-05-01 15:09:00 +03:00
Pauli Virtanen
d28394173a bluez5: add LC3plus A2DP vendor codec caps
From the specification
https://www.iis.fraunhofer.de/en/ff/amm/communication/lc3.html
2022-05-01 00:27:05 +03:00
Pauli Virtanen
f9850ca4f8 bluez5: use bigger decode buffer in a2dp-source
LC3plus expands 509 bytes input -> 7680 bytes output, which is bigger
than current decode buffer.

Make the decode buffer bigger, and put it on heap, not stack.
2022-05-01 00:27:05 +03:00
Pauli Virtanen
9ad53d9d19 bluez5: a2dp-source should not stop on codec decode failures
A2DP source should continue trying to decode, even if garbled data is
received.
2022-04-30 23:43:10 +03:00
Pauli Virtanen
3d4eafcb0f bluez5: allow codecs to produce multiple packets from same data
Codecs may need to fragment a single encoder frame across multiple
packets that are sent consecutively.

Allow codec->encode() to set need_flush=NEED_FLUSH_FRAGMENT, so that
sink should immediately call start_encode + encode with NULL input data,
to produce the next packet.

Previously, other return values than need_flush=1 were unused, so no
need to bump codec ABI for this.
2022-04-30 23:43:10 +03:00
Wim Taymans
0cab700c06 profiler: place rate suggestion in latency if given 2022-04-28 17:09:52 +02:00
Wim Taymans
da072d6613 settings: also allow 44.1KHz as samplerate
Make the default allowed samplerates be 44.1KHz and 48KHz to see
what happens..
2022-04-28 17:02:27 +02:00
Wim Taymans
b7845bd702 alsa: scale buffer with frame_scale
Make the alsa buffer a little larger when we scaled the samplerate,
like for DSD. This allows us to go all the way up to the quantum
limit.
2022-04-28 13:04:39 +02:00
Wim Taymans
c48a4bc166 pw-cat: fix DSF playback again
Make the DSD buffers a little bigger because we scale down the rate.
Read an interleaved number of samples to fill one quantum.
2022-04-28 12:32:08 +02:00
Wim Taymans
ebc775674a 0.3.51 2022-04-27 19:59:21 +02:00