[linux-dvb] [RFC] add "read_signal_strength" function to dvb_tuner_ops

Michael Krufky mkrufky at linuxtv.org
Thu Aug 30 04:06:06 CEST 2007

struct dvb_frontend_ops contains a function pointer for reading signal
strength from the demodulator, however, it would also be useful to be
able to read the signal strength from the tuner, itself.

As of now, in dvb_tuner_ops, we only have the following function for status:

int (*get_status)(struct dvb_frontend *fe, u32 *status);

The usability of this function is rather limited, and currently only
provides a mechanism for reading a limited amount of bits. The current
status bits are as follows:


...this doesn't really lend itself for a useful signal strength reading.

I can cite two examples of how this would be useful in the current codebase:

1) Some demodulators do not directly provide signal strength readings.
For example, lgdt330x.  In order to provide some sort of measurement,
other values are used to arrive at an estimated reading.

If we had a read_signal_strength function available from the tuner
driver, such demodulator drivers that are otherwise unable to provide
this functionality directly would be able to read the signal strength
from the tuner driver, and either pass on that value, or use it in its
calculation of status readings.

2) The analog tuner system accesses the tuner modules directly, and
would benefit greatly from having such functionality available to be
able to read signal strength from the tuner.

I propose the following addition to the internal API.  Please respond
with an ack, and / or any comments that you may have:

[PATCH] add "read_signal_strength" function to dvb_tuner_ops

Signed-off-by: Michael Krufky <mkrufky at linuxtv.org>

 linux/drivers/media/dvb/dvb-core/dvb_frontend.h |    1 +
 1 file changed, 1 insertion(+)

--- v4l-dvb.orig/linux/drivers/media/dvb/dvb-core/dvb_frontend.h
+++ v4l-dvb/linux/drivers/media/dvb/dvb-core/dvb_frontend.h
@@ -92,6 +92,7 @@
 	int (*get_status)(struct dvb_frontend *fe, u32 *status);
+	int (*read_signal_strength)(struct dvb_frontend* fe, u16* strength);
 	/** These are provided seperately from set_params in order to facilitate silicon
 	 * tuners which require sophisticated tuning loops, controlling each parameter seperately. */

More information about the linux-dvb mailing list