Ticket #10153: 0041-libmythtv-Set-the-modulation-system-for-all-dvb-s2-c.2.patch

File 0041-libmythtv-Set-the-modulation-system-for-all-dvb-s2-c.2.patch, 1.7 KB (added by Lawrence Rust <lvr@…>, 14 years ago)
  • mythtv/libs/libmythtv/dtvmultiplex.cpp

    From c0b5d14a3cda6b91509cfb63cd04c940eb3dc656 Mon Sep 17 00:00:00 2001
    From: Lawrence Rust <lvr@softsystem.co.uk>
    Date: Sun, 6 Nov 2011 13:53:58 +0100
    Subject: [PATCH 41/51] libmythtv: Set the modulation system for all dvb-s2 channels
    
    This works around a change in Linux 3.x handling of ioctl FE_SET_PROPERTY
    when DTV_DELIVERY_SYSTEM is set to 0.  In previous versions dvb_frontend
    interpreted this as meaning dvb-s and passed that value on to the frontend
    driver.  In versions 3.0 and later the value 0 is left unchanged and so the
    tune operation fails.
    
    Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
    ---
     mythtv/libs/libmythtv/dtvmultiplex.cpp |   18 ++++++++++++++++++
     1 files changed, 18 insertions(+), 0 deletions(-)
    
    diff --git a/mythtv/libs/libmythtv/dtvmultiplex.cpp b/mythtv/libs/libmythtv/dtvmultiplex.cpp
    index 35b4666..9b5e2ec 100644
    a b bool DTVMultiplex::ParseDVB_S2(  
    262262        return false;
    263263    }
    264264
     265    switch (mod_sys)
     266    {
     267    case DTVModulationSystem::kModulationSystem_UNDEFINED:
     268        // Force dvb-s if using qpsk
     269        if (DTVModulation::kModulationQPSK == modulation)
     270            mod_sys = DTVModulationSystem::kModulationSystem_DVBS;
     271        else
     272            mod_sys = DTVModulationSystem::kModulationSystem_DVBS2;
     273        break;
     274    case DTVModulationSystem::kModulationSystem_DVBS:
     275    case DTVModulationSystem::kModulationSystem_DVBS2:
     276        break;
     277    default:
     278        LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported S2 modulation system " +
     279                QString("parameter '%1', aborting.").arg(_mod_sys));
     280        return false;
     281    }
     282
    265283    if (!_rolloff.isEmpty())
    266284        ok &= rolloff.Parse(_rolloff);
    267285