public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Dennis Noordsij <dennis.noordsij@movial.fi>
Cc: linux-dvb@linuxtv.org
Subject: Re: [linux-dvb] usb-dvb and endpoints question
Date: Sat, 31 May 2008 17:01:08 +0300	[thread overview]
Message-ID: <48415A24.5080305@iki.fi> (raw)
In-Reply-To: <48414EC8.3080008@movial.fi>

Dennis Noordsij wrote:
> Hi list,
> 
> I am writing a driver for the TerraTec Piranha DVB-T USB stick (actually
> the Sanio SMS-1000 chipset). From reading USB logs I have a working
> libusb prototype which can tune and receive the transport stream, and
> use the hardware PID filter.
> 
> Porting it to a proper linux DVB driver I have the following question:
> 
> This device has exactly 2 bulk endpoints, as follows:
> 
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0040  1x 64 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x02  EP 2 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0040  1x 64 bytes
>         bInterval               0
> 
> All control messages go out over EP2. All responses, as well as the
> transport stream, come in over EP1.

uh, very crazy solution :o

> All incoming packets have a small header which allows it to be mapped
> back to the corresponding request (excepting TS data which can be read
> spontaneously, but which is still marked with an additional header).
> 
> Does this mean that I can not really use the dvb-usb framework ? (since
> there is no generic_bulk_ctrl_endpoint, and since the TS stream also
> does not come on its own endpoint and even needs additional depackatizing).

Looks like it is not possible to use dvb-framework very much...

...But you can use generic_bulk_ctrl_endpoint & generic_write to write 
data if you can use dvb-framework partially. But reading data could be 
very hard to implement.

> Since incoming data is mixed with TS packets, you can no longer just
> write a command and read the next response. TS data will be streaming in
> and every time you make some request you will probably get some TS data
> first, and only then your response. How to solve?
> 
> Any pointers in the right direction? :-)

Other thoughts, wMaxPacketSize 0x0040 1x 64 bytes looks rather small for TS.

Can you provide sample usb-sniff from windows? Parsed with usb-replay 
parser.pl -script would be enough if whole sniff is very large.

> Cheers,
> Dennis

regards
Antti
-- 
http://palosaari.fi/

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

  reply	other threads:[~2008-05-31 14:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-31 13:12 [linux-dvb] usb-dvb and endpoints question Dennis Noordsij
2008-05-31 14:01 ` Antti Palosaari [this message]
2008-05-31 14:32   ` Dennis Noordsij
2008-05-31 16:58   ` Dennis Noordsij
2008-05-31 17:03     ` Dennis Noordsij

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=48415A24.5080305@iki.fi \
    --to=crope@iki.fi \
    --cc=dennis.noordsij@movial.fi \
    --cc=linux-dvb@linuxtv.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