1
Fork 0
Commit Graph

11851 Commits

Author SHA1 Message Date
Dmitry Sharshakov 066e8e1c63 module-rtp-sap: add a way to add extra attributes to SDP
Useful for new device bringup without rebuilding PW
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 1fe6feac56 module-rtp: improve logging priorities
Previous state was useless for real debug at the current implementation level
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov c75f6219dc module-rtp-sap: add notices about different channelmap formats used by different hw 2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 873e6119b8 module-rtp: handle framecount attribute 2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 2525a99b97 module-rtp-sap: parse ptime from incoming streams 2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 6a64ec8b8f module-rtp-sap: send out a default channelmap if none specified
RAVENNA devices (at least Lawo) seem to error out on streams without this property

Co-authored-by: Dewi Seignard <dewiweb@gmail.com>
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov c66aad9a7c pipewire-aes67: improve the config 2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 533161a766 module-rtp: add framecount to the SDP
Required for RAVENNA hardware.

Co-authored-by: Dewi Seignard <dewiweb@gmail.com>
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 8c4cfa57b6 pipewire-aes67: use interface name as default PHC
If it's wrong the service won't start anyway because of socket bind failure
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov e4a9f800c8 pipewire-aes67: recommend using ifname
It's better for PHC identification in multi-NIC systems. PHC numbering might be dependent on the probe order yet no bugs was observed. Still recommend this for more comfortable configuration.

Also added some guidance on what must be changed
2023-12-20 09:35:22 +00:00
Dmitry Sharshakov 5edd3f240b node-driver: open PHC as readonly
RW access is usually denied to a user unit. RO might be as well but it's more safe to make /dev/ptpX just user-readable
2023-12-20 09:35:22 +00:00
Duncan Overbruck fffda6b6d1 pulse-server: fill in active port for monitors
The monitor sources also list the port of the sink and so the active
port needs to be collected as well so it doesn't fall back to the first
port (which might not be available).
2023-12-20 10:15:06 +01:00
Mark Gallagher bd87902da6 Add a build option to specify whether pulse gsettings schema should be installed 2023-12-16 21:10:00 +01:00
Mark Gallagher ee42a6868d Add pulseaudio gsettings schema 2023-12-16 21:09:17 +01:00
Wim Taymans ecf4b071e5 gst: keep track of node ports
Keep a list of ports for the node. When the node goes away, clear the
port links to the node. Handle the case where the port no longer has a
node.

This avoids a crash when, for example, the node permission is removed
and the port points to the now freed node_data.

Fixes #3708
2023-12-14 13:00:00 +01:00
Wim Taymans 5eb1f35997 gst: remove unused pending list 2023-12-14 12:59:04 +01:00
Wim Taymans 06d6551cc1 pulse-server: handle errors in echo-cancel geometry
Check for errors when loading the geometry instead of silently failing.
The points need to be given in the user locale and so might fail to
parse when given in JSON format.

Format the geometry nicely when loading the module.
2023-12-14 12:16:29 +01:00
Wim Taymans 5e750f6fb8 modules: place floats in properties in JSON format
Using %f will result in a locale dependent format and might not parse
with JSON parsers or even our own spa_atof() function.
2023-12-14 11:50:30 +01:00
Christian Glombek c386c96ff0 module-raop-discover: Skip tunnel creation for link-local addresses
Some Apple devices will advertise their link-local address via mDNS.
Ignore these mDNS entries.
2023-12-14 10:14:33 +00:00
Christian Glombek c0f018e0f4 module-raop-sink: Destroy module on RTSP error
Avoid continuation of the stream on error more rigorously.
2023-12-14 10:14:33 +00:00
Christian Glombek dc82bc5086 module-raop-discover: Remove unused raop.ip.version prop
Some AirPlay devices will announce their IPv4 addresses
over IPv6 mDNS if both are available, so the determined
IP version was not reliable.

The prop is not used by module-raop-sink, so its
removal should be safe.
2023-12-14 10:14:33 +00:00
Wim Taymans fee0f95737 jack: handle -ENOENT from the core
This means that we tried to do something on a proxy that was destroyed
on the server and we should just ignore the error.
2023-12-14 11:10:52 +01:00
Dimitrios Katsaros 1d3013f0f9 ALSA: Remove alsa timer from IRQ scheduling
As part of the setup for IRQ based scheduling, a period event
was installed. Not only is a timer based polling unecessary for
IRQ scheduling, depending on the state of the system, the timer
could fire far enough from the IRQ, causing alsa wakeup events
with no data in the ring buffer. Pipewire would identify these
events as an "early wakeup", adding an extra quantum of time
to the next_time estimate, skewing the clock and causing issues
with apps that depend on precise timing.
2023-12-13 20:56:50 +01:00
Wim Taymans 6045ce87b1 module-pipe-tunnel: avoid bitfield data race
Move the have_sync bitfield away from the other bitfields because they
are written from different threads and might cause a data race.

Fixes #3706
2023-12-13 12:48:51 +01:00
Wim Taymans ad784ca5e6 audioadapter: improve state check
Update the started and ready state after we suspend/pause the node so
that we don't complain if scheduling happens between setting the fields
and actually stopping the follower.

Also only complain when the scheduling happens when the node is not
ready. It is possible that the node is scheduled before we manage to set
the started field.
2023-12-13 12:26:26 +01:00
Wim Taymans 27bed62e66 audioconvert: avoid bitfield data races
Move the driver and warned bits after the int field in the struct so
that they are placed in separate memory.

Otherwise, a write from the data thread might race with a write from the
main thread and leave the bits in the wrong state.
2023-12-13 12:15:11 +01:00
Barnabás Pőcze 70b224f1c2 pipewire: data-loop: set thread name
Set the name of the thread running the data loop to "pw-data-loop"
for easier identification in debuggers, htop, etc.
2023-12-12 15:58:51 +00:00
Wim Taymans 5980f6988a Revert "alsa: also use interpolated time as nsec in IRQ mode"
This reverts commit 49cdb468c2.

We should not do this, the nsec field should be relatable to the clock
monotonic time. If we use the estimated time, without actually using it
as a timer, we might end up with a wakeup time in the future compared to
the MONOTONIC clock time.

Instead, you can use the estimated current time simply by subtracting
the rate corrected duration from the next_nsec. This is really only
useful for some selected use cases (like in the JACK library).

This fixes some issues where in pro-audio mode, a client would try to
compare the current MONOTONIC time to nsec and find that it is in the
past.

This commit was done in an attempt to fix #3657 but it turned out the
real problem was something else.
2023-12-12 13:09:30 +01:00
Wim Taymans 74f48a2bec jack: improve current_usec calculation
We should not use nsec from the clock as the current_usec because
current_usec is supposed to be an idealized time when the wakeup would
have happened and nsec is when it actually happened.

Instead use next_nsec and subtract the rate corrected period from it to
get the idealized current_usec.

We can still use nsec to calculate the elapsed time since the wakeup and
be sure that it is always in the past.
2023-12-12 13:08:11 +01:00
Wim Taymans e4d6cca32a raop: use default 1500ms latency again
Use 1500ms as the default latency and use the raop.latency.ms to
configure a smaller value.

Fixes #3605
2023-12-11 16:33:51 +01:00
Wim Taymans cda2522384 raop: add option back to set custom latency 2023-12-11 16:10:06 +01:00
Wim Taymans ae045ef3f6 raop: use 1500ms of latency as fallback
The Pro Link 1 replies with Audio-latency=0, patch that up to
1500ms to make it work again.

Previously it configured 1500ms as the default latency but that seems
unnecessary in the usual case.

Fixes #3698
2023-12-11 16:07:57 +01:00
Wim Taymans 283c215641 stream: make empty objects remove the PARAM
Make sure that NULL params don't cause -EINVAL but ignore them.

Don't add empty param objects. this makes it possible to clear all previous
params by setting an empty object.
2023-12-11 13:01:10 +01:00
Wim Taymans 971bc8a249 modules: make sure we don't overrun our array
Limit the max number of params to 512 and make sure we don't collect
more.
2023-12-11 12:53:40 +01:00
Wim Taymans 6cda416e71 modules: always add the Props param
We always need to add the Props param because it contains the
debug.aec.wav-path key, which is always available, even when the AEC
implementation has no properties.

Also add the debug.aec.wav-path PropInfo.
2023-12-11 12:02:58 +01:00
Wim Taymans 658b624a83 modules: reuse the same code for setting properties
We can reuse the same code for setting input and output stream
properties. This also makes it possible to set the debug.aec.wav-path
on all streams, like the properties say.
2023-12-11 12:00:43 +01:00
Wim Taymans fbaf4db6b0 modules: add source ip and port in stream props 2023-12-11 10:04:14 +01:00
Wim Taymans f31d87cfee modules: return -EINVAL on invalid port 2023-12-11 10:03:51 +01:00
Alexander Shopov 7568a64ab6 po: Update Bulgarian translation
Fixes #3697
2023-12-10 13:41:53 +01:00
Pauli Virtanen bdf96979fc doc: include pipewire-pulse modules explanations also on man page 2023-12-09 16:37:03 +02:00
Pauli Virtanen 31b7ff58ad doc: add pw-v4l2.1 and spa-*.1
Add manpages for the remaining utilities without one.
2023-12-09 16:36:24 +02:00
Pauli Virtanen 7f2dd3531c bluez5: use only one input route
Don't have separate input route for A2DP and HFP, as it is generally not
necessary.

When in A2DP mode when there's also HFP possible, emit the input route
in SPA_PARAM_Route, even though there is no corresponding input node
emitted.

The host may then emit a loopback microphone node, and switch profiles
according to its status. Having the input route available at all times
allows to retain changes to volume settings made when there is no real
input node.
2023-12-09 14:05:50 +02:00
Pauli Virtanen 4e2057930f pulse-server: update all params only after enumeration complete
For params that don't emit change events, the param enumeration does not
start core sync, and its enumeration may be incomplete if a previous
core sync completes first.

Fix by always starting a core sync if we are updating params.

This fixes dev_info.active_port being sporadically SPA_ID_INVALID if
there is event pressure, which causes do_set_volume randomly set the
volume on the node instead of setting it on the device.  This can be
triggered e.g. by shaking the volume slider in Pavucontrol with mouse.
2023-12-09 11:23:25 +00:00
Pauli Virtanen 9d779300af context: support letter codes for log.level
Letter codes instead of numbers for log levels are allowed in
PIPEWIRE_DEBUG.

Support them also for log.level in context properties and metadata.

Add a few alias letter codes to harmonize them with what WirePlumber 0.5
supports.
2023-12-09 10:26:26 +00:00
Pauli Virtanen 80bf28edfd doc: add pw-reserve.1 2023-12-08 18:59:23 +02:00
Wim Taymans 9c6d310297 conf: fix comment node.always-driver -> node.always-process
Fixes #3696
2023-12-08 17:20:31 +01:00
Kiran K 44df080482 bluez5: Add support for 32KHz for lc3 codec
Fixes: b69e089648 ("bluez5: Add support for 32KHz sampling frequency")
2023-12-08 19:15:50 +05:30
kirankrishnappa-intel b69e089648 bluez5: Add support for 32KHz sampling frequency 2023-12-08 08:34:09 +00:00
Pauli Virtanen 92f0815e4d bluez5: media-sink: keep one more buffer free
We delay the audio a bit to keep packet intervals equal, which keeps
some data in buffers.

In theory the calculation keeps one buffer free, but it doesn't
explicitly keep "extra" buffer space so in theory might flush too late
and next process() might not have free buffers.  However, as we encode
next packet right away this shouldn't really occur...

Try to keep one extra spare buffer free so that the flush time is
certainly early enough.
2023-12-05 18:37:36 +02:00
Pauli Virtanen a9ff282501 bluez5: drop queued data on node stop
Clear queued buffers when stopping consuming, to ensure that all buffers
are usable when we start again.

Do for A2DP as we already do for SCO.
2023-12-05 18:37:36 +02:00