diff options
author | Antti Palosaari <crope@iki.fi> | 2012-06-16 18:56:37 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-04 12:56:34 +0200 |
commit | 12077a3aa4bfc1fb5ca779dcc6b3a1f45a475736 (patch) | |
tree | a16a64828049d54a100cea6b915abe22964b7267 /drivers/media/dvb | |
parent | [media] dvb_usb_v2: .read_mac_address() callback changes (diff) | |
download | linux-12077a3aa4bfc1fb5ca779dcc6b3a1f45a475736.tar.xz linux-12077a3aa4bfc1fb5ca779dcc6b3a1f45a475736.zip |
[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 @@ #include "dmxdev.h" #include "dvb-usb-ids.h" -struct dvb_usb_driver_info { - const char *name; - const char *rc_map; - const struct dvb_usb_device_properties *props; -}; +#define DVB_USB_STREAM_BULK(endpoint_, count_, size_) { \ + .type = USB_BULK, \ + .count = count_, \ + .endpoint = endpoint_, \ + .u = { \ + .bulk = { \ + .buffersize = size_, \ + } \ + } \ +} + +#define DVB_USB_STREAM_ISOC(endpoint_, count_, frames_, size_, interval_) { \ + .type = USB_ISOC, \ + .count = count_, \ + .endpoint = endpoint_, \ + .u = { \ + .isoc = { \ + .framesperurb = frames_, \ + .framesize = size_,\ + .interval = interval_, \ + } \ + } \ +} #define DVB_USB_DEVICE(vend, prod, props_, name_, rc) \ .match_flags = USB_DEVICE_ID_MATCH_DEVICE, \ @@ -38,6 +56,12 @@ struct dvb_usb_driver_info { .rc_map = (rc), \ }) +struct dvb_usb_driver_info { + const char *name; + const char *rc_map; + const struct dvb_usb_device_properties *props; +}; + struct dvb_usb_device; struct dvb_usb_adapter; struct usb_data_stream; |