Commit graph

8761 commits

Author SHA1 Message Date
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
Wim Taymans
4bcc93b68e module-loopback: fix spelling
Thanks to Diego Viola and !1220
2022-04-25 17:03:45 +02:00
Wim Taymans
09ea37cfdf roc: add fec_code option
Add fec_code option.
Fix resample.profile parsing.
2022-04-25 16:20:55 +02:00
Wim Taymans
1e244b4ebd module-roc: try to switch rates
Try to switch the graph to 44100Hz.
2022-04-25 15:34:05 +02:00
Wim Taymans
4885baabb1 protocol-pulse: add roc-sink-input
Add a sink-input roc source, like the pulseaudio one.

Fixes #2331
2022-04-25 15:18:47 +02:00
Wim Taymans
ef2f8f981d roc-source: make the source a stream by default
So that it autoconnects to a sink.
Use requested buffer size as read size.
2022-04-25 15:16:54 +02:00
Wim Taymans
037304ce70 module-roc-source: don't set defaults
Don't set defaults, the real roc-source will handle that. Especially,
don't set the remote port as the latency.

See #2331
2022-04-25 15:14:50 +02:00
Wim Taymans
277447d8f9 module: add debug while dlopen failed 2022-04-25 15:09:37 +02:00
Wim Taymans
1e46d114d0 modules: update docs 2022-04-24 11:29:46 +02:00
Wim Taymans
e78b886785 module: update docs 2022-04-24 11:21:04 +02:00
Wim Taymans
d9fd4dc76a module-rt: fix formating and comment 2022-04-24 10:18:47 +02:00
Wim Taymans
b95c145446 module-rt: fix compilation 2022-04-24 10:14:56 +02:00
Thomas Bernard
5cad844b49 Replace sched_ calls with pthread_ to set realtime priorities 2022-04-24 08:14:01 +00:00
Dennis D
08e7ac6239 Update spa/plugins/bluez5/bluez-hardware.conf
Fixes https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2291
2022-04-23 19:53:24 +00:00
Wim Taymans
bb8a0b5e06 jack: only call buffer_size callback after change
Don't call the buffersize callback the first time but only when the
size changed since the last process or get_buffer_size() call.

Fixes #2324
2022-04-23 21:37:45 +02:00
Wim Taymans
c9cf914d85 filter: don't use invalid context
The context is not yet set on the impl.

Fixes #2323
2022-04-23 12:31:13 +02:00
Wim Taymans
e406ff9530 doc: add an older AGL Paper 2022-04-23 10:16:22 +02:00
Wim Taymans
54e96d2d10 doc: Add good bluetooth article 2022-04-23 10:14:00 +02:00
Wim Taymans
49486bceeb filter-chain: add a simple delay
See #2320
2022-04-22 21:40:01 +02:00
Wim Taymans
2dfc41766f filter-chain: fix config parse
We need to advance to the next item.
2022-04-22 21:33:49 +02:00
Wim Taymans
978c50e86c pw-link: make port_id char array larger
The id might not fit.
2022-04-22 21:06:40 +02:00
Antonio Larrosa
6dd3ee4e15 pw-link: Support destroying all links between ports of two nodes
With this commit, something like
`pw-link -d my-device alsa_output.headset` can be used to destroy
all links from output ports of `my-device` to input ports of
`alsa_output.headset`.
2022-04-22 17:29:52 +00:00