Mailing List archive

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

[linux-dvb] Re: refactoring



Michael Hunold wrote:

Hi,

On 06.10.2004 21:18, Andrew de Quincey wrote:

If you keep going on this line of thought, you end up with:

-----------
struct dvb_frontend_api {
[...]

        int (*fe_read_ber)(void* data, __u32 ber);
        int (*fe_read_signal_strength)(void* data, __u16 strength);
        int (*fe_read_snr)(void* data, __u16 snr);
        int (*fe_read_ucblocks)(void* data, __u32 ucblocks);

Shouldn't we simply create a

struct dvb_fe_status {
__u16 flags;
__u32 ber;
__u16 strength;
__u16 snr;
__u32 ucblocks;
__u32 reserved[4];
};

#define DVB_FE_BER_VALID 0x1
#define DVB_FE_STRENGTH_VALID 0x2
#define DVB_FE_SNR_VALID 0x4
#define DVB_FE_UCBLOCKS_VALID 0x8

and only provide one function to query these informations?

For V3 this doesn't matter because the ioctl will only deliver one value at a time. But V4 already has a similar kind of simplification and I'd like to keep the frontend stuff in sync.

Perhaps we can introduce a new ioctl that provides all informations to userspace at once.

yes, we should. In v5 I would suggest to remove all FE_GET_XXX/FE_READ_XXX ioctls that only deliver a single value in favour of this one.

Holger





Home | Main Index | Thread Index