Commit graph

9392 commits

Author SHA1 Message Date
Wim Taymans
6e9e02b420 audioconvert: refactor peaks resampler
Use common code in macro and generate arch specific version.
Compile with -Ofast to optimize some fmaxf calls.
2022-09-07 16:00:31 +02:00
Wim Taymans
a79b5c86ea pulse-server: Handle clients that send more than requested
A client can sometimes send more data than we requested. PulseAudio
keeps the extra data around, it just asks for more data when it consumed
some of it.

PipeWire however always tries to keep tlength worth of data, as
specified in the PulseAudio docs... Keep track of how much extra data
has been sent and keep this around as well. Make sure we flush this
extra data as well.

Fixes #2626
2022-09-07 13:07:28 +02:00
Wim Taymans
50f76c8730 pulse-server: implement TRIGGER and PREBUF methods
Start and stop prebuf.
2022-09-07 13:02:55 +02:00
Wim Taymans
968bc382af log: initialize pos to help the compiler
Although pos will be set to 0 in the first iteration, the compiler does
not seem to figure this out, so help it a little:

../spa/include/spa/support/log.h:306:21: warning: ‘pos’ may be used uninitialized [-Wmaybe-uninitialized]
  306 |                 pos += sprintf(str + pos, "%02x ", buf[i]);                             \
      |                     ^~
../spa/include/spa/support/log.h:301:13: note: ‘pos’ was declared here
  301 |         int pos;                                                                        \
      |             ^~~
2022-09-07 09:17:19 +02:00
Frédéric Danis
2c72597271 bluez5: Use spa_log_hexdump() to dump media properties/configuration 2022-09-07 07:50:23 +02:00
Frédéric Danis
1d39ea004e log: Add spa_log_hexdump 2022-09-07 07:50:23 +02:00
Wim Taymans
75af02edcd stream: add Format and EnumFormat on stream nodes
The stream only has one format/enumformat list for the one port it has
so also expose this on the node. We can then remove the adapter for
video.

We can also now show midi (control) streams as the format in pw-top.
2022-09-06 20:42:19 +02:00
Wim Taymans
5b2b93f915 alsa: add period-size, period-num and headroom in props
Add the currently configured alsa hw_params in the properties for
easier access.
2022-09-06 20:16:29 +02:00
Wim Taymans
32421965c7 stream: add a video adapter for video streams
The vidweo adapter is in passthrough but allows us to query the
node for the formats, which then show up in pw-top.
2022-09-06 19:06:10 +02:00
Wim Taymans
e9b7667b55 pw-top: remove some slashes to avoid confusion
Update man page
2022-09-06 18:32:56 +02:00
Wim Taymans
ffc09ce55e videoconvert: refresh with latest audioadapter copy 2022-09-06 17:48:00 +02:00
Wim Taymans
d90d2c92f4 man: update man page 2022-09-06 15:47:13 +02:00
Wim Taymans
76631e6251 pw-top: show negotiated formats
Add a column with negotiated formats.
It requires an adapter that will enumerate the port formats so it does
not work for video streams yet.

Fixes #2566
2022-09-06 15:36:58 +02:00
Wim Taymans
305f2104ee pulse-server: rework buffer attributes
Move the latency fraction calculation to fix_ functions so that the
new latency rate can be used when creating the streams.
Actually set the requested record attributes on the stream instead
of modifying the defaults.

See #2671
2022-09-06 11:53:51 +02:00
Wim Taymans
8efc221fa8 man: clarify MIDI and DSD playback
These tools don't render MIDI or DSD, you need separate tools or
hardware for that.
2022-09-06 10:03:52 +02:00
Wim Taymans
1a915c2ced pulse-server: set record attributes more like PulseAudio
PulseAudio assigns half of the fragsize to the source latency.
PulseAudio sends in chunks up to a fixed limit.

Checked against #2418
2022-09-05 18:13:12 +02:00
Wim Taymans
ad06db91ee Revert "pulse-server: send chunks with half the fragsize"
This reverts commit e10305851d.

If causes some regressions: see #2671
2022-09-05 16:19:42 +02:00
Wim Taymans
83e83608c8 Revert "pulse-server: tweak the fragsize/minreq handling"
This reverts commit ad214dde2e.
2022-09-05 16:18:54 +02:00
Wim Taymans
009ab9681d Revert "pulse-server: simplify latency handling"
This reverts commit 9c34a923db.
2022-09-05 16:18:45 +02:00
Wim Taymans
72ce2f815b Revert "pulse-server: enforce minfrag after latency adjust"
This reverts commit b70f32a259.
2022-09-05 16:18:34 +02:00
Wim Taymans
201e6ae9fd audioconvert: use given channelmap for volume
Use the given channelmap for the volume, like it used to be in old
audioconvert.

This makes new streams expose a volume even when not negotiated yet.
2022-09-05 15:29:16 +02:00
Wim Taymans
71ec8650ba audioconvert: remove redundant set_volume calls 2022-09-05 13:23:18 +02:00
Wim Taymans
0c47ab76a7 channelmix: Only filter FC/LFE when present 2022-09-05 13:22:40 +02:00
Wim Taymans
7b432aec88 spa: make default samplerate 48000
Remove some 44100 default rates and use 48000 instead.
2022-09-05 12:21:20 +02:00
Wim Taymans
cad7db9f58 libcamera: close camera in error path 2022-09-05 09:25:42 +02:00
Pauli Virtanen
df858cae7c bluez5: clarify OPUS-A2DP spec
Also remove DRAFT tag.
2022-09-03 19:08:27 +00:00
Wim Taymans
b70f32a259 pulse-server: enforce minfrag after latency adjust 2022-09-03 13:07:09 +02:00
souravdas142
0079a1d5bc filter-chain: use right lv2 include path for some older distros also
3f6fe392 uses headers from /usr/include/lv2/atom/. but this leads compilation
    failure for some distros (i.e. ubuntu 18.04) as they have some
    different location for these headers. One can find these headers
    at /usr/include/lv2/lv2plug.in/ns/ext/atom/ (for ubuntu 18.04)
    instead /usr/include/lv2/atom/. So guard them with __has_include.
    and mention other possibilities.

    Fixes #2670
2022-09-03 13:14:00 +05:30
Wim Taymans
f957435586 module-loopback: use node.name as description fallback
When no description is given, just copy the node.name. This looks
better than the automatically generated description.
2022-09-02 13:55:25 +02:00
Wim Taymans
3f6fe39209 filter-chain: use right lv2 include path 2022-09-02 13:00:07 +02:00
Wim Taymans
225e89b8da doc: add a bootlin.com blog post 2022-09-02 11:36:58 +02:00
Wim Taymans
33103ff39d NEWS update highlights 2022-09-02 10:48:29 +02:00
Wim Taymans
49f1c2038f 0.3.57 2022-09-02 10:23:23 +02:00
Jordi Mas
a3351b8997 Update Catalan translation 2022-09-01 21:17:07 +02:00
Wim Taymans
9c34a923db pulse-server: simplify latency handling
We don't need to use the minreq field. The fragsize is only updated when
adjust_latency is used.
2022-09-01 16:46:18 +02:00
Wim Taymans
ad214dde2e pulse-server: tweak the fragsize/minreq handling
Only send 2/3 of the fragsize
2022-09-01 16:23:56 +02:00
Wim Taymans
e10305851d pulse-server: send chunks with half the fragsize
PulseAudio configures half of the fragsize as the source latency. It
also sends chunks as soon as they become available.

This means that we also need to configure the source with half of
the fragsize latency and send in chunks of fragsize/2. Keep this in
the unused (for record) minreq field.
2022-09-01 15:46:17 +02:00
Wim Taymans
9123710971 spa: clean up some port io checks
We should not generate a warning.
2022-09-01 15:39:34 +02:00
Wim Taymans
2fa1b4384b spa: don't warn for NULL io
The io is set to NULL when the port becomes unnegotiated.
2022-09-01 15:31:14 +02:00
Wim Taymans
f48f158566 filter-chain: fix includes 2022-09-01 14:08:38 +02:00
Wim Taymans
4593ac4113 alsa: pass bool argument properly 2022-09-01 10:18:55 +02:00
Wim Taymans
3215b58bae alsa: save volumes
Instruct the session manager to save the volumes when set with the
ALSA ctrl API.
2022-09-01 09:43:10 +02:00
Wim Taymans
c8ef655b3e jack: group all jack nodes in the same application group
Make sure all jack nodes from the same pid are in the same group.

It is normally not a problem for different JACK clients to live in
different groups and be scheduled by different drivers with different
quantum and rate.

Some applications (like Carla), however, make multiple clients and
expect all of them to use the same quantum and rate. Enforce this by
adding all jack clients to the application jack group.
2022-08-31 16:08:05 +02:00
Wim Taymans
0126663238 context: remove unused function 2022-08-31 13:52:19 +02:00
Wim Taymans
2054dcf36f alsa: Improve format negotiation
When the device is not running but has a format, close/open the
device to get all the available formats again. Do the same when
setting a format.

Otherwise, the configuration space of the device is restricted to the
current negotiated format and we can't query the other possibilities
or change it.

Fixes #2625
2022-08-31 10:03:39 +02:00
Wim Taymans
b33ffcf683 test: print channel map as reported by alsa as well
See #1707
2022-08-30 16:45:35 +02:00
Wim Taymans
c20790c64b pulse-tunnel: destroy the module on errors
When the pulse context or stream is in error, destroy the module.
2022-08-30 16:09:04 +02:00
Wim Taymans
9248ce3c19 pulse-tunnel: fix rate adjustement argument
The sign of the error was wrong, making the rate controller adjust in
the wrong direction and make things worse.

See #2548
2022-08-30 16:01:14 +02:00
Wim Taymans
24f6225c5d audioconvert: don't emit changed events for rate changes
Rate changes can happen very often when a stream is doing rate control,
so don't emit the changes every time.
2022-08-30 16:00:00 +02:00
Wim Taymans
5ae1c03d77 module-rt: small fixes
could_use_rtkit -> can_use_rtkit.
Only warn when setting nice and there is no rtkit fallback.
Always call set_rtlimit, it does not have an rtkit implementation, if just
has some properties with limits.
Only try to set nice again with rtkit when we required rtkit for some
functions.
2022-08-30 15:15:56 +02:00