[media] af9015: update USB streaming configuration logic
authorAntti Palosaari <crope@iki.fi>
Sat, 16 Jun 2012 19:25:22 +0000 (16:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 4 Aug 2012 10:56:34 +0000 (07:56 -0300)
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/af9015.c

index a9d9f9a23450f6665ebe266d895f180bd539e494..a429c24d8b305dfd98b861b2bf89e9fcd892e2f5 100644 (file)
@@ -602,22 +602,8 @@ error:
 static int af9015_get_usb_stream_config(struct dvb_frontend *fe,
                struct usb_data_stream_properties *stream)
 {
-       struct dvb_usb_adapter *adap;
-
-       deb_info("%s: fe=%p\n", __func__, fe);
-
-       stream->type = USB_BULK;
-       stream->count = 8;
-       stream->endpoint = 0x84;
-       stream->u.bulk.buffersize = TS_USB20_FRAME_SIZE;
-
-       if (fe == NULL)
-               return 0;
-
-        adap = fe->dvb->priv;
-
-       if (adap->id == 1)
-               stream->endpoint = 0x85;
+       struct dvb_usb_adapter *adap = fe->dvb->priv;
+       deb_info("%s: adap=%d\n", __func__, adap->id);
 
        if (adap->dev->udev->speed == USB_SPEED_FULL)
                stream->u.bulk.buffersize = TS_USB11_FRAME_SIZE;
@@ -1335,6 +1321,10 @@ static struct dvb_usb_device_properties af9015_props = {
                        .pid_filter_count = 32,
                        .pid_filter = af9015_pid_filter,
                        .pid_filter_ctrl = af9015_pid_filter_ctrl,
+
+                       .stream = DVB_USB_STREAM_BULK(0x84, 8, TS_USB20_FRAME_SIZE),
+               }, {
+                       .stream = DVB_USB_STREAM_BULK(0x85, 8, TS_USB20_FRAME_SIZE),
                },
        },
 };