Re: [PATCH]Frontends or51132, or51211 move common code to module

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

 



On Friday 14 April 2006 10:17, Manu Abraham wrote:
> Andrew de Quincey wrote:
> > On Friday 14 April 2006 05:19, Rusty Scott wrote:
> >> The attached patch moves the common logarithm code found in the or51211
> >> and or 51132 frontends into a module that can be accessed by other
> >> frontends as well. This patch is in anticipation of using the logarithm
> >> code in the lgdt330x module to calculate a signal strength which is
> >> currently not done.
> >
> > What about making it an "arithmetic module" instead of just for logs?
> > From what I see we're going to be needing a place to put more and more
> > things like this.. e.g. a fixed point implementation might be handy at
> > some point as well (not that I'm suggesting you write that! Just renaming
> > the module).
>
> Yeah, would be nice. The last we discussed, Ralph suggested that we can
> probably add it to dvb-core, rather than a separate module, while being
> at the new modules.

Ah - sounds like a good idea... dvb_core_arith.c anyone?

BTW: as for the reporting stuff in dB - if we can do it for some cards (e.g. 
the manufacturer told us), it would be great - no sense in chucking stuff out 
if we can actually do it. But we need to distinguish those from the ones 
where we cannot.

We could always add new IOCTLs, but that seems nasty... perhaps we need a 
single generic FE_READ_VALUE ioctl - where you pass in the key (integer) of 
what to read and it returns it, so we can expand easily in the future?

e.g.
#define FE_VALUE_SNR 0		/* same value as from FE_READ_SNR */
#define FE_VALUE_SNR_DB 1	/* SNR value in dB if the frontend can do it */
#define FE_VALUE_BER 2		/* same value as FE_READ_BER */
....

struct fe_value {
	int key;
	void *data;
}

struct fe_value_snr_db {
	__s32 snr;
}
....


struct fe_value val;
struct fe_value_snr_db val_snr_db;

val.key = FE_VALUE_SNR_DB;
val.data = &fe_val_snr_db;
ioctl(fd, FE_GET_VALUE, &val);

Just a suggestion...

_______________________________________________

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