summaryrefslogtreecommitdiff
path: root/drivers/media/usb/stk1160/stk1160.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/stk1160/stk1160.h')
-rw-r--r--drivers/media/usb/stk1160/stk1160.h29
1 files changed, 11 insertions, 18 deletions
diff --git a/drivers/media/usb/stk1160/stk1160.h b/drivers/media/usb/stk1160/stk1160.h
index acd1c811db08..4cbcb0a03bab 100644
--- a/drivers/media/usb/stk1160/stk1160.h
+++ b/drivers/media/usb/stk1160/stk1160.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* STK1160 driver
*
@@ -7,17 +8,6 @@
* Based on Easycap driver by R.M. Thomas
* Copyright (C) 2010 R.M. Thomas
* <rmthomas--a.t--sciolus.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
*/
#include <linux/i2c.h>
@@ -94,6 +84,14 @@ struct stk1160_buffer {
unsigned int pos; /* current pos inside buffer */
};
+struct stk1160_urb {
+ struct urb *urb;
+ char *transfer_buffer;
+ struct sg_table *sgt;
+ struct stk1160 *dev;
+ dma_addr_t dma;
+};
+
struct stk1160_isoc_ctl {
/* max packet size of isoc transaction */
int max_pkt_size;
@@ -101,18 +99,13 @@ struct stk1160_isoc_ctl {
/* number of allocated urbs */
int num_bufs;
- /* urb for isoc transfers */
- struct urb **urb;
-
- /* transfer buffers for isoc transfer */
- char **transfer_buffer;
+ struct stk1160_urb urb_ctl[STK1160_NUM_BUFS];
/* current buffer */
struct stk1160_buffer *buf;
};
struct stk1160_fmt {
- char *name;
u32 fourcc; /* v4l2 format id */
int depth;
};
@@ -177,7 +170,7 @@ struct regval {
int stk1160_vb2_setup(struct stk1160 *dev);
int stk1160_video_register(struct stk1160 *dev);
void stk1160_video_unregister(struct stk1160 *dev);
-void stk1160_clear_queue(struct stk1160 *dev);
+void stk1160_clear_queue(struct stk1160 *dev, enum vb2_buffer_state vb2_state);
/* Provided by stk1160-video.c */
int stk1160_alloc_isoc(struct stk1160 *dev);