Commit 12077a3a authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] dvb_usb_v2: add macros to fill USB stream properties

Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ddee5694
...@@ -22,11 +22,29 @@ ...@@ -22,11 +22,29 @@
#include "dmxdev.h" #include "dmxdev.h"
#include "dvb-usb-ids.h" #include "dvb-usb-ids.h"
struct dvb_usb_driver_info { #define DVB_USB_STREAM_BULK(endpoint_, count_, size_) { \
const char *name; .type = USB_BULK, \
const char *rc_map; .count = count_, \
const struct dvb_usb_device_properties *props; .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) \ #define DVB_USB_DEVICE(vend, prod, props_, name_, rc) \
.match_flags = USB_DEVICE_ID_MATCH_DEVICE, \ .match_flags = USB_DEVICE_ID_MATCH_DEVICE, \
...@@ -38,6 +56,12 @@ struct dvb_usb_driver_info { ...@@ -38,6 +56,12 @@ struct dvb_usb_driver_info {
.rc_map = (rc), \ .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_device;
struct dvb_usb_adapter; struct dvb_usb_adapter;
struct usb_data_stream; struct usb_data_stream;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment