Commit graph

82 commits

Author SHA1 Message Date
Christian Glombek
def6514872 module-raop-sink: Set DACP-ID header 2023-09-26 19:11:08 +02:00
Christian Glombek
de329f3a62 module-raop-sink: Uppercase Client-Instance header 2023-09-26 19:11:08 +02:00
Christian Glombek
c4a18d6c5c module-raop-sink: Add Apple-Challenge only if RSA encrypted
Only add Apple-Challenge header once on ANNOUNCE,
and only if RSA encrypted.
2023-09-26 19:11:08 +02:00
Christian Glombek
a8f5d20384 module-raop-sink: Rename a bunch of things 2023-09-26 19:11:08 +02:00
Christian Glombek
7f14e14ab7 module-raop-sink: Use rtp_header for RTP messages 2023-09-25 08:37:56 +02:00
Wim Taymans
5942c282a2 module-raop-sink: bump latency to 1.5sec
Make it work on the Audio pro link 1
2023-07-13 17:56:34 +02:00
Christian Glombek
d8dc89ad1a module-raop/rtsp-client: Pass content to reply function 2023-07-13 15:42:56 +00:00
Christian Glombek
6368b8cb87 module-raop-sink: Always log reply status 2023-07-13 15:42:56 +00:00
Christian Glombek
a4c6f9a27f Revert "module-raop: zero uppet timestamp bits"
This reverts commit 21d16b1ad5.

The change causes the sound of videos to be way out of sync when streaming from Fedora to Sonos.

It seems the issue is a device-specific quirk, and the change cannot be applied universally to all devices,
thus reverting until a better solution is found that does not affect other devices.
2023-07-13 15:42:56 +00:00
Barnabás Pőcze
fe45786a5d treewide: add some examples for the spa_auto* macros 2023-07-11 14:23:53 +02:00
Wim Taymans
21d16b1ad5 module-raop: zero uppet timestamp bits
The Audiopro link1 seems to want to upper bits of the timestamp in
sync messages as 0. It still seems to work with Sonos.

See #3247
2023-07-06 17:01:09 +02:00
Barnabás Pőcze
1bb714b95e pipewire: utils: make_random(): do not use errno
The function already returns `ssize_t`, so do not use `errno`
to communicate the reason for failure, instead, return the
negative errno.

`pw_getrandom()` was inconsistent in this regard because
sometimes it simply returned a negative errno without
setting `errno`. This change fixes that as well.
2023-07-03 19:40:31 +02:00
Wim Taymans
802b51a0cb module-raop: set min-latency correctly
I think we need to set this to the min-latency, not the latency
we will report in the sync messages.

See #3282
2023-06-11 19:51:54 +02:00
Barnabás Pőcze
dfb3cb20af pipewire: module-raop-sink: check asprintf return value
GCC warns because `asprintf()` has the `warn_unused_result`
attribute, so check the return value to silence the warning.
2023-06-10 02:22:08 +02:00
Wim Taymans
c2860477c3 module-raop: add default 1 sec of latency
Make NTP timestamps based on CLOCK_REALTIME.

Handle socket errors.

Some devices want at least 1 second of latency between RTP and NTP
timestamps or they stay silent. A a raop.latency.ms property for this
purpose that defaults to 1 second.

It is said that all devices seem to add 250ms of extra playback delay,
so include that into the delay reporting.

Fixes #3247
2023-06-07 16:51:34 +02:00
Wim Taymans
e3d715dfdf module-raop: only send volume when recording
See #3210
2023-05-12 10:48:40 +02:00
Dmitry Sharshakov
249cf9bfbe chore: fix warnings shown by Clang 16
These might have existed earlier, but fixing anyway
2023-05-09 08:31:56 +00:00
Christian Glombek
b6b8035b0d module-raop-sink: Add default PW_KEY_DEVICE_ICON_NAME prop
Default icon prop to "audio-speakers"
2023-05-02 17:08:09 +00:00
Wim Taymans
c23c27b566 module-raop: fix warning on uninitialised res variable 2023-05-01 09:59:55 +02:00
Christian Glombek
0bb0b524c7 raop: Deduplicate sink creation
Currently, RAOP sinks referencing the same remote ip and port may be created multiple times:
One each for IPv4 and IPv6, times the number of network interfaces used for mDNS discovery.

A recent change added `(IPv4)`and `(IPv6)`identifiers to the sinks' pretty names, however that
is misleading, as often times the service advertised through an mDNSv6 record is actually an
IPv4 service (i.e. the IP reference contained in the IPv6 record may be an IPv4 address).

With this change, sink creation is skipped if a sink with the same advertised name already exists.
2023-05-01 07:48:19 +00:00
Wim Taymans
12bc69a469 raop-sink: only set volume when connected
Only attempt to set the volume when connected. Apply the current
volume after connecting.

Based on patch by Tycho Haemers

Fixes #3175
2023-04-22 11:16:55 +02:00
Wim Taymans
74b1b63c3d module-raop: implement remote volume
Intercept the volume property changes and trigger a set_parameter
with the volume property to control the remote volume.

Fixes #2061
2023-04-18 11:30:57 +02:00
Wim Taymans
7f7821c3f2 module-raop: handle 0 timing_port
When the timing_port is 0, just don't send out an initial timing packet.

When we receive a timing packet, reply to the same address/port that the
timing packet was sent from.

Fixes #3133
2023-04-04 17:55:02 +02:00
Wim Taymans
07e6f44e58 modules: clean up USAGE arguments
use () to mark optional arguments to avoid confusion with arrays.
Add some more optional arguments.
2023-03-22 16:35:55 +01:00
Wim Taymans
cb46c8c5f9 module-raop: fix compilation 2023-03-16 14:50:22 +01:00
Wim Taymans
a3875c38ac modules-raop-sink: improve error handling 2023-03-16 11:22:35 +01:00
Wim Taymans
106836f7d6 module-raop: add audio rate in SDP 2023-03-15 18:32:12 +01:00
Wim Taymans
114e678243 module-raop: fix compilation 2023-03-15 17:50:49 +01:00
Wim Taymans
8167e1b9be module-raop: add match rules for discover
Useful for selecting only ip4 streams or for setting up the password.
2023-03-15 17:23:41 +01:00
Wim Taymans
9e56fae236 module-raop: use newer openssl API when we can 2023-03-15 15:57:26 +01:00
Wim Taymans
af9d8072a3 module-raop: remove unused include 2023-03-15 12:50:27 +01:00
Wim Taymans
9a4a4fe9c4 module-raop: Use new openssl methods
Fix Digest, we need to use the method to generate a new Digest for each
request.
Use newer openssl methods instead of deprecated ones. The RSA sign still
need to be ported.
2023-03-15 10:29:35 +01:00
Wim Taymans
98222ab2ae module-raop: improve properties
Try to make a better NODE_NAME and NODE_DESCRIPTION using the
hostname and ip version.
2023-03-14 10:34:45 +01:00
Barnabás Pőcze
934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Wim Taymans
164e343dbf remove pipewire/private.h includes when possible
In many places this is not needed.
Expose pw_impl_node_set_param() for adapter.
2023-01-20 16:08:38 +01:00
Wim Taymans
f472fd736d fix includes
Only include debug we need. We usually only need the debug types.
2023-01-18 13:12:16 +01:00
Gleb Popov
781b7b187a Add a type cast necessary to compile on FreeBSD. 2022-11-14 19:57:08 +03:00
Wim Taymans
59e49d31eb raop: add error from reply
Return an error from the reply callback and log some generic message
in case there is an error value returned.
2022-10-12 17:51:35 +02:00
Tycho Haemers
e168af8804 Update src/modules/module-raop-sink.c 2022-10-12 13:41:07 +00:00
Tycho Haemers
09a62514e3 Update src/modules/module-raop-sink.c 2022-10-12 13:28:14 +00:00
Tycho Haemers
5fc69f3ec7 Update src/modules/module-raop-sink.c 2022-10-12 13:21:03 +00:00
Tycho Haemers
0c494c5469 Update src/modules/module-raop-sink.c 2022-10-12 10:23:39 +00:00
Tycho Haemers
2ef10cefa9 Replace module-raop-sink.c 2022-10-12 10:23:39 +00:00
James Le Cuirot
384ec63ae4 raop: Fix raop.encryption typo in the documented configuration example 2022-10-12 07:38:14 +00:00
James Le Cuirot
f059f14c68 raop: Allow digest authentication and auth-setup to be used together
The current implementation assumes these are mutually exclusive, but
Yamaha MusicCast requires an auth-setup step following the digest
authentication.

`rtsp_auth_reply` could be dropped in favour of `rtsp_options_reply`,
but you may end up in a loop if the other end keeps responding with 401.
2022-10-12 07:38:14 +00:00
James Le Cuirot
4b0945bf01 raop: Use the real URI for digest authentication rather than *
Yamaha MusicCast (or at least the RX-A880) seems to be stricter about
the URI here, as it rejects `*`. Examples, such as those documented by
OpenAirplay, use the real URI.
2022-10-12 07:38:14 +00:00
James Le Cuirot
f613922d0e raop: Fix duplicate Digest string in Authorization response header
We were responding with this, which works, but was probably unintended.

  Authorization: Digest Digest username="iTunes" ...
2022-10-12 07:38:14 +00:00
Wim Taymans
be1159eb66 module-rtp: make sender work
Small cleanups
2022-10-06 11:41:01 +02:00
Sebastian Koenig
fd66fb8867 raop: add support for ALAC codec
Some Airplay devices announce themselves as using the ALAC (Apple Lossless Audio
Codec) format, while pipewire only supports the PCM codec.  A look at the
Pulseaudio RAOP reveals that ALAC is supported there, but the encoding looks
exactly like what pipewire does for PCM.  This patch adds support for ALAC, but
it uses the existing PCM infrastructure to send the audio data.
2022-09-26 07:16:52 +00:00
Wim Taymans
4b16eee27a module-raop-sink: add more docs 2022-09-13 12:10:48 +02:00