Commit graph

8782 commits

Author SHA1 Message Date
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
Wim Taymans
dfbb106aa8 pulse-server: use Rate control to change stream rate
Fixes #1159
2022-04-27 15:24:10 +02:00
Wim Taymans
e68364e5b7 stream: update node properties completely
Add some more context to the match rules and return how many properties
changed. If something changed, send all the properties as updates
instead of just the original changed ones.
2022-04-27 11:12:02 +02:00
Wim Taymans
ba7d410c3c handle realloc error better
Make sure we free the old pointer, clear it and set the array size to 0.
Use reallocarray where possible.
2022-04-27 10:09:06 +02:00
Wim Taymans
9e3b784b34 bluez5: use reallocarray 2022-04-27 09:27:32 +02:00
Wim Taymans
c0cf2d802b jack: handle allocation errors better 2022-04-27 09:26:40 +02:00
Wim Taymans
92e2b7dd0d json: improve unicode parsing
Make sure don't overread the strings.
Don't use sscanf but use a custom hex read function.

Fixes #2340
2022-04-27 08:37:32 +02:00
Wim Taymans
f641e4ecb3 jack: don't wait for activation update
We could do an invoke, wait, then the process could do a jack_connect()
, do_sync and we deadlock. it's probably better to not wait for
completion.
2022-04-26 20:32:25 +02:00
Wim Taymans
838ab996d0 jack: fix a potential deadlock
When some blocking method is performed on the process thread, like
jack_connect() mark the data thread as blocked while we wait for the
thread loop to process the result.

If we then try to do a blocking _invoke from the thread loop on the
data thread, make sure we don't wait for it to complete or else we
deadlock.
2022-04-26 20:15:58 +02:00
Wim Taymans
5137015c33 json: convert utf16 to utf8
We work with utf8 string so convert the unicode escape sequences to
utf8.

Fixes #2337
2022-04-26 15:38:22 +02:00
Wim Taymans
f2cdb15e0c json: fix \uXXXX parsing
We need exactly 4 hex characters, everything else is refused. We
also copy those characters directly to the output string without
assuming any encoding.

See #2337
2022-04-26 11:01:33 +02:00
Wim Taymans
d9871f36c1 pw-cat: support saving to other file formats
Use the extension to find the file format and save to it instead of
forcing wav.

See #2328
2022-04-25 20:43:18 +02:00
Pauli Virtanen
689e2d0cc9 bluez5: clear codec switch flag on device connnection change
Codec switch flag should be cleared on device connection status change,
to deal with codec_switched() callback not being called if device is
suddenly disconnected.
2022-04-25 21:28:39 +03:00
Wim Taymans
0306855b5b module-roc: update docs 2022-04-25 20:26:07 +02:00
Pauli Virtanen
3be019d7a8 bluez5: stop running codec switch on disconnect
When device is disconnected, running codec switches are not meaningful,
and should be stopped.

The codec switch callback may also trigger A2DP profile switch, which
may reconnect the device. Fix it so this does not happen.

See #2334
2022-04-25 20:15:37 +03:00