From 12d76edc429854d7f29b4135db09399c3d10b5dd Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Mon, 1 Jun 2026 13:31:06 -0400 Subject: [PATCH] feat(deltacast): support 8 RX channels (ports 0-7) on DELTA-12G-elp-h --- services/capture/deltacast-bridge/main.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/services/capture/deltacast-bridge/main.c b/services/capture/deltacast-bridge/main.c index 22cd516..2725357 100644 --- a/services/capture/deltacast-bridge/main.c +++ b/services/capture/deltacast-bridge/main.c @@ -36,8 +36,12 @@ static ULONG rx_streamtype(unsigned port) { case 1: return VHD_ST_RX1; case 2: return VHD_ST_RX2; case 3: return VHD_ST_RX3; + case 4: return VHD_ST_RX4; + case 5: return VHD_ST_RX5; + case 6: return VHD_ST_RX6; + case 7: return VHD_ST_RX7; default: - fprintf(stderr, "{\"error\":\"port %u not supported (max 3)\"}\n", port); + fprintf(stderr, "{\"error\":\"port %u not supported (max 7)\"}\n", port); return VHD_ST_RX0; /* caller will fail on signal lock */ } } @@ -200,8 +204,13 @@ int main(int argc, char *argv[]) { return 1; } - /* Disable passive (relay) loopback so RX is live */ - VHD_SetBoardProperty(board, loopback_prop(port_id), FALSE); + /* Disable passive (relay) loopback so RX is live. + * VHD_CORE_BP_PASSIVE_LOOPBACK_ only exists for ports 0-3 in SDK 6.34.1, + * and the board reports passive-loopback capability 0, so skipping ports 4-7 + * is harmless. */ + if (port_id < 4) { + VHD_SetBoardProperty(board, loopback_prop(port_id), FALSE); + } /* ── Wait for signal lock ──────────────────────────────────────── */ ULONG video_std = (ULONG)NB_VHD_VIDEOSTANDARDS; @@ -301,10 +310,10 @@ int main(int argc, char *argv[]) { } } - /* ── Cleanup ─────────────────────────────────────────────────────── */ + /* ── Cleanup ─────────────────────────────────────────────────── */ VHD_StopStream(video_stream); VHD_CloseStreamHandle(video_stream); if (audio_tid) pthread_join(audio_tid, NULL); VHD_CloseBoardHandle(board); return 0; -} \ No newline at end of file +}