27 #include <sys/types.h>
30 #include <sys/ioctl.h>
32 #include "dvb-frontend.h"
65 #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
72 #define MAX_DELIVERY_SYSTEMS 20
80 #define DTV_MAX_STATS DTV_NUM_STATS_PROPS
81 #define DTV_SIGNAL_STRENGTH DTV_STAT_SIGNAL_STRENGTH
82 #define DTV_SNR DTV_STAT_CNR
83 #define DTV_UNCORRECTED_BLOCKS DTV_STAT_ERROR_BLOCK_COUNT
197 unsigned use_legacy_call,
220 unsigned use_legacy_call);
243 unsigned verbose,
unsigned use_legacy_call,
302 unsigned cmd, uint32_t *value);
318 unsigned cmd, uint32_t value);
336 fe_delivery_system_t sys);
353 fe_delivery_system_t sys);
375 uint32_t desired_system);
442 unsigned cmd,
unsigned layer);
459 unsigned cmd, uint32_t *value);
499 enum fecap_scale_params *scale);
591 char *display_name,
int layer,
592 char **buf,
int *len,
int *show_layer_name);
698 const unsigned char *buf);
737 extern const unsigned fe_bandwidth_name[8];
738 extern const char *dvb_v5_name[71];
739 extern const void *dvb_v5_attr_names[];
740 extern const char *delivery_system_name[20];
741 extern const char *fe_code_rate_name[14];
742 extern const char *fe_modulation_name[15];
743 extern const char *fe_transmission_mode_name[10];
744 extern const unsigned fe_bandwidth_name[8];
745 extern const char *fe_guard_interval_name[12];
746 extern const char *fe_hierarchy_name[6];
747 extern const char *fe_voltage_name[4];
748 extern const char *fe_tone_name[3];
749 extern const char *fe_inversion_name[4];
750 extern const char *fe_pilot_name[4];
751 extern const char *fe_rolloff_name[5];
int dvb_fe_diseqc_cmd(struct dvb_v5_fe_parms *parms, const unsigned len, const unsigned char *buf)
DVB ioctl wrapper for setting SEC DiSeqC command.
Stores the information of a LNBf.
int dvb_fe_retrieve_stats(struct dvb_v5_fe_parms *parms, unsigned cmd, uint32_t *value)
Retrieve the stats for a DTV layer from cache.
struct dvb_v5_fe_parms * dvb_fe_open_flags(int adapter, int frontend, unsigned verbose, unsigned use_legacy_call, dvb_logfunc logfunc, int flags)
Opens a frontend and allocates a structure to work with.
int dvb_fe_set_parms(struct dvb_v5_fe_parms *parms)
Prints all the properties at the cache.
Provides interfaces to deal with DVB Satellite systems.
Provides interfaces to handle libdvbv5 log messages.
int dvb_fe_store_parm(struct dvb_v5_fe_parms *parms, unsigned cmd, uint32_t value)
Stores the value of a DVBv5/libdvbv5 property.
int dvb_set_compat_delivery_system(struct dvb_v5_fe_parms *parms, uint32_t desired_system)
Sets the delivery system.
float dvb_fe_retrieve_ber(struct dvb_v5_fe_parms *parms, unsigned layer, enum fecap_scale_params *scale)
Retrieve the BER stats from cache.
float dvb_fe_retrieve_per(struct dvb_v5_fe_parms *parms, unsigned layer)
Retrieve the PER stats from cache.
void dvb_fe_prt_parms(const struct dvb_v5_fe_parms *parms)
Prints all the properties at the cache.
struct dvb_frontend_info info
void(* dvb_logfunc)(int level, const char *fmt,...)
typedef used by dvb_fe_open2 for the log function
int dvb_fe_diseqc_reply(struct dvb_v5_fe_parms *parms, unsigned *len, char *buf, int timeout)
DVB ioctl wrapper for getting SEC DiSEqC reply.
int dvb_fe_get_parms(struct dvb_v5_fe_parms *parms)
Prints all the properties at the cache.
struct dtv_stats * dvb_fe_retrieve_stats_layer(struct dvb_v5_fe_parms *parms, unsigned cmd, unsigned layer)
Retrieve the stats for a DTV layer from cache.
int dvb_add_parms_for_sys(struct dvb_v5_fe_parms *parms, fe_delivery_system_t sys)
Make dvb properties reflect the current standard.
void dvb_fe_close(struct dvb_v5_fe_parms *parms)
Closes the frontend and frees allocated resources.
struct dvb_v5_fe_parms * dvb_fe_open2(int adapter, int frontend, unsigned verbose, unsigned use_legacy_call, dvb_logfunc logfunc)
Opens a frontend and allocates a structure to work with.
int dvb_fe_get_event(struct dvb_v5_fe_parms *parms)
Get both status statistics and dvb parameters.
const char *const * dvb_attr_names(int cmd)
Returns an string array with the valid string values associated with a DVBv5 command.
Keeps data needed to handle the DVB frontend.
struct dvb_v5_fe_parms * dvb_fe_open(int adapter, int frontend, unsigned verbose, unsigned use_legacy_call)
Opens a frontend and allocates a structure to work with.
fe_delivery_system_t systems[MAX_DELIVERY_SYSTEMS]
int dvb_fe_is_satellite(uint32_t delivery_system)
DVB Ancillary routine to check if a given Delivery system is satellite.
const struct dvb_sat_lnb * lnb
int dvb_set_sys(struct dvb_v5_fe_parms *parms, fe_delivery_system_t sys)
Sets the delivery system.
int dvb_fe_retrieve_parm(const struct dvb_v5_fe_parms *parms, unsigned cmd, uint32_t *value)
Retrieves the value of a DVBv5/libdvbv5 property.
int dvb_fe_sec_voltage(struct dvb_v5_fe_parms *parms, int on, int v18)
DVB ioctl wrapper for setting SEC voltage.
#define MAX_DELIVERY_SYSTEMS
Max number of delivery systems for a given frontend.
int dvb_fe_snprintf_eng(char *buf, int len, float val)
Ancillary function to sprintf on ENG format.
int dvb_fe_sec_tone(struct dvb_v5_fe_parms *parms, fe_sec_tone_mode_t tone)
DVB ioctl wrapper for setting SEC tone.
int dvb_fe_get_stats(struct dvb_v5_fe_parms *parms)
Retrieve the stats from the Kernel.
int dvb_fe_snprintf_stat(struct dvb_v5_fe_parms *parms, uint32_t cmd, char *display_name, int layer, char **buf, int *len, int *show_layer_name)
Ancillary function to sprintf on ENG format.
int dvb_fe_diseqc_burst(struct dvb_v5_fe_parms *parms, int mini_b)
DVB ioctl wrapper for setting SEC DiSeqC tone burst to select between satellite A or B...
enum dvb_quality dvb_fe_retrieve_quality(struct dvb_v5_fe_parms *parms, unsigned layer)
Retrieve the quality stats from cache.
int dvb_fe_lnb_high_voltage(struct dvb_v5_fe_parms *parms, int on)
DVB ioctl wrapper for setting LNBf high voltage.
struct dvb_v5_fe_parms * dvb_fe_dummy(void)
Allocates a dummy frontend structure.
dvb_quality
Provides an estimation about the user's experience while watching to a given MPEG stream...
fe_delivery_system_t current_sys
const char * dvb_cmd_name(int cmd)
Returns the string name associated with a DVBv5 command.