// SPDX-License-Identifier: GPL-2.0-or-later /* * Driver for Zarlink DVB-T MT352 demodulator * * Written by Holger Waechtler <holger@qanu.de> * and Daniel Mack <daniel@qanu.de> * * AVerMedia AVerTV DVB-T 771 support by * Wolfram Joost <dbox2@frokaschwei.de> * * Support for Samsung TDTC9251DH01C(M) tuner * Copyright (C) 2004 Antonio Mancuso <antonio.mancuso@digitaltelevision.it> * Amauri Celani <acelani@essegi.net> * * DVICO FusionHDTV DVB-T1 and DVICO FusionHDTV DVB-T Lite support by * Christopher Pascoe <c.pascoe@itee.uq.edu.au>
*/
staticint _mt352_write(struct dvb_frontend* fe, const u8 ibuf[], int ilen)
{ int err,i; for (i=0; i < ilen-1; i++) if ((err = mt352_single_write(fe,ibuf[0]+i,ibuf[i+1]))) return err;
if (state->config.no_tuner) { if (fe->ops.tuner_ops.set_params) {
fe->ops.tuner_ops.set_params(fe); if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);
}
if ( (mt352_read_register(state,0x00) & 0xC0) != 0xC0 ) return -EINVAL;
/* Use TPS_RECEIVED-registers, not the TPS_CURRENT-registers because * the mt352 sometimes works with the wrong parameters
*/
tps = (mt352_read_register(state, TPS_RECEIVED_1) << 8) | mt352_read_register(state, TPS_RECEIVED_0);
div = (mt352_read_register(state, CHAN_START_1) << 8) | mt352_read_register(state, CHAN_START_0);
trl = mt352_read_register(state, TRL_NOMINAL_RATE_1);
staticint mt352_read_status(struct dvb_frontend *fe, enum fe_status *status)
{ struct mt352_state* state = fe->demodulator_priv; int s0, s1, s3;
/* FIXME: * * The MT352 design manual from Zarlink states (page 46-47): * * Notes about the TUNER_GO register: * * If the Read_Tuner_Byte (bit-1) is activated, then the tuner status * byte is copied from the tuner to the STATUS_3 register and * completion of the read operation is indicated by bit-5 of the * INTERRUPT_3 register.
*/
if ((s0 = mt352_read_register(state, STATUS_0)) < 0) return -EREMOTEIO; if ((s1 = mt352_read_register(state, STATUS_1)) < 0) return -EREMOTEIO; if ((s3 = mt352_read_register(state, STATUS_3)) < 0) return -EREMOTEIO;
*status = 0; if (s0 & (1 << 4))
*status |= FE_HAS_CARRIER; if (s0 & (1 << 1))
*status |= FE_HAS_VITERBI; if (s0 & (1 << 5))
*status |= FE_HAS_LOCK; if (s1 & (1 << 1))
*status |= FE_HAS_SYNC; if (s3 & (1 << 6))
*status |= FE_HAS_SIGNAL;
/* align the 12 bit AGC gain with the most significant bits */
u16 signal = ((mt352_read_register(state, AGC_GAIN_1) & 0x0f) << 12) |
(mt352_read_register(state, AGC_GAIN_0) << 4);
/* inverse of gain is signal strength */
*strength = ~signal; return0;
}
MODULE_DESCRIPTION("Zarlink MT352 DVB-T Demodulator driver");
MODULE_AUTHOR("Holger Waechtler, Daniel Mack, Antonio Mancuso");
MODULE_LICENSE("GPL");
EXPORT_SYMBOL_GPL(mt352_attach);
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.7Bemerkung:
(vorverarbeitet am 2026-06-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.