Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] dvb: Add DVBv5 statistics properties

The DVBv3 statistics parameters are limited on several ways:
- It doesn't provide any way to indicate the used measure,
so userspace need to guess how to calculate/use it;
- Only a limited set of stats are supported;
- Can't be called in a way to require them to be filled
all at once (atomic reads from the hardware), with may
cause troubles on interpreting them on userspace;
- On some OFDM delivery systems, the carriers can be
independently modulated, having different properties.
Currently, there's no way to report per-layer stats.
To address the above issues, adding a new DVBv5-based stats API.
While here, correct inner code nomenclature on a few places.

Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

+260 -5
+1 -1
Documentation/DocBook/media/dvb/dvbapi.xml
··· 84 84 85 85 86 86 <title>LINUX DVB API</title> 87 - <subtitle>Version 5.8</subtitle> 87 + <subtitle>Version 5.10</subtitle> 88 88 <!-- ADD THE CHAPTERS HERE --> 89 89 <chapter id="dvb_introdution"> 90 90 &sub-intro;
+179 -1
Documentation/DocBook/media/dvb/dvbproperty.xml
··· 7 7 <para>The typical usage for the <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant> 8 8 API is to replace the ioctl's were the <link linkend="dvb-frontend-parameters"> 9 9 struct <constant>dvb_frontend_parameters</constant></link> were used.</para> 10 + <section id="dtv-stats"> 11 + <title>DTV stats type</title> 12 + <programlisting> 13 + struct dtv_stats { 14 + __u8 scale; /* enum fecap_scale_params type */ 15 + union { 16 + __u64 uvalue; /* for counters and relative scales */ 17 + __s64 svalue; /* for 1/1000 dB measures */ 18 + }; 19 + } __packed; 20 + </programlisting> 21 + </section> 22 + <section id="dtv-fe-stats"> 23 + <title>DTV stats type</title> 24 + <programlisting> 25 + #define MAX_DTV_STATS 4 26 + 27 + struct dtv_fe_stats { 28 + __u8 len; 29 + struct dtv_stats stat[MAX_DTV_STATS]; 30 + } __packed; 31 + </programlisting> 32 + </section> 33 + 10 34 <section id="dtv-property"> 11 35 <title>DTV property type</title> 12 36 <programlisting> 13 37 /* Reserved fields should be set to 0 */ 38 + 14 39 struct dtv_property { 15 40 __u32 cmd; 41 + __u32 reserved[3]; 16 42 union { 17 43 __u32 data; 44 + struct dtv_fe_stats st; 18 45 struct { 19 46 __u8 data[32]; 20 47 __u32 len; ··· 467 440 <title><constant>DTV-ISDBT-LAYER*</constant> parameters</title> 468 441 <para>ISDB-T channels can be coded hierarchically. As opposed to DVB-T in 469 442 ISDB-T hierarchical layers can be decoded simultaneously. For that 470 - reason a ISDB-T demodulator has 3 viterbi and 3 reed-solomon-decoders.</para> 443 + reason a ISDB-T demodulator has 3 Viterbi and 3 Reed-Solomon decoders.</para> 471 444 <para>ISDB-T has 3 hierarchical layers which each can use a part of the 472 445 available segments. The total number of segments over all layers has 473 446 to 13 in ISDB-T.</para> ··· 877 850 <para>use the special macro LNA_AUTO to set LNA auto</para> 878 851 </section> 879 852 </section> 853 + 854 + <section id="frontend-stat-properties"> 855 + <title>Frontend statistics indicators</title> 856 + <para>The values are returned via <constant>dtv_property.stat</constant>. 857 + If the property is supported, <constant>dtv_property.stat.len</constant> is bigger than zero.</para> 858 + <para>For most delivery systems, <constant>dtv_property.stat.len</constant> 859 + will be 1 if the stats is supported, and the properties will 860 + return a single value for each parameter.</para> 861 + <para>It should be noticed, however, that new OFDM delivery systems 862 + like ISDB can use different modulation types for each group of 863 + carriers. On such standards, up to 3 groups of statistics can be 864 + provided, and <constant>dtv_property.stat.len</constant> is updated 865 + to reflect the "global" metrics, plus one metric per each carrier 866 + group (called "layer" on ISDB).</para> 867 + <para>So, in order to be consistent with other delivery systems, the first 868 + value at <link linkend="dtv-stats"><constant>dtv_property.stat.dtv_stats</constant></link> 869 + array refers to the global metric. The other elements of the array 870 + represent each layer, starting from layer A(index 1), 871 + layer B (index 2) and so on.</para> 872 + <para>The number of filled elements are stored at <constant>dtv_property.stat.len</constant>.</para> 873 + <para>Each element of the <constant>dtv_property.stat.dtv_stats</constant> array consists on two elements:</para> 874 + <itemizedlist mark='opencircle'> 875 + <listitem><para><constant>svalue</constant> or <constant>uvalue</constant>, where 876 + <constant>svalue</constant> is for signed values of the measure (dB measures) 877 + and <constant>uvalue</constant> is for unsigned values (counters, relative scale)</para></listitem> 878 + <listitem><para><constant>scale</constant> - Scale for the value. It can be:</para> 879 + <section id = "fecap-scale-params"> 880 + <itemizedlist mark='bullet'> 881 + <listitem><para><constant>FE_SCALE_NOT_AVAILABLE</constant> - The parameter is supported by the frontend, but it was not possible to collect it (could be a transitory or permanent condition)</para></listitem> 882 + <listitem><para><constant>FE_SCALE_DECIBEL</constant> - parameter is a signed value, measured in 1/1000 dB</para></listitem> 883 + <listitem><para><constant>FE_SCALE_RELATIVE</constant> - parameter is a unsigned value, where 0 means 0% and 65535 means 100%.</para></listitem> 884 + <listitem><para><constant>FE_SCALE_COUNTER</constant> - parameter is a unsigned value that counts the occurrence of an event, like bit error, block error, or lapsed time.</para></listitem> 885 + </itemizedlist> 886 + </section> 887 + </listitem> 888 + </itemizedlist> 889 + <section id="DTV-STAT-SIGNAL-STRENGTH"> 890 + <title><constant>DTV_STAT_SIGNAL_STRENGTH</constant></title> 891 + <para>Indicates the signal strength level at the analog part of the tuner or of the demod.</para> 892 + <para>Possible scales for this metric are:</para> 893 + <itemizedlist mark='bullet'> 894 + <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem> 895 + <listitem><constant>FE_SCALE_DECIBEL</constant> - signal strength is in 0.0001 dBm units, power measured in miliwatts. This value is generally negative.</listitem> 896 + <listitem><constant>FE_SCALE_RELATIVE</constant> - The frontend provides a 0% to 100% measurement for power (actually, 0 to 65535).</listitem> 897 + </itemizedlist> 898 + </section> 899 + <section id="DTV-STAT-CNR"> 900 + <title><constant>DTV_STAT_CNR</constant></title> 901 + <para>Indicates the Signal to Noise ratio for the main carrier.</para> 902 + <para>Possible scales for this metric are:</para> 903 + <itemizedlist mark='bullet'> 904 + <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem> 905 + <listitem><constant>FE_SCALE_DECIBEL</constant> - Signal/Noise ratio is in 0.0001 dB units.</listitem> 906 + <listitem><constant>FE_SCALE_RELATIVE</constant> - The frontend provides a 0% to 100% measurement for Signal/Noise (actually, 0 to 65535).</listitem> 907 + </itemizedlist> 908 + </section> 909 + <section id="DTV-STAT-PRE-ERROR-BIT-COUNT"> 910 + <title><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></title> 911 + <para>Measures the number of bit errors before the forward error correction (FEC) on the inner coding block (before Viterbi, LDPC or other inner code).</para> 912 + <para>This measure is taken during the same interval as <constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant>.</para> 913 + <para>In order to get the BER (Bit Error Rate) measurement, it should be divided by 914 + <link linkend="DTV-STAT-PRE-TOTAL-BIT-COUNT"><constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant></link>.</para> 915 + <para>This measurement is monotonically increased, as the frontend gets more bit count measurements. 916 + The frontend may reset it when a channel/transponder is tuned.</para> 917 + <para>Possible scales for this metric are:</para> 918 + <itemizedlist mark='bullet'> 919 + <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem> 920 + <listitem><constant>FE_SCALE_COUNTER</constant> - Number of error bits counted before the inner coding.</listitem> 921 + </itemizedlist> 922 + </section> 923 + <section id="DTV-STAT-PRE-TOTAL-BIT-COUNT"> 924 + <title><constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant></title> 925 + <para>Measures the amount of bits received before the inner code block, during the same period as 926 + <link linkend="DTV-STAT-PRE-ERROR-BIT-COUNT"><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></link> measurement was taken.</para> 927 + <para>It should be noticed that this measurement can be smaller than the total amount of bits on the transport stream, 928 + as the frontend may need to manually restart the measurement, loosing some data between each measurement interval.</para> 929 + <para>This measurement is monotonically increased, as the frontend gets more bit count measurements. 930 + The frontend may reset it when a channel/transponder is tuned.</para> 931 + <para>Possible scales for this metric are:</para> 932 + <itemizedlist mark='bullet'> 933 + <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem> 934 + <listitem><constant>FE_SCALE_COUNTER</constant> - Number of bits counted while measuring 935 + <link linkend="DTV-STAT-PRE-ERROR-BIT-COUNT"><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></link>.</listitem> 936 + </itemizedlist> 937 + </section> 938 + <section id="DTV-STAT-POST-ERROR-BIT-COUNT"> 939 + <title><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></title> 940 + <para>Measures the number of bit errors after the forward error correction (FEC) done by inner code block (after Viterbi, LDPC or other inner code).</para> 941 + <para>This measure is taken during the same interval as <constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant>.</para> 942 + <para>In order to get the BER (Bit Error Rate) measurement, it should be divided by 943 + <link linkend="DTV-STAT-POST-TOTAL-BIT-COUNT"><constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant></link>.</para> 944 + <para>This measurement is monotonically increased, as the frontend gets more bit count measurements. 945 + The frontend may reset it when a channel/transponder is tuned.</para> 946 + <para>Possible scales for this metric are:</para> 947 + <itemizedlist mark='bullet'> 948 + <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem> 949 + <listitem><constant>FE_SCALE_COUNTER</constant> - Number of error bits counted after the inner coding.</listitem> 950 + </itemizedlist> 951 + </section> 952 + <section id="DTV-STAT-POST-TOTAL-BIT-COUNT"> 953 + <title><constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant></title> 954 + <para>Measures the amount of bits received after the inner coding, during the same period as 955 + <link linkend="DTV-STAT-POST-ERROR-BIT-COUNT"><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></link> measurement was taken.</para> 956 + <para>It should be noticed that this measurement can be smaller than the total amount of bits on the transport stream, 957 + as the frontend may need to manually restart the measurement, loosing some data between each measurement interval.</para> 958 + <para>This measurement is monotonically increased, as the frontend gets more bit count measurements. 959 + The frontend may reset it when a channel/transponder is tuned.</para> 960 + <para>Possible scales for this metric are:</para> 961 + <itemizedlist mark='bullet'> 962 + <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem> 963 + <listitem><constant>FE_SCALE_COUNTER</constant> - Number of bits counted while measuring 964 + <link linkend="DTV-STAT-POST-ERROR-BIT-COUNT"><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></link>.</listitem> 965 + </itemizedlist> 966 + </section> 967 + <section id="DTV-STAT-ERROR-BLOCK-COUNT"> 968 + <title><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></title> 969 + <para>Measures the number of block errors after the outer forward error correction coding (after Reed-Solomon or other outer code).</para> 970 + <para>This measurement is monotonically increased, as the frontend gets more bit count measurements. 971 + The frontend may reset it when a channel/transponder is tuned.</para> 972 + <para>Possible scales for this metric are:</para> 973 + <itemizedlist mark='bullet'> 974 + <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem> 975 + <listitem><constant>FE_SCALE_COUNTER</constant> - Number of error blocks counted after the outer coding.</listitem> 976 + </itemizedlist> 977 + </section> 978 + <section id="DTV-STAT-TOTAL-BLOCK-COUNT"> 979 + <title><constant>DTV-STAT_TOTAL_BLOCK_COUNT</constant></title> 980 + <para>Measures the total number of blocks received during the same period as 981 + <link linkend="DTV-STAT-ERROR-BLOCK-COUNT"><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></link> measurement was taken.</para> 982 + <para>It can be used to calculate the PER indicator, by dividing 983 + <link linkend="DTV-STAT-ERROR-BLOCK-COUNT"><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></link> 984 + by <link linkend="DTV-STAT-TOTAL-BLOCK-COUNT"><constant>DTV-STAT-TOTAL-BLOCK-COUNT</constant></link>.</para> 985 + <para>Possible scales for this metric are:</para> 986 + <itemizedlist mark='bullet'> 987 + <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem> 988 + <listitem><constant>FE_SCALE_COUNTER</constant> - Number of blocks counted while measuring 989 + <link linkend="DTV-STAT-ERROR-BLOCK-COUNT"><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></link>.</listitem> 990 + </itemizedlist> 991 + </section> 992 + </section> 993 + 880 994 <section id="frontend-property-terrestrial-systems"> 881 995 <title>Properties used on terrestrial delivery systems</title> 882 996 <section id="dvbt-params"> ··· 1039 871 <listitem><para><link linkend="DTV-HIERARCHY"><constant>DTV_HIERARCHY</constant></link></para></listitem> 1040 872 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1041 873 </itemizedlist> 874 + <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para> 1042 875 </section> 1043 876 <section id="dvbt2-params"> 1044 877 <title>DVB-T2 delivery system</title> ··· 1064 895 <listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem> 1065 896 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1066 897 </itemizedlist> 898 + <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para> 1067 899 </section> 1068 900 <section id="isdbt"> 1069 901 <title>ISDB-T delivery system</title> ··· 1118 948 <listitem><para><link linkend="DTV-ISDBT-LAYER-SEGMENT-COUNT"><constant>DTV_ISDBT_LAYERC_SEGMENT_COUNT</constant></link></para></listitem> 1119 949 <listitem><para><link linkend="DTV-ISDBT-LAYER-TIME-INTERLEAVING"><constant>DTV_ISDBT_LAYERC_TIME_INTERLEAVING</constant></link></para></listitem> 1120 950 </itemizedlist> 951 + <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para> 1121 952 </section> 1122 953 <section id="atsc-params"> 1123 954 <title>ATSC delivery system</title> ··· 1132 961 <listitem><para><link linkend="DTV-MODULATION"><constant>DTV_MODULATION</constant></link></para></listitem> 1133 962 <listitem><para><link linkend="DTV-BANDWIDTH-HZ"><constant>DTV_BANDWIDTH_HZ</constant></link></para></listitem> 1134 963 </itemizedlist> 964 + <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para> 1135 965 </section> 1136 966 <section id="atscmh-params"> 1137 967 <title>ATSC-MH delivery system</title> ··· 1160 988 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-C"><constant>DTV_ATSCMH_SCCC_CODE_MODE_C</constant></link></para></listitem> 1161 989 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-D"><constant>DTV_ATSCMH_SCCC_CODE_MODE_D</constant></link></para></listitem> 1162 990 </itemizedlist> 991 + <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para> 1163 992 </section> 1164 993 <section id="dtmb-params"> 1165 994 <title>DTMB delivery system</title> ··· 1180 1007 <listitem><para><link linkend="DTV-INTERLEAVING"><constant>DTV_INTERLEAVING</constant></link></para></listitem> 1181 1008 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1182 1009 </itemizedlist> 1010 + <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para> 1183 1011 </section> 1184 1012 </section> 1185 1013 <section id="frontend-property-cable-systems"> ··· 1202 1028 <listitem><para><link linkend="DTV-INNER-FEC"><constant>DTV_INNER_FEC</constant></link></para></listitem> 1203 1029 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1204 1030 </itemizedlist> 1031 + <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para> 1205 1032 </section> 1206 1033 <section id="dvbc-annex-b-params"> 1207 1034 <title>DVB-C Annex B delivery system</title> ··· 1218 1043 <listitem><para><link linkend="DTV-INVERSION"><constant>DTV_INVERSION</constant></link></para></listitem> 1219 1044 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1220 1045 </itemizedlist> 1046 + <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para> 1221 1047 </section> 1222 1048 </section> 1223 1049 <section id="frontend-property-satellital-systems"> ··· 1238 1062 <listitem><para><link linkend="DTV-VOLTAGE"><constant>DTV_VOLTAGE</constant></link></para></listitem> 1239 1063 <listitem><para><link linkend="DTV-TONE"><constant>DTV_TONE</constant></link></para></listitem> 1240 1064 </itemizedlist> 1065 + <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para> 1241 1066 <para>Future implementations might add those two missing parameters:</para> 1242 1067 <itemizedlist mark='opencircle'> 1243 1068 <listitem><para><link linkend="DTV-DISEQC-MASTER"><constant>DTV_DISEQC_MASTER</constant></link></para></listitem> ··· 1254 1077 <listitem><para><link linkend="DTV-ROLLOFF"><constant>DTV_ROLLOFF</constant></link></para></listitem> 1255 1078 <listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem> 1256 1079 </itemizedlist> 1080 + <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para> 1257 1081 </section> 1258 1082 <section id="turbo-params"> 1259 1083 <title>Turbo code delivery system</title>
+1 -1
Documentation/DocBook/media/dvb/frontend.xml
··· 230 230 <entry align="char">The frontend has found a DVB signal</entry> 231 231 </row><row> 232 232 <entry align="char">FE_HAS_VITERBI</entry> 233 - <entry align="char">The frontend FEC code is stable</entry> 233 + <entry align="char">The frontend FEC inner coding (Viterbi, LDPC or other inner code) is stable</entry> 234 234 </row><row> 235 235 <entry align="char">FE_HAS_SYNC</entry> 236 236 <entry align="char">Syncronization bytes was found</entry>
+78 -1
include/uapi/linux/dvb/frontend.h
··· 365 365 #define DTV_INTERLEAVING 60 366 366 #define DTV_LNA 61 367 367 368 - #define DTV_MAX_COMMAND DTV_LNA 368 + /* Quality parameters */ 369 + #define DTV_STAT_SIGNAL_STRENGTH 62 370 + #define DTV_STAT_CNR 63 371 + #define DTV_STAT_PRE_ERROR_BIT_COUNT 64 372 + #define DTV_STAT_PRE_TOTAL_BIT_COUNT 65 373 + #define DTV_STAT_POST_ERROR_BIT_COUNT 66 374 + #define DTV_STAT_POST_TOTAL_BIT_COUNT 67 375 + #define DTV_STAT_ERROR_BLOCK_COUNT 68 376 + #define DTV_STAT_TOTAL_BLOCK_COUNT 69 377 + 378 + #define DTV_MAX_COMMAND DTV_STAT_TOTAL_BLOCK_COUNT 369 379 370 380 typedef enum fe_pilot { 371 381 PILOT_ON, ··· 462 452 __u32 reserved:30; /* Align */ 463 453 }; 464 454 455 + /** 456 + * Scale types for the quality parameters. 457 + * @FE_SCALE_NOT_AVAILABLE: That QoS measure is not available. That 458 + * could indicate a temporary or a permanent 459 + * condition. 460 + * @FE_SCALE_DECIBEL: The scale is measured in 0.0001 dB steps, typically 461 + * used on signal measures. 462 + * @FE_SCALE_RELATIVE: The scale is a relative percentual measure, 463 + * ranging from 0 (0%) to 0xffff (100%). 464 + * @FE_SCALE_COUNTER: The scale counts the occurrence of an event, like 465 + * bit error, block error, lapsed time. 466 + */ 467 + enum fecap_scale_params { 468 + FE_SCALE_NOT_AVAILABLE = 0, 469 + FE_SCALE_DECIBEL, 470 + FE_SCALE_RELATIVE, 471 + FE_SCALE_COUNTER 472 + }; 473 + 474 + /** 475 + * struct dtv_stats - Used for reading a DTV status property 476 + * 477 + * @value: value of the measure. Should range from 0 to 0xffff; 478 + * @scale: Filled with enum fecap_scale_params - the scale 479 + * in usage for that parameter 480 + * 481 + * For most delivery systems, this will return a single value for each 482 + * parameter. 483 + * It should be noticed, however, that new OFDM delivery systems like 484 + * ISDB can use different modulation types for each group of carriers. 485 + * On such standards, up to 8 groups of statistics can be provided, one 486 + * for each carrier group (called "layer" on ISDB). 487 + * In order to be consistent with other delivery systems, the first 488 + * value refers to the entire set of carriers ("global"). 489 + * dtv_status:scale should use the value FE_SCALE_NOT_AVAILABLE when 490 + * the value for the entire group of carriers or from one specific layer 491 + * is not provided by the hardware. 492 + * st.len should be filled with the latest filled status + 1. 493 + * 494 + * In other words, for ISDB, those values should be filled like: 495 + * u.st.stat.svalue[0] = global statistics; 496 + * u.st.stat.scale[0] = FE_SCALE_DECIBELS; 497 + * u.st.stat.value[1] = layer A statistics; 498 + * u.st.stat.scale[1] = FE_SCALE_NOT_AVAILABLE (if not available); 499 + * u.st.stat.svalue[2] = layer B statistics; 500 + * u.st.stat.scale[2] = FE_SCALE_DECIBELS; 501 + * u.st.stat.svalue[3] = layer C statistics; 502 + * u.st.stat.scale[3] = FE_SCALE_DECIBELS; 503 + * u.st.len = 4; 504 + */ 505 + struct dtv_stats { 506 + __u8 scale; /* enum fecap_scale_params type */ 507 + union { 508 + __u64 uvalue; /* for counters and relative scales */ 509 + __s64 svalue; /* for 0.0001 dB measures */ 510 + }; 511 + } __attribute__ ((packed)); 512 + 513 + 514 + #define MAX_DTV_STATS 4 515 + 516 + struct dtv_fe_stats { 517 + __u8 len; 518 + struct dtv_stats stat[MAX_DTV_STATS]; 519 + } __attribute__ ((packed)); 520 + 465 521 struct dtv_property { 466 522 __u32 cmd; 467 523 __u32 reserved[3]; 468 524 union { 469 525 __u32 data; 526 + struct dtv_fe_stats st; 470 527 struct { 471 528 __u8 data[32]; 472 529 __u32 len;
+1 -1
include/uapi/linux/dvb/version.h
··· 24 24 #define _DVBVERSION_H_ 25 25 26 26 #define DVB_API_VERSION 5 27 - #define DVB_API_VERSION_MINOR 9 27 + #define DVB_API_VERSION_MINOR 10 28 28 29 29 #endif /*_DVBVERSION_H_*/