#define IVTV_IOC_FWAPI          0xFFEE7701 /*just some values i picked for now*/
#define IVTV_IOC_ZCOUNT         0xFFEE7702 
#define IVTV_IOC_G_CODEC        0xFFEE7703
#define IVTV_IOC_S_CODEC        0xFFEE7704

#define IVTV_MBOX_MAX_DATA 16

/* allow direct access to the saa7115 registers for testing */
#define SAA7115_GET_REG         0xFFEE7705
#define SAA7115_SET_REG         0xFFEE7706

/* to set audio options */
#define DECODER_SET_AUDIO       0xFFEE7707
#define DECODER_AUDIO_32_KHZ	0
#define DECODER_AUDIO_441_KHZ	1
#define DECODER_AUDIO_48_KHZ	2

/* ioctl for MSP_SET_MATRIX will have to be registered */
#define MSP_SET_MATRIX     _IOW('m',17,struct msp_matrix)

/* Custom v4l controls */
#define V4L2_CID_IVTV_FREQ      (V4L2_CID_PRIVATE_BASE)
#define V4L2_CID_IVTV_ENC       (V4L2_CID_PRIVATE_BASE + 1)
#define V4L2_CID_IVTV_BITRATE   (V4L2_CID_PRIVATE_BASE + 2)
#define V4L2_CID_IVTV_MONO      (V4L2_CID_PRIVATE_BASE + 3)
#define V4L2_CID_IVTV_JOINT     (V4L2_CID_PRIVATE_BASE + 4)
#define V4L2_CID_IVTV_EMPHASIS  (V4L2_CID_PRIVATE_BASE + 5)
#define V4L2_CID_IVTV_CRC       (V4L2_CID_PRIVATE_BASE + 6)
#define V4L2_CID_IVTV_COPYRIGHT (V4L2_CID_PRIVATE_BASE + 7)
#define V4L2_CID_IVTV_GEN       (V4L2_CID_PRIVATE_BASE + 8)

#define IVTV_V4L2_AUDIO_MENUCOUNT 9 /* # of v4l controls */

struct ivtv_ioctl_fwapi {
  uint32_t cmd;
  uint32_t result;
  int32_t args;
  uint32_t data[IVTV_MBOX_MAX_DATA];
};

/* For use with IVTV_IOC_G_CODEC and IVTV_IOC_S_CODEC */
struct ivtv_ioctl_codec {
  uint32_t aspect;
  uint32_t audio_bitmask;
  uint32_t bframes;
  uint32_t bitrate_mode;
  uint32_t bitrate;
  uint32_t bitrate_peak;
  uint32_t dnr_mode;
  uint32_t dnr_spatial;
  uint32_t dnr_temporal;
  uint32_t dnr_type;
  uint32_t framerate;
  uint32_t framespergop;
  uint32_t gop_closure;
  uint32_t pulldown;
  uint32_t stream_type;
};


struct msp_matrix {
  int input;
  int output;
};
