STRUCT DTV_STATS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct dtv_stats(9) β€” the Kernel API Manual, but make it make sense πŸŽ€

okay bestie, so this is a page from the Kernel API Manual and it's all about struct dtv_stats β€” literally the little guy you use for reading a DTV status property ✨


🌸 NAME 🌸

struct dtv_stats β€” bestie, it's Used for reading a DTV status property πŸ’–


✨ SYNOPSIS ✨

here's the whole shape of it, no cap, copy it exactly:

struct dtv_stats {
    __u8 scale;
    union {
      __u64 uvalue;
      __s64 svalue;
    };
 };

🫢 Members 🫢

  • scale β€” this one gets filled with enum fecap_scale_params β€” it's the scale that's in usage for that parameter, periodt πŸ’…
  • {unnamed_union} β€” anonymous. that's it, that's the whole vibe πŸ«₯
  • uvalue β€” the unsigned integer value of the measure. you use this one when scale is either FE_SCALE_RELATIVE or FE_SCALE_COUNTER 🌈
  • svalue β€” the integer value of the measure, for FE_SCALE_DECIBEL, used for dB measures. and heads up: the unit is 0.001 dB ⭐

πŸ¦‹ Description πŸ¦‹

so for most delivery systems, this is gonna return a single value for each parameter. easy, love that for us πŸ’–

but bestie, it should be noticed (yes, noticed πŸ‘€) that new OFDM delivery systems like ISDB can use different modulation types for each group of carriers. on those standards, up to 8 groups of statistics can be provided β€” one for each carrier group (called a "layer" on ISDB) 🧚

and to stay consistent with other delivery systems, the first value refers to the entire set of carriers ("global") πŸ‘‘

scale should use the value FE_SCALE_NOT_AVAILABLE when the value for the entire group of carriers, or from one specific layer, is not provided by the hardware 😭

len should be filled with the latest filled status + 1. iykyk πŸŽ€

in other words, for ISDB, those values should be filled like this β€” verbatim, don't touch:

u.st.stat.svalue[0] = global statistics;
u.st.stat.scale[0] = FE_SCALE_DECIBEL;
u.st.stat.value[1] = layer A statistics;
u.st.stat.scale[1] = FE_SCALE_NOT_AVAILABLE (if not available);
u.st.stat.svalue[2] = layer B statistics;
u.st.stat.scale[2] = FE_SCALE_DECIBEL;
u.st.stat.svalue[3] = layer C statistics;
u.st.stat.scale[3] = FE_SCALE_DECIBEL;
u.st.len = 4;

πŸ”₯ SEE ALSO πŸ”₯

and here's the whole friend group β€” first up, the kernel file itself: ./include/uapi/linux/dvb/frontend.h πŸ’œ

  • enum fe_caps(9)
  • struct dvb_frontend_info(9)
  • struct dvb_diseqc_master_cmd(9)
  • struct dvb_diseqc_slave_reply(9)
  • enum fe_sec_voltage(9)
  • enum fe_sec_tone_mode(9)
  • enum fe_sec_mini_cmd(9)
  • enum fe_status(9)
  • enum fe_spectral_inversion(9)
  • enum fe_code_rate(9)
  • enum fe_modulation(9)
  • enum fe_transmit_mode(9)
  • enum fe_guard_interval(9)
  • enum fe_hierarchy(9)
  • enum fe_interleaving(9)
  • enum fe_pilot(9)
  • enum fe_rolloff(9)
  • enum fe_delivery_system(9)
  • enum atscmh_sccc_block_mode(9)
  • enum atscmh_sccc_code_mode(9)
  • enum atscmh_rs_frame_ensemble(9)
  • enum atscmh_rs_frame_mode(9)
  • enum atscmh_rs_code_mode(9)
  • enum fecap_scale_params(9)
  • struct dtv_fe_stats(9)
  • struct dtv_property(9)
  • struct dtv_properties(9)

okay that's the whole page, you ate that πŸ“ this one lives at ./include/uapi/linux/dvb and the date on it is October 2026 β€” go off, see you in the next manpage bestie πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from