Skip to content

Commit

Permalink
[media] dvb_usb_v2: add macros to fill USB stream properties
Browse files Browse the repository at this point in the history
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Aug 4, 2012
1 parent ddee569 commit 12077a3
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions drivers/media/dvb/dvb-usb/dvb_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand All @@ -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;
Expand Down

0 comments on commit 12077a3

Please sign in to comment.