Bug #393

FE_READ_UNCORRECTED_BLOCKS issues

Added by andrew de Quincey about 2 years ago. Updated about 2 years ago.

Status:FixedStart date:03/07/2011
Priority:NormalDue date:
Assignee:Andreas Öman% Done:

0%

Category:DVB
Target version:2.13
Found in version: Affected Versions:

Description

Hi, I've been wondering why the "quality" on my DVB-T cards always tends to zero (even though they actually work fine!) in tvheadend, and I've identified the cause. Specifically, it is the code in
https://github.com/andoma/tvheadend/blob/master/src/dvb/dvb_fe.c dealing with reading the uncorrected blocks count. It is assuming the UCBLOCKS count is reset on each call, e.g.:

/* Reset FEC counter */
ioctl(tda->tda_fe_fd, FE_READ_UNCORRECTED_BLOCKS, &fec);

However, according to the DVB API, this is incorrect, the UCBLOCKS count is the total uncorrected blocks since the adapter was created. See
http://www.linuxtv.org/docs/dvbapi/DVB_Frontend_API.html#SECTION00327000000000000000

"This ioctl call returns the number of uncorrected blocks detected by the device driver during its lifetime."

However, the other issue is while some that DVB frontends implement this correctly (e.g. the af9013 DVBT demod is an accumulative counter), others don't. The ones that are incorrectly implemented do in fact reset the count every call.

History

#1 Updated by Andreas Öman about 2 years ago

I think tvheadend could be modified so it detects if the counter resets.
It's rather easy to do. just check if it ever decreases and if so assume it resets on read.

I'll try to fix that soonish

#2 Updated by Andreas Öman about 2 years ago

  • Status changed from New to Fixed
  • Target version set to 2.13

Fixed in c26a0b4b

Also available in: Atom PDF