From c1d6188eedbf64971f16c7213ae453b3248b50a7 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 3 Oct 2022 14:53:52 +0100 Subject: [PATCH 01/31] Update Events.md --- ADVANCED TOPICS/Events.md | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/ADVANCED TOPICS/Events.md b/ADVANCED TOPICS/Events.md index 26a777de..9390da84 100644 --- a/ADVANCED TOPICS/Events.md +++ b/ADVANCED TOPICS/Events.md @@ -1,18 +1,42 @@ ## Events Shairport Sync can run programs when certain "events" occur. The events are: -1. When Shairport Sync become `active` or `inactive`. Shairport Sync is normally in the `inactive` state when no audio is being played. When audio is sent to Shairport Sync, it will transition from `inactive` to `active`. When the audio stops, Shairport Sync will start a timer. If audio restarts before the timer reaches the value of the `active_state_timeout` configuration setting (10 seconds by default), Shairport Sync will stay `active`. However, if no more audio is received before the timer reaches the `active_state_timeout` value, Shairport Sync will transition to `inactive`. The overall effect of this is that Shairport Sync will go `active` when a track is played and will stay active in the interval between tracks, so long as the interval is less than the `active_state_timeout`. +1. Shairport Sync goes `active`, +2. Shairport Sync goes `inactive`, +3. Play starts, +4. Play stops, +5. Volume changes +6 +### Active / Inactive Events +Shairport Sync is normally in the `inactive` state when no audio is being played. + +When audio is sent to Shairport Sync, it will transition from `inactive` to `active`. + +When the audio stops, Shairport Sync will start a timer. If audio restarts before the timer reaches the value of the `active_state_timeout` configuration setting (10 seconds by default), Shairport Sync will stay `active`. However, if no more audio is received before the timer reaches the `active_state_timeout` value, Shairport Sync will transition to `inactive`. + +The overall effect of this is that Shairport Sync will go `active` when a track is played and will stay active in the interval between tracks, so long as the interval is less than the `active_state_timeout`. When the sequence of tracks ends. Shairport Sync will go `inactive`. + 1. Set the `run_this_before_entering_active_state` setting to the full path name to the program to run before Shairport Sync goes `active`. 2. Set the `run_this_after_exiting_active_state` setting to the full path name to the program to run after Shairport Sync goes `inactive`. 3. Set the `active_state_timeout` setting to the maximum amount of time to wait for play to resume before going `inactive`. -3. When audio starts and stops playing. + +### Play Start / Play Stop +When audio starts, the `play begins` event occurs. When it stops, the `play ends` event occurs. 1. Set the `run_this_before_play_begins` setting to the full path name to the program to run just before Shairport Sync starts playing. 2. Set the `run_this_after_play_ends` setting to the full path name to the program to run after Shairport Sync stops playing. -5. When the volume is adjusted. Shairport Sync can run a program whenever the volume is set or changed. You specify the full path name to the program to run using the `general` group setting `run_this_when_volume_changes`. + +**Note** Play events havbe been superceded by Active/Inactive events -- they are less "noisy" and work better in AirPlay 2 operation. + +### Volume Adjustment +Shairport Sync can run a program whenever the volume is set or changed. You specify the full path name to the program to run using the `general` group setting `run_this_when_volume_changes` but you should also add a space character to the end of the name. This is because when a volume event occurs, Shairport Sync will append the new volume to the text you have specified in `run_this_when_volume_changes` and will then try to execute it. + +For example, if the program you wish to execute is `usr/local/vc` and the new volume is `-24.6`, then, if you have specified `run_this_when_volume_changes` to be `usr/local/vc ` (note the extra space at then end), then Shairport Sync will execute the command `usr/local/vc -24.6`. (Without the extra space at the end, it would look like this: `usr/local/vc24.6`.) + +### Waiting for Completion Set the `wait_for_completion` value to `"yes"` for Shairport Sync to wait until the respective commands have been completed before continuing. -Note that the full path to the programs must be specified, and script files will not be executed unless they are marked as executable -and have the appropriate shebang `#!/bin/...` as the first line. (This behaviour may be different from other Shairports.) +### Program +The environment in which the program you specify will be very different to a login environment. In particular, the `PATH` variable will be different. This means that you can't assume that the system will look in the right directories for programs or documents. Theremore, it is _vital_ that you specify everything using a _full path name_. -Shairport Sync can run a program whenever the volume is set or changed. You specify it using the `general` group setting `run_this_when_volume_changes`. -This is to facilitate situations where something has to be done when the volume changes, e.g. adjust an external mixer value. Set the `wait_for_completion` value to `"yes"` for Shairport Sync to wait until the command has been completed before continuing. Again, please note that the full path to the program must be specified, and script files will not be executed unless they are marked as executable and have the appropriate shebang `#!/bin/...` as the first line. +You can specify a normal program to be executed or you can specify a script. Make sure the script file is marked as executable +and has the appropriate shebang `#!/bin/...` as the first line. And within the script, make sure all references to files are full path names also. From da6526f5609b79bad04fefdd20d1eae410402842 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 3 Oct 2022 17:52:08 +0100 Subject: [PATCH 02/31] Update Events.md --- ADVANCED TOPICS/Events.md | 56 ++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/ADVANCED TOPICS/Events.md b/ADVANCED TOPICS/Events.md index 9390da84..ff5c8190 100644 --- a/ADVANCED TOPICS/Events.md +++ b/ADVANCED TOPICS/Events.md @@ -1,42 +1,54 @@ -## Events -Shairport Sync can run programs when certain "events" occur. The events are: -1. Shairport Sync goes `active`, -2. Shairport Sync goes `inactive`, -3. Play starts, -4. Play stops, -5. Volume changes -6 +# Events +Shairport Sync can run programs when certain _events_ occur. The events are: +1. When Shairport Sync goes _active_ or _inactive,_ +3. When audio play starts or stops, +5. When the volume is set or changed. + + ### Active / Inactive Events Shairport Sync is normally in the `inactive` state when no audio is being played. When audio is sent to Shairport Sync, it will transition from `inactive` to `active`. -When the audio stops, Shairport Sync will start a timer. If audio restarts before the timer reaches the value of the `active_state_timeout` configuration setting (10 seconds by default), Shairport Sync will stay `active`. However, if no more audio is received before the timer reaches the `active_state_timeout` value, Shairport Sync will transition to `inactive`. +When the audio stops, Shairport Sync will start a timer. If audio restarts before the timer reaches the value of the `active_state_timeout` setting (10 seconds by default), Shairport Sync will stay `active`. However, if no more audio is received before the timer reaches the `active_state_timeout` value, Shairport Sync will transition to `inactive`. -The overall effect of this is that Shairport Sync will go `active` when a track is played and will stay active in the interval between tracks, so long as the interval is less than the `active_state_timeout`. When the sequence of tracks ends. Shairport Sync will go `inactive`. +The overall effect of this is that Shairport Sync will go `active` when a track starts and stays active in the interval between tracks, so long as the interval is less than the `active_state_timeout`. When the sequence of tracks ends, Shairport Sync will go `inactive`. - 1. Set the `run_this_before_entering_active_state` setting to the full path name to the program to run before Shairport Sync goes `active`. - 2. Set the `run_this_after_exiting_active_state` setting to the full path name to the program to run after Shairport Sync goes `inactive`. - 3. Set the `active_state_timeout` setting to the maximum amount of time to wait for play to resume before going `inactive`. +* Set the `run_this_before_entering_active_state` setting to the full path name to the program to run before Shairport Sync goes `active`. +* Set the `run_this_after_exiting_active_state` setting to the full path name to the program to run after Shairport Sync goes `inactive`. +* Set the `active_state_timeout` setting to the maximum amount of time to wait for play to resume before going `inactive`. ### Play Start / Play Stop +**Note:** Play events have been superceded by Active/Inactive events, which works better in AirPlay 2 operation. + When audio starts, the `play begins` event occurs. When it stops, the `play ends` event occurs. - 1. Set the `run_this_before_play_begins` setting to the full path name to the program to run just before Shairport Sync starts playing. - 2. Set the `run_this_after_play_ends` setting to the full path name to the program to run after Shairport Sync stops playing. - -**Note** Play events havbe been superceded by Active/Inactive events -- they are less "noisy" and work better in AirPlay 2 operation. + +* Set the `run_this_before_play_begins` setting to the full path name to the program to run just before Shairport Sync starts playing. +* Set the `run_this_after_play_ends` setting to the full path name to the program to run after Shairport Sync stops playing. ### Volume Adjustment -Shairport Sync can run a program whenever the volume is set or changed. You specify the full path name to the program to run using the `general` group setting `run_this_when_volume_changes` but you should also add a space character to the end of the name. This is because when a volume event occurs, Shairport Sync will append the new volume to the text you have specified in `run_this_when_volume_changes` and will then try to execute it. +Shairport Sync can run a program whenever the volume is set or changed. -For example, if the program you wish to execute is `usr/local/vc` and the new volume is `-24.6`, then, if you have specified `run_this_when_volume_changes` to be `usr/local/vc ` (note the extra space at then end), then Shairport Sync will execute the command `usr/local/vc -24.6`. (Without the extra space at the end, it would look like this: `usr/local/vc24.6`.) +* Set `run_this_when_volume_changes` to the full path name to the program to run using the `general` group setting `run_this_when_volume_changes` _but also_ add a space character to the end of the name. This is because when a volume event occurs, Shairport Sync will append the new volume to the text you have specified in `run_this_when_volume_changes` and will then try to execute it. + +For example, to use the `echo` command to log the volume setting, let's say that you have found that the full path name for `echo` is `/usr/bin/echo`, then you would specify `run_this_when_volume_is_set` as follows: +``` +run_this_when_volume_is_set = "/usr/bin/echo "; +``` +(Note the extra space at the end of the path name.) Suppose the volume is set or changed to `-24.6`, then Shairport Sync will execute the command `/usr/bin/echo -24.6`. (Without that extra space, it would try to execute `/usr/bin/echo24.6`.) ### Waiting for Completion Set the `wait_for_completion` value to `"yes"` for Shairport Sync to wait until the respective commands have been completed before continuing. ### Program -The environment in which the program you specify will be very different to a login environment. In particular, the `PATH` variable will be different. This means that you can't assume that the system will look in the right directories for programs or documents. Theremore, it is _vital_ that you specify everything using a _full path name_. +The environment in which the program you specify will be very different to a login environment. In particular, the `PATH` variable will be different. This means that you can't assume that the system will look in the right directories for programs or documents. Therefore, it is _vital_ that you specify everything using a _full path name_. -You can specify a normal program to be executed or you can specify a script. Make sure the script file is marked as executable -and has the appropriate shebang `#!/bin/...` as the first line. And within the script, make sure all references to files are full path names also. +For example, to get the `logger` command to log `Active Start` when Shairport Sync goes active, set `run_this_before_entering_active_state` as follows: + +``` +run_this_before_entering_active_state = "/usr/bin/logger \"Active Start\""; +``` + +You can specify a program to be executed or you can specify a script. Make sure the script file is marked as executable +and has the appropriate shebang `#!/bin/...` as the first line. Within the script, make sure all references to files are full path names. From a193eb24f5257d8f76a3c12d5c7a16297f3448dd Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 5 Oct 2022 10:00:27 +0100 Subject: [PATCH 03/31] Add names of AP2 clients to debug messages. --- rtsp.c | 55 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/rtsp.c b/rtsp.c index d61ffeb1..76395df9 100644 --- a/rtsp.c +++ b/rtsp.c @@ -1275,7 +1275,9 @@ void clear_ptp_clock() { ssize_t read_from_rtsp_connection(rtsp_conn_info *conn, void *buf, size_t count) { // first try to read with a timeout, to see if there is any traffic... - ssize_t response = timed_read_from_rtsp_connection(conn, 10000000000L, buf, count); + // ssize_t response = timed_read_from_rtsp_connection(conn, 20000000000L, buf, count); + // actually don't use a timeout -- OwnTone doesn't supply regular traffic. + ssize_t response = timed_read_from_rtsp_connection(conn, 0, buf, count); if ((response == -1) && ((errno == EAGAIN) || (errno == EWOULDBLOCK))) { if (conn->rtsp_link_is_idle == 0) { debug(1, "Connection %d: RTSP connection is idle.", conn->connection_number); @@ -1622,7 +1624,7 @@ void handle_record(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) if (conn->player_thread) warn("Connection %d: RECORD: Duplicate RECORD message -- ignored", conn->connection_number); else { - debug(1, "Connection %d: AP1 ALAC Stream, from %s:%u to self at %s:%u.", + debug(1, "Connection %d: Classic AirPlay connection from %s:%u to self at %s:%u.", conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, conn->self_ip_string, conn->self_rtsp_port); activity_monitor_signify_activity(1); @@ -2830,6 +2832,15 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) plist_t messagePlist = plist_from_rtsp_content(req); plist_t setupResponsePlist = plist_new_dict(); resp->respcode = 400; + + // see if we can get a name for the client + char *clientNameString = NULL; + plist_t nameItem = plist_dict_get_item(messagePlist, "name"); + if (nameItem != NULL) { + plist_get_string_val(nameItem, &clientNameString); + } else { + clientNameString = strdup(""); + } // see if the incoming plist contains a "streams" array plist_t streams = plist_dict_get_item(messagePlist, "streams"); @@ -2847,8 +2858,8 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) plist_get_string_val(timingProtocol, &timingProtocolString); if (timingProtocolString) { if (strcmp(timingProtocolString, "PTP") == 0) { - debug(2, "Connection %d: AP2 PTP connection from %s:%u to self at %s:%u.", - conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, + debug(1, "Connection %d: AP2 PTP connection from %s:%u (\"%s\") to self at %s:%u.", + conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, clientNameString, conn->self_ip_string, conn->self_rtsp_port); conn->airplay_stream_category = ptp_stream; conn->timing_type = ts_ptp; @@ -2862,20 +2873,24 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) send_ssnc_metadata('svip', conn->self_ip_string, strlen(conn->self_ip_string), 1); #endif } else if (strcmp(timingProtocolString, "NTP") == 0) { - debug(1, "Connection %d: SETUP: NTP setup detected.", conn->connection_number); + debug(1, "Connection %d: SETUP: NTP setup from %s:%u (\"%s\") to self at %s:%u.", + conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, clientNameString, + conn->self_ip_string, conn->self_rtsp_port); conn->airplay_stream_category = ntp_stream; conn->timing_type = ts_ntp; } else if (strcmp(timingProtocolString, "None") == 0) { - debug(2, "Connection %d: SETUP: a \"None\" setup detected.", conn->connection_number); + debug(3, "Connection %d: SETUP: a \"None\" setup detected from %s:%u (\"%s\") to self at %s:%u.", + conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, clientNameString, + conn->self_ip_string, conn->self_rtsp_port); // now check to see if it's got the "isRemoteControlOnly" item and check it's true plist_t isRemoteControlOnly = plist_dict_get_item(messagePlist, "isRemoteControlOnly"); if (isRemoteControlOnly != NULL) { uint8_t isRemoteControlOnlyBoolean = 0; plist_get_bool_val(isRemoteControlOnly, &isRemoteControlOnlyBoolean); if (isRemoteControlOnlyBoolean != 0) { - debug(2, "Connection %d: Remote Control connection from %s:%u to self at %s:%u.", - conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, - conn->self_ip_string, conn->self_rtsp_port); + debug(1, "Connection %d: Remote Control connection from %s:%u (\"%s\") to self at %s:%u.", + conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, clientNameString, + conn->self_ip_string, conn->self_rtsp_port); conn->airplay_stream_category = remote_control_stream; } else { debug(1, @@ -3354,6 +3369,8 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) msg_add_header(resp, "Content-Type", "application/x-apple-binary-plist"); } plist_free(messagePlist); + if (clientNameString != NULL) + free(clientNameString); debug_log_rtsp_message(2, " SETUP response", resp); } #endif @@ -3521,14 +3538,16 @@ void handle_set_parameter_parameter(rtsp_conn_info *conn, rtsp_message *req, debug(2, "Connection %d: request to set AirPlay Volume to: %f.", conn->connection_number, volume); // if we are playing, go ahead and change the volume - lock_player(); - config.airplay_volume = volume; - if (playing_conn == conn) - player_volume(volume, conn); - unlock_player(); #ifdef CONFIG_DBUS_INTERFACE if (dbus_service_is_running()) { - shairport_sync_set_volume(shairportSyncSkeleton, config.airplay_volume); + shairport_sync_set_volume(shairportSyncSkeleton, volume); + } else { +#endif + lock_player(); + if (playing_conn == conn) + player_volume(volume, conn); + unlock_player(); +#ifdef CONFIG_DBUS_INTERFACE } #endif } else if (strncmp(cp, "progress: ", strlen("progress: ")) == @@ -4407,7 +4426,9 @@ static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag #ifdef CONFIG_AIRPLAY_2 conn->airplay_type = ap_1; conn->timing_type = ts_ntp; - debug(1, "Connection %d. AirPlay 1 Audio Stream Detected.", conn->connection_number); + debug(1, "Connection %d: Classic AirPlay connection from %s:%u to self at %s:%u.", + conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, + conn->self_ip_string, conn->self_rtsp_port); #endif conn->stream.type = ast_unknown; @@ -5460,7 +5481,7 @@ void *rtsp_listen_loop(__attribute((unused)) void *arg) { inet_ntop(conn->connection_ip_family, self_addr, conn->self_ip_string, sizeof(conn->self_ip_string)); - debug(1, "Connection %d: New connection from %s:%u to self at %s:%u.", + debug(2, "Connection %d: New connection from %s:%u to self at %s:%u.", conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, conn->self_ip_string, conn->self_rtsp_port); conn->connection_start_time = get_absolute_time_in_ns(); From 2a70297945f267b90b7e97262fda9b00b0ea39b2 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 5 Oct 2022 10:15:45 +0100 Subject: [PATCH 04/31] Fixes --- Makefile.am | 12 ++++++++++-- audio_alsa.c | 12 ++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index b681ed3e..1dc654cc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -267,9 +267,13 @@ if INSTALL_SYSTEMV INSTALL_SYSTEMV_TARGET = install-systemv-local +# watch out -- shairport-sync is created during the ./configure step and +# will be stored in a scripts folder in the _build_ folder +# which will be the source folder if you're not using a separate build folder + $(INSTALL_SYSTEMV_TARGET): scripts/shairport-sync $(INSTALL_USER_TARGET) install -d $(DESTDIR)$(sysconfdir)/init.d - [ -e $(DESTDIR)$(sysconfdir)/init.d/shairport-sync ] || install -m 0644 $(top_srcdir)/scripts/shairport-sync $(DESTDIR)$(sysconfdir)/init.d + [ -e $(DESTDIR)$(sysconfdir)/init.d/shairport-sync ] || install -m 0755 scripts/shairport-sync $(DESTDIR)$(sysconfdir)/init.d endif # INSTALL_SYSTEMV @@ -283,9 +287,13 @@ endif # USE_AVAHI INSTALL_SYSTEMD_TARGET = install-systemd-local +# watch out -- shairport-sync.service is created during the ./configure step and +# will be stored in a scripts folder in the _build_ folder +# which will be the source folder if you're not using a separate build folder + $(INSTALL_SYSTEMD_TARGET): scripts/$(SYSTEMD_SERVICE) $(INSTALL_USER_TARGET) install -d $(DESTDIR)$(systemdsystemunitdir) - [ -e $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service ] || install -m 0644 $(top_srcdir)/scripts/$(SYSTEMD_SERVICE) $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service + [ -e $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service ] || install -m 0644 scripts/$(SYSTEMD_SERVICE) $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service endif # INSTALL_SYSTEMD diff --git a/audio_alsa.c b/audio_alsa.c index fc53ee65..62db843f 100644 --- a/audio_alsa.c +++ b/audio_alsa.c @@ -1850,7 +1850,8 @@ static int do_close() { // debug(1,"alsa: do_close() -- closing the output device"); if ((derr = snd_pcm_drop(alsa_handle))) debug(1, "Error %d (\"%s\") dropping output device.", derr, snd_strerror(derr)); - usleep(5000); // this make the function pthread cancellable + usleep(10000); // wait for the hardware to do its trick. BTW, this make the function pthread + // cancellable if ((derr = snd_pcm_hw_free(alsa_handle))) debug(1, "Error %d (\"%s\") freeing the output device hardware.", derr, snd_strerror(derr)); debug(2, "alsa: do_close() -- closing alsa handle"); @@ -2061,9 +2062,12 @@ static void *alsa_buffer_monitor_thread_code(__attribute__((unused)) void *arg) int error_count = 0; int error_detected = 0; int okb = -1; - while (error_detected == - 0) { // if too many play errors occur early on, we will turn off the disable stanby mode + // if too many play errors occur early on, we will turn off the disable standby mode + while (error_detected == 0) { + int keep_dac_busy_has_just_gone_off = 0; if (okb != config.keep_dac_busy) { + if ((okb != 0) && (config.keep_dac_busy == 0)) + keep_dac_busy_has_just_gone_off = 1; debug(2, "keep_dac_busy is now \"%s\"", config.keep_dac_busy == 0 ? "no" : "yes"); okb = config.keep_dac_busy; } @@ -2081,7 +2085,7 @@ static void *alsa_buffer_monitor_thread_code(__attribute__((unused)) void *arg) if (do_open(1) == 0) // no automatic setup of rate and speed if necessary debug(2, "alsa: alsa_buffer_monitor_thread_code() -- output device opened; " "alsa_backend_state => abm_connected"); - } else if ((alsa_backend_state == abm_connected) && (config.keep_dac_busy == 0)) { + } else if ((alsa_backend_state != abm_disconnected) && (keep_dac_busy_has_just_gone_off != 0)) { stall_monitor_start_time = 0; // frame_index = 0; // measurement_data_is_valid = 0; From 0eb29bfd10765c0f6f9071fddad34ed16bc03ca7 Mon Sep 17 00:00:00 2001 From: Charles <32498151+charlesomer@users.noreply.github.com> Date: Wed, 5 Oct 2022 22:45:23 +0100 Subject: [PATCH 05/31] Docker build changes, github action updates. --- .../docker-build-on-formal-release.yaml | 83 -------------- .github/workflows/docker-build-on-push.yaml | 42 +++---- .github/workflows/docker-build-on-tag.yaml | 45 +++++--- Makefile.am | 12 +- audio_alsa.c | 12 +- docker/README.md | 27 +++-- docker/airplay1/Dockerfile | 103 ------------------ docker/airplay1/README.md | 22 ---- docker/airplay1/start.sh | 13 --- docker/classic/README.md | 2 +- docker/docker-compose.yaml | 2 +- rtsp.c | 55 +++++++--- 12 files changed, 125 insertions(+), 293 deletions(-) delete mode 100644 .github/workflows/docker-build-on-formal-release.yaml delete mode 100644 docker/airplay1/Dockerfile delete mode 100644 docker/airplay1/README.md delete mode 100644 docker/airplay1/start.sh diff --git a/.github/workflows/docker-build-on-formal-release.yaml b/.github/workflows/docker-build-on-formal-release.yaml deleted file mode 100644 index fc698373..00000000 --- a/.github/workflows/docker-build-on-formal-release.yaml +++ /dev/null @@ -1,83 +0,0 @@ -# Builds & pushes a docker image when a "formal" release tag of the format X, X.Y or X.Y.Z occurs, where X, Y and Z are all numbers. -# It seems this yaml has to exist on the branch the tag refers to. - -# Thanks to Charles Omer for the workfow upon which this is based. - -# The following docker tags are created & pushed: -# trial, trial-classic -# not building 'latest' yet... - -name: Formal (X, X.Y or X.Y.Z) release tags -- docker build and push. - -on: - push: - tags: - - '[0-9]+\.[0-9]+\.[0-9]+' # e.g. 8.9.0 - - '[0-9]+\.[0-9]+' # e.g. 8.9 - - '[0-9]+' # e.g. 8 - - '[0-9]+\.[0-9]+rc[0-9]+' # e.g. 4.1rc0 - -env: - DOCKER_PLATFORMS: linux/386,linux/amd64,linux/arm/v6,linux/arm64,linux/arm/v7 - -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set SHAIRPORT_SYNC_BRANCH env. - run: | - raw=$(git branch -r --contains ${{ github.ref }}) - branch=${raw##*/} - echo "SHAIRPORT_SYNC_BRANCH=${branch}" >> $GITHUB_ENV - - - name: Set tag env - run: echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - - name: Determine NQPTP env (part 1). - if: ${{ env.SHAIRPORT_SYNC_BRANCH == 'development' }} - run: echo "NQPTP_BRANCH=development" >> $GITHUB_ENV - - - name: Determine NQPTP env (part 2). - if: ${{ env.SHAIRPORT_SYNC_BRANCH != 'development' }} - run: echo "NQPTP_BRANCH=main" >> $GITHUB_ENV - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to Docker Registry - uses: docker/login-action@v1 - with: - registry: ${{ secrets.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_REGISTRY_USER }} - password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: ./ - file: ./docker/Dockerfile - platforms: ${{ env.DOCKER_PLATFORMS }} - push: true - tags: trial - build-args: | - SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }} - NQPTP_BRANCH=${{ env.NQPTP_BRANCH }} - - - name: Build and push (Classic) - uses: docker/build-push-action@v2 - with: - context: ./ - file: ./docker/classic/Dockerfile - platforms: ${{ env.DOCKER_PLATFORMS }} - push: true - tags: trial-classic - build-args: | - SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }} diff --git a/.github/workflows/docker-build-on-push.yaml b/.github/workflows/docker-build-on-push.yaml index dca048e2..1d273cad 100644 --- a/.github/workflows/docker-build-on-push.yaml +++ b/.github/workflows/docker-build-on-push.yaml @@ -1,14 +1,19 @@ -# Builds & pushes a docker image when a commit is made to one of the branches specified below. -# Tag pattern: 'unstable-[BRANCH NAME]' & 'unstable-[BRANCH NAME]-classic' +# Builds a docker image when a commit is made. Also pushes the build if the branch is 'master' or 'development'. -name: Build and push docker image based on commit to specified branches. +# Tag pattern +# 'master' - latest, latest-classic +# 'development' - development, development-classic + +name: Build and push docker (commit) on: push: - branches: [ development ] + branches: + - '**' env: DOCKER_PLATFORMS: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + NQPTP_BRANCH: main jobs: main: @@ -22,13 +27,16 @@ jobs: - name: Set SHAIRPORT_SYNC_BRANCH env. run: echo "SHAIRPORT_SYNC_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV - - name: Determine NQPTP env (part 1). - if: ${{ env.SHAIRPORT_SYNC_BRANCH == 'development' }} - run: echo "NQPTP_BRANCH=development" >> $GITHUB_ENV + - name: Is branch "master"? + if: ${{ env.SHAIRPORT_SYNC_BRANCH == 'master' }} + run: | + echo "IMAGE_TAG_BASE=latest" >> $GITHUB_ENV - - name: Determine NQPTP env (part 2). - if: ${{ env.SHAIRPORT_SYNC_BRANCH != 'development' }} - run: echo "NQPTP_BRANCH=main" >> $GITHUB_ENV + - name: Is branch "development"? + if: ${{ env.SHAIRPORT_SYNC_BRANCH == 'development' }} + run: | + echo "NQPTP_BRANCH=development" >> $GITHUB_ENV + echo "IMAGE_TAG_BASE=development" >> $GITHUB_ENV - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -43,33 +51,25 @@ jobs: username: ${{ secrets.DOCKER_REGISTRY_USER }} password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} - - name: Set tag start (part 1). - if: ${{ env.SHAIRPORT_SYNC_BRANCH == 'master' }} - run: echo "IMAGE_TAG_BASE=unstable" >> $GITHUB_ENV - - - name: Set tag start (part 2). - if: ${{ env.SHAIRPORT_SYNC_BRANCH != 'master' }} - run: echo "IMAGE_TAG_BASE=unstable-${{ env.SHAIRPORT_SYNC_BRANCH }}" >> $GITHUB_ENV - - name: Build and push uses: docker/build-push-action@v2 with: context: ./ file: ./docker/Dockerfile platforms: ${{ env.DOCKER_PLATFORMS }} - push: true + push: ${{ env.IMAGE_TAG_BASE != '' }} tags: ${{ secrets.DOCKER_IMAGE_NAME }}:${{ env.IMAGE_TAG_BASE }} build-args: | SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }} NQPTP_BRANCH=${{ env.NQPTP_BRANCH }} - - name: Build and push (AirPlay 1) + - name: Build and push (classic) uses: docker/build-push-action@v2 with: context: ./ file: ./docker/classic/Dockerfile platforms: ${{ env.DOCKER_PLATFORMS }} - push: true + push: ${{ env.IMAGE_TAG_BASE != '' }} tags: ${{ secrets.DOCKER_IMAGE_NAME }}:${{ env.IMAGE_TAG_BASE }}-classic build-args: | SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }} \ No newline at end of file diff --git a/.github/workflows/docker-build-on-tag.yaml b/.github/workflows/docker-build-on-tag.yaml index 6762a9bd..0e87ebd4 100644 --- a/.github/workflows/docker-build-on-tag.yaml +++ b/.github/workflows/docker-build-on-tag.yaml @@ -1,18 +1,22 @@ -# Builds & pushes a docker image when a tag occurs. -# It seems this yaml has to exist on the branch the tag refers to. +# Builds & pushes a docker image when a tag is created. +# Tag pattern: '[tag]' & '[tag]-classic' +# 'stable' & 'stable-classic' also, when master tagged. -# The following docker tags are created & pushed: -# [RELEASE TAG], [RELEASE TAG]-classic, +# Only pushes the tag when it matches one of the following patterns: +# X, X.Y or X.Y.Z -name: Build and push docker images on releases. +name: Build and push docker (tag) on: push: tags: - - '*' # Push events to every tag (not containing '/') + - '[0-9]+' # X + - '[0-9]+\.[0-9]+' # X.Y + - '[0-9]+\.[0-9]+\.[0-9]+' # X.Y.Z env: DOCKER_PLATFORMS: linux/386,linux/amd64,linux/arm/v6,linux/arm64,linux/arm/v7 + NQPTP_BRANCH: main jobs: main: @@ -32,22 +36,23 @@ jobs: - name: Set tag env run: echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Determine NQPTP env (part 1). + - name: Is branch "master"? + if: ${{ env.SHAIRPORT_SYNC_BRANCH == 'master' }} + run: echo "STABLE_TAG=true" >> $GITHUB_ENV + + - name: Is branch "development"? if: ${{ env.SHAIRPORT_SYNC_BRANCH == 'development' }} - run: echo "NQPTP_BRANCH=development" >> $GITHUB_ENV - - - name: Determine NQPTP env (part 2). - if: ${{ env.SHAIRPORT_SYNC_BRANCH != 'development' }} - run: echo "NQPTP_BRANCH=main" >> $GITHUB_ENV + run: | + echo "NQPTP_BRANCH=development" >> $GITHUB_ENV - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to Docker Registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ${{ secrets.DOCKER_REGISTRY }} username: ${{ secrets.DOCKER_REGISTRY_USER }} @@ -60,18 +65,22 @@ jobs: file: ./docker/Dockerfile platforms: ${{ env.DOCKER_PLATFORMS }} push: true - tags: ${{ secrets.DOCKER_IMAGE_NAME }}:${{ env.GIT_TAG }} + tags: | + ${{ secrets.DOCKER_IMAGE_NAME }}:${{ env.GIT_TAG }} + ${{ env.STABLE_TAG == 'true' && format('{0}:stable', secrets.DOCKER_IMAGE_NAME) || '' }} build-args: | SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }} NQPTP_BRANCH=${{ env.NQPTP_BRANCH }} - - name: Build and push (Classic) + - name: Build and push (classic) uses: docker/build-push-action@v2 with: context: ./ file: ./docker/classic/Dockerfile platforms: ${{ env.DOCKER_PLATFORMS }} push: true - tags: ${{ secrets.DOCKER_IMAGE_NAME }}:${{ env.GIT_TAG }}-classic + tags: | + ${{ secrets.DOCKER_IMAGE_NAME }}:${{ env.GIT_TAG }}-classic + ${{ env.STABLE_TAG == 'true' && format('{0}:stable-classic', secrets.DOCKER_IMAGE_NAME) || '' }} build-args: | SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }} \ No newline at end of file diff --git a/Makefile.am b/Makefile.am index b681ed3e..1dc654cc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -267,9 +267,13 @@ if INSTALL_SYSTEMV INSTALL_SYSTEMV_TARGET = install-systemv-local +# watch out -- shairport-sync is created during the ./configure step and +# will be stored in a scripts folder in the _build_ folder +# which will be the source folder if you're not using a separate build folder + $(INSTALL_SYSTEMV_TARGET): scripts/shairport-sync $(INSTALL_USER_TARGET) install -d $(DESTDIR)$(sysconfdir)/init.d - [ -e $(DESTDIR)$(sysconfdir)/init.d/shairport-sync ] || install -m 0644 $(top_srcdir)/scripts/shairport-sync $(DESTDIR)$(sysconfdir)/init.d + [ -e $(DESTDIR)$(sysconfdir)/init.d/shairport-sync ] || install -m 0755 scripts/shairport-sync $(DESTDIR)$(sysconfdir)/init.d endif # INSTALL_SYSTEMV @@ -283,9 +287,13 @@ endif # USE_AVAHI INSTALL_SYSTEMD_TARGET = install-systemd-local +# watch out -- shairport-sync.service is created during the ./configure step and +# will be stored in a scripts folder in the _build_ folder +# which will be the source folder if you're not using a separate build folder + $(INSTALL_SYSTEMD_TARGET): scripts/$(SYSTEMD_SERVICE) $(INSTALL_USER_TARGET) install -d $(DESTDIR)$(systemdsystemunitdir) - [ -e $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service ] || install -m 0644 $(top_srcdir)/scripts/$(SYSTEMD_SERVICE) $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service + [ -e $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service ] || install -m 0644 scripts/$(SYSTEMD_SERVICE) $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service endif # INSTALL_SYSTEMD diff --git a/audio_alsa.c b/audio_alsa.c index fc53ee65..62db843f 100644 --- a/audio_alsa.c +++ b/audio_alsa.c @@ -1850,7 +1850,8 @@ static int do_close() { // debug(1,"alsa: do_close() -- closing the output device"); if ((derr = snd_pcm_drop(alsa_handle))) debug(1, "Error %d (\"%s\") dropping output device.", derr, snd_strerror(derr)); - usleep(5000); // this make the function pthread cancellable + usleep(10000); // wait for the hardware to do its trick. BTW, this make the function pthread + // cancellable if ((derr = snd_pcm_hw_free(alsa_handle))) debug(1, "Error %d (\"%s\") freeing the output device hardware.", derr, snd_strerror(derr)); debug(2, "alsa: do_close() -- closing alsa handle"); @@ -2061,9 +2062,12 @@ static void *alsa_buffer_monitor_thread_code(__attribute__((unused)) void *arg) int error_count = 0; int error_detected = 0; int okb = -1; - while (error_detected == - 0) { // if too many play errors occur early on, we will turn off the disable stanby mode + // if too many play errors occur early on, we will turn off the disable standby mode + while (error_detected == 0) { + int keep_dac_busy_has_just_gone_off = 0; if (okb != config.keep_dac_busy) { + if ((okb != 0) && (config.keep_dac_busy == 0)) + keep_dac_busy_has_just_gone_off = 1; debug(2, "keep_dac_busy is now \"%s\"", config.keep_dac_busy == 0 ? "no" : "yes"); okb = config.keep_dac_busy; } @@ -2081,7 +2085,7 @@ static void *alsa_buffer_monitor_thread_code(__attribute__((unused)) void *arg) if (do_open(1) == 0) // no automatic setup of rate and speed if necessary debug(2, "alsa: alsa_buffer_monitor_thread_code() -- output device opened; " "alsa_backend_state => abm_connected"); - } else if ((alsa_backend_state == abm_connected) && (config.keep_dac_busy == 0)) { + } else if ((alsa_backend_state != abm_disconnected) && (keep_dac_busy_has_just_gone_off != 0)) { stall_monitor_start_time = 0; // frame_index = 0; // measurement_data_is_valid = 0; diff --git a/docker/README.md b/docker/README.md index acabc123..2b27e77f 100644 --- a/docker/README.md +++ b/docker/README.md @@ -2,21 +2,32 @@ Available at: https://hub.docker.com/r/mikebrady/shairport-sync -Please note if you want the development version of the image including Airplay 2 support, please pull the image with the ```unstable development``` tag using the following command: -``` -docker pull mikebrady/shairport-sync:unstable-development +The following docker tags are available: ``` +[tag] +[tag]-classic -When using the below commands, you should replace mikebrady/shairport-sync with mikbrady/shairport-sync:unstable-development. +(build from newest tag) +stable +stable-classic + +(latest build from master) +latest +latest-classic + +(latest build from development) +development +development-classic +``` ## Example Docker Compose File See the `docker-compose.yaml` file in this folder for an example. -## Docker Run +## Example Docker Run ``` $ docker run -d --restart unless-stopped --net host --device /dev/snd \ - mikebrady/shairport-sync + mikebrady/shairport-sync: ``` ### Options @@ -24,7 +35,7 @@ $ docker run -d --restart unless-stopped --net host --device /dev/snd \ You can change the default commands passed to Shairport Sync. Here is an example: ``` $ docker run -d --restart unless-stopped --net host --device /dev/snd \ - mikebrady/shairport-sync:unstable-development shairport-sync -v \ + mikebrady/shairport-sync: shairport-sync -v \ --statistics -a DenSystem -d hw:0 -c PCM ``` This will sent audio to alsa hardware device `hw:0` and make use of the that device's mixer control called `PCM`. The service will be visible as `DenSystem` on the network. @@ -53,4 +64,4 @@ Requires the following secrets to be set in the repo: - `DOCKER_REGISTRY` - docker.io if using Docker Hub, else set to your registry URL. - `DOCKER_REGISTRY_TOKEN` - Access token for your registry. - `DOCKER_REGISTRY_USER` - Login user for your registry. -- `DOCKER_IMAGE_NAME` - The name of the image, for example `your-registry.com/shairport-sync` or just `your-username/shairport-sync` if using Docker Hub. +- `DOCKER_IMAGE_NAME` - The name of the image, for example `your-registry.com/shairport-sync` or just `your-username/shairport-sync` if using Docker Hub. \ No newline at end of file diff --git a/docker/airplay1/Dockerfile b/docker/airplay1/Dockerfile deleted file mode 100644 index e60fd0b5..00000000 --- a/docker/airplay1/Dockerfile +++ /dev/null @@ -1,103 +0,0 @@ -FROM alpine:3.12 AS builder-base -# General Build System: -RUN apk -U add \ - git \ - build-base \ - autoconf \ - automake \ - libtool \ - dbus \ - su-exec \ - alsa-lib-dev \ - libdaemon-dev \ - popt-dev \ - mbedtls-dev \ - soxr-dev \ - avahi-dev \ - libconfig-dev \ - libsndfile-dev \ - mosquitto-dev \ - xmltoman - -# ALAC Build System: -FROM builder-base AS builder-alac - -RUN git clone https://github.com/mikebrady/alac -WORKDIR alac -RUN autoreconf -fi -RUN ./configure -RUN make -RUN make install - -# Shairport Sync Build System: -FROM builder-base AS builder-sps - -# This will be modified by the Github Action Workflow and is required -# to ensure the correct branch is being used. -ARG SHAIRPORT_SYNC_BRANCH -RUN test -n "$SHAIRPORT_SYNC_BRANCH" - -COPY --from=builder-alac /usr/local/lib/libalac.* /usr/local/lib/ -COPY --from=builder-alac /usr/local/lib/pkgconfig/alac.pc /usr/local/lib/pkgconfig/alac.pc -COPY --from=builder-alac /usr/local/include /usr/local/include - -WORKDIR shairport-sync -COPY . . -RUN git checkout "$SHAIRPORT_SYNC_BRANCH" -RUN autoreconf -fi -RUN ./configure \ - --with-alsa \ - --with-dummy \ - --with-pipe \ - --with-stdout \ - --with-avahi \ - --with-ssl=mbedtls \ - --with-soxr \ - --sysconfdir=/etc \ - --with-dbus-interface \ - --with-mpris-interface \ - --with-mqtt-client \ - --with-apple-alac \ - --with-convolution -RUN make -j $(nproc) -RUN make install - -# Shairport Sync Runtime System: -FROM alpine:3.12 - -RUN apk -U add \ - alsa-lib \ - dbus \ - popt \ - glib \ - mbedtls \ - soxr \ - avahi \ - libconfig \ - libsndfile \ - mosquitto-libs \ - su-exec \ - libgcc \ - libgc++ - -RUN rm -rf /lib/apk/db/* - -COPY --from=builder-alac /usr/local/lib/libalac.* /usr/local/lib/ -COPY --from=builder-sps /etc/shairport-sync* /etc/ -COPY --from=builder-sps /etc/dbus-1/system.d/shairport-sync-dbus.conf /etc/dbus-1/system.d/ -COPY --from=builder-sps /etc/dbus-1/system.d/shairport-sync-mpris.conf /etc/dbus-1/system.d/ -COPY --from=builder-sps /usr/local/bin/shairport-sync /usr/local/bin/shairport-sync - -# Create non-root user for running the container -- running as the user 'shairport-sync' also allows -# Shairport Sync to provide the D-Bus and MPRIS interfaces within the container - -RUN addgroup shairport-sync -RUN adduser -D shairport-sync -G shairport-sync - -# Add the shairport-sync user to the pre-existing audio group, which has ID 29, for access to the ALSA stuff -RUN addgroup -g 29 docker_audio && addgroup shairport-sync docker_audio - -COPY ./docker/airplay1/start.sh / -RUN chmod +x /start.sh - -ENTRYPOINT [ "/start.sh" ] diff --git a/docker/airplay1/README.md b/docker/airplay1/README.md deleted file mode 100644 index 094a7429..00000000 --- a/docker/airplay1/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# Original AirPlay 1 Only Docker Image - -## Basic Usage - -``` -$ docker run -d --restart unless-stopped --net host --device /dev/snd \ - mikebrady/shairport-sync -``` -The above command will run Shairport Sync as a daemon in a Docker container, accessing the computer's ALSA audio infrastructure. It will send audio to the default output device and make no use of any hardware mixers the default device might have. The AirPlay service name will be the host's `hostname` with the first letter capitalised, e.g. `Ubuntu`. - -## Options - -Any options you add to the command above will be passed to Shairport Sync. Here is an example: -``` -$ docker run -d --restart unless-stopped --net host --device /dev/snd \ - mikebrady/shairport-sync -a DenSystem -- -d hw:0 -c PCM -``` -This will sent audio to alsa hardware device `hw:0` and make use of the that device's mixer control called `PCM`. The service will be visible as `DenSystem` on the network. - -## Configuration File - -Edit the configuration file `/etc/shairport-sync.conf` in the container (or use the `-v` option to mirror an external copy of `shairport-sync.conf` in to `/etc/shairport-sync.conf`) to get access to the full range of configuration options. \ No newline at end of file diff --git a/docker/airplay1/start.sh b/docker/airplay1/start.sh deleted file mode 100644 index 5e24ff59..00000000 --- a/docker/airplay1/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -set -e - -rm -rf /var/run/dbus.pid -#mkdir -p /var/run/dbus - -dbus-uuidgen --ensure -dbus-daemon --system - -avahi-daemon --daemonize --no-chroot - -su-exec shairport-sync shairport-sync "$@" \ No newline at end of file diff --git a/docker/classic/README.md b/docker/classic/README.md index 4dd3bf76..09ac8872 100644 --- a/docker/classic/README.md +++ b/docker/classic/README.md @@ -1,3 +1,3 @@ # Classic (AirPlay 1 Only) Docker Image -See the [Shairport Sync Docker Hub Repo](https://hub.docker.com/r/mikebrady/shairport-sync) for available tags. +See the [Shairport Sync Docker Hub Repo](https://hub.docker.com/r/mikebrady/shairport-sync) for available tags. \ No newline at end of file diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 8877d0d0..6b2394a1 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -2,7 +2,7 @@ services: shairport-sync: - image: mikebrady/shairport-sync + image: mikebrady/shairport-sync: network_mode: host restart: unless-stopped devices: diff --git a/rtsp.c b/rtsp.c index d61ffeb1..76395df9 100644 --- a/rtsp.c +++ b/rtsp.c @@ -1275,7 +1275,9 @@ void clear_ptp_clock() { ssize_t read_from_rtsp_connection(rtsp_conn_info *conn, void *buf, size_t count) { // first try to read with a timeout, to see if there is any traffic... - ssize_t response = timed_read_from_rtsp_connection(conn, 10000000000L, buf, count); + // ssize_t response = timed_read_from_rtsp_connection(conn, 20000000000L, buf, count); + // actually don't use a timeout -- OwnTone doesn't supply regular traffic. + ssize_t response = timed_read_from_rtsp_connection(conn, 0, buf, count); if ((response == -1) && ((errno == EAGAIN) || (errno == EWOULDBLOCK))) { if (conn->rtsp_link_is_idle == 0) { debug(1, "Connection %d: RTSP connection is idle.", conn->connection_number); @@ -1622,7 +1624,7 @@ void handle_record(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) if (conn->player_thread) warn("Connection %d: RECORD: Duplicate RECORD message -- ignored", conn->connection_number); else { - debug(1, "Connection %d: AP1 ALAC Stream, from %s:%u to self at %s:%u.", + debug(1, "Connection %d: Classic AirPlay connection from %s:%u to self at %s:%u.", conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, conn->self_ip_string, conn->self_rtsp_port); activity_monitor_signify_activity(1); @@ -2830,6 +2832,15 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) plist_t messagePlist = plist_from_rtsp_content(req); plist_t setupResponsePlist = plist_new_dict(); resp->respcode = 400; + + // see if we can get a name for the client + char *clientNameString = NULL; + plist_t nameItem = plist_dict_get_item(messagePlist, "name"); + if (nameItem != NULL) { + plist_get_string_val(nameItem, &clientNameString); + } else { + clientNameString = strdup(""); + } // see if the incoming plist contains a "streams" array plist_t streams = plist_dict_get_item(messagePlist, "streams"); @@ -2847,8 +2858,8 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) plist_get_string_val(timingProtocol, &timingProtocolString); if (timingProtocolString) { if (strcmp(timingProtocolString, "PTP") == 0) { - debug(2, "Connection %d: AP2 PTP connection from %s:%u to self at %s:%u.", - conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, + debug(1, "Connection %d: AP2 PTP connection from %s:%u (\"%s\") to self at %s:%u.", + conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, clientNameString, conn->self_ip_string, conn->self_rtsp_port); conn->airplay_stream_category = ptp_stream; conn->timing_type = ts_ptp; @@ -2862,20 +2873,24 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) send_ssnc_metadata('svip', conn->self_ip_string, strlen(conn->self_ip_string), 1); #endif } else if (strcmp(timingProtocolString, "NTP") == 0) { - debug(1, "Connection %d: SETUP: NTP setup detected.", conn->connection_number); + debug(1, "Connection %d: SETUP: NTP setup from %s:%u (\"%s\") to self at %s:%u.", + conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, clientNameString, + conn->self_ip_string, conn->self_rtsp_port); conn->airplay_stream_category = ntp_stream; conn->timing_type = ts_ntp; } else if (strcmp(timingProtocolString, "None") == 0) { - debug(2, "Connection %d: SETUP: a \"None\" setup detected.", conn->connection_number); + debug(3, "Connection %d: SETUP: a \"None\" setup detected from %s:%u (\"%s\") to self at %s:%u.", + conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, clientNameString, + conn->self_ip_string, conn->self_rtsp_port); // now check to see if it's got the "isRemoteControlOnly" item and check it's true plist_t isRemoteControlOnly = plist_dict_get_item(messagePlist, "isRemoteControlOnly"); if (isRemoteControlOnly != NULL) { uint8_t isRemoteControlOnlyBoolean = 0; plist_get_bool_val(isRemoteControlOnly, &isRemoteControlOnlyBoolean); if (isRemoteControlOnlyBoolean != 0) { - debug(2, "Connection %d: Remote Control connection from %s:%u to self at %s:%u.", - conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, - conn->self_ip_string, conn->self_rtsp_port); + debug(1, "Connection %d: Remote Control connection from %s:%u (\"%s\") to self at %s:%u.", + conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, clientNameString, + conn->self_ip_string, conn->self_rtsp_port); conn->airplay_stream_category = remote_control_stream; } else { debug(1, @@ -3354,6 +3369,8 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) msg_add_header(resp, "Content-Type", "application/x-apple-binary-plist"); } plist_free(messagePlist); + if (clientNameString != NULL) + free(clientNameString); debug_log_rtsp_message(2, " SETUP response", resp); } #endif @@ -3521,14 +3538,16 @@ void handle_set_parameter_parameter(rtsp_conn_info *conn, rtsp_message *req, debug(2, "Connection %d: request to set AirPlay Volume to: %f.", conn->connection_number, volume); // if we are playing, go ahead and change the volume - lock_player(); - config.airplay_volume = volume; - if (playing_conn == conn) - player_volume(volume, conn); - unlock_player(); #ifdef CONFIG_DBUS_INTERFACE if (dbus_service_is_running()) { - shairport_sync_set_volume(shairportSyncSkeleton, config.airplay_volume); + shairport_sync_set_volume(shairportSyncSkeleton, volume); + } else { +#endif + lock_player(); + if (playing_conn == conn) + player_volume(volume, conn); + unlock_player(); +#ifdef CONFIG_DBUS_INTERFACE } #endif } else if (strncmp(cp, "progress: ", strlen("progress: ")) == @@ -4407,7 +4426,9 @@ static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag #ifdef CONFIG_AIRPLAY_2 conn->airplay_type = ap_1; conn->timing_type = ts_ntp; - debug(1, "Connection %d. AirPlay 1 Audio Stream Detected.", conn->connection_number); + debug(1, "Connection %d: Classic AirPlay connection from %s:%u to self at %s:%u.", + conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, + conn->self_ip_string, conn->self_rtsp_port); #endif conn->stream.type = ast_unknown; @@ -5460,7 +5481,7 @@ void *rtsp_listen_loop(__attribute((unused)) void *arg) { inet_ntop(conn->connection_ip_family, self_addr, conn->self_ip_string, sizeof(conn->self_ip_string)); - debug(1, "Connection %d: New connection from %s:%u to self at %s:%u.", + debug(2, "Connection %d: New connection from %s:%u to self at %s:%u.", conn->connection_number, conn->client_ip_string, conn->client_rtsp_port, conn->self_ip_string, conn->self_rtsp_port); conn->connection_start_time = get_absolute_time_in_ns(); From 20f3f12235781147b208f66db59414e57c18cdb3 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 7 Oct 2022 17:11:57 +0100 Subject: [PATCH 06/31] Update CAR INSTALL.md --- CAR INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CAR INSTALL.md b/CAR INSTALL.md index c2259a5f..8bbf5856 100644 --- a/CAR INSTALL.md +++ b/CAR INSTALL.md @@ -41,7 +41,7 @@ Let's get the tools and libraries for building and installing Shairport Sync (an ``` # apt install --no-install-recommends build-essential git xmltoman autoconf automake libtool \ libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev \ - libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd + libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev libgcrypt-dev xxd ``` If you are building classic Shairport Sync, the list of packages is shorter: ``` From e7c6c4b2064506c8b635e0925700c561609baff3 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sun, 9 Oct 2022 10:12:08 +0100 Subject: [PATCH 07/31] Adjust version number and remove references to the development branch. --- BUILD.md | 3 +-- configure.ac | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/BUILD.md b/BUILD.md index 3d5bc4a9..f9f4361d 100644 --- a/BUILD.md +++ b/BUILD.md @@ -121,7 +121,7 @@ Download, install, enable and start NQPTP from [here](https://github.com/mikebra ### Shairport Sync #### Build and Install -Download Shairport Sync, check out the `development` branch and configure, compile and install it. Before executing the commands, please note the following: +Download Shairport Sync, configure, compile and install it. Before executing the commands, please note the following: * If building for FreeBSD, replace `--with-systemd` with `--with-os=freebsd --with-freebsd-service`. * Omit the `--with-airplay-2` from the `./configure` options if you are building classic Shairport Sync. @@ -130,7 +130,6 @@ Download Shairport Sync, check out the `development` branch and configure, compi ``` $ git clone https://github.com/mikebrady/shairport-sync.git $ cd shairport-sync -$ git checkout development $ autoreconf -fi $ ./configure --sysconfdir=/etc --with-alsa \ --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2 diff --git a/configure.ac b/configure.ac index b0f53cd9..09cd5559 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.50]) -AC_INIT([shairport-sync], [4.1-dev], [4265913+mikebrady@users.noreply.github.com]) +AC_INIT([shairport-sync], [4.1-rc2], [4265913+mikebrady@users.noreply.github.com]) AM_INIT_AUTOMAKE([subdir-objects]) AC_CONFIG_SRCDIR([shairport.c]) AC_CONFIG_HEADERS([config.h]) From 0ca3b1f7569ad231d139a13d5ef418745644c247 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 14 Oct 2022 14:46:39 +0100 Subject: [PATCH 08/31] Update docker-build-on-push.yaml --- .github/workflows/docker-build-on-push.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-on-push.yaml b/.github/workflows/docker-build-on-push.yaml index 1d273cad..17a621a5 100644 --- a/.github/workflows/docker-build-on-push.yaml +++ b/.github/workflows/docker-build-on-push.yaml @@ -9,7 +9,8 @@ name: Build and push docker (commit) on: push: branches: - - '**' + - master + - development env: DOCKER_PLATFORMS: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 @@ -72,4 +73,4 @@ jobs: push: ${{ env.IMAGE_TAG_BASE != '' }} tags: ${{ secrets.DOCKER_IMAGE_NAME }}:${{ env.IMAGE_TAG_BASE }}-classic build-args: | - SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }} \ No newline at end of file + SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }} From 9312d8c1e66f7c209e3b8074e3a6f359efce46c0 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 14 Oct 2022 14:50:36 +0100 Subject: [PATCH 09/31] Delete build_check.yml --- .github/workflows/build_check.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/build_check.yml diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml deleted file mode 100644 index 38952783..00000000 --- a/.github/workflows/build_check.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Build Check - -on: - push: - branches: [ "danger" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Install Dependencies - run: apt install --no-install-recommends build-essential git xmltoman autoconf automake \ - libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev \ - libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd - - name: Configure - run: | - mkdir build - cd build - autoreconf -i .. - ../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2 - - name: make - run: Make From 9bb015cebc224cd7226b9e44351299545223b89f Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 17 Oct 2022 13:15:02 +0100 Subject: [PATCH 10/31] version 4.1-rc3 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 12e47af4..d3180895 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.50]) -AC_INIT([shairport-sync], [4.1-rc2], [4265913+mikebrady@users.noreply.github.com]) +AC_INIT([shairport-sync], [4.1-rc3], [4265913+mikebrady@users.noreply.github.com]) AM_INIT_AUTOMAKE([subdir-objects]) AC_CONFIG_SRCDIR([shairport.c]) AC_CONFIG_HEADERS([config.h]) From 191ce5d5f012c048263e22c6103c8b56eb398a83 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 17 Oct 2022 20:01:09 +0100 Subject: [PATCH 11/31] Update Bug Report.yaml Add request for displayConfig --- .github/ISSUE_TEMPLATE/Bug Report.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug Report.yaml b/.github/ISSUE_TEMPLATE/Bug Report.yaml index 8017b5db..6600da61 100644 --- a/.github/ISSUE_TEMPLATE/Bug Report.yaml +++ b/.github/ISSUE_TEMPLATE/Bug Report.yaml @@ -30,8 +30,12 @@ body: - type: textarea id: version attributes: - label: Version? - description: What version of Shairport Sync are you running? (`shairport-sync -V`) + label: Configuration or Version. + description: Please paste the results of `shairport-sync --displayConfig` here, if available. + This gives useful information about the environment Shairport Sync is running in and + also displays the command line options and configuration settings. + If `shairport-sync -displayConfig` is not available (it's new), please + paste the results of `shairport-sync -V`. validations: required: true - type: dropdown @@ -41,7 +45,7 @@ body: options: - Homebrew for Mac - Docker - - A package manager (apt, yum, pkg, etc.) + - A package manager (`apt`, `apt install`, `yum`, `pkg`, etc.) - Built from source validations: required: true From bb9a7f81fdf8997c35cef2aa1e370a604b55e51b Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 17 Oct 2022 20:02:13 +0100 Subject: [PATCH 12/31] Update Bug Report.yaml --- .github/ISSUE_TEMPLATE/Bug Report.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug Report.yaml b/.github/ISSUE_TEMPLATE/Bug Report.yaml index 6600da61..7d030d3e 100644 --- a/.github/ISSUE_TEMPLATE/Bug Report.yaml +++ b/.github/ISSUE_TEMPLATE/Bug Report.yaml @@ -31,11 +31,8 @@ body: id: version attributes: label: Configuration or Version. - description: Please paste the results of `shairport-sync --displayConfig` here, if available. - This gives useful information about the environment Shairport Sync is running in and - also displays the command line options and configuration settings. - If `shairport-sync -displayConfig` is not available (it's new), please - paste the results of `shairport-sync -V`. + description: Please paste the results of `shairport-sync --displayConfig` here, if available. This gives useful information about the environment Shairport Sync is running in and also displays the command line options and configuration settings. + If `shairport-sync -displayConfig` is not available (it's new), please paste the results of `shairport-sync -V`. validations: required: true - type: dropdown From ad3adab9e05f4f02f58f241255243d9d1e3ff67f Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 17 Oct 2022 20:02:38 +0100 Subject: [PATCH 13/31] Update Bug Report.yaml --- .github/ISSUE_TEMPLATE/Bug Report.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug Report.yaml b/.github/ISSUE_TEMPLATE/Bug Report.yaml index 7d030d3e..35b775ae 100644 --- a/.github/ISSUE_TEMPLATE/Bug Report.yaml +++ b/.github/ISSUE_TEMPLATE/Bug Report.yaml @@ -31,8 +31,7 @@ body: id: version attributes: label: Configuration or Version. - description: Please paste the results of `shairport-sync --displayConfig` here, if available. This gives useful information about the environment Shairport Sync is running in and also displays the command line options and configuration settings. - If `shairport-sync -displayConfig` is not available (it's new), please paste the results of `shairport-sync -V`. + description: Please paste the results of `shairport-sync --displayConfig` here, if available. This gives useful information about the environment Shairport Sync is running in and also displays the command line options and configuration settings. If `shairport-sync -displayConfig` is not available (it's new), please paste the results of `shairport-sync -V`. validations: required: true - type: dropdown From 2160cd2bae01f4b40d0e58b33967e95fa77c6b2a Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 17 Oct 2022 20:05:51 +0100 Subject: [PATCH 14/31] Update Bug Report.yaml --- .github/ISSUE_TEMPLATE/Bug Report.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug Report.yaml b/.github/ISSUE_TEMPLATE/Bug Report.yaml index 35b775ae..44233e9f 100644 --- a/.github/ISSUE_TEMPLATE/Bug Report.yaml +++ b/.github/ISSUE_TEMPLATE/Bug Report.yaml @@ -31,7 +31,7 @@ body: id: version attributes: label: Configuration or Version. - description: Please paste the results of `shairport-sync --displayConfig` here, if available. This gives useful information about the environment Shairport Sync is running in and also displays the command line options and configuration settings. If `shairport-sync -displayConfig` is not available (it's new), please paste the results of `shairport-sync -V`. + description: Please paste the results of `shairport-sync --displayConfig` here, if available. This gives useful information about the environment Shairport Sync is running in and also displays the command line options and configuration settings. If `shairport-sync --displayConfig` is not available (it's new), please paste the results of `shairport-sync -V`. validations: required: true - type: dropdown @@ -41,7 +41,7 @@ body: options: - Homebrew for Mac - Docker - - A package manager (`apt`, `apt install`, `yum`, `pkg`, etc.) + - A package manager (apt, apt install, yum, pkg, etc.) - Built from source validations: required: true From edca148b0d89b43b66d8f2aa65bc997a1a053c48 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Tue, 18 Oct 2022 10:16:52 +0100 Subject: [PATCH 15/31] Update Bug Report.yaml Slight simplification. --- .github/ISSUE_TEMPLATE/Bug Report.yaml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug Report.yaml b/.github/ISSUE_TEMPLATE/Bug Report.yaml index 44233e9f..f60b1659 100644 --- a/.github/ISSUE_TEMPLATE/Bug Report.yaml +++ b/.github/ISSUE_TEMPLATE/Bug Report.yaml @@ -20,18 +20,11 @@ body: label: Relevant log output description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. render: shell - - type: textarea - id: os - attributes: - label: Operating System? - description: What Operating System are you running on ? (`uname -a`) - validations: - required: true - type: textarea id: version attributes: - label: Configuration or Version. - description: Please paste the results of `shairport-sync --displayConfig` here, if available. This gives useful information about the environment Shairport Sync is running in and also displays the command line options and configuration settings. If `shairport-sync --displayConfig` is not available (it's new), please paste the results of `shairport-sync -V`. + label: Configuration Information. + description: Please paste the results of `shairport-sync --displayConfig` here, if available. This gives useful information about the environment Shairport Sync is running in and also displays the command line options and configuration settings. If `shairport-sync --displayConfig` is not available (it's new), please paste the results of two commands: `uname -a` and `shairport-sync -V`. validations: required: true - type: dropdown From 98d2ecb3102550aa32edf280594a741e1bea2b25 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Tue, 18 Oct 2022 10:17:59 +0100 Subject: [PATCH 16/31] Update Bug Report.yaml Simplification --- .github/ISSUE_TEMPLATE/Bug Report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Bug Report.yaml b/.github/ISSUE_TEMPLATE/Bug Report.yaml index f60b1659..873bdb1d 100644 --- a/.github/ISSUE_TEMPLATE/Bug Report.yaml +++ b/.github/ISSUE_TEMPLATE/Bug Report.yaml @@ -24,7 +24,7 @@ body: id: version attributes: label: Configuration Information. - description: Please paste the results of `shairport-sync --displayConfig` here, if available. This gives useful information about the environment Shairport Sync is running in and also displays the command line options and configuration settings. If `shairport-sync --displayConfig` is not available (it's new), please paste the results of two commands: `uname -a` and `shairport-sync -V`. + description: Please paste the results of `shairport-sync --displayConfig` here, if available. This gives useful information about the environment Shairport Sync is running in and also displays the command line options and configuration settings. If `shairport-sync --displayConfig` is not available (it's new), please paste the results of two commands `uname -a` and `shairport-sync -V`. validations: required: true - type: dropdown From 0156e38529ed1982bb240f533efd32cb1a74b34b Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 24 Oct 2022 10:00:40 +0100 Subject: [PATCH 17/31] Bump internal version to match rc status --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d3180895..7d40ced7 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.50]) -AC_INIT([shairport-sync], [4.1-rc3], [4265913+mikebrady@users.noreply.github.com]) +AC_INIT([shairport-sync], [4.1-rc4], [4265913+mikebrady@users.noreply.github.com]) AM_INIT_AUTOMAKE([subdir-objects]) AC_CONFIG_SRCDIR([shairport.c]) AC_CONFIG_HEADERS([config.h]) From 4165538eb73c5da2b4cf4a4ba69bc1c43fb960b8 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 28 Oct 2022 16:31:18 +0100 Subject: [PATCH 18/31] 4.1 release --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d30f3a40..0cd27627 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.50]) -AC_INIT([shairport-sync], [4.1-rc5], [4265913+mikebrady@users.noreply.github.com]) +AC_INIT([shairport-sync], [4.1], [4265913+mikebrady@users.noreply.github.com]) AM_INIT_AUTOMAKE([subdir-objects]) AC_CONFIG_SRCDIR([shairport.c]) AC_CONFIG_HEADERS([config.h]) From 99e76fdf2daad00aeaba065738825c7a82d573fd Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sat, 29 Oct 2022 10:20:42 +0100 Subject: [PATCH 19/31] Add a HTML version of the man page and put a reference to it in the README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f7006ba..c25890c3 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Shairport Sync does not support AirPlay video or photo streaming. * Next Steps and Advanced Topics are [here](ADVANCED%20TOPICS/README.md). * Runtime settings are documented [here](scripts/shairport-sync.conf). * Build configuration options are detailed in [CONFIGURATION FLAGS.md](CONFIGURATION%20FLAGS.md). -* The `man` page, detailing command line options, is [here](https://htmlpreview.github.io/?https://github.com/mikebrady/shairport-sync/blob/development/man/shairport-sync.html). +* The `man` page, detailing command line options, is [here](https://htmlpreview.github.io/?https://github.com/mikebrady/shairport-sync/blob/master/man/shairport-sync.html). # Features * Outputs AirPlay audio to [ALSA](https://www.alsa-project.org/wiki/Main_Page), [sndio](http://www.sndio.org), [PulseAudio](https://www.freedesktop.org/wiki/Software/PulseAudio/), [Jack Audio](http://jackaudio.org), to a unix pipe or to `STDOUT`. It also has experimental support for [PipeWire](https://pipewire.org) and limited support for [libao](https://xiph.org/ao/) and for [libsoundio](http://libsound.io). From 029baf2ba7f20a0c2a5ed5c68ab14ce3156f98ed Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 18 Nov 2022 22:48:47 +0000 Subject: [PATCH 20/31] Update BUILD.md --- BUILD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index 87bfe8e1..ba85f5bb 100644 --- a/BUILD.md +++ b/BUILD.md @@ -54,7 +54,7 @@ For AirPlay 2 operation, _before you install the libraries_, please ensure the y # yum update # yum install make automake gcc gcc-c++ \ git autoconf automake avahi-devel libconfig-devel openssl-devel popt-devel soxr-devel \ - ffmpeg ffmpeg-devel libplist-devel libsodium-devel libgcrypt-dev libuuid-devel vim-common \ + ffmpeg ffmpeg-devel libplist-devel libsodium-devel libgcrypt-devel libuuid-devel vim-common \ alsa-lib-devel ``` If you are building classic Shairport Sync, the list of packages is shorter: From a732f5d3060121601ef0814815b5bb4d07925965 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 5 Dec 2022 13:11:40 +0000 Subject: [PATCH 21/31] 4.4.1 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c473c957..8d3a1563 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.50]) -AC_INIT([shairport-sync], [4.1], [4265913+mikebrady@users.noreply.github.com]) +AC_INIT([shairport-sync], [4.1.1], [4265913+mikebrady@users.noreply.github.com]) AM_INIT_AUTOMAKE([subdir-objects]) AC_CONFIG_SRCDIR([shairport.c]) AC_CONFIG_HEADERS([config.h]) From a407352061cf23af99aea158d68650a602582498 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 14 Dec 2022 10:26:44 +0000 Subject: [PATCH 22/31] Update check_classic_systemd_full.yml Run on the danger branch too. --- .github/workflows/check_classic_systemd_full.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_classic_systemd_full.yml b/.github/workflows/check_classic_systemd_full.yml index bbc7c02e..06744a03 100644 --- a/.github/workflows/check_classic_systemd_full.yml +++ b/.github/workflows/check_classic_systemd_full.yml @@ -2,7 +2,7 @@ name: Full classic configuration (but without apple-alac) for systemd, using a b on: push: - branches: [ "development" ] + branches: [ "development", "danger" ] jobs: build: From 6240fd83707b77fe2fb2250f8136e530e36010d2 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 14 Dec 2022 10:27:47 +0000 Subject: [PATCH 23/31] Update check_ap2_systemd_full.yml Build on the danger branch too. --- .github/workflows/check_ap2_systemd_full.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_ap2_systemd_full.yml b/.github/workflows/check_ap2_systemd_full.yml index 780dd3a4..858b2af5 100644 --- a/.github/workflows/check_ap2_systemd_full.yml +++ b/.github/workflows/check_ap2_systemd_full.yml @@ -2,7 +2,7 @@ name: Full configuration (but without apple-alac) for systemd. on: push: - branches: [ "development" ] + branches: [ "development", "danger" ] jobs: build: From a9fd294bf78c4e83ca7192f33c8fd3379a97745b Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 8 Mar 2023 22:10:24 +0000 Subject: [PATCH 24/31] Add GitHub sponsorship. --- .github/FUNDING.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 41d81e74..6a0b7817 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ -custom: [paypal.me/UMBr] \ No newline at end of file +github: mikebrady +custom: [paypal.me/UMBr] From ac412bf7dfd79eba1e43151a1208806d613c77da Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 24 Mar 2023 10:49:13 +0000 Subject: [PATCH 25/31] Update README.md --- ADVANCED TOPICS/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ADVANCED TOPICS/README.md b/ADVANCED TOPICS/README.md index 19db0266..014fc13b 100644 --- a/ADVANCED TOPICS/README.md +++ b/ADVANCED TOPICS/README.md @@ -1,6 +1,7 @@ # Advanced Topics Here you will find links to some advanced features and things you can do with Shairport Sync. * [Finish Setting Up](InitialConfiguration.md). +* [Working with PulseAudio or PipeWire](https://github.com/mikebrady/shairport-sync/blob/development/ADVANCED%20TOPICS/PulseAudioAndPipeWire.md). * [Adjusting Sync](AdjustingSync.md) – advance or delay the timing of the output from Shairport Sync to compensate for amplifier delays. * [Get The Best](GetTheBest.md) from your system. * [Metadata](Metadata.md). From 69d3b02a2602af79b112eebfe98b14825a2cc329 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 24 Mar 2023 10:49:31 +0000 Subject: [PATCH 26/31] Update README.md --- ADVANCED TOPICS/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/ADVANCED TOPICS/README.md b/ADVANCED TOPICS/README.md index 014fc13b..19db0266 100644 --- a/ADVANCED TOPICS/README.md +++ b/ADVANCED TOPICS/README.md @@ -1,7 +1,6 @@ # Advanced Topics Here you will find links to some advanced features and things you can do with Shairport Sync. * [Finish Setting Up](InitialConfiguration.md). -* [Working with PulseAudio or PipeWire](https://github.com/mikebrady/shairport-sync/blob/development/ADVANCED%20TOPICS/PulseAudioAndPipeWire.md). * [Adjusting Sync](AdjustingSync.md) – advance or delay the timing of the output from Shairport Sync to compensate for amplifier delays. * [Get The Best](GetTheBest.md) from your system. * [Metadata](Metadata.md). From b46962c7338afeda87d026942f5687564b856e22 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sat, 20 May 2023 17:54:17 +0100 Subject: [PATCH 27/31] update release notes --- RELEASENOTES.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 275ef76a..ea2f5162 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,4 +1,60 @@ -Version 4.1-rc0 Release Candidate +Version 4.2 +==== +This release consists of enhancements and bug fixes to Version 4.1. For information on the new features of 4.1, including AirPlay 2 support, please see the section "Version 4.1" below. + +Important +---- +If you are updating an existing installation of Shairport Sync, you must also update [NQPTP](https://github.com/mikebrady/nqptp). The reason is that this update to Shairport Sync requires NQPTP with Shared Memory Interface Version `smi9` and will not work with older versions. +* The Shared Memory Interface Version `smi*` needed by Shairport Sync is part of its version string, obtainable using `$ shairport-sync -V`. +* You can check the Shared Memory Interface Version of the installed version of `nqptp` using `$ nqptp -V`. + +**Enhancements** +* Allow compilation with `libplist` version `2.3.0`. Thanks to [Markus Reiter](https://github.com/reitermarkus). +* Updates to GitHub Action Workflows -- many thanks to [yubiuser](https://github.com/yubiuser). +* Update to the MQTT documentation to correspond to updates in [Home Assistant](https://www.home-assistant.io/blog/2022/06/01/release-20226/#breaking-changes). Thanks to [hunhejj](https://github.com/hunhejj). +* Update to the PTP clock for improved performance. + +**Docker Enhancements** +* Add basic PulseAudio support to the Docker images. Thanks to [Ferdynand Naczynski](https://github.com/nipsufn) and thanks also to [Noel Hibbard](https://github.com/noelhibbard) for championing this idea for a long time. +* Update the Docker images to use Alpine 3.17 and ensure services such as Avahi and D-Bus start in the correct order. Thanks to [yubiuser](https://github.com/yubiuser). + +**Bug Fixes** +* In some situations, the Device ID generated by Shairport Sync was all zeros, and so was invalid, causing connectivity problems. The cause of the problem was that `get_device_id` was not interpreting `getaddrinfo` information correctly. Thanks to [Carl Johnson](https://github.com/ridgelift) for [reporting](https://github.com/mikebrady/shairport-sync/issues/1657) the issue, finding the (rather obscure) cause of the problem and for providing [code](https://github.com/mikebrady/shairport-sync/issues/1657#issuecomment-1493423175) to fix it. +* Fix a bug reported in Issue [#1633](https://github.com/mikebrady/shairport-sync/issues/1633). The bug was that when a Realtime Audio stream (e.g. playing from Spotify on iOS or using Shairport Sync as the Sound Output on a Mac) was played, it was fine, but when a second stream was started, it could not be heard. The problem was that the PTP clock was not being correctly revalidated for second and subsequent Realtime Audio streams. The fix was to ensure that the PTP clock is revalidated on second and subsequent plays on the same connection. Thanks again to [David Leibovic](https://github.com/dasl-) for finding the problem. +* Use TCP keepalive a little more generally -- treat it the same as a client closing the link rather than just an error. +* Remove three potential race conditions between Shairport Sync opening a TCP connection and the client checking that the connections are open. The problem was that the connections were being opened in threads that were created just before the client was given the connection information. If the threads were delayed (e.g. on a slow or busy processor), the client could use the connection information to check the connections, but find that they were not (yet) open. This could cause the client to terminate the session immediately with a `TEARDOWN`. The fix was to open the connections before creating those threads and before sending the connection information back to the client. In this way, the connections are guaranteed to be open before the client has the information it needs to try to open them, even if the threads ared delayed in starting. This bug would manifest itself by allowing play to proceed but not play anything. +* When built for AirPlay 2, ensure the hexadecimal string that prefixes the AirPlay 1 Service Name in the Bonjour text strings matches the AirPlay 2 Device ID. For example, if the Service Name is `Kitchen` and the AirPlay 2 Device ID is `b8:2f:eb:d7:85:df`, the AirPlay 1 Service Name should be `B82FEBD785DF@Kitchen`. (When built for AirPlay 1, the hexadecimal prefix is simply a hash of the Service Name.) Thanks to [Casper](https://github.com/casperghst42) for raising the [issue](https://github.com/owntone/owntone-server/issues/1578) and to [ejurgensen](https://github.com/ejurgensen) for identifying the cause of the problem. + +Version 4.1.1 +==== +This release consists of enhancements and bug fixes to Version 4.1. For information on the new features of 4.1, including AirPlay 2 support, please see the section "Version 4.1" below. + +**Enhancement** +* Use the TCP `keepalive` facility to close a play session if the client connection drops for a minute. + +**Metadata Enhancements** +* Add `FramePosition` (`phbt`), `FirstFramePosition` (`phb0`), `OutputRate` (`ofps`), `OutputFormat` (`ofmt`), `StreamType` (`styp`), `ServiceName` (`svna`), `ClientName` (`snam`) properties to the D-Bus interface and to the metadata stream (codes in brackets). +* `FramePosition`/`FirstFramePosition` metadata is generated only if the `progress_interval` in the `metadata` section of the configuration file is non-zero. The progress interval can also be set by a new `SetFramePositionUpdateInterval` method in the D-Bus interface. +* `FramePosition`/`FirstFramePosition` metadata is of the form `/` where the local time, in nanoseconds (a 64-bit number), is the precise time that frame should be played. The metadata is generated when the frame is placed in the output buffer, and is thus generated `audio_backend_buffer_desired_length_in_seconds` (usually 0.2 seconds) before the time in question. +* Add `xesam:albumArtist` and `xesam:composer` metadata (if available) to the metadata bundle presented in the D-Bus interface. +* Add a new metadata item: `sps:songdatakind`, derived from the `asdk` metadata token, to the metadata bundle presented in the D-Bus interface. If `0` it seems to indicate an item of a specific duration such as an audio track; if `1` it seems to mean the stream is of unknown duration, for example an internet radio stream. + +**Docker Enhancements** +* Launch the `shairport-sync` app as `root` user within the Docker container rather than as the user `shairport-sync`. +* Add the configuration file and the sample configuration files back into the Docker image. + +**Bug Fixes** +* Fix a bug that prevented multiple classic AirPlay instances being recognised. The bug was that the 12-digit classic AirPlay service name prefixes for each instance were all identically derived from a MAC hardware address. The fix was to modify the generation of prefixes to depend on the service name as well as the hardware address. +* Fix a bug that prevented play to the the PulseAudio backend from resuming after a pause. The bug was due to changes in the way pauses were handled and the fix was to reopen the stream if it is closed whenever a play or latency request was made. +* Fix a long-standing bug which didn't close the socket used for the RTSP connection, potentially exhausting the sockets available. +* Fix a bug in `audio_alsa.c` when there is no hardware device name. +* Add a configuration check for the `xxd` program when building for AirPlay 2. +* Fix a compilation bug on certain platforms by trying to use `AC_CHECK_LIB` to find `libavcodec` if the `PKG_CHECK_MODULES` check fails. + +**Documentation** +* Include and reference the HTML version of the man page. + +Version 4.1 ==== Really Big Update -- AirPlay 2! @@ -15,7 +71,7 @@ Here is a brief list of the high-level new features and changes (more to be adde * AirPlay 2 operation. * Improved `libao` backend for better compatibility with HomeBrew installations. * Improved MQTT and D-Bus facilities. -* Automatically-generated Docker images (forthcoming). +* Automatically-generated Docker images. There have been many many bug fixes and enhancements to the core operation of Shairport Sync. From 7911445adb6d2f0b0b9941f2b52a55f40f1ffa28 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sat, 20 May 2023 18:09:51 +0100 Subject: [PATCH 28/31] actually make is 4.2 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1e58765f..7797c074 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.50]) -AC_INIT([shairport-sync], [4.2rc0], [4265913+mikebrady@users.noreply.github.com]) +AC_INIT([shairport-sync], [4.2], [4265913+mikebrady@users.noreply.github.com]) AM_INIT_AUTOMAKE([subdir-objects]) AC_CONFIG_SRCDIR([shairport.c]) AC_CONFIG_HEADERS([config.h]) From 290a431a85cf785c80243de939ca1f076a155ca5 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sat, 20 May 2023 18:15:15 +0100 Subject: [PATCH 29/31] emphasise the significance of the bug fixes --- RELEASENOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index ea2f5162..f3d6c0bd 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,6 +1,6 @@ Version 4.2 ==== -This release consists of enhancements and bug fixes to Version 4.1. For information on the new features of 4.1, including AirPlay 2 support, please see the section "Version 4.1" below. +This release consists of enhancements and a number of important bug fixes to Version 4.1. For information on the new features of 4.1, including AirPlay 2 support, please see the section "Version 4.1" below. Important ---- From 10ee07210466742ab7399da4af461f2e97d0ec28 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sun, 21 May 2023 12:45:22 +0100 Subject: [PATCH 30/31] Small documentation updates. --- RELEASENOTES.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index f3d6c0bd..143e0aee 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -12,15 +12,15 @@ If you are updating an existing installation of Shairport Sync, you must also up * Allow compilation with `libplist` version `2.3.0`. Thanks to [Markus Reiter](https://github.com/reitermarkus). * Updates to GitHub Action Workflows -- many thanks to [yubiuser](https://github.com/yubiuser). * Update to the MQTT documentation to correspond to updates in [Home Assistant](https://www.home-assistant.io/blog/2022/06/01/release-20226/#breaking-changes). Thanks to [hunhejj](https://github.com/hunhejj). -* Update to the PTP clock for improved performance. +* Updates to the PTP clock to improve performance. Shairport Sync now passes activity information to NQPTP, enabling it to process timing data more accurately. -**Docker Enhancements** -* Add basic PulseAudio support to the Docker images. Thanks to [Ferdynand Naczynski](https://github.com/nipsufn) and thanks also to [Noel Hibbard](https://github.com/noelhibbard) for championing this idea for a long time. -* Update the Docker images to use Alpine 3.17 and ensure services such as Avahi and D-Bus start in the correct order. Thanks to [yubiuser](https://github.com/yubiuser). +**Docker Image Enhancements** +* Add basic PulseAudio support. Thanks to [Ferdynand Naczynski](https://github.com/nipsufn) and thanks also to [Noel Hibbard](https://github.com/noelhibbard) for championing this idea for a long time. +* Update to Alpine 3.17 and ensure services such as Avahi and D-Bus start in the correct order. Thanks to [yubiuser](https://github.com/yubiuser). **Bug Fixes** -* In some situations, the Device ID generated by Shairport Sync was all zeros, and so was invalid, causing connectivity problems. The cause of the problem was that `get_device_id` was not interpreting `getaddrinfo` information correctly. Thanks to [Carl Johnson](https://github.com/ridgelift) for [reporting](https://github.com/mikebrady/shairport-sync/issues/1657) the issue, finding the (rather obscure) cause of the problem and for providing [code](https://github.com/mikebrady/shairport-sync/issues/1657#issuecomment-1493423175) to fix it. -* Fix a bug reported in Issue [#1633](https://github.com/mikebrady/shairport-sync/issues/1633). The bug was that when a Realtime Audio stream (e.g. playing from Spotify on iOS or using Shairport Sync as the Sound Output on a Mac) was played, it was fine, but when a second stream was started, it could not be heard. The problem was that the PTP clock was not being correctly revalidated for second and subsequent Realtime Audio streams. The fix was to ensure that the PTP clock is revalidated on second and subsequent plays on the same connection. Thanks again to [David Leibovic](https://github.com/dasl-) for finding the problem. +* Sometimes the AirPlay Device ID generated by Shairport Sync was all zeros, and so was invalid, causing connectivity problems. The cause of the problem was that `get_device_id` was not interpreting `getaddrinfo` information correctly. Thanks to [Carl Johnson](https://github.com/ridgelift) for [reporting](https://github.com/mikebrady/shairport-sync/issues/1657) the issue, finding the (rather obscure) cause of the problem and for providing [code](https://github.com/mikebrady/shairport-sync/issues/1657#issuecomment-1493423175) to fix it. +* Fix a bug reported in Issue [#1633](https://github.com/mikebrady/shairport-sync/issues/1633). The bug was that when a Realtime Audio stream (e.g. playing from Spotify on iOS or using Shairport Sync as the Sound Output on a Mac) was played, it was fine, but when it was stopped and a second stream was started, the new stream could not be heard. The problem was that the PTP clock was not being correctly revalidated for second and subsequent Realtime Audio streams. The fix was to ensure that the PTP clock is revalidated on second and subsequent plays on the same connection. Thanks again to [David Leibovic](https://github.com/dasl-) for finding the problem. * Use TCP keepalive a little more generally -- treat it the same as a client closing the link rather than just an error. * Remove three potential race conditions between Shairport Sync opening a TCP connection and the client checking that the connections are open. The problem was that the connections were being opened in threads that were created just before the client was given the connection information. If the threads were delayed (e.g. on a slow or busy processor), the client could use the connection information to check the connections, but find that they were not (yet) open. This could cause the client to terminate the session immediately with a `TEARDOWN`. The fix was to open the connections before creating those threads and before sending the connection information back to the client. In this way, the connections are guaranteed to be open before the client has the information it needs to try to open them, even if the threads ared delayed in starting. This bug would manifest itself by allowing play to proceed but not play anything. * When built for AirPlay 2, ensure the hexadecimal string that prefixes the AirPlay 1 Service Name in the Bonjour text strings matches the AirPlay 2 Device ID. For example, if the Service Name is `Kitchen` and the AirPlay 2 Device ID is `b8:2f:eb:d7:85:df`, the AirPlay 1 Service Name should be `B82FEBD785DF@Kitchen`. (When built for AirPlay 1, the hexadecimal prefix is simply a hash of the Service Name.) Thanks to [Casper](https://github.com/casperghst42) for raising the [issue](https://github.com/owntone/owntone-server/issues/1578) and to [ejurgensen](https://github.com/ejurgensen) for identifying the cause of the problem. From b56d55151890ff846a667b50d15e9e6b562144d2 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sun, 21 May 2023 12:49:05 +0100 Subject: [PATCH 31/31] Small documentation updates. --- RELEASENOTES.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 143e0aee..a1fcb0a9 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -10,9 +10,9 @@ If you are updating an existing installation of Shairport Sync, you must also up **Enhancements** * Allow compilation with `libplist` version `2.3.0`. Thanks to [Markus Reiter](https://github.com/reitermarkus). -* Updates to GitHub Action Workflows -- many thanks to [yubiuser](https://github.com/yubiuser). -* Update to the MQTT documentation to correspond to updates in [Home Assistant](https://www.home-assistant.io/blog/2022/06/01/release-20226/#breaking-changes). Thanks to [hunhejj](https://github.com/hunhejj). -* Updates to the PTP clock to improve performance. Shairport Sync now passes activity information to NQPTP, enabling it to process timing data more accurately. +* Update GitHub Action Workflows -- many thanks to [yubiuser](https://github.com/yubiuser). +* Update MQTT documentation to correspond to updates in [Home Assistant](https://www.home-assistant.io/blog/2022/06/01/release-20226/#breaking-changes). Thanks to [hunhejj](https://github.com/hunhejj). +* Update NQPTP communication to improve performance. Shairport Sync now passes activity information to NQPTP, enabling it to process timing data more accurately. **Docker Image Enhancements** * Add basic PulseAudio support. Thanks to [Ferdynand Naczynski](https://github.com/nipsufn) and thanks also to [Noel Hibbard](https://github.com/noelhibbard) for championing this idea for a long time.