All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: JPT <j-p-t@gmx.net>, linux-media@vger.kernel.org
Subject: Re: Running Technisat DVB-S2 on ARM-NAS
Date: Sun, 21 Sep 2014 18:28:43 +0300	[thread overview]
Message-ID: <541EEEAB.10106@iki.fi> (raw)
In-Reply-To: <541EEA74.2000909@gmx.net>



On 09/21/2014 06:10 PM, JPT wrote:
>>> How my I find out more about the error -12?
>>
>> http://www.virtsync.com/c-error-codes-include-errno
>>
>> #define ENOMEM      12  /* Out of memory */
>>
>> Likely allocating USB stream buffers fails. You could try request
>> smaller buffers. Drop count to 1 and test. Drop framesperurb to 1 and
>> test. Drop framesize to 1 and test. Surely streaming will not work if
>> all buffers are totally wrong and too small, but you will see if it is
>> due to big usb buffers. Then you could try optimize buffers smaller.
>>
>
> Wow, that did it. Thanks Antti!
>
> Works with count = 2, but not with count = 4.
>
> What exactly do I learn from this?
> Where are those buffers? In the RAM? or somewhere in onboard USB hardware?
>
> VDR is now able to connect to the device, but I am not sure if it
> receives anything yet.

.count = 8,
.framesperurb = 32,
.framesize = 2048,

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.

32 framesperurb sounds absolute too much. You could decrease it a lot, 
under 10 should be OK. Maybe 8 is good guess. 8 is number of URBs you 
use for streaming. 8 does not sound bad, but maybe 6 is OK if it works. 
Smallest value depends largely device USB FIFO size vs. stream size. 
Bigger the FIFO less the buffers needed. Smaller the stream, less the 
buffers needed.

So I would recommend
.count = 6,
.framesperurb = 8,
.framesize = 1024,

Use some testing with error and trial to find out smallest working 
buffers, then add some 20% extra for that.

regards
Antti



-- 
http://palosaari.fi/

  reply	other threads:[~2014-09-21 15:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-21 14:26 Running Technisat DVB-S2 on ARM-NAS JPT
2014-09-21 14:38 ` Antti Palosaari
2014-09-21 15:10   ` JPT
2014-09-21 15:28     ` Antti Palosaari [this message]
2014-09-21 17:28       ` JPT
2014-09-21 20:45         ` Jannis
2014-09-22  8:26           ` Jan Tisje

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=541EEEAB.10106@iki.fi \
    --to=crope@iki.fi \
    --cc=j-p-t@gmx.net \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.