All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Technisat DVB-S2 USB: reduced buffer sizes
@ 2014-11-08 17:15 Jan Tisje
  2014-11-09 21:28 ` Antti Palosaari
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Tisje @ 2014-11-08 17:15 UTC (permalink / raw)
  To: linux-media

Hi,

I reduced the buffer size in order to make this driver work on my NAS
station. It's an arm system and thus only has limited resources.

I compiled and ran with kernel 3.16.3 for some weeks and now compiled
and booted kernel 3.17.2 today.
Without this patch the device doesn't work at all, in both kernel versions.

This is what Antti Palosaar crope@iki.fi wrote:
> If I didn't remember wrong, that means allocated buffers are 8 * 32 * 2048 = 524288 bytes. 
> It sounds rather big for my taste. Probably even wrong. IIRC USB2.0 frames are 1024 and there could be 1-3 frames. 
> You could use lsusb with all verbosity levels to see if it is 1024/2048/3072. And set value according to that info.
> So I would recommend .count = 6, .framesperurb = 8, .framesize = 1024 


I only changed one value because this was sufficient to make it work.

I believe these sizes correspond to the output of lsusb -v
But to be honest: I don't have any idea of what this all is about. USB
wasn't invented yet when I studied computer science. ;)
maybe someone knows better.

    Interface Descriptor:
      bAlternateSetting       0
      Endpoint Descriptor:
        bEndpointAddress     0x82  EP 2 IN
        wMaxPacketSize     0x0200  1x 512 bytes
      Endpoint Descriptor:
        bEndpointAddress     0x81  EP 1 IN
        wMaxPacketSize     0x0200  1x 512 bytes
      Endpoint Descriptor:
        bEndpointAddress     0x01  EP 1 OUT
        wMaxPacketSize     0x0200  1x 512 bytes
    Interface Descriptor:
      bAlternateSetting       1
      Endpoint Descriptor:
        bEndpointAddress     0x82  EP 2 IN
        wMaxPacketSize     0x0c00  2x 1024 bytes
          Transfer Type            Isochronous
      Endpoint Descriptor:
        bEndpointAddress     0x81  EP 1 IN
        wMaxPacketSize     0x0200  1x 512 bytes
      Endpoint Descriptor:
        bEndpointAddress     0x01  EP 1 OUT
        wMaxPacketSize     0x0200  1x 512 bytes


This is the first kernel patch I submitted. I hope everything is fine.

Jan


diff -uNr linux-3.17.2.orig/drivers/media/usb/dvb-usb/technisat-usb2.c
linux-3.17.2/drivers/media/usb/dvb-usb/technisat-usb2.c
--- linux-3.17.2.orig/drivers/media/usb/dvb-usb/technisat-usb2.c
2014-10-30 17:43:25.000000000 +0100
+++ linux-3.17.2/drivers/media/usb/dvb-usb/technisat-usb2.c
2014-11-08 17:31:18.716668708 +0100
@@ -708,7 +708,7 @@
                                .endpoint = 0x2,
                                .u = {
                                        .isoc = {
-                                               .framesperurb = 32,
+                                               .framesperurb = 8,
                                                .framesize = 2048,
                                                .interval = 1,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-09 21:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-08 17:15 [PATCH] Technisat DVB-S2 USB: reduced buffer sizes Jan Tisje
2014-11-09 21:28 ` Antti Palosaari

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.