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