diff options
author | Antti Palosaari <crope@iki.fi> | 2012-06-16 12:56:37 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-04 06:56:34 -0400 |
commit | 12077a3aa4bfc1fb5ca779dcc6b3a1f45a475736 (patch) | |
tree | a16a64828049d54a100cea6b915abe22964b7267 /drivers/media/dvb | |
parent | ddee56943ab6df098e411fe943c2a52063fba0a5 (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.h | 34 |
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 | ||
25 | struct 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 | ||
59 | struct dvb_usb_driver_info { | ||
60 | const char *name; | ||
61 | const char *rc_map; | ||
62 | const struct dvb_usb_device_properties *props; | ||
63 | }; | ||
64 | |||
41 | struct dvb_usb_device; | 65 | struct dvb_usb_device; |
42 | struct dvb_usb_adapter; | 66 | struct dvb_usb_adapter; |
43 | struct usb_data_stream; | 67 | struct usb_data_stream; |