Re: [RFC] add "read_signal_strength" function to dvb_tuner_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Krufky wrote:
> 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:
> 
> #define TUNER_STATUS_LOCKED 1
> #define TUNER_STATUS_STEREO 2
> 
> ...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.

Manu and I spoke about this on irc today, and we decided that it would be better 
to name this function, "get_rf_strength" ...  So, the change would be as follows:


--- 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 @@
  #define TUNER_STATUS_LOCKED 1
  #define TUNER_STATUS_STEREO 2
  	int (*get_status)(struct dvb_frontend *fe, u32 *status);
+	int (*get_rf_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. */


This is a rather trivial addition, so I doubt there will be any debate on this 
matter.  I plan to move forward with this tonight, unless anybody is opposed.

Any acks would still be appreciated, of course :-)

Regards,

Mike Krufky


_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux