*** dvbchannel.cpp.2 2010-06-21 16:20:16.285148510 +0200 --- dvbchannel.cpp 2010-04-03 02:41:20.402134167 +0200 *************** *** 141,146 **** --- 141,148 ---- if (fd_frontend >= 0) { close(fd_frontend); + usleep(5000000); + fprintf(stderr, "waiting for frontend.................................\n"); fd_frontend = -1; dvbcam->Stop(); *************** *** 190,197 **** --- 192,203 ---- QString devname = CardUtil::GetDeviceName(DVB_DEV_FRONTEND, device); QByteArray devn = devname.toAscii(); + VERBOSE(VB_CHANNEL, LOC + "DVB channel :" + devname); + for (int tries = 1; ; ++tries) { + usleep(5000000); + VERBOSE(VB_CHANNEL, LOC + "Slowing down open DVB channel :" + devname); fd_frontend = open(devn.constData(), O_RDWR | O_NONBLOCK); if (fd_frontend >= 0) break; *************** *** 207,212 **** --- 213,219 ---- usleep(50000); } + usleep(50000); dvb_frontend_info info; bzero(&info, sizeof(info)); if (ioctl(fd_frontend, FE_GET_INFO, &info) < 0) *************** *** 215,220 **** --- 222,229 ---- "Failed to get frontend information." + ENO); close(fd_frontend); + usleep(5000000); + fprintf(stderr, "waiting for frontend.................................\n"); fd_frontend = -1; return false; }