Skip to content

Commit d8a4242

Browse files
committed
finish review and cherrypick changes for FIFO configuration from tsawyer:dvmhost:codex/fix-v24-r05a05-prready;
1 parent 8c21388 commit d8a4242

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/host/Host.Config.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66
*
77
* Copyright (C) 2017-2026 Bryan Biedenkapp, N2PLL
8+
* Copyright (C) 2026 Timothy Sawyer, WD6AWP
89
*
910
*/
1011
#include "Defines.h"
@@ -511,6 +512,7 @@ bool Host::createModem()
511512
uint16_t dmrFifoLength = (uint16_t)modemConf["dmrFifoLength"].as<uint32_t>(DMR_TX_BUFFER_LEN);
512513
uint16_t p25FifoLength = (uint16_t)modemConf["p25FifoLength"].as<uint32_t>(P25_TX_BUFFER_LEN);
513514
uint16_t nxdnFifoLength = (uint16_t)modemConf["nxdnFifoLength"].as<uint32_t>(NXDN_TX_BUFFER_LEN);
515+
uint32_t v24P25TxQueueSize = p25FifoLength;
514516

515517
yaml::Node dfsiParams = modemConf["dfsi"];
516518

@@ -645,6 +647,14 @@ bool Host::createModem()
645647
LogInfo(" DFSI FSC Initiator: %s", fscInitiator ? "yes" : "no");
646648
LogInfo(" DFSI TIA-102 Frames: %s", dfsiTIAMode ? "yes" : "no");
647649
}
650+
651+
// DFSI startup can enqueue a burst of timed frames before the modem
652+
// thread starts draining; keep the TX scheduler queue larger than the
653+
// raw modem FIFO to avoid clipping first-call onset.
654+
uint32_t minV24TxQueueSize = m_p25QueueSizeBytes + p25FifoLength;
655+
if (v24P25TxQueueSize < minV24TxQueueSize) {
656+
v24P25TxQueueSize = minV24TxQueueSize;
657+
}
648658
}
649659

650660
if (g_remoteModemMode) {
@@ -708,6 +718,8 @@ bool Host::createModem()
708718
LogInfo(" NXDN Queue Size: %u (%u bytes)", nxdnQueueSize, m_nxdnQueueSizeBytes);
709719
LogInfo(" DMR FIFO Size: %u bytes", dmrFifoLength);
710720
LogInfo(" P25 FIFO Size: %u bytes", p25FifoLength);
721+
if (m_isModemDFSI)
722+
LogInfo(" P25 DFSI TX Queue Size: %u bytes", v24P25TxQueueSize);
711723
LogInfo(" NXDN FIFO Size: %u bytes", nxdnFifoLength);
712724

713725
if (ignoreModemConfigArea) {
@@ -728,7 +740,7 @@ bool Host::createModem()
728740
}
729741

730742
if (m_isModemDFSI) {
731-
m_modem = new ModemV24(modemPort, m_duplex, m_p25QueueSizeBytes, p25FifoLength, rtrt, jitter,
743+
m_modem = new ModemV24(modemPort, m_duplex, m_p25QueueSizeBytes, v24P25TxQueueSize, rtrt, jitter,
732744
dumpModemStatus, displayModemDebugMessages, trace, debug);
733745
((ModemV24*)m_modem)->setCallTimeout(dfsiCallTimeout);
734746
((ModemV24*)m_modem)->setTIAFormat(dfsiTIAMode);

0 commit comments

Comments
 (0)