Ticket #8074: 8074-v1.patch

File 8074-v1.patch, 1.5 KB (added by danielk, 13 years ago)

Workaround patch

  • mythtv/libs/libmythtv/cardutil.cpp

    diff --git a/mythtv/libs/libmythtv/cardutil.cpp b/mythtv/libs/libmythtv/cardutil.cpp
    index 7acc8ca..ffda264 100644
    a b  
    4747#define LOC_WARN QString("CardUtil, Warning: ")
    4848#define LOC_ERR  QString("CardUtil, Error: ")
    4949
     50/// This is a hack for the problem tracked here:
     51/// https://bugs.launchpad.net/mythtv/+bug/439163/
     52/// http://www.kernellabs.com/blog/?p=1568
     53/// Which will probably be fixed upstream by August 2011,
     54/// so the hack should remain until August 2013
     55#define HVR1300_HACK
     56
    5057QString CardUtil::GetScanableCardTypes(void)
    5158{
    5259    QString cardTypes = "";
    QString CardUtil::ProbeDVBType(const QString &device) 
    357364    if (err < 0)
    358365    {
    359366        close(fd_frontend);
     367#ifdef HVR1300_HACK
     368        usleep(100 * 1000);
     369#endif
    360370        LOG(VB_GENERAL, LOG_ERR, "FE_GET_INFO ioctl failed (" + dvbdev + ").");
    361371        return ret;
    362372    }
    363373    close(fd_frontend);
     374#ifdef HVR1300_HACK
     375    usleep(100 * 1000);
     376#endif
    364377
    365378    DTVTunerType type(info.type);
    366379#if HAVE_FE_CAN_2G_MODULATION
    QString CardUtil::ProbeDVBFrontendName(const QString &device) 
    394407    if (err < 0)
    395408    {
    396409        close(fd_frontend);
     410#ifdef HVR1300_HACK
     411        usleep(100 * 1000);
     412#endif
    397413        return "ERROR_PROBE";
    398414    }
    399415
    400416    ret = info.name;
    401417
    402418    close(fd_frontend);
     419#ifdef HVR1300_HACK
     420        usleep(100 * 1000);
     421#endif
    403422#endif // USING_DVB
    404423
    405424    return ret;