mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.29k stars 574 forks source link

[Problem]: Compatibility layer of Avahi #1817

Closed gearhead closed 6 months ago

gearhead commented 8 months ago

What happened?

Clean startup w/o extraneous error/warnings in shairport-sync.

This is not a problem that causes any loss of functionality, but the current version of libavahi-compat-libdnssd1 on RpiOS (and, I am guessing debian/ubuntu) show this warning when shairport-sync is started. We can turn the warning off, but is this something that affects anything? Will it/should it be remedied in shairport-sync? It does not inhibit any audio played through shairport-sync. I connect and can play from my phone without issue.

Relevant log output

Journal entries under 'systemctl status shairport-sync':
Mar 04 18:22:55 rpi64 shairport-sync[801554]: *** WARNING *** The program 'shairport-sync' uses the Apple Bonjour compatibility layer of Avahi.
Mar 04 18:22:55 rpi64 shairport-sync[801554]: *** WARNING *** Please fix your application to use the native API of Avahi!
Mar 04 18:22:55 rpi64 shairport-sync[801554]: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>

System Information.

Rpi running RPiOS bookworm running alsaun (no pipewire or pulseaudio)

Linux rpi64 6.1.0-rpi8-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux

Configuration Information.

root@rpi64(rw):~# shairport-sync --displayConfig
>> Display Config Start.

From "uname -a":
 Linux rpi64 6.1.0-rpi8-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux

From /etc/os-release:
 Debian GNU/Linux 12 (bookworm)

From /sys/firmware/devicetree/base/model:
 Raspberry Pi 3 Model B Plus Rev 1.3

Shairport Sync Version String:
 4.3.2-AirPlay2-smi10-alac-OpenSSL-dns_sd-ALSA-jack-pa-pw-stdout-pipe-soxr-metadata-mqtt-dbus-sysconfdir:/etc

Command Line:
 shairport-sync --displayConfig

Configuration File:
 /etc/shairport-sync.conf

Configuration File Settings:
 general : 
 {
   name = "rpi64";
   interpolation = "soxr";
   output_backend = "alsa";
   alac_decoder = "apple";
 };
 sessioncontrol : 
 {
   run_this_before_play_begins = "/var/www/command/airplay_toggle on";
   run_this_after_play_ends = "/var/www/command/airplay_toggle off";
   wait_for_completion = "yes";
 };
 alsa : 
 {
   output_device = "hw:CARD=J380";
   mixer_control_name = "Digital";
   mixer_device = "default";
   output_rate = 44100;
   output_format = "S16";
 };
 pipe : 
 {
   name = "/run/shairport-sync/shairport-sync-output-pipe";
 };
 metadata : 
 {
   enabled = "yes";
   include_cover_art = "yes";
   pipe_name = "/run/shairport-sync/shairport-sync-metadata";
 };

>> Display Config End.
>> Goodbye!

PulseAudio or PipeWire installed?

How did you install Shairport Sync?

Built from source

Check previous issues

mikebrady commented 8 months ago

Thanks for the interesting post.

That warning seems to be because Shairport Sync has been built with the --with-dns_sd rather than the --with-avahi configuration setting. With the --with-avahi setting, the native Avahi API is used.

Actually, and slightly separately, I'm a bit surprised that --with-dns_sd allows AirPlay 2 functionality, as many specific Avahi features are used to implement AirPlay 2.

gearhead commented 8 months ago

Thanks for the help. Actually, it was built with both flags. Once I removed the --with=dns_sd flag, it worked without showing that warning.

mikebrady commented 8 months ago

Aha, didn’t spot that 🤨.

github-actions[bot] commented 6 months ago

This issue has been inactive for 28 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.