Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Problem]: no sound pipewire #1839

Open
2 tasks done
sergeybutakov opened this issue Apr 8, 2024 · 3 comments
Open
2 tasks done

[Problem]: no sound pipewire #1839

sergeybutakov opened this issue Apr 8, 2024 · 3 comments

Comments

@sergeybutakov
Copy link

sergeybutakov commented Apr 8, 2024

What happened?

Hi 馃憢
Pipewire is selected by default, in raspi-config
What do I need to do to get sound? I'm using a docker image with a personal config
Please help me find how to run this .

docker start is:

services:
  shairport-sync:
    image: mikebrady/shairport-sync:latest
    network_mode: host
    restart: unless-stopped
    # environment:
    #  PULSE_SERVER: unix:/tmp/pulseaudio.socket # Path for PulseAudio socket
    #  PULSE_COOKIE: /tmp/pulseaudio.cookie # Path for PulseAudio cookie
    devices:
      - /dev/snd # ALSA device
    volumes:
      - ./my.conf:/etc/shairport-sync.conf # Customised Shairport Sync configuration file.
    #   - /run/user/1000/pulse/native:/tmp/pulseaudio.socket # PulseAudio socket when using that backend
    logging:
      options:
        max-size: 200k
        max-file: "10"

I tried to change the port, it says that it is busy.
It鈥檚 not clear who is busy, it鈥檚 running in Docker, the port is not occupied by anything in the system.

...
         0.001069686 "shairport.c:2643" NQPTP is online.
         0.000571055 "rtsp.c:5504" unable to listen on IPv4 port 7001. The error is: "Address in use".
         0.000047500 "rtsp.c:5504" unable to listen on IPv6 port 7001. The error is: "Address in use".
         0.000052185 "rtsp.c:5695" *warning: could not establish a service on port 7001 -- program terminating. Is another instance of Shairport Sync running on this device?
         0.000089648 "rtsp.c:5699" Oops -- fell out of the RTSP select loop
Segmentation fault (core dumped)

Relevant log output

shairport-sync -v
         0.001308537 "shairport.c:2252" Startup in AirPlay 2 mode, with features 0x405fca00,0x1c340 on device "2c:cf:67:1a:fa:97".
         0.000049166 "shairport.c:2291" Version String: "4.3.2-2-g165431a8-dirty-AirPlay2-smi10-alac-OpenSSL-Avahi-ALSA-pa-dummy-stdout-pipe-soxr-convolution-metadata-mqtt-dbus-mpris-sysconfdir:/etc"
         0.000010482 "shairport.c:2310" Command Line: "shairport-sync -v".
         0.000118889 "shairport.c:2346" Log Verbosity is 1.
         0.000024703 "audio_pipe.c:134" audio pipe name is "/tmp/shairport-sync-audio"
         0.000007630 "shairport.c:2394" disable_resend_requests is off.
         0.000006000 "shairport.c:2395" diagnostic_drop_packet_fraction is 0.000000. A value of 0.0 means no packets will be dropped deliberately.
         0.000008222 "shairport.c:2399" statistics_requester status is 0.
         0.000005556 "shairport.c:2404" rtsp listening port is 7000.
         0.000006037 "shairport.c:2405" udp base port is 6001.
         0.000005333 "shairport.c:2406" udp port range is 10.
         0.000005111 "shairport.c:2407" player name is "SoundBar".
         0.000005426 "shairport.c:2408" backend is "pipe".
         0.000005260 "shairport.c:2409" run_this_before_play_begins action is "(null)".
         0.000006463 "shairport.c:2410" run_this_after_play_ends action is "(null)".
         0.000006296 "shairport.c:2411" wait-cmd status is 0.
         0.000005222 "shairport.c:2412" run_this_before_play_begins may return output is 0.
         0.000006426 "shairport.c:2413" run_this_if_an_unfixable_error_is_detected action is "(null)".
         0.000006593 "shairport.c:2415" run_this_before_entering_active_state action is  "(null)".
         0.000006314 "shairport.c:2417" run_this_after_exiting_active_state action is  "(null)".
         0.000006111 "shairport.c:2419" active_state_timeout is  10.000000 seconds.
         0.000006982 "shairport.c:2420" mdns backend "(null)".
         0.000005093 "shairport.c:2422" interpolation setting is "auto".
         0.000005277 "shairport.c:2426" interpolation soxr_delay_threshold is 30000000.
         0.000006074 "shairport.c:2427" resync time is 0.050000 seconds.
         0.000006130 "shairport.c:2428" resync recovery time is 0.100000 seconds.
         0.000007000 "shairport.c:2429" allow a session to be interrupted: 0.
         0.000005648 "shairport.c:2430" busy timeout time is 0.
         0.000005111 "shairport.c:2431" drift tolerance is 0.002000 seconds.
         0.000006074 "shairport.c:2432" password is "(null)".
         0.000004889 "shairport.c:2433" default airplay volume is: -24.000000.
         0.000005685 "shairport.c:2434" high threshold airplay volume is: -16.000000.
         0.000006575 "shairport.c:2436" check for higher-than-threshold volume for new play session is disabled.
         0.000006796 "shairport.c:2442" ignore_volume_control is 0.
         0.000005185 "shairport.c:2446" volume_max_db is not set
         0.000004796 "shairport.c:2447" volume range in dB (zero means use the range specified by the mixer): 30.
         0.000006519 "shairport.c:2449" volume_range_combined_hardware_priority (1 means hardware mixer attenuation is used first) is 0.
         0.000006778 "shairport.c:2453" playback_mode is 0 (0-stereo, 1-mono, 1-reverse_stereo, 2-both_left, 3-both_right).
         0.000006963 "shairport.c:2455" disable_synchronization is 0.
         0.000004981 "shairport.c:2456" use_mmap_if_available is 1.
         0.000005056 "shairport.c:2457" output_format automatic selection is enabled.
         0.000006092 "shairport.c:2461" output_rate automatic selection is enabled.
         0.000006093 "shairport.c:2465" audio backend desired buffer length is 1.000000 seconds.
         0.000007129 "shairport.c:2467" audio_backend_buffer_interpolation_threshold_in_seconds is 0.000000 seconds.
         0.000006889 "shairport.c:2469" audio backend latency offset is 0.000000 seconds.
         0.000006315 "shairport.c:2471" audio backend silence lead-in time is "auto".
         0.000005796 "shairport.c:2475" zeroconf regtype is "_raop._tcp".
         0.000005241 "shairport.c:2476" decoders_supported field is 3.
         0.000005593 "shairport.c:2477" use_apple_decoder is 1.
         0.000004963 "shairport.c:2478" alsa_use_hardware_mute is 0.
         0.000005037 "shairport.c:2482" no special mdns service interface was requested.
         0.000009759 "shairport.c:2485" configuration file name "/etc/shairport-sync.conf" resolves to "/etc/shairport-sync.conf".
         0.000006944 "shairport.c:2492" metadata enabled is 1.
         0.000004815 "shairport.c:2493" metadata pipename is "/tmp/shairport-sync-metadata".
         0.000006204 "shairport.c:2494" metadata socket address is "(null)" port 0.
         0.000006204 "shairport.c:2496" metadata socket packet size is "500".
         0.000005074 "shairport.c:2497" get-coverart is 1.
         0.000004759 "shairport.c:2500" mqtt is disabled.
         0.000004815 "shairport.c:2501" mqtt hostname is (null), port is 1883.
         0.000005315 "shairport.c:2502" mqtt topic is /SoundBar.
         0.000005389 "shairport.c:2503" mqtt will not publish raw metadata.
         0.000005259 "shairport.c:2504" mqtt will not publish parsed metadata.
         0.000005092 "shairport.c:2505" mqtt will not publish cover Art.
         0.000004963 "shairport.c:2506" mqtt remote control is disabled.
         0.000005019 "shairport.c:2510" convolution is 0.
         0.000004796 "shairport.c:2511" convolution IR file is "(null)"
         0.000004926 "shairport.c:2512" convolution max length 8192
         0.000005167 "shairport.c:2513" convolution gain is 0.000000
         0.000005166 "shairport.c:2515" loudness is 0.
         0.000004871 "shairport.c:2516" loudness reference level is -20.000000
         0.000065148 "rtsp.c:4193" metadata pipe name is "/tmp/shairport-sync-metadata".
         0.001261500 "shairport.c:2643" NQPTP is online.
         0.000390130 "rtsp.c:5504" unable to listen on IPv4 port 7000. The error is: "Address in use".
         0.000387055 "rtsp.c:5504" unable to listen on IPv6 port 7000. The error is: "Address in use".
         0.000079519 "rtsp.c:5695" *warning: could not establish a service on port 7000 -- program terminating. Is another instance of Shairport Sync running on this device?
         0.000028148 "rtsp.c:5699" Oops -- fell out of the RTSP select loop
Segmentation fault (core dumped)

System Information.

Raspberry Pi 5
Raspberry Pi OS (64-bit) Desktop
CX31993 384Khz HIFI AUDIO

Configuration Information.

shairport-sync --displayConfig
>> Display Config Start.

From "uname -a":
 Linux raspberrypi 6.6.20+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 Linux

From /etc/os-release:
 Alpine Linux v3.17

Shairport Sync Version String:
 4.3.2-2-g165431a8-dirty-AirPlay2-smi10-alac-OpenSSL-Avahi-ALSA-pa-dummy-stdout-pipe-soxr-convolution-metadata-mqtt-dbus-mpris-sysconfdir:/etc

Command Line:
 shairport-sync --displayConfig

Configuration File:
 /etc/shairport-sync.conf

Configuration File Settings:
 general : 
 {
   name = "SoundBar";
   output_backend = "pipe";
   alac_decoder = "apple";
   volume_range_db = 30;
   default_airplay_volume = -24.0;
 };
 pw : 
 {
 };
 metadata : 
 {
   enabled = "yes";
   include_cover_art = "yes";
 };

>> Display Config End.
>> Goodbye!

PulseAudio or PipeWire installed?

  • Check if your system uses a Sound Server.

How did you install Shairport Sync?

Docker

Check previous issues

  • Confirm
@mikebrady
Copy link
Owner

Thanks for the post. There are a few things here.

  1. The pipe backend is not the PipeWire backend -- in fact, it is the backend to output audio to a Unix pipe. The PipeWire backend is called pw and is not part of the Docker image.

  2. Even if the Docker image had the pw backend, you would not be able to connect it up to the host machine's PipeWire system without considerable modification. The reason is, of course, that the Docker image is meant to be more-or-less isolated from the system. I believe you can modify the runtime configuration of the Docker image to allow a connection, but I haven't done it.

  3. The reason for this message:

         0.000390130 "rtsp.c:5504" unable to listen on IPv4 port 7000. The error is: "Address in use".
    

    is that Shairport Sync is already running somewhere, possibly in a Docker image that was launched at boot up.

  4. The Docker image is configured to include a PulseAudio backend, so it might be worth trying to use that. If you search for Shairport Sync, PulseAudio and Docker, you may come up with some useful ideas, like this one, for example.

@sergeybutakov
Copy link
Author

  1. Sorry 馃槀
  2. / 3. Yes, I see this problem, but I can鈥檛 do anything about it, because no matter what port I use, it is constantly in use.
  3. I'm trying to use the full potential of usb dac, so I need pipewire. Because when using alsa and my config, it does not allow me to set the desired frequency of discrediting.

@mikebrady
Copy link
Owner

Thanks. The reason I was thinking of PulseAudio is because (1) [I understand that] PipeWire has a PulseAudio compatibility interface,(2) the Shairport Sync Docker image has a PulseAudio backend and (3) some users have had success outputting from Shairport Sync in a Docker image outputting through the Docker host's PulseAudio system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants