aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-06-16 12:56:37 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-04 06:56:34 -0400
commit12077a3aa4bfc1fb5ca779dcc6b3a1f45a475736 (patch)
treea16a64828049d54a100cea6b915abe22964b7267 /drivers/media/dvb
parentddee56943ab6df098e411fe943c2a52063fba0a5 (diff)
[media] dvb_usb_v2: add macros to fill USB stream properties
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb_usb.h34
1 files changed, 29 insertions, 5 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb_usb.h b/drivers/media/dvb/dvb-usb/dvb_usb.h
index e7015ce5b3b4..56df13fbc05e 100644
--- a/drivers/media/dvb/dvb-usb/dvb_usb.h
+++ b/drivers/media/dvb/dvb-usb/dvb_usb.h
@@ -22,11 +22,29 @@
22#include "dmxdev.h" 22#include "dmxdev.h"
23#include "dvb-usb-ids.h" 23#include "dvb-usb-ids.h"
24 24
25struct dvb_usb_driver_info { 25#define DVB_USB_STREAM_BULK(endpoint_, count_, size_) { \
26 const char *name; 26 .type = USB_BULK, \
27 const char *rc_map; 27 .count = count_, \
28 const struct dvb_usb_device_properties *props; 28 .endpoint = endpoint_, \
29}; 29 .u = { \
30 .bulk = { \
31 .buffersize = size_, \
32 } \
33 } \
34}
35
36#define DVB_USB_STREAM_ISOC(endpoint_, count_, frames_, size_, interval_) { \
37 .type = USB_ISOC, \
38 .count = count_, \
39 .endpoint = endpoint_, \
40 .u = { \
41 .isoc = { \
42 .framesperurb = frames_, \
43 .framesize = size_,\
44 .interval = interval_, \
45 } \
46 } \
47}
30 48
31#define DVB_USB_DEVICE(vend, prod, props_, name_, rc) \ 49#define DVB_USB_DEVICE(vend, prod, props_, name_, rc) \
32 .match_flags = USB_DEVICE_ID_MATCH_DEVICE, \ 50 .match_flags = USB_DEVICE_ID_MATCH_DEVICE, \
@@ -38,6 +56,12 @@ struct dvb_usb_driver_info {
38 .rc_map = (rc), \ 56 .rc_map = (rc), \
39 }) 57 })
40 58
59struct dvb_usb_driver_info {
60 const char *name;
61 const char *rc_map;
62 const struct dvb_usb_device_properties *props;
63};
64
41struct dvb_usb_device; 65struct dvb_usb_device;
42struct dvb_usb_adapter; 66struct dvb_usb_adapter;
43struct usb_data_stream; 67struct usb_data_stream;