From: Mauro Carvalho Chehab <m.chehab@samsung.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>,
Xenia Ragiadakou <burzalodowa@gmail.com>,
linux-usb@vger.kernel.org, linux-input@vger.kernel.org,
linux-media@vger.kernel.org
Subject: Re: New USB core API to change interval and max packet size
Date: Wed, 02 Oct 2013 14:11:23 -0300 [thread overview]
Message-ID: <20131002141123.1c8d2e3b@samsung.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1310021234510.1293-100000@iolanthe.rowland.org>
Em Wed, 02 Oct 2013 12:38:14 -0400 (EDT)
Alan Stern <stern@rowland.harvard.edu> escreveu:
> On Wed, 2 Oct 2013, Mauro Carvalho Chehab wrote:
>
> > > > So, there's no need to call usb_change_ep_bandwidth().
> > >
> > > That's right.
> > >
> > > > If so, then usb_change_ep_bandwidth() as a quirk, if bInterval
> > > > or wMaxPacketSize were improperly filled.
> > > >
> > > > Right?
> > >
> > > Or if the values are correct, but the driver wants to use something
> > > different for its own reasons (for example, to get lower latency or
> > > because it knows that it will never use packets as large as the
> > > descriptor allows). Right.
> >
> > Ok, so, in this case, usb_change_ep_bandwidth() could be called
> > just before usb_alloc_urb(), in order to make it to use the packet
> > size that would be expected for that kind of ISOC traffic that
> > userspace indirectly selected, by adjusting the streaming
> > video resolution selected, right?
>
> We haven't decided on the final API yet. However, note that
> usb_alloc_urb() doesn't depend on the packet size. It requires you to
> specify only the number of packets, not their sizes. Therefore it
> doesn't matter whether you call usb_change_ep_bandwidth() before or
> after usb_alloc_urb().
Sure, but, at least on almost all V4L2 drivers, the number of packets
and their sizes should be calculated to be able to receive all URBs
needed to store a complete image frame (that generally arrives on
every 1/60 Hz or 1/50 Hz - depending on the frames per second rate).
On those drivers, the transfer_buffer is allocated at the same loop
where usb_alloc_urb() is called.
So, it makes sense for them to specify the bandwidth parameters at
the function that calls usb_alloc_coherent() and usb_alloc_urb().
Regards,
Mauro
next prev parent reply other threads:[~2013-10-02 17:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <524B1BF4.6000305@gmail.com>
2013-10-01 20:45 ` New USB core API to change interval and max packet size Sarah Sharp
2013-10-01 21:16 ` Xenia Ragiadakou
2013-10-02 18:26 ` Sarah Sharp
2013-10-02 12:33 ` Mauro Carvalho Chehab
[not found] ` <20131002093354.507cd24d-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-02 15:00 ` Alan Stern
2013-10-02 16:15 ` Mauro Carvalho Chehab
[not found] ` <20131002131550.38f90611-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-10-02 16:38 ` Alan Stern
2013-10-02 17:11 ` Mauro Carvalho Chehab [this message]
2013-10-02 14:22 ` Alan Stern
2013-10-02 18:39 ` Sarah Sharp
2013-10-02 19:08 ` Alan Stern
2013-10-02 19:37 ` Alan Stern
2013-10-07 15:25 ` Hans de Goede
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=20131002141123.1c8d2e3b@samsung.com \
--to=m.chehab@samsung.com \
--cc=burzalodowa@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=stern@rowland.harvard.edu \
/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;
as well as URLs for NNTP newsgroup(s).