diff options
author | Frank Schaefer <fschaefer.oss@googlemail.com> | 2012-11-08 14:11:53 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-22 18:20:03 -0200 |
commit | 454fe92f01f8d669669619a9b301d133eda9d173 (patch) | |
tree | 899ef8fbc0895c0a40ec3fe5dfecbb467d333534 /drivers/media/usb | |
parent | c647a91a2558c4031eddd013e5860ca5a41363a7 (diff) |
[media] em28xx: add module parameter for selection of the preferred USB transfer type
By default, isoc transfers are used if possible.
With the new module parameter, bulk can be selected as the
preferred USB transfer type.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-cards.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index a6f00181c24..bc63b1cee80 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -61,6 +61,11 @@ static unsigned int card[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET }; module_param_array(card, int, NULL, 0444); MODULE_PARM_DESC(card, "card type"); +static unsigned int prefer_bulk; +module_param(prefer_bulk, int, 0644); +MODULE_PARM_DESC(prefer_bulk, "prefer USB bulk transfers"); + + /* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS - 1 */ static unsigned long em28xx_devused; @@ -3332,9 +3337,11 @@ static int em28xx_usb_probe(struct usb_interface *interface, } /* Select USB transfer types to use */ - if (has_video && !dev->analog_ep_isoc) + if (has_video && + (!dev->analog_ep_isoc || (prefer_bulk && dev->analog_ep_bulk))) dev->analog_xfer_bulk = 1; - if (has_dvb && !dev->dvb_ep_isoc) + if (has_dvb && + (!dev->dvb_ep_isoc || (prefer_bulk && dev->dvb_ep_bulk))) dev->dvb_xfer_bulk = 1; snprintf(dev->name, sizeof(dev->name), "em28xx #%d", nr); |