GNOME Bugzilla – Bug 654483
Multiple attempts to tune a DVB frontend
Last modified: 2014-06-11 00:42:23 UTC
If dvbsrc fails to tune a DVB frontend it retries up to a total of five attempts. I don't think this is useful because most failures won't be cleared by trying again. If it is useful in some circumstances, application writers can easily make multiple attempts where necessary instead of having it hard wired in to the library. The biggest disadvantage of these forced retries is in DVB-T scanning where multiple frequencies are tried until a working one is found. Trying all the bad frequencies up to five times makes the process painfully slow. Here's a patch to remove the extra retries. It should be applied after my s2api patch from Bug 654479.
Created attachment 191819 [details] [review] Only make one attempt to tune a DVB frontend.
Please attach the patch in "git format-patch" style. It makes applying it easier and will include your name, mail address and commit message.
Created attachment 191904 [details] [review] Only make one attempt to tune DVB frontend Now created with git format-patch.
How about making that constant 5 attempts an object property, defaulting to 1 ? This would allow the user code to do the choice, while making the patch simpler too (at least without all the whitespace change).
The tuning process in now different and it's been controlled by a seteable timeout property. Tuning & locking is an slow process, how long does it take for a particular frontend to perform depends on several factors, signal quality (CNR / SRN), power and reciver sensibility among others. Retrying a few times is often needed. The above been said though, harcoded sleep() calls and dumb retries had been replaced by a polling logic, this allows for a far quicker tuning approach and early bail out in case of irrecoverable failures. I'm closing this bug and rejecting this patch on these grounds.