public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Malcolm Priestley <tvboxspy@gmail.com>
To: Jason Hecker <jwhecker@gmail.com>
Cc: Josu Lazkano <josu.lazkano@gmail.com>,
	linux-media <linux-media@vger.kernel.org>
Subject: [PATCH] Re: Afatech AF9013 [TEST ONLY] AF9015 stream buffer size aligned with max packet size.
Date: Tue, 23 Aug 2011 22:43:36 +0100	[thread overview]
Message-ID: <1314135816.2140.16.camel@localhost> (raw)
In-Reply-To: <CAATJ+ftemL4NYTQLxLw4vmXpD+nFfxrUVjmapUt9EzYJNqH6FQ@mail.gmail.com>

On Tue, 2011-08-23 at 11:47 +1000, Jason Hecker wrote:
> Damn, this patch didn't help so maybe forget this patch.  Tuner A is
> still messed up.
Try this patch, applied to the latest media_build. it aligns buffer size to the max packet
size instead of TS packet size.

I think what might happening is that TS packets are getting chopped, as device seems to want
to align to max packet size.

Afatech seem to want create rather large buffers at considerable delay. The size of the buffer
has also been considerably reduced. If you want to increase it change TS_USB20_PACKET_COUNT
in multiplies of 2 (56 ... 112).

---
 drivers/media/dvb/dvb-usb/af9015.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c
index d7ad05f..eaf0800 100644
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -404,21 +404,22 @@ static int af9015_init_endpoint(struct dvb_usb_device *d)
 	   We use smaller - about 1/4 from the original, 5 and 87. */
 #define TS_PACKET_SIZE            188
 
-#define TS_USB20_PACKET_COUNT      87
-#define TS_USB20_FRAME_SIZE       (TS_PACKET_SIZE*TS_USB20_PACKET_COUNT)
-
 #define TS_USB11_PACKET_COUNT       5
 #define TS_USB11_FRAME_SIZE       (TS_PACKET_SIZE*TS_USB11_PACKET_COUNT)
 
-#define TS_USB20_MAX_PACKET_SIZE  512
+#define TS_USB20_MAX_PACKET_SIZE  128
 #define TS_USB11_MAX_PACKET_SIZE   64
 
+#define TS_USB20_PACKET_COUNT      28
+#define TS_USB20_FRAME_SIZE       (TS_USB20_MAX_PACKET_SIZE\
+					*TS_USB20_PACKET_COUNT)
+
 	if (d->udev->speed == USB_SPEED_FULL) {
 		frame_size = TS_USB11_FRAME_SIZE/4;
 		packet_size = TS_USB11_MAX_PACKET_SIZE/4;
 	} else {
-		frame_size = TS_USB20_FRAME_SIZE/4;
-		packet_size = TS_USB20_MAX_PACKET_SIZE/4;
+		frame_size = TS_USB20_FRAME_SIZE;
+		packet_size = TS_USB20_MAX_PACKET_SIZE;
 	}
 
 	ret = af9015_set_reg_bit(d, 0xd507, 2); /* assert EP4 reset */
-- 
1.7.4.1


  reply	other threads:[~2011-08-23 21:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAATJ+fu5JqVmyY=zJn_CM_Eusst_YWKG2B2MAuu5fqELYYsYqA@mail.gmail.com>
2011-08-21  1:51 ` Afatech AF9013 Jason Hecker
2011-08-21 15:06   ` Josu Lazkano
2011-08-21 18:00   ` Malcolm Priestley
2011-08-22  2:05     ` Jason Hecker
2011-08-22 12:01       ` Josu Lazkano
2011-08-23  0:59         ` Jason Hecker
2011-08-23  1:47           ` Jason Hecker
2011-08-23 21:43             ` Malcolm Priestley [this message]
2011-08-23 22:29               ` [PATCH] Re: Afatech AF9013 [TEST ONLY] AF9015 stream buffer size aligned with max packet size Jason Hecker
2011-08-29 18:40             ` Afatech AF9013 Josu Lazkano
2011-08-30 23:31               ` Malcolm Priestley

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=1314135816.2140.16.camel@localhost \
    --to=tvboxspy@gmail.com \
    --cc=josu.lazkano@gmail.com \
    --cc=jwhecker@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox