~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/staging/tm6000/tm6000.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
#define TM6000_VERSION KERNEL_VERSION(0, 0, 2)
41
41
 
42
42
/* Inputs */
43
 
 
44
43
enum tm6000_itype {
45
 
        TM6000_INPUT_TV = 0,
46
 
        TM6000_INPUT_COMPOSITE,
 
44
        TM6000_INPUT_TV = 1,
 
45
        TM6000_INPUT_COMPOSITE1,
 
46
        TM6000_INPUT_COMPOSITE2,
47
47
        TM6000_INPUT_SVIDEO,
 
48
        TM6000_INPUT_DVB,
 
49
        TM6000_INPUT_RADIO,
 
50
};
 
51
 
 
52
enum tm6000_mux {
 
53
        TM6000_VMUX_VIDEO_A = 1,
 
54
        TM6000_VMUX_VIDEO_B,
 
55
        TM6000_VMUX_VIDEO_AB,
 
56
        TM6000_AMUX_ADC1,
 
57
        TM6000_AMUX_ADC2,
 
58
        TM6000_AMUX_SIF1,
 
59
        TM6000_AMUX_SIF2,
 
60
        TM6000_AMUX_I2S,
48
61
};
49
62
 
50
63
enum tm6000_devtype {
53
66
        TM6010,
54
67
};
55
68
 
 
69
struct tm6000_input {
 
70
        enum tm6000_itype       type;
 
71
        enum tm6000_mux         vmux;
 
72
        enum tm6000_mux         amux;
 
73
        unsigned int            v_gpio;
 
74
        unsigned int            a_gpio;
 
75
};
 
76
 
56
77
/* ------------------------------------------------------------------
57
78
 *      Basic structures
58
79
 * ------------------------------------------------------------------
121
142
        unsigned int    has_zl10353:1;
122
143
        unsigned int    has_eeprom:1;
123
144
        unsigned int    has_remote:1;
 
145
        unsigned int    has_radio:1;
124
146
};
125
147
 
126
148
struct tm6000_dvb {
157
179
        int                             model;          /* index in the device_data struct */
158
180
        int                             devno;          /* marks the number of this device */
159
181
        enum tm6000_devtype             dev_type;       /* type of device */
 
182
        unsigned char                   eedata[256];    /* Eeprom data */
 
183
        unsigned                        eedata_size;    /* Size of the eeprom info */
160
184
 
161
185
        v4l2_std_id                     norm;           /* Current norm */
162
186
        int                             width, height;  /* Selected resolution */
174
198
 
175
199
        char                            *ir_codes;
176
200
 
 
201
        __u8                            radio;
 
202
 
177
203
        /* Demodulator configuration */
178
204
        int                             demod_addr;     /* demodulator address */
179
205
 
194
220
        bool                            is_res_read;
195
221
 
196
222
        struct video_device             *vfd;
 
223
        struct video_device             *radio_dev;
197
224
        struct tm6000_dmaqueue          vidq;
198
225
        struct v4l2_device              v4l2_dev;
199
226
 
200
227
        int                             input;
 
228
        struct tm6000_input             vinput[3];      /* video input */
 
229
        struct tm6000_input             rinput;         /* radio input */
 
230
 
201
231
        int                             freq;
202
232
        unsigned int                    fourcc;
203
233
 
204
234
        enum tm6000_mode                mode;
205
235
 
 
236
        int                             ctl_mute;             /* audio */
 
237
        int                             ctl_volume;
 
238
        int                             amode;
 
239
 
206
240
        /* DVB-T support */
207
241
        struct tm6000_dvb               *dvb;
208
242
 
211
245
        struct work_struct              wq_trigger;   /* Trigger to start/stop audio for alsa module */
212
246
        atomic_t                        stream_started;  /* stream should be running if true */
213
247
 
214
 
 
215
248
        struct tm6000_IR                *ir;
216
249
 
217
250
        /* locks */
248
281
 
249
282
struct tm6000_fh {
250
283
        struct tm6000_core           *dev;
 
284
        unsigned int                 radio;
251
285
 
252
286
        /* video capture */
253
287
        struct tm6000_fmt            *fmt;
276
310
int tm6000_get_reg16(struct tm6000_core *dev, u8 req, u16 value, u16 index);
277
311
int tm6000_get_reg32(struct tm6000_core *dev, u8 req, u16 value, u16 index);
278
312
int tm6000_set_reg(struct tm6000_core *dev, u8 req, u16 value, u16 index);
 
313
int tm6000_set_reg_mask(struct tm6000_core *dev, u8 req, u16 value,
 
314
                                                u16 index, u16 mask);
279
315
int tm6000_i2c_reset(struct tm6000_core *dev, u16 tsleep);
280
316
int tm6000_init(struct tm6000_core *dev);
281
317
 
282
318
int tm6000_init_analog_mode(struct tm6000_core *dev);
283
319
int tm6000_init_digital_mode(struct tm6000_core *dev);
284
320
int tm6000_set_audio_bitrate(struct tm6000_core *dev, int bitrate);
 
321
int tm6000_set_audio_rinput(struct tm6000_core *dev);
 
322
int tm6000_tvaudio_set_mute(struct tm6000_core *dev, u8 mute);
 
323
void tm6000_set_volume(struct tm6000_core *dev, int vol);
285
324
 
286
325
int tm6000_v4l2_register(struct tm6000_core *dev);
287
326
int tm6000_v4l2_unregister(struct tm6000_core *dev);
300
339
 
301
340
/* In tm6000-stds.c */
302
341
void tm6000_get_std_res(struct tm6000_core *dev);
303
 
int tm6000_set_standard(struct tm6000_core *dev, v4l2_std_id *norm);
 
342
int tm6000_set_standard(struct tm6000_core *dev);
304
343
 
305
344
/* In tm6000-i2c.c */
306
345
int tm6000_i2c_register(struct tm6000_core *dev);