~ubuntu-branches/ubuntu/lucid/linux-rt/lucid

« back to all changes in this revision

Viewing changes to drivers/media/video/cx23885/cx23885.h

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2009-08-05 23:00:52 UTC
  • Revision ID: james.westby@ubuntu.com-20090805230052-7xedvqcyk9dnnxb2
Tags: 2.6.31-1.1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <linux/i2c-algo-bit.h>
25
25
#include <linux/kdev_t.h>
26
26
 
27
 
#include <media/v4l2-common.h>
 
27
#include <media/v4l2-device.h>
28
28
#include <media/tuner.h>
29
29
#include <media/tveeprom.h>
30
30
#include <media/videobuf-dma-sg.h>
37
37
#include <linux/version.h>
38
38
#include <linux/mutex.h>
39
39
 
40
 
#define CX23885_VERSION_CODE KERNEL_VERSION(0, 0, 1)
 
40
#define CX23885_VERSION_CODE KERNEL_VERSION(0, 0, 2)
41
41
 
42
42
#define UNSET (-1U)
43
43
 
67
67
#define CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP 11
68
68
#define CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H 12
69
69
#define CX23885_BOARD_COMPRO_VIDEOMATE_E650F   13
 
70
#define CX23885_BOARD_TBS_6920                 14
 
71
#define CX23885_BOARD_TEVII_S470               15
 
72
#define CX23885_BOARD_DVBWORLD_2005            16
 
73
#define CX23885_BOARD_NETUP_DUAL_DVBS2_CI      17
 
74
#define CX23885_BOARD_HAUPPAUGE_HVR1270        18
 
75
#define CX23885_BOARD_HAUPPAUGE_HVR1275        19
 
76
#define CX23885_BOARD_HAUPPAUGE_HVR1255        20
 
77
#define CX23885_BOARD_HAUPPAUGE_HVR1210        21
 
78
#define CX23885_BOARD_MYGICA_X8506             22
 
79
 
 
80
#define GPIO_0 0x00000001
 
81
#define GPIO_1 0x00000002
 
82
#define GPIO_2 0x00000004
 
83
#define GPIO_3 0x00000008
 
84
#define GPIO_4 0x00000010
 
85
#define GPIO_5 0x00000020
 
86
#define GPIO_6 0x00000040
 
87
#define GPIO_7 0x00000080
 
88
#define GPIO_8 0x00000100
 
89
#define GPIO_9 0x00000200
70
90
 
71
91
/* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM B/G/H/LC */
72
92
#define CX23885_NORMS (\
184
204
         */
185
205
        u32                     clk_freq;
186
206
        struct cx23885_input    input[MAX_CX23885_INPUT];
 
207
        int                     cimax; /* for NetUP */
187
208
};
188
209
 
189
210
struct cx23885_subid {
266
287
 
267
288
        /* Allow a single tsport to have multiple frontends */
268
289
        u32                        num_frontends;
 
290
        void                       *port_priv;
 
291
 
 
292
        /* FIXME: temporary hack */
 
293
        int (*set_frontend_save) (struct dvb_frontend *,
 
294
                                  struct dvb_frontend_parameters *);
269
295
};
270
296
 
271
297
struct cx23885_dev {
272
298
        struct list_head           devlist;
273
299
        atomic_t                   refcount;
 
300
        struct v4l2_device         v4l2_dev;
274
301
 
275
302
        /* pci stuff */
276
303
        struct pci_dev             *pci;
316
343
        unsigned int               radio_type;
317
344
        unsigned char              radio_addr;
318
345
        unsigned int               has_radio;
 
346
        struct v4l2_subdev         *sd_cx25840;
319
347
 
320
348
        /* V4l */
321
349
        u32                        freq;
336
364
 
337
365
};
338
366
 
 
367
static inline struct cx23885_dev *to_cx23885(struct v4l2_device *v4l2_dev)
 
368
{
 
369
        return container_of(v4l2_dev, struct cx23885_dev, v4l2_dev);
 
370
}
 
371
 
 
372
#define call_all(dev, o, f, args...) \
 
373
        v4l2_device_call_all(&dev->v4l2_dev, 0, o, f, ##args)
 
374
 
339
375
extern struct list_head cx23885_devlist;
340
376
 
341
377
#define SRAM_CH01  0 /* Video A */
406
442
extern void cx23885_wakeup(struct cx23885_tsport *port,
407
443
                           struct cx23885_dmaqueue *q, u32 count);
408
444
 
 
445
extern void cx23885_gpio_set(struct cx23885_dev *dev, u32 mask);
 
446
extern void cx23885_gpio_clear(struct cx23885_dev *dev, u32 mask);
 
447
extern void cx23885_gpio_enable(struct cx23885_dev *dev, u32 mask,
 
448
        int asoutput);
 
449
 
409
450
 
410
451
/* ----------------------------------------------------------- */
411
452
/* cx23885-cards.c                                             */
452
493
/* cx23885-i2c.c                                                */
453
494
extern int cx23885_i2c_register(struct cx23885_i2c *bus);
454
495
extern int cx23885_i2c_unregister(struct cx23885_i2c *bus);
455
 
extern void cx23885_call_i2c_clients(struct cx23885_i2c *bus, unsigned int cmd,
456
 
                                     void *arg);
457
496
extern void cx23885_av_clk(struct cx23885_dev *dev, int enable);
458
497
 
459
498
/* ----------------------------------------------------------- */