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

File 0071-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 37d860fe2b25b3f7a4c8f80a66867a2c34956af8 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 71/85] 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 2281a5e..2433667 100644
    a b bool DTVMultiplex::ParseDVB_S2(  
    246246        return false;
    247247    }
    248248
     249    switch (mod_sys)
     250    {
     251    case DTVModulationSystem::kModulationSystem_UNDEFINED:
     252        // Force dvb-s if using qpsk
     253        if (DTVModulation::kModulationQPSK == modulation)
     254            mod_sys = DTVModulationSystem::kModulationSystem_DVBS;
     255        else
     256            mod_sys = DTVModulationSystem::kModulationSystem_DVBS2;
     257        break;
     258    case DTVModulationSystem::kModulationSystem_DVBS:
     259    case DTVModulationSystem::kModulationSystem_DVBS2:
     260        break;
     261    default:
     262        VERBOSE(VB_IMPORTANT, LOC_ERR + "Unsupported S2 modulation system " +
     263                QString("parameter '%1', aborting.").arg(_mod_sys));
     264        return false;
     265    }
     266
    249267    if (!_rolloff.isEmpty())
    250268        ok &= rolloff.Parse(_rolloff);
    251269