moikka!

On 08/28/2014 12:07 PM, Akihiro TSUKADA wrote:
moikka,
thanks for the comment.

I have feeling DVBv5 API is aimed to transfer data via property cached.
I haven't done much driver for DVBv5 statistics, but recently I
implemented CNR (DVBv5 stats) to Si2168 driver and it just writes all
the values directly to property cache. I expect RF strength (RSSI) is
just similar.

Currently, the demod of PT3 card (tc90522) gets RSSI data from
the connected tuner (mxl301rf) via tuner_ops.get_signal_strength_dbm()
and sets property cache in fe->ops.get_frontend() (which is called
before returning property cache value by dvb_frontend_ioctl_properties()).
If the tuner driver should set property cache directly,
when is the right timing to do so?
In fe->ops.tuner_ops.get_status() ?
or in the old fe->ops.tuner_ops.get_signal_strength()?
or Should I change get_signal_strength_dbm(fe, s64 *) to
update_signal_strength(fe) and let the tuner driver set property cache there?

I think tuner driver should set c->strength as own. Look drivers/media/dvb-core/dvb_frontend.c
        /* Fill quality measures */
        case DTV_STAT_SIGNAL_STRENGTH:
                tvp->u.st = c->strength;
                break;

So user-space just get info what is set to struct dtv_frontend_properties. That is similarly than CNR and all the other statistics.

Start polling thread, which polls once per 2 sec or so, which reads RSSI and writes value to struct dtv_frontend_properties. That it is, in my understanding. Same for all those DVBv5 stats. Mauro knows better as he designed that functionality.

regards
Antti

--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to