Skip to content

Commit

Permalink
HDHomeRun DVB-T/T2 tuning command
Browse files Browse the repository at this point in the history
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 fff7d84 where both
bandwidth and modulation system were added to the tuning command.
  • Loading branch information
kmdewaal committed Mar 13, 2023
1 parent 337500e commit c9854c4
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions mythtv/libs/libmythtv/recorders/hdhrchannel.cpp
Expand Up @@ -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";
}
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit c9854c4

Please sign in to comment.