summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2012-11-08 18:11:52 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-22 21:17:52 +0100
commitc647a91a2558c4031eddd013e5860ca5a41363a7 (patch)
tree90a0b103355b59ef61fa7d2f88a6ec78e24e189b /drivers/media/usb/em28xx/em28xx-video.c
parent[media] em28xx: set USB alternate settings for analog video bulk transfers pr... (diff)
downloadlinux-c647a91a2558c4031eddd013e5860ca5a41363a7.tar.xz
linux-c647a91a2558c4031eddd013e5860ca5a41363a7.zip
[media] em28xx: improve USB endpoint logic, also use bulk transfers
The current enpoint logic ignores all bulk endpoints and uses a fixed mapping between endpint addresses and the supported data stream types (analog/audio/DVB): Ep 0x82, isoc => analog Ep 0x83, isoc => audio Ep 0x84, isoc => DVB Now that the code can also do bulk transfers, the endpoint logic has to be extended to also consider bulk endpoints. The new logic preserves backwards compatibility and reflects the endpoint configurations we have seen so far: Ep 0x82, isoc => analog Ep 0x82, bulk => analog Ep 0x83, isoc* => audio Ep 0x84, isoc => digital Ep 0x84, bulk => analog or digital** (*: audio should always be isoc) (**: analog, if ep 0x82 is isoc, otherwise digital) [mchehab@redhat.com: Fix a CodingStyle issue: don't break strings into separate lines] 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/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-video.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index d9c15b6da1af..c7e23dd73b88 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -788,16 +788,18 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb,
if (urb_init) {
if (em28xx_vbi_supported(dev) == 1)
- rc = em28xx_init_usb_xfer(dev, EM28XX_ANALOG_MODE, 0,
+ rc = em28xx_init_usb_xfer(dev, EM28XX_ANALOG_MODE,
+ dev->analog_xfer_bulk,
EM28XX_NUM_BUFS,
dev->max_pkt_size,
- EM28XX_NUM_ISOC_PACKETS,
+ dev->packet_multiplier,
em28xx_urb_data_copy_vbi);
else
- rc = em28xx_init_usb_xfer(dev, EM28XX_ANALOG_MODE, 0,
+ rc = em28xx_init_usb_xfer(dev, EM28XX_ANALOG_MODE,
+ dev->analog_xfer_bulk,
EM28XX_NUM_BUFS,
dev->max_pkt_size,
- EM28XX_NUM_ISOC_PACKETS,
+ dev->packet_multiplier,
em28xx_urb_data_copy);
if (rc < 0)
goto fail;