staging: delete non-required instances of include <linux/init.h>
[deliverable/linux.git] / drivers / staging / media / go7007 / go7007-driver.c
1 /*
2 * Copyright (C) 2005-2006 Micronas USA 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 (Version 2) as
6 * published by the Free Software Foundation.
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 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software Foundation,
15 * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
16 */
17
18 #include <linux/module.h>
19 #include <linux/delay.h>
20 #include <linux/sched.h>
21 #include <linux/spinlock.h>
22 #include <linux/unistd.h>
23 #include <linux/time.h>
24 #include <linux/mm.h>
25 #include <linux/vmalloc.h>
26 #include <linux/device.h>
27 #include <linux/i2c.h>
28 #include <linux/firmware.h>
29 #include <linux/mutex.h>
30 #include <linux/uaccess.h>
31 #include <linux/slab.h>
32 #include <linux/videodev2.h>
33 #include <media/tuner.h>
34 #include <media/v4l2-common.h>
35
36 #include "go7007-priv.h"
37
38 /*
39 * Wait for an interrupt to be delivered from the GO7007SB and return
40 * the associated value and data.
41 *
42 * Must be called with the hw_lock held.
43 */
44 int go7007_read_interrupt(struct go7007 *go, u16 *value, u16 *data)
45 {
46 go->interrupt_available = 0;
47 go->hpi_ops->read_interrupt(go);
48 if (wait_event_timeout(go->interrupt_waitq,
49 go->interrupt_available, 5*HZ) < 0) {
50 v4l2_err(&go->v4l2_dev, "timeout waiting for read interrupt\n");
51 return -1;
52 }
53 if (!go->interrupt_available)
54 return -1;
55 go->interrupt_available = 0;
56 *value = go->interrupt_value & 0xfffe;
57 *data = go->interrupt_data;
58 return 0;
59 }
60 EXPORT_SYMBOL(go7007_read_interrupt);
61
62 /*
63 * Read a register/address on the GO7007SB.
64 *
65 * Must be called with the hw_lock held.
66 */
67 int go7007_read_addr(struct go7007 *go, u16 addr, u16 *data)
68 {
69 int count = 100;
70 u16 value;
71
72 if (go7007_write_interrupt(go, 0x0010, addr) < 0)
73 return -EIO;
74 while (count-- > 0) {
75 if (go7007_read_interrupt(go, &value, data) == 0 &&
76 value == 0xa000)
77 return 0;
78 }
79 return -EIO;
80 }
81 EXPORT_SYMBOL(go7007_read_addr);
82
83 /*
84 * Send the boot firmware to the encoder, which just wakes it up and lets
85 * us talk to the GPIO pins and on-board I2C adapter.
86 *
87 * Must be called with the hw_lock held.
88 */
89 static int go7007_load_encoder(struct go7007 *go)
90 {
91 const struct firmware *fw_entry;
92 char fw_name[] = "go7007/go7007fw.bin";
93 void *bounce;
94 int fw_len, rv = 0;
95 u16 intr_val, intr_data;
96
97 if (go->boot_fw == NULL) {
98 if (request_firmware(&fw_entry, fw_name, go->dev)) {
99 v4l2_err(go, "unable to load firmware from file \"%s\"\n", fw_name);
100 return -1;
101 }
102 if (fw_entry->size < 16 || memcmp(fw_entry->data, "WISGO7007FW", 11)) {
103 v4l2_err(go, "file \"%s\" does not appear to be go7007 firmware\n", fw_name);
104 release_firmware(fw_entry);
105 return -1;
106 }
107 fw_len = fw_entry->size - 16;
108 bounce = kmemdup(fw_entry->data + 16, fw_len, GFP_KERNEL);
109 if (bounce == NULL) {
110 v4l2_err(go, "unable to allocate %d bytes for firmware transfer\n", fw_len);
111 release_firmware(fw_entry);
112 return -1;
113 }
114 release_firmware(fw_entry);
115 go->boot_fw_len = fw_len;
116 go->boot_fw = bounce;
117 }
118 if (go7007_interface_reset(go) < 0 ||
119 go7007_send_firmware(go, go->boot_fw, go->boot_fw_len) < 0 ||
120 go7007_read_interrupt(go, &intr_val, &intr_data) < 0 ||
121 (intr_val & ~0x1) != 0x5a5a) {
122 v4l2_err(go, "error transferring firmware\n");
123 rv = -1;
124 }
125 return rv;
126 }
127
128 MODULE_FIRMWARE("go7007/go7007fw.bin");
129
130 /*
131 * Boot the encoder and register the I2C adapter if requested. Do the
132 * minimum initialization necessary, since the board-specific code may
133 * still need to probe the board ID.
134 *
135 * Must NOT be called with the hw_lock held.
136 */
137 int go7007_boot_encoder(struct go7007 *go, int init_i2c)
138 {
139 int ret;
140
141 mutex_lock(&go->hw_lock);
142 ret = go7007_load_encoder(go);
143 mutex_unlock(&go->hw_lock);
144 if (ret < 0)
145 return -1;
146 if (!init_i2c)
147 return 0;
148 if (go7007_i2c_init(go) < 0)
149 return -1;
150 go->i2c_adapter_online = 1;
151 return 0;
152 }
153 EXPORT_SYMBOL(go7007_boot_encoder);
154
155 /*
156 * Configure any hardware-related registers in the GO7007, such as GPIO
157 * pins and bus parameters, which are board-specific. This assumes
158 * the boot firmware has already been downloaded.
159 *
160 * Must be called with the hw_lock held.
161 */
162 static int go7007_init_encoder(struct go7007 *go)
163 {
164 if (go->board_info->audio_flags & GO7007_AUDIO_I2S_MASTER) {
165 go7007_write_addr(go, 0x1000, 0x0811);
166 go7007_write_addr(go, 0x1000, 0x0c11);
167 }
168 switch (go->board_id) {
169 case GO7007_BOARDID_MATRIX_REV:
170 /* Set GPIO pin 0 to be an output (audio clock control) */
171 go7007_write_addr(go, 0x3c82, 0x0001);
172 go7007_write_addr(go, 0x3c80, 0x00fe);
173 break;
174 case GO7007_BOARDID_ADLINK_MPG24:
175 /* set GPIO5 to be an output, currently low */
176 go7007_write_addr(go, 0x3c82, 0x0000);
177 go7007_write_addr(go, 0x3c80, 0x00df);
178 break;
179 case GO7007_BOARDID_ADS_USBAV_709:
180 /* GPIO pin 0: audio clock control */
181 /* pin 2: TW9906 reset */
182 /* pin 3: capture LED */
183 go7007_write_addr(go, 0x3c82, 0x000d);
184 go7007_write_addr(go, 0x3c80, 0x00f2);
185 break;
186 }
187 return 0;
188 }
189
190 /*
191 * Send the boot firmware to the GO7007 and configure the registers. This
192 * is the only way to stop the encoder once it has started streaming video.
193 *
194 * Must be called with the hw_lock held.
195 */
196 int go7007_reset_encoder(struct go7007 *go)
197 {
198 if (go7007_load_encoder(go) < 0)
199 return -1;
200 return go7007_init_encoder(go);
201 }
202
203 /*
204 * Attempt to instantiate an I2C client by ID, probably loading a module.
205 */
206 static int init_i2c_module(struct i2c_adapter *adapter, const struct go_i2c *const i2c)
207 {
208 struct go7007 *go = i2c_get_adapdata(adapter);
209 struct v4l2_device *v4l2_dev = &go->v4l2_dev;
210 struct v4l2_subdev *sd;
211 struct i2c_board_info info;
212
213 memset(&info, 0, sizeof(info));
214 strlcpy(info.type, i2c->type, sizeof(info.type));
215 info.addr = i2c->addr;
216 info.flags = i2c->flags;
217
218 sd = v4l2_i2c_new_subdev_board(v4l2_dev, adapter, &info, NULL);
219 if (sd) {
220 if (i2c->is_video)
221 go->sd_video = sd;
222 if (i2c->is_audio)
223 go->sd_audio = sd;
224 return 0;
225 }
226
227 printk(KERN_INFO "go7007: probing for module i2c:%s failed\n", i2c->type);
228 return -EINVAL;
229 }
230
231 /*
232 * Detach and unregister the encoder. The go7007 struct won't be freed
233 * until v4l2 finishes releasing its resources and all associated fds are
234 * closed by applications.
235 */
236 static void go7007_remove(struct v4l2_device *v4l2_dev)
237 {
238 struct go7007 *go = container_of(v4l2_dev, struct go7007, v4l2_dev);
239
240 v4l2_device_unregister(v4l2_dev);
241 if (go->hpi_ops->release)
242 go->hpi_ops->release(go);
243 if (go->i2c_adapter_online) {
244 i2c_del_adapter(&go->i2c_adapter);
245 go->i2c_adapter_online = 0;
246 }
247
248 kfree(go->boot_fw);
249 go7007_v4l2_remove(go);
250 kfree(go);
251 }
252
253 /*
254 * Finalize the GO7007 hardware setup, register the on-board I2C adapter
255 * (if used on this board), load the I2C client driver for the sensor
256 * (SAA7115 or whatever) and other devices, and register the ALSA and V4L2
257 * interfaces.
258 *
259 * Must NOT be called with the hw_lock held.
260 */
261 int go7007_register_encoder(struct go7007 *go, unsigned num_i2c_devs)
262 {
263 int i, ret;
264
265 dev_info(go->dev, "go7007: registering new %s\n", go->name);
266
267 go->v4l2_dev.release = go7007_remove;
268 ret = v4l2_device_register(go->dev, &go->v4l2_dev);
269 if (ret < 0)
270 return ret;
271
272 mutex_lock(&go->hw_lock);
273 ret = go7007_init_encoder(go);
274 mutex_unlock(&go->hw_lock);
275 if (ret < 0)
276 return ret;
277
278 ret = go7007_v4l2_ctrl_init(go);
279 if (ret < 0)
280 return ret;
281
282 if (!go->i2c_adapter_online &&
283 go->board_info->flags & GO7007_BOARD_USE_ONBOARD_I2C) {
284 ret = go7007_i2c_init(go);
285 if (ret < 0)
286 return ret;
287 go->i2c_adapter_online = 1;
288 }
289 if (go->i2c_adapter_online) {
290 if (go->board_id == GO7007_BOARDID_ADS_USBAV_709) {
291 /* Reset the TW9906 */
292 go7007_write_addr(go, 0x3c82, 0x0009);
293 msleep(50);
294 go7007_write_addr(go, 0x3c82, 0x000d);
295 }
296 for (i = 0; i < num_i2c_devs; ++i)
297 init_i2c_module(&go->i2c_adapter, &go->board_info->i2c_devs[i]);
298
299 if (go->tuner_type >= 0) {
300 struct tuner_setup setup = {
301 .addr = ADDR_UNSET,
302 .type = go->tuner_type,
303 .mode_mask = T_ANALOG_TV,
304 };
305
306 v4l2_device_call_all(&go->v4l2_dev, 0, tuner,
307 s_type_addr, &setup);
308 }
309 if (go->board_id == GO7007_BOARDID_ADLINK_MPG24)
310 v4l2_subdev_call(go->sd_video, video, s_routing,
311 0, 0, go->channel_number + 1);
312 }
313
314 ret = go7007_v4l2_init(go);
315 if (ret < 0)
316 return ret;
317
318 if (go->board_info->flags & GO7007_BOARD_HAS_AUDIO) {
319 go->audio_enabled = 1;
320 go7007_snd_init(go);
321 }
322 return 0;
323 }
324 EXPORT_SYMBOL(go7007_register_encoder);
325
326 /*
327 * Send the encode firmware to the encoder, which will cause it
328 * to immediately start delivering the video and audio streams.
329 *
330 * Must be called with the hw_lock held.
331 */
332 int go7007_start_encoder(struct go7007 *go)
333 {
334 u8 *fw;
335 int fw_len, rv = 0, i;
336 u16 intr_val, intr_data;
337
338 go->modet_enable = 0;
339 if (!go->dvd_mode)
340 for (i = 0; i < 4; ++i) {
341 if (go->modet[i].enable) {
342 go->modet_enable = 1;
343 continue;
344 }
345 go->modet[i].pixel_threshold = 32767;
346 go->modet[i].motion_threshold = 32767;
347 go->modet[i].mb_threshold = 32767;
348 }
349
350 if (go7007_construct_fw_image(go, &fw, &fw_len) < 0)
351 return -1;
352
353 if (go7007_send_firmware(go, fw, fw_len) < 0 ||
354 go7007_read_interrupt(go, &intr_val, &intr_data) < 0) {
355 v4l2_err(&go->v4l2_dev, "error transferring firmware\n");
356 rv = -1;
357 goto start_error;
358 }
359
360 go->state = STATE_DATA;
361 go->parse_length = 0;
362 go->seen_frame = 0;
363 if (go7007_stream_start(go) < 0) {
364 v4l2_err(&go->v4l2_dev, "error starting stream transfer\n");
365 rv = -1;
366 goto start_error;
367 }
368
369 start_error:
370 kfree(fw);
371 return rv;
372 }
373
374 /*
375 * Store a byte in the current video buffer, if there is one.
376 */
377 static inline void store_byte(struct go7007_buffer *vb, u8 byte)
378 {
379 if (vb && vb->vb.v4l2_planes[0].bytesused < GO7007_BUF_SIZE) {
380 u8 *ptr = vb2_plane_vaddr(&vb->vb, 0);
381
382 ptr[vb->vb.v4l2_planes[0].bytesused++] = byte;
383 }
384 }
385
386 /*
387 * Deliver the last video buffer and get a new one to start writing to.
388 */
389 static struct go7007_buffer *frame_boundary(struct go7007 *go, struct go7007_buffer *vb)
390 {
391 struct go7007_buffer *vb_tmp = NULL;
392 u32 *bytesused = &vb->vb.v4l2_planes[0].bytesused;
393 int i;
394
395 if (vb) {
396 if (vb->modet_active) {
397 if (*bytesused + 216 < GO7007_BUF_SIZE) {
398 for (i = 0; i < 216; ++i)
399 store_byte(vb, go->active_map[i]);
400 *bytesused -= 216;
401 } else
402 vb->modet_active = 0;
403 }
404 vb->vb.v4l2_buf.sequence = go->next_seq++;
405 v4l2_get_timestamp(&vb->vb.v4l2_buf.timestamp);
406 vb_tmp = vb;
407 spin_lock(&go->spinlock);
408 list_del(&vb->list);
409 if (list_empty(&go->vidq_active))
410 vb = NULL;
411 else
412 vb = list_first_entry(&go->vidq_active, struct go7007_buffer, list);
413 go->active_buf = vb;
414 spin_unlock(&go->spinlock);
415 vb2_buffer_done(&vb_tmp->vb, VB2_BUF_STATE_DONE);
416 return vb;
417 }
418 spin_lock(&go->spinlock);
419 if (!list_empty(&go->vidq_active))
420 vb = go->active_buf =
421 list_first_entry(&go->vidq_active, struct go7007_buffer, list);
422 spin_unlock(&go->spinlock);
423 go->next_seq++;
424 return vb;
425 }
426
427 static void write_bitmap_word(struct go7007 *go)
428 {
429 int x, y, i, stride = ((go->width >> 4) + 7) >> 3;
430
431 for (i = 0; i < 16; ++i) {
432 y = (((go->parse_length - 1) << 3) + i) / (go->width >> 4);
433 x = (((go->parse_length - 1) << 3) + i) % (go->width >> 4);
434 if (stride * y + (x >> 3) < sizeof(go->active_map))
435 go->active_map[stride * y + (x >> 3)] |=
436 (go->modet_word & 1) << (x & 0x7);
437 go->modet_word >>= 1;
438 }
439 }
440
441 /*
442 * Parse a chunk of the video stream into frames. The frames are not
443 * delimited by the hardware, so we have to parse the frame boundaries
444 * based on the type of video stream we're receiving.
445 */
446 void go7007_parse_video_stream(struct go7007 *go, u8 *buf, int length)
447 {
448 struct go7007_buffer *vb = go->active_buf;
449 int i, seq_start_code = -1, gop_start_code = -1, frame_start_code = -1;
450
451 switch (go->format) {
452 case V4L2_PIX_FMT_MPEG4:
453 seq_start_code = 0xB0;
454 gop_start_code = 0xB3;
455 frame_start_code = 0xB6;
456 break;
457 case V4L2_PIX_FMT_MPEG1:
458 case V4L2_PIX_FMT_MPEG2:
459 seq_start_code = 0xB3;
460 gop_start_code = 0xB8;
461 frame_start_code = 0x00;
462 break;
463 }
464
465 for (i = 0; i < length; ++i) {
466 if (vb && vb->vb.v4l2_planes[0].bytesused >= GO7007_BUF_SIZE - 3) {
467 v4l2_info(&go->v4l2_dev, "dropping oversized frame\n");
468 vb->vb.v4l2_planes[0].bytesused = 0;
469 vb->frame_offset = 0;
470 vb->modet_active = 0;
471 vb = go->active_buf = NULL;
472 }
473
474 switch (go->state) {
475 case STATE_DATA:
476 switch (buf[i]) {
477 case 0x00:
478 go->state = STATE_00;
479 break;
480 case 0xFF:
481 go->state = STATE_FF;
482 break;
483 default:
484 store_byte(vb, buf[i]);
485 break;
486 }
487 break;
488 case STATE_00:
489 switch (buf[i]) {
490 case 0x00:
491 go->state = STATE_00_00;
492 break;
493 case 0xFF:
494 store_byte(vb, 0x00);
495 go->state = STATE_FF;
496 break;
497 default:
498 store_byte(vb, 0x00);
499 store_byte(vb, buf[i]);
500 go->state = STATE_DATA;
501 break;
502 }
503 break;
504 case STATE_00_00:
505 switch (buf[i]) {
506 case 0x00:
507 store_byte(vb, 0x00);
508 /* go->state remains STATE_00_00 */
509 break;
510 case 0x01:
511 go->state = STATE_00_00_01;
512 break;
513 case 0xFF:
514 store_byte(vb, 0x00);
515 store_byte(vb, 0x00);
516 go->state = STATE_FF;
517 break;
518 default:
519 store_byte(vb, 0x00);
520 store_byte(vb, 0x00);
521 store_byte(vb, buf[i]);
522 go->state = STATE_DATA;
523 break;
524 }
525 break;
526 case STATE_00_00_01:
527 if (buf[i] == 0xF8 && go->modet_enable == 0) {
528 /* MODET start code, but MODET not enabled */
529 store_byte(vb, 0x00);
530 store_byte(vb, 0x00);
531 store_byte(vb, 0x01);
532 store_byte(vb, 0xF8);
533 go->state = STATE_DATA;
534 break;
535 }
536 /* If this is the start of a new MPEG frame,
537 * get a new buffer */
538 if ((go->format == V4L2_PIX_FMT_MPEG1 ||
539 go->format == V4L2_PIX_FMT_MPEG2 ||
540 go->format == V4L2_PIX_FMT_MPEG4) &&
541 (buf[i] == seq_start_code ||
542 buf[i] == gop_start_code ||
543 buf[i] == frame_start_code)) {
544 if (vb == NULL || go->seen_frame)
545 vb = frame_boundary(go, vb);
546 go->seen_frame = buf[i] == frame_start_code;
547 if (vb && go->seen_frame)
548 vb->frame_offset = vb->vb.v4l2_planes[0].bytesused;
549 }
550 /* Handle any special chunk types, or just write the
551 * start code to the (potentially new) buffer */
552 switch (buf[i]) {
553 case 0xF5: /* timestamp */
554 go->parse_length = 12;
555 go->state = STATE_UNPARSED;
556 break;
557 case 0xF6: /* vbi */
558 go->state = STATE_VBI_LEN_A;
559 break;
560 case 0xF8: /* MD map */
561 go->parse_length = 0;
562 memset(go->active_map, 0,
563 sizeof(go->active_map));
564 go->state = STATE_MODET_MAP;
565 break;
566 case 0xFF: /* Potential JPEG start code */
567 store_byte(vb, 0x00);
568 store_byte(vb, 0x00);
569 store_byte(vb, 0x01);
570 go->state = STATE_FF;
571 break;
572 default:
573 store_byte(vb, 0x00);
574 store_byte(vb, 0x00);
575 store_byte(vb, 0x01);
576 store_byte(vb, buf[i]);
577 go->state = STATE_DATA;
578 break;
579 }
580 break;
581 case STATE_FF:
582 switch (buf[i]) {
583 case 0x00:
584 store_byte(vb, 0xFF);
585 go->state = STATE_00;
586 break;
587 case 0xFF:
588 store_byte(vb, 0xFF);
589 /* go->state remains STATE_FF */
590 break;
591 case 0xD8:
592 if (go->format == V4L2_PIX_FMT_MJPEG)
593 vb = frame_boundary(go, vb);
594 /* fall through */
595 default:
596 store_byte(vb, 0xFF);
597 store_byte(vb, buf[i]);
598 go->state = STATE_DATA;
599 break;
600 }
601 break;
602 case STATE_VBI_LEN_A:
603 go->parse_length = buf[i] << 8;
604 go->state = STATE_VBI_LEN_B;
605 break;
606 case STATE_VBI_LEN_B:
607 go->parse_length |= buf[i];
608 if (go->parse_length > 0)
609 go->state = STATE_UNPARSED;
610 else
611 go->state = STATE_DATA;
612 break;
613 case STATE_MODET_MAP:
614 if (go->parse_length < 204) {
615 if (go->parse_length & 1) {
616 go->modet_word |= buf[i];
617 write_bitmap_word(go);
618 } else
619 go->modet_word = buf[i] << 8;
620 } else if (go->parse_length == 207 && vb) {
621 vb->modet_active = buf[i];
622 }
623 if (++go->parse_length == 208)
624 go->state = STATE_DATA;
625 break;
626 case STATE_UNPARSED:
627 if (--go->parse_length == 0)
628 go->state = STATE_DATA;
629 break;
630 }
631 }
632 }
633 EXPORT_SYMBOL(go7007_parse_video_stream);
634
635 /*
636 * Allocate a new go7007 struct. Used by the hardware-specific probe.
637 */
638 struct go7007 *go7007_alloc(const struct go7007_board_info *board,
639 struct device *dev)
640 {
641 struct go7007 *go;
642 int i;
643
644 go = kzalloc(sizeof(struct go7007), GFP_KERNEL);
645 if (go == NULL)
646 return NULL;
647 go->dev = dev;
648 go->board_info = board;
649 go->board_id = 0;
650 go->tuner_type = -1;
651 go->channel_number = 0;
652 go->name[0] = 0;
653 mutex_init(&go->hw_lock);
654 init_waitqueue_head(&go->frame_waitq);
655 spin_lock_init(&go->spinlock);
656 go->status = STATUS_INIT;
657 memset(&go->i2c_adapter, 0, sizeof(go->i2c_adapter));
658 go->i2c_adapter_online = 0;
659 go->interrupt_available = 0;
660 init_waitqueue_head(&go->interrupt_waitq);
661 go->input = 0;
662 go7007_update_board(go);
663 go->encoder_h_halve = 0;
664 go->encoder_v_halve = 0;
665 go->encoder_subsample = 0;
666 go->format = V4L2_PIX_FMT_MJPEG;
667 go->bitrate = 1500000;
668 go->fps_scale = 1;
669 go->pali = 0;
670 go->aspect_ratio = GO7007_RATIO_1_1;
671 go->gop_size = 0;
672 go->ipb = 0;
673 go->closed_gop = 0;
674 go->repeat_seqhead = 0;
675 go->seq_header_enable = 0;
676 go->gop_header_enable = 0;
677 go->dvd_mode = 0;
678 go->interlace_coding = 0;
679 for (i = 0; i < 4; ++i)
680 go->modet[i].enable = 0;
681 for (i = 0; i < 1624; ++i)
682 go->modet_map[i] = 0;
683 go->audio_deliver = NULL;
684 go->audio_enabled = 0;
685
686 return go;
687 }
688 EXPORT_SYMBOL(go7007_alloc);
689
690 void go7007_update_board(struct go7007 *go)
691 {
692 const struct go7007_board_info *board = go->board_info;
693
694 if (board->sensor_flags & GO7007_SENSOR_TV) {
695 go->standard = GO7007_STD_NTSC;
696 go->std = V4L2_STD_NTSC_M;
697 go->width = 720;
698 go->height = 480;
699 go->sensor_framerate = 30000;
700 } else {
701 go->standard = GO7007_STD_OTHER;
702 go->width = board->sensor_width;
703 go->height = board->sensor_height;
704 go->sensor_framerate = board->sensor_framerate;
705 }
706 go->encoder_v_offset = board->sensor_v_offset;
707 go->encoder_h_offset = board->sensor_h_offset;
708 }
709 EXPORT_SYMBOL(go7007_update_board);
710
711 MODULE_LICENSE("GPL v2");
This page took 0.055568 seconds and 5 git commands to generate.