Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (4788): Tda8083: support for uncorrectable blocks and bit error rate

Copied routines for uc blocks and BER from the removed tda80xx.c
into tda8083.c.

Signed-off-by: Christoph Haubrich <christoph1.haubrich@arcor.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>

authored by

Christoph Haubrich and committed by
Mauro Carvalho Chehab
dbb2e639 bf11f5e9

+30
+30
drivers/media/dvb/frontends/tda8083.c
··· 262 262 if (sync & 0x10) 263 263 *status |= FE_HAS_SYNC; 264 264 265 + if (sync & 0x20) /* frontend can not lock */ 266 + *status |= FE_TIMEDOUT; 267 + 265 268 if ((sync & 0x1f) == 0x1f) 266 269 *status |= FE_HAS_LOCK; 270 + 271 + return 0; 272 + } 273 + 274 + static int tda8083_read_ber(struct dvb_frontend* fe, u32* ber) 275 + { 276 + struct tda8083_state* state = fe->demodulator_priv; 277 + int ret; 278 + u8 buf[3]; 279 + 280 + if ((ret = tda8083_readregs(state, 0x0b, buf, sizeof(buf)))) 281 + return ret; 282 + 283 + *ber = ((buf[0] & 0x1f) << 16) | (buf[1] << 8) | buf[2]; 267 284 268 285 return 0; 269 286 } ··· 301 284 302 285 u8 _snr = tda8083_readreg (state, 0x08); 303 286 *snr = (_snr << 8) | _snr; 287 + 288 + return 0; 289 + } 290 + 291 + static int tda8083_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) 292 + { 293 + struct tda8083_state* state = fe->demodulator_priv; 294 + 295 + *ucblocks = tda8083_readreg(state, 0x0f); 296 + if (*ucblocks == 0xff) 297 + *ucblocks = 0xffffffff; 304 298 305 299 return 0; 306 300 } ··· 468 440 .read_status = tda8083_read_status, 469 441 .read_signal_strength = tda8083_read_signal_strength, 470 442 .read_snr = tda8083_read_snr, 443 + .read_ber = tda8083_read_ber, 444 + .read_ucblocks = tda8083_read_ucblocks, 471 445 472 446 .diseqc_send_master_cmd = tda8083_send_diseqc_msg, 473 447 .diseqc_send_burst = tda8083_diseqc_send_burst,