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

Michael Krufky mkrufky at linuxtv.org
Fri Aug 31 16:30:30 CEST 2007


Henk wrote:
> Of course from a kernel perspective it is a simple addition, but where
> should we form a userspace perspective decide on which signal strength
> function to use?
>
> I don't think an extra interface should be needed here.
>   
Henk,

This is an addition to the *internal* API -- This means no change to 
userspace.
> For example if a demodulator is unable to provide signal strengths on
> his own there is always the possibility to request it from the tuner
> (if available) and report that.
>   
That's the point -- the addition of this function to dvb_tuner_ops will 
expose this functionality of the tuner driver to the demod driver.
> For example how about this alternative. In the demod driver you could use:
>
> int  demod_get_rf_strength(struct dvb_frontend *fe, u16 *strength)
> {
>    /* No I dont support this so see if we can get something from the tuner */
>    if ( fe->ops.tuner_ops.get_rf_strength(fe, strength) )
>           return fe->ops.tuner_ops.get_rf_strength(fe, strength);
>
>    return -ENOSYS;
> }
>   
This is exactly what I was describing...  The entire point, however, is 
that there is no tuner_ops.get_rf_strength as of yet.  I was proposing 
to add this new function pointer to struct dvb_tuner_ops, an internal 
structure only available *within* the kernel..
> That way you can decide in the demod driver what's the best way on how
> to deal with this specific hardware "feature".

Thank you for agreeing with me ;-)

Henk wrote:
> Sorry,
>
> My mistake, I was under the impression that "read_rf_strength" was
> already a tuner interface.
>   
:-P
> So in that case it would be usefull to have included in the tuner interface.
>
> Still policy on whether it is reported to userspace should reside
> within the demod driver as outlined below I think.
>   
exactly.
> As for the name I think it would cause less confusion to call it
> similar to the function thats used in "struct frontend"
> (get_signal_strength).

Manu and I together decided against that.  get_rf_strength is more 
appropriate, since he plans to add similar functions later on for 
reading IF strength amongst other values.

Thank you for your comments.

Regards,

Mike




More information about the linux-dvb mailing list