DVB-FE.H(3)

πŸ“¦
version 1.32.0 Β· 2 versions
, in fedora 43

✨ NAME ✨

libdvbv5's dvb-fe.h β€” bestie, this is the header that gives you interfaces to deal with the DVB frontend πŸ’–

It's lib/includ...v5/dvb-fe.h(3) from the library man pages, and yes the filename is doing the most with those ellipses, we love her anyway πŸŽ€


🌸 SYNOPSIS 🌸

Okay so first things first, here's the whole stack of includes you gotta pull in before any of this works:

#include <stdio.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <string.h>
#include 'dvb-frontend.h'
#include 'dvb-sat.h'
#include 'dvb-log.h'

🫢 Data Structures

  • struct dvb_v5_fe_parms β€” Keeps data needed to handle the DVB frontend. She's the main character of this whole file, fr fr.

πŸ¦‹ Macros

  • #define ARRAY_SIZE(x) β€” Calculates the number of elements of an array. Lowkey the most useful three lines of C ever written.
  • #define MAX_DELIVERY_SYSTEMS β€” Max number of delivery systems for a given frontend.

πŸ’… Functions

  • struct dvb_v5_fe_parms * dvb_fe_dummy (void) β€” Allocates a dummy frontend structure. No hardware, no vibes, just a lil placeholder ✨
  • 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. The full-control version, flags and all.
  • 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. The classic.
  • 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. Same deal but you get to hand it a logfunc 🫢
  • void dvb_fe_close (struct dvb_v5_fe_parms *parms) β€” Closes the frontend and frees allocated resources. Say bye, clean up your mess, periodt.
  • const char * dvb_cmd_name (int cmd) β€” Returns the string name associated with a DVBv5 command.
  • const char *const * dvb_attr_names (int cmd) β€” Returns an string array with the valid string values associated with a DVBv5 command.
  • 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_store_parm (struct dvb_v5_fe_parms *parms, unsigned cmd, uint32_t value) β€” Stores the value of a DVBv5/libdvbv5 property.
  • int dvb_set_sys (struct dvb_v5_fe_parms *parms, fe_delivery_system_t sys) β€” Sets the delivery system.
  • int dvb_add_parms_for_sys (struct dvb_v5_fe_parms *parms, fe_delivery_system_t sys) β€” Make dvb properties reflect the current standard.
  • int dvb_set_compat_delivery_system (struct dvb_v5_fe_parms *parms, uint32_t desired_system) β€” Sets the delivery system. (Yes, there are two of these bad boys. Slay.)
  • void dvb_fe_prt_parms (const struct dvb_v5_fe_parms *parms) β€” Prints all the properties at the cache.
  • int dvb_fe_set_parms (struct dvb_v5_fe_parms *parms) β€” Prints all the properties at the cache.
  • 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_fe_retrieve_stats (struct dvb_v5_fe_parms *parms, unsigned cmd, uint32_t *value) β€” Retrieve the stats for a DTV layer from cache.
  • int dvb_fe_get_stats (struct dvb_v5_fe_parms *parms) β€” Retrieve the stats from the Kernel.
  • 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.
  • enum dvb_quality dvb_fe_retrieve_quality (struct dvb_v5_fe_parms *parms, unsigned layer) β€” Retrieve the quality stats from cache.
  • int dvb_fe_snprintf_eng (char *buf, int len, float val) β€” Ancillary function to sprintf on ENG format.
  • 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_get_event (struct dvb_v5_fe_parms *parms) β€” Get both status statistics and dvb parameters. Two-for-one, iconic behavior πŸ’…
  • int dvb_fe_sec_voltage (struct dvb_v5_fe_parms *parms, int on, int v18) β€” DVB ioctl wrapper for setting SEC voltage.
  • 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_lnb_high_voltage (struct dvb_v5_fe_parms *parms, int on) β€” DVB ioctl wrapper for setting LNBf high voltage.
  • 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.
  • 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.
  • 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_is_satellite (uint32_t delivery_system) β€” DVB Ancillary routine to check if a given Delivery system is satellite. Yes ma'am, satellite check πŸ›°οΈ
  • int dvb_fe_set_default_country (struct dvb_v5_fe_parms *parms, const char *country) β€” Set default country variant of delivery systems like ISDB-T.

πŸ’œ Detailed Description πŸ’œ

Provides interfaces to deal with DVB frontend. (She said it twice because she means it.)

GNU Lesser General Public License version 2.1 (LGPLv2.1)

⭐ Author

Mauro Carvalho Chehab

🧚 The Whole Vibe, Explained

The libdvbv5 API works with a set of key/value properties. There are two types of properties, bestie, listen up:

  • The ones defined at the Kernel's frontent API, that are found at /usr/include/linux/dvb/frontend.h (actually, it uses a local copy of that file, stored at ./include/linux/dvb/frontend.h)
  • Some extra properties used by libdvbv5. Those can be found at lib/include/libdvbv5/dvb-v5-std.h and start at DTV_USER_COMMAND_START.

Just like the DTV properties, the stats are cached. That warrants that all stats are got at the same time, when dvb_fe_get_stats() is called. (Yes. All of them. At once. The efficiency of it all 😭✨)

πŸ™ˆ Bug Report

Please submit bug reports and patches to linux-media@vger.kernel.org β€” they don't bite, go tell them what's up 🫢

πŸŽ€ Definition in file dvb-fe.h.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libdvbv5 from the source code.


πŸ’– That's the whole page bestie. Go read your stats, cache your parms, and remember: dvb_fe_close() when you're done or the file descriptors will haunt you. No cap.

Stay slay, stay tuned β€” this page is from libdvbv5, Version 1.32.0, and it lives at lib/includ...v5/dvb-fe.h(3) πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from