Mauro Carvalho Chehab | 9701dc9 | 2009-09-14 09:42:41 -0300 | [diff] [blame] | 1 | /* |
Ruslan Pisarev | d005864 | 2010-10-20 06:35:54 -0300 | [diff] [blame] | 2 | * tm6000-buf.c - driver for TM5600/TM6000/TM6010 USB video capture devices |
| 3 | * |
| 4 | * Copyright (C) 2006-2007 Mauro Carvalho Chehab <mchehab@infradead.org> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation version 2 |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
Mauro Carvalho Chehab | 9701dc9 | 2009-09-14 09:42:41 -0300 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | #include <linux/videodev2.h> |
| 21 | |
Mauro Carvalho Chehab | 6eb5c8a | 2008-01-08 11:25:57 -0300 | [diff] [blame] | 22 | #define TM6000_URB_MSG_LEN 180 |
| 23 | |
Mauro Carvalho Chehab | 9701dc9 | 2009-09-14 09:42:41 -0300 | [diff] [blame] | 24 | struct usb_isoc_ctl { |
| 25 | /* max packet size of isoc transaction */ |
| 26 | int max_pkt_size; |
| 27 | |
| 28 | /* number of allocated urbs */ |
| 29 | int num_bufs; |
| 30 | |
| 31 | /* urb for isoc transfers */ |
| 32 | struct urb **urb; |
| 33 | |
| 34 | /* transfer buffers for isoc transfer */ |
| 35 | char **transfer_buffer; |
| 36 | |
Mauro Carvalho Chehab | ed0236a | 2008-04-09 08:07:20 -0300 | [diff] [blame] | 37 | /* Last buffer command and region */ |
| 38 | u8 cmd; |
| 39 | int pos, size, pktsize; |
Mauro Carvalho Chehab | 9701dc9 | 2009-09-14 09:42:41 -0300 | [diff] [blame] | 40 | |
| 41 | /* Last field: ODD or EVEN? */ |
Stefan Ringel | 423c79e | 2011-05-21 03:05:38 -0300 | [diff] [blame] | 42 | int vfield, field; |
Mauro Carvalho Chehab | cc6c60d | 2007-09-19 16:24:05 -0300 | [diff] [blame] | 43 | |
Mauro Carvalho Chehab | a228618 | 2007-09-22 02:06:25 -0300 | [diff] [blame] | 44 | /* Stores incomplete commands */ |
Mauro Carvalho Chehab | ed0236a | 2008-04-09 08:07:20 -0300 | [diff] [blame] | 45 | u32 tmp_buf; |
| 46 | int tmp_buf_len; |
Mauro Carvalho Chehab | a228618 | 2007-09-22 02:06:25 -0300 | [diff] [blame] | 47 | |
| 48 | /* Stores already requested buffers */ |
Mauro Carvalho Chehab | 45dbf0d | 2011-09-23 09:26:22 -0300 | [diff] [blame] | 49 | struct tm6000_buffer *buf; |
Mauro Carvalho Chehab | 9701dc9 | 2009-09-14 09:42:41 -0300 | [diff] [blame] | 50 | }; |