public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: linux-usb@vger.kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, libusb-devel@lists.sourceforge.net,
	Alexander Graf <agraf@suse.de>, Gerd Hoffmann <kraxel@redhat.com>,
	hector@marcansoft.com, Jan Kiszka <jan.kiszka@siemens.com>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
	pbonzini@redhat.com, Anthony Liguori <aliguori@us.ibm.com>,
	Jes Sorensen <Jes.Sorensen@redhat.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Oliver Neukum <oliver@neukum.org>, Greg KH <greg@kroah.com>,
	Felipe Balbi <balbi@ti.com>, Clemens Ladisch <clemens@ladisch.de>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Theodore Kilgore <kilgota@banach.math.auburn.edu>,
	Adam Baker <linux@baker-net.org.uk>
Subject: Re: USB mini-summit at LinuxCon Vancouver
Date: Thu, 04 Aug 2011 19:21:47 -0300	[thread overview]
Message-ID: <4E3B1B7B.2040501@infradead.org> (raw)
In-Reply-To: <20110610002103.GA7169@xanatos>

Hi Sarah/Greg,

Em 09-06-2011 21:21, Sarah Sharp escreveu:
> I'm pleased to announce a USB mini-summit at LinuxCon Vancouver.
> 
> What:	USB mini-summit
> When:	Tuesday, August 16th, all day
> Where:	At the conference venue, room TBD pending confirmation from
> 	Angela Brown.
> 
> Proposed topics include USB virtualization, and improved bandwidth APIs
> between the USB core and drivers (especially webcam drivers).  See the
> detailed topic list below.  Anyone is also welcome to propose or show up
> with a USB related topic.  MUSB?  USB 3.0 gadget drivers?  USB-IP?
> 
> The USB mini-summit does overlap with the virtualization mini-summit by
> a day, but I'm hoping we can schedule talks so some of the
> virtualization folks can make it to the USB mini-summit.  The other
> option was on Friday during the conference which was not ideal.
> 
> Proposed topics:
> 
> Topic 1
> -------
> 
> The KVM folks suggested that it would be good to get USB and
> virtualization developers together to talk about how to virtualize the
> xHCI host controller.  The xHCI spec architect worked closely with
> VMWare to get some extra goodies in the spec to help virtualization, and
> I'd like to see the other virtualization developers take advantage of
> that.  I'd also like us to hash out any issues they have been finding in
> the USB core or xHCI driver during the virtualization effort.
> 
> 
> Topic 2
> -------
> 
> I'd also like to get the V4L and audio developers who work with USB
> devices together with the core USB folks to talk about bandwidth
> management under xHCI.
> 
> One of the issues is that since the xHCI hardware does bandwidth
> management, not the xHCI driver, a schedule that will take too much
> bandwidth will get rejected much sooner than any USB driver currently
> expects (during a call to usb_set_interface).  This poses issues, since
> most USB video drivers negotiate the video size and frame rate after
> they call usb_set_interface, so they don't know whether they can fall
> back to a less bandwidth-intensive setting.  Currently, they just submit
> URBs with less and less bandwidth until one interval setting gets
> accepted that won't work under xHCI.
> 
> A second issue is that that some drivers need less bandwidth than the
> device advertises, and the xHCI driver currently uses whatever periodic
> interval the device advertises in its descriptors.  This is not what the
> video/audio driver wants, especially in the case of buggy high speed
> devices that advertise the interval in frames, not microframes.  There
> needs to be some way for the drivers to communicate their bandwidth
> needs to the USB core.  We've known about this issue for a while, and I
> think it's time to get everyone in the same room and hash out an API.
> 
> (I will send out an API proposal later this month.)

While discussing the topics for the media workshop that will happen together
with this year's KS/2011, one issue related to the USB stack came on our
discussions: it is related to multi-function USB devices, as you can
see on this thread:
	http://www.spinics.net/lists/linux-media/msg36195.html

We have several cases of multi-function devices at the media subsystem.
For example, most TV grabber devices provides Remote Controller, Video,
audio and MPEG streaming capabilities, either implementing the standard
USB API's, or the vendor class API's. There are even some devices that
support USB storage, 3G modem and Digital TV.

Some of those devices have some resources that are mutually exclusive.

For example, some Digital Cameras can provide either access to the stored
images, or can be used as webcams. Using them as webcams automatically
deletes all stored images from it. So, a properly implemented driver
should be returning -EBUSY (or -EPERM?) if someone tries to stream for
such devices if is there any pictures stored on it. Symmetrically,
accessing the stored pictures there should return -EBUSY if the device
is streaming.

Currently, the data access for Digital Cameras is implemented via libusb,
libgphoto and gvfs, while the streaming interface is implemented via
a gspca Kernel driver.

I know that this problem were somewhat solved for 3G modems, with the usage
of the userspace problem usb_modeswitch, and with some quirks for the USB
storage driver, but I'm not sure if such tricks will scale forever, as more
functions are seen on some USB devices.

So, if we have some time, maybe we could start some discussions about that
during the USB mini-summit.

It should be noticed that the media subsystem has currently similar problems 
on devices that provide both analog and digital TV, as some resources, like 
the tuner can't be used simultaneously by the two API's. This happens even
with PCI devices. So, maybe, in the end, we'll be writing some kernel library
for resource locking, but it would be good if we can have preliminary
discussions there, and let the final discussions to happen during KS/2011. 

What do you think?

Thanks!
Mauro

  parent reply	other threads:[~2011-08-04 22:22 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-10  0:21 USB mini-summit at LinuxCon Vancouver Sarah Sharp
2011-06-10  3:18 ` Greg KH
2011-06-10  6:59   ` Gerd Hoffmann
2011-06-10 19:48   ` Sarah Sharp
2011-06-10 20:50     ` Greg KH
2011-06-13 10:44       ` Alexander Graf
2011-06-13 16:29         ` Greg KH
2011-06-13 17:11           ` Alexander Graf
2011-06-10  7:19 ` Hans de Goede
2011-06-10  7:55 ` Improving kernel -> userspace (usbfs) usb device hand off Hans de Goede
2011-06-10  8:22   ` Felipe Balbi
2011-06-10  8:36     ` Hans de Goede
2011-06-10  8:42       ` Felipe Balbi
2011-06-10 12:19         ` Hans de Goede
2011-06-10 12:28           ` Felipe Balbi
2011-06-10 14:48   ` Alan Stern
2011-06-10 15:07     ` Mauro Carvalho Chehab
2011-06-10 15:21       ` Alan Stern
2011-06-11  9:15     ` Hans de Goede
2011-06-11 16:19       ` Theodore Kilgore
2011-06-12 11:43         ` Hans de Goede
2011-06-12 21:20           ` Theodore Kilgore
2011-06-13  2:03             ` Xiaofan Chen
2011-06-13  2:27               ` [Libusb-devel] " Michael Bender
2011-06-11 16:57       ` Alan Stern
2011-06-10 18:16   ` Theodore Kilgore
2011-06-10 18:34     ` Felipe Balbi
2011-06-10 21:18       ` Alan Stern
2011-06-10 21:46         ` Felipe Balbi
2011-06-10 22:46         ` Theodore Kilgore
2011-06-10 22:43       ` Theodore Kilgore
2011-06-11  1:30         ` Xiaofan Chen
2011-06-11  4:17           ` Theodore Kilgore
2011-06-13  9:05         ` Felipe Balbi
2011-06-13 13:06           ` Mauro Carvalho Chehab
2011-06-13 13:12             ` Felipe Balbi
2011-08-04 22:21 ` Mauro Carvalho Chehab [this message]
2011-08-04 22:56   ` USB mini-summit at LinuxCon Vancouver Greg KH
     [not found]     ` <CAA6KcBBZv7bvVxvEWOYL83igpNZHyzh=bcGxh6Dr5aKsvJK5Cg@mail.gmail.com>
2011-08-05  0:33       ` Mauro Carvalho Chehab
2011-08-05  2:56     ` Theodore Kilgore
2011-08-05  6:57     ` Oliver Neukum
2011-08-05 17:38       ` Theodore Kilgore
2011-08-05  7:45     ` Hans de Goede
2011-08-05  7:59       ` USB mini-summit at LinuxCon Vancouveroliver Oliver Neukum
2011-08-05  8:18         ` Hans de Goede
2011-08-05 13:07       ` USB mini-summit at LinuxCon Vancouver Mauro Carvalho Chehab
2011-08-08 17:58       ` Sarah Sharp
2011-08-08 18:23         ` Theodore Kilgore
2011-08-08 18:32           ` Sarah Sharp
2011-08-08 19:37         ` Mauro Carvalho Chehab
2011-08-09  7:52         ` Hans de Goede
2011-08-09 14:19           ` Alan Stern
2011-08-09 15:03             ` Marko Ristola
2011-08-09 19:57             ` Hans de Goede
2011-08-09 20:31               ` Adam Baker
2011-08-09 20:57                 ` Hans de Goede
2011-08-10  2:05                   ` Xiaofan Chen
2011-08-10 23:04                   ` Adam Baker
2011-08-11  8:14                     ` Hans de Goede
2011-08-09 23:05               ` Theodore Kilgore
2011-08-10 14:19               ` Alan Stern
2011-08-10 15:03                 ` Theodore Kilgore
2011-08-10 16:09                   ` Alan Stern
2011-08-10 18:33                     ` Theodore Kilgore
2011-08-10 19:39                       ` Hans Verkuil
2011-08-10 19:43                       ` Greg KH
2011-08-10 20:34                         ` Theodore Kilgore
2011-08-10 20:14                       ` Mauro Carvalho Chehab
2011-08-10 20:39                         ` Theodore Kilgore
2011-08-11  8:14                     ` Hans de Goede
2011-08-11 14:56                       ` Alan Stern
2011-08-11 15:13                         ` Mauro Carvalho Chehab
2011-08-11 15:25                           ` Alan Cox
2011-08-11 15:49                             ` Alan Stern
2011-08-11 20:01                               ` Theodore Kilgore
2011-08-11 20:32                                 ` Mauro Carvalho Chehab
2011-08-11 23:13                                   ` Theodore Kilgore
2011-08-12  7:16                                   ` Hans de Goede
2011-08-12 10:11                                   ` Alan Cox
2011-08-12  1:07                                 ` Alan Stern
2011-08-12  2:38                                   ` Theodore Kilgore
2011-08-11 15:44                           ` Alan Stern
2011-08-12  7:26                         ` Hans de Goede
2011-08-12 15:36                           ` Alan Stern
2011-08-09 17:10           ` Sarah Sharp

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=4E3B1B7B.2040501@infradead.org \
    --to=mchehab@infradead.org \
    --cc=Jes.Sorensen@redhat.com \
    --cc=agraf@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=balbi@ti.com \
    --cc=clemens@ladisch.de \
    --cc=greg@kroah.com \
    --cc=hdegoede@redhat.com \
    --cc=hector@marcansoft.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kilgota@banach.math.auburn.edu \
    --cc=kraxel@redhat.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=libusb-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@baker-net.org.uk \
    --cc=oliver@neukum.org \
    --cc=pbonzini@redhat.com \
    --cc=perex@perex.cz \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=stern@rowland.harvard.edu \
    --cc=tiwai@suse.de \
    /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