From c9854c435008ee9da50353be6a240526778dd22b Mon Sep 17 00:00:00 2001 From: Klaas de Waal Date: Mon, 13 Mar 2023 23:17:11 +0100 Subject: [PATCH] HDHomeRun DVB-T/T2 tuning command For HDHomeRun DVB-T/T2 tuners, use the bandwidth but not the modulation system in the tuning command. For example, use "autot8:570000000" for a 570MHz signal. Previously, instead of "auto" the modulation system was specified. This led to issues when scanning for channels because then the modulation system is not yet known; it happens on some systems that Using "dvbt" as modulation system can give a tuning error on a dvb-t2 multiplex. This partially reverts commit fff7d84c0ea2e65cc7f95a711656a5dd889b104b where both bandwidth and modulation system were added to the tuning command. --- .../libs/libmythtv/recorders/hdhrchannel.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/mythtv/libs/libmythtv/recorders/hdhrchannel.cpp b/mythtv/libs/libmythtv/recorders/hdhrchannel.cpp index d2ac41175fc..c58e6e356a7 100644 --- a/mythtv/libs/libmythtv/recorders/hdhrchannel.cpp +++ b/mythtv/libs/libmythtv/recorders/hdhrchannel.cpp @@ -119,23 +119,12 @@ static QString format_modulation(const DTVMultiplex &tuning) return "auto"; } -static QString format_modsys_dvbt(const DTVMultiplex &tuning) -{ - if (DTVModulationSystem::kModulationSystem_DVBT == tuning.m_modSys) - return "dvbt"; - if (DTVModulationSystem::kModulationSystem_DVBT2 == tuning.m_modSys) - return "dvbt2"; - return "auto"; -} - -static QString format_dvbt(const DTVMultiplex &tuning, const QString &modsys) +static QString format_dvbt(const DTVMultiplex &tuning) { const QChar b = tuning.m_bandwidth.toChar(); if ((QChar('8') == b) || (QChar('7') == b) || (QChar('6') == b)) { - if ("auto" == modsys) - return QString("auto%1t").arg(b); - return QString("t%1%2").arg(b).arg(modsys); + return QString("auto%1t").arg(b); } return "auto"; } @@ -169,8 +158,7 @@ static QString get_tune_spec( if ((DTVTunerType::kTunerTypeDVBT == tunerType) || (DTVTunerType::kTunerTypeDVBT2 == tunerType)) { - const QString modsys = format_modsys_dvbt(tuning); - return format_dvbt(tuning, modsys); + return format_dvbt(tuning); } return "auto";