Project

General

Profile

Bug #393

FE_READ_UNCORRECTED_BLOCKS issues

Added by andrew de Quincey over 11 years ago. Updated over 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
Category:
DVB
Target version:
Start date:
2011-03-07
Due date:
% Done:

0%

Estimated time:
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 Smas over 11 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 Smas over 11 years ago

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

Fixed in commit:c26a0b4b

Also available in: Atom PDF