aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/dvb/frontend.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-03-19 04:47:30 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-03-19 04:47:30 -0400
commit0d4a42f6bd298e826620585e766a154ab460617a (patch)
tree406d8f7778691d858dbe3e48e4bbb10e99c0a58a /include/uapi/linux/dvb/frontend.h
parentd62b4892f3d9f7dd2002e5309be10719d6805b0f (diff)
parenta937536b868b8369b98967929045f1df54234323 (diff)
Merge tag 'v3.9-rc3' into drm-intel-next-queued
Backmerge so that I can merge Imre Deak's coalesced sg entries fixes, which depend upon the new for_each_sg_page introduce in commit a321e91b6d73ed011ffceed384c40d2785cf723b Author: Imre Deak <imre.deak@intel.com> Date: Wed Feb 27 17:02:56 2013 -0800 lib/scatterlist: add simple page iterator The merge itself is just two trivial conflicts: Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/uapi/linux/dvb/frontend.h')
-rw-r--r--include/uapi/linux/dvb/frontend.h79
1 files changed, 78 insertions, 1 deletions
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
370typedef enum fe_pilot { 380typedef 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 */
477enum 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 */
515struct 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
526struct dtv_fe_stats {
527 __u8 len;
528 struct dtv_stats stat[MAX_DTV_STATS];
529} __attribute__ ((packed));
530
455struct dtv_property { 531struct 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;