linux/include/media/davinci/vpbe_types.h
<<
>>
Prefs
   1/*
   2 * Copyright (C) 2010 Texas Instruments Inc
   3 *
   4 * This program is free software; you can redistribute it and/or modify
   5 * it under the terms of the GNU General Public License as published by
   6 * the Free Software Foundation version 2.
   7 *
   8 * This program is distributed in the hope that it will be useful,
   9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11 * GNU General Public License for more details.
  12 */
  13#ifndef _VPBE_TYPES_H
  14#define _VPBE_TYPES_H
  15
  16enum vpbe_version {
  17        VPBE_VERSION_1 = 1,
  18        VPBE_VERSION_2,
  19        VPBE_VERSION_3,
  20};
  21
  22/* vpbe_timing_type - Timing types used in vpbe device */
  23enum vpbe_enc_timings_type {
  24        VPBE_ENC_STD = 0x1,
  25        VPBE_ENC_DV_TIMINGS = 0x4,
  26        /* Used when set timings through FB device interface */
  27        VPBE_ENC_TIMINGS_INVALID = 0x8,
  28};
  29
  30/*
  31 * struct vpbe_enc_mode_info
  32 * @name: ptr to name string of the standard, "NTSC", "PAL" etc
  33 * @std: standard or non-standard mode. 1 - standard, 0 - nonstandard
  34 * @interlaced: 1 - interlaced, 0 - non interlaced/progressive
  35 * @xres: x or horizontal resolution of the display
  36 * @yres: y or vertical resolution of the display
  37 * @fps: frame per second
  38 * @left_margin: left margin of the display
  39 * @right_margin: right margin of the display
  40 * @upper_margin: upper margin of the display
  41 * @lower_margin: lower margin of the display
  42 * @hsync_len: h-sync length
  43 * @vsync_len: v-sync length
  44 * @flags: bit field: bit usage is documented below
  45 *
  46 * Description:
  47 *  Structure holding timing and resolution information of a standard.
  48 * Used by vpbe_device to set required non-standard timing in the
  49 * venc when lcd controller output is connected to a external encoder.
  50 * A table of timings is maintained in vpbe device to set this in
  51 * venc when external encoder is connected to lcd controller output.
  52 * Encoder may provide a g_dv_timings() API to override these values
  53 * as needed.
  54 *
  55 *  Notes
  56 *  ------
  57 *  if_type should be used only by encoder manager and encoder.
  58 *  flags usage
  59 *     b0 (LSB) - hsync polarity, 0 - negative, 1 - positive
  60 *     b1       - vsync polarity, 0 - negative, 1 - positive
  61 *     b2       - field id polarity, 0 - negative, 1  - positive
  62 */
  63struct vpbe_enc_mode_info {
  64        unsigned char *name;
  65        enum vpbe_enc_timings_type timings_type;
  66        v4l2_std_id std_id;
  67        struct v4l2_dv_timings dv_timings;
  68        unsigned int interlaced;
  69        unsigned int xres;
  70        unsigned int yres;
  71        struct v4l2_fract aspect;
  72        struct v4l2_fract fps;
  73        unsigned int left_margin;
  74        unsigned int right_margin;
  75        unsigned int upper_margin;
  76        unsigned int lower_margin;
  77        unsigned int hsync_len;
  78        unsigned int vsync_len;
  79        unsigned int flags;
  80};
  81
  82#endif
  83