cx25821-video.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Driver for the Conexant CX25821 PCIe bridge
  3. *
  4. * Copyright (C) 2009 Conexant Systems Inc.
  5. * Authors <shu.lin@conexant.com>, <hiep.huynh@conexant.com>
  6. * Based on Steven Toth <stoth@linuxtv.org> cx23885 driver
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. *
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. */
  23. #ifndef CX25821_VIDEO_H_
  24. #define CX25821_VIDEO_H_
  25. #include <linux/init.h>
  26. #include <linux/list.h>
  27. #include <linux/module.h>
  28. #include <linux/moduleparam.h>
  29. #include <linux/kmod.h>
  30. #include <linux/kernel.h>
  31. #include <linux/slab.h>
  32. #include <linux/interrupt.h>
  33. #include <linux/delay.h>
  34. #include <linux/kthread.h>
  35. #include <asm/div64.h>
  36. #include "cx25821.h"
  37. #include <media/v4l2-common.h>
  38. #include <media/v4l2-ioctl.h>
  39. #define VIDEO_DEBUG 0
  40. #define dprintk(level, fmt, arg...) \
  41. do { \
  42. if (VIDEO_DEBUG >= level) \
  43. printk(KERN_DEBUG "%s/0: " fmt, dev->name, ##arg); \
  44. } while (0)
  45. /* For IOCTL to identify running upstream */
  46. #define UPSTREAM_START_VIDEO 700
  47. #define UPSTREAM_STOP_VIDEO 701
  48. #define UPSTREAM_START_AUDIO 702
  49. #define UPSTREAM_STOP_AUDIO 703
  50. #define UPSTREAM_DUMP_REGISTERS 702
  51. #define SET_VIDEO_STD 800
  52. #define SET_PIXEL_FORMAT 1000
  53. #define ENABLE_CIF_RESOLUTION 1001
  54. #define REG_READ 900
  55. #define REG_WRITE 901
  56. #define MEDUSA_READ 910
  57. #define MEDUSA_WRITE 911
  58. #define FORMAT_FLAGS_PACKED 0x01
  59. extern void cx25821_video_wakeup(struct cx25821_dev *dev,
  60. struct cx25821_dmaqueue *q, u32 count);
  61. extern int cx25821_start_video_dma(struct cx25821_dev *dev,
  62. struct cx25821_dmaqueue *q,
  63. struct cx25821_buffer *buf,
  64. const struct sram_channel *channel);
  65. extern int cx25821_video_irq(struct cx25821_dev *dev, int chan_num, u32 status);
  66. extern void cx25821_video_unregister(struct cx25821_dev *dev, int chan_num);
  67. extern int cx25821_video_register(struct cx25821_dev *dev);
  68. #endif