From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQfcO-0006MO-BB for qemu-devel@nongnu.org; Sun, 29 May 2011 09:01:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQfcM-0003zQ-VJ for qemu-devel@nongnu.org; Sun, 29 May 2011 09:01:20 -0400 Received: from nm19-vm0.bullet.mail.ac4.yahoo.com ([98.139.53.212]:34309) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QQfcM-0003yi-SZ for qemu-devel@nongnu.org; Sun, 29 May 2011 09:01:18 -0400 Message-ID: <559799.53196.qm@web65313.mail.ac2.yahoo.com> Date: Sun, 29 May 2011 06:01:17 -0700 (PDT) From: Peter Baitz MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1031272390-1306674077=:53196" Subject: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --0-1031272390-1306674077=:53196 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello, I had asked a question of some of your Sourceforge contacts for KVM - Qemu = on addition of webcam support, specifically the following - and was given t= he following interesting answer.=A0=A0 I would indeed like to hear more abo= ut what the project is adding to KVM - Qemu to allow video to work with web= cams (currently I run Fedora 15 as host and Fedora 11 under KVM and while t= he webcam driver and video device shows up in the guest I get no video. Als= o there is confusion for me if the host is supposed to have its webcam driv= er loaded and device enabled or not).=20 I was told I could try to add a complete host controller to the guest, but = am not entirely sure I understand what that means?=A0 Looking for specifics= ?=A0 Is there a suggestion for doing this during install of the KVM guest, = or can this be done while the guest is running, or otherwise? Many thanks, Peter=20 ---------------------------------------------------------------------------= -------- > You need to ask to KVM guys. You should notice that it is not just adding > ISOC and USB 2.0 support, but also to prioritize the processing of isoc > packets on a virtual environment, and to provide enough throughput for > video streams > > Can you tell me if KVM will be implementing Webcam support as > described above - the components missing that need to be > implemented for webcams to work - in any upcoming version of KVM ? It's work in progress, but not by me. Please check the qemu-devel mailing l= ist archive, specifically regarding recent discussions about EHCI (USB 2.0)= . Some of those threads address isochronous transfer as well. In the meantime, you could also try to assign a complete host controller to= the guest to get a webcam working. I tried this a while ago, though the re= sult was only moderately well working here. -------------------------------------------------- --0-1031272390-1306674077=:53196 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hello,

I had asked a question of some = of your Sourceforge contacts for KVM - Qemu on addition of webcam support, = specifically the following - and was given the following interesting answer= .   I would indeed like to hear more about what the project is ad= ding to KVM - Qemu to allow video to work with webcams (currently I run Fed= ora 15 as host and Fedora 11 under KVM and while the webcam driver and vide= o device shows up in the guest I get no video. Also there is confusion for = me if the host is supposed to have its webcam driver loaded and device enab= led or not).

I was told I could try to add a complete host controll= er to the guest, but am not entirely sure I understand what that means?&nbs= p; Looking for specifics?  Is there a suggestion for doing this during= install of the KVM guest, or can this be done while the guest is running, = or otherwise?

Many thanks,
Peter


----------------------= -------------------------------------------------------------
> You n= eed to ask to KVM guys. You should notice that it is not just adding
>= ; ISOC and USB 2.0 support, but also to prioritize the processing of isoc> packets on a virtual environment, and to provide enough throughput f= or
> video streams
>
> Can you tell me if KVM will be imp= lementing Webcam support as
> described above - the components missin= g that need to be
> implemented for webcams to work - in any upcoming= version of KVM ?

It's work in progress, but not by me. Please check= the qemu-devel mailing list archive, specifically regarding recent discuss= ions about EHCI (USB 2.0). Some of those threads address isochronous transf= er as well.

In the meantime, you could also try to assign a complete= host controller to the guest to get a webcam working. I tried this a while ago, though the result was only moderately well working here.
-= -------------------------------------------------

--0-1031272390-1306674077=:53196-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQgBK-0003yR-Vz for qemu-devel@nongnu.org; Sun, 29 May 2011 09:37:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQgBK-0000SO-7e for qemu-devel@nongnu.org; Sun, 29 May 2011 09:37:26 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:34543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQgBK-0000SB-1T for qemu-devel@nongnu.org; Sun, 29 May 2011 09:37:26 -0400 Message-Id: From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: <559799.53196.qm@web65313.mail.ac2.yahoo.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Sun, 29 May 2011 15:37:23 +0200 References: <559799.53196.qm@web65313.mail.ac2.yahoo.com> Sender: andreas.faerber@web.de Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Baitz Cc: QEMU Developers Hello, Am 29.05.2011 um 15:01 schrieb Peter Baitz: > >> [...] You should notice that it is not just adding >> ISOC and USB 2.0 support, but also to prioritize the processing of >> isoc >> packets on a virtual environment, and to provide enough throughput >> for >> video streams > > [...] Please check the qemu-devel mailing list archive, specifically > regarding recent discussions about EHCI (USB 2.0). Some of those > threads address isochronous transfer as well. > > In the meantime, you could also try to assign a complete host > controller to the guest to get a webcam working. I tried this a > while ago, though the result was only moderately well working here. > [...] I would indeed like to hear more about what the project is > adding to KVM - Qemu to allow video to work with webcams [...] > I was told I could try to add a complete host controller to the > guest, but am not entirely sure I understand what that means? > Looking for specifics? Is there a suggestion for doing this during > install of the KVM guest, or can this be done while the guest is > running, or otherwise? Independent of the ongoing EHCI work, I remember a patch specifically for webcams a while ago, try searching the archives for V4L. Andreas From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQgRB-0005Im-T9 for qemu-devel@nongnu.org; Sun, 29 May 2011 09:53:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQgRA-0002qu-H4 for qemu-devel@nongnu.org; Sun, 29 May 2011 09:53:49 -0400 Received: from 149.red-80-37-155.staticip.rima-tde.net ([80.37.155.149]:51608 helo=mail.claunia.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQgR9-0002qa-Kz for qemu-devel@nongnu.org; Sun, 29 May 2011 09:53:48 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: Natalia Portillo In-Reply-To: Date: Sun, 29 May 2011 14:53:40 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <559799.53196.qm@web65313.mail.ac2.yahoo.com> Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Andreas_F=E4rber?= Cc: Peter Baitz , QEMU Developers -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 More concretely search for patches sent by me. Even when EHCI is finished still is the problem of isochronous transfer = not working well because of timing issues on QEMU. My patches overcome the need for ISO transfer and EHCI controllers = completely, as well as providing an universal device to the guest that = works with every Windows >XP, every Linux and even Mac OS X. El 29/05/2011, a las 14:37, Andreas F=E4rber escribi=F3: > Hello, >=20 > Am 29.05.2011 um 15:01 schrieb Peter Baitz: >=20 >>=20 >>> [...] You should notice that it is not just adding >>> ISOC and USB 2.0 support, but also to prioritize the processing of = isoc >>> packets on a virtual environment, and to provide enough throughput = for >>> video streams >>=20 >> [...] Please check the qemu-devel mailing list archive, specifically = regarding recent discussions about EHCI (USB 2.0). Some of those threads = address isochronous transfer as well. >>=20 >> In the meantime, you could also try to assign a complete host = controller to the guest to get a webcam working. I tried this a while = ago, though the result was only moderately well working here. >=20 >> [...] I would indeed like to hear more about what the project is = adding to KVM - Qemu to allow video to work with webcams > [...] >> I was told I could try to add a complete host controller to the = guest, but am not entirely sure I understand what that means? Looking = for specifics? Is there a suggestion for doing this during install of = the KVM guest, or can this be done while the guest is running, or = otherwise? >=20 > Independent of the ongoing EHCI work, I remember a patch specifically = for webcams a while ago, try searching the archives for V4L. >=20 > Andreas -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org iF4EAREIAAYFAk3iT+QACgkQv/wfOsykIRTtxQD+KCTGZhuzrZMzmYDvY5NFO0+F QQwdE0aYVntQWpHMG5YBAJsFT5wd7/8FxOIt3aL1lwFqXtKc9y9TrrNog95gnoVh =3Dn0hn -----END PGP SIGNATURE----- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQgaW-00079H-9h for qemu-devel@nongnu.org; Sun, 29 May 2011 10:03:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQgaU-0003uw-JN for qemu-devel@nongnu.org; Sun, 29 May 2011 10:03:28 -0400 Received: from nm10-vm0.bullet.mail.ac4.yahoo.com ([98.139.53.194]:29495) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QQgaU-0003us-Bk for qemu-devel@nongnu.org; Sun, 29 May 2011 10:03:26 -0400 Message-ID: <654825.49014.qm@web65303.mail.ac2.yahoo.com> Date: Sun, 29 May 2011 07:03:25 -0700 (PDT) From: Peter Baitz In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1540096199-1306677805=:49014" Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Andreas_F=E4rber?= , Natalia Portillo Cc: QEMU Developers --0-1540096199-1306677805=:49014 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello Natalia and Andreas, Thank you for the replies and suggestions.=A0 I will lookup V4L.=A0=20 Natalia, So your patch creates a generic webcam under KVM/Qemu to allow many webcams= to work? My only concern is the following:=A0=A0 I use specific Philips webcams, and= one in particular has a long exposure modification that the PWC driver (Fe= dora 11 guest on Fedora 15 host) coupled with Qastrocam-G2 (v4.9) allows th= e "shutter" to remain open through USB control of the LED.=A0 If the guest = restorts to using a generic webcam driver, I think this would preclude func= tionality that the native driver supports ?=A0=20 Also, can you tell me - when KVM is running my guest, should the PWC webcam= driver be loaded and/or the /dev/video0 on the HOST (F15), versus the gues= t (F11) ?=A0=A0 I am confused as to which components are supposed to be ena= bled or disabled while running the guest webcam. =A0 What I see is when I e= nable the webcam USB device in KVM, it appears to disable the /dev/video0 o= n the host an brings it up in the guest. =A0 And the pwc driver loads and r= emains on both host and guest.=A0=20 Peter --- On Sun, 5/29/11, Natalia Portillo wrote: From: Natalia Portillo Subject: Re: [Qemu-devel] Webcams under KVM and Linux To: "Andreas F=E4rber" Cc: "Peter Baitz" , "QEMU Developers" = Date: Sunday, May 29, 2011, 1:53 PM -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 More concretely search for patches sent by me. Even when EHCI is finished still is the problem of isochronous transfer not= working well because of timing issues on QEMU. My patches overcome the need for ISO transfer and EHCI controllers complete= ly, as well as providing an universal device to the guest that works with e= very Windows >XP, every Linux and even Mac OS X. El 29/05/2011, a las 14:37, Andreas F=E4rber escribi=F3: > Hello, >=20 > Am 29.05.2011 um 15:01 schrieb Peter Baitz: >=20 >>=20 >>> [...] You should notice that it is not just adding >>> ISOC and USB 2.0 support, but also to prioritize the processing of isoc >>> packets on a virtual environment, and to provide enough throughput for >>> video streams >>=20 >> [...] Please check the qemu-devel mailing list archive, specifically reg= arding recent discussions about EHCI (USB 2.0). Some of those threads addre= ss isochronous transfer as well. >>=20 >> In the meantime, you could also try to assign a complete host controller= to the guest to get a webcam working. I tried this a while ago, though the= result was only moderately well working here. >=20 >> [...] I would indeed like to hear more about what the project is adding = to KVM - Qemu to allow video to work with webcams > [...] >> I was told I could try to add a complete host controller to the guest, b= ut am not entirely sure I understand what that means?=A0 Looking for specif= ics?=A0 Is there a suggestion for doing this during install of the KVM gues= t, or can this be done while the guest is running, or otherwise? >=20 > Independent of the ongoing EHCI work, I remember a patch specifically for= webcams a while ago, try searching the archives for V4L. >=20 > Andreas -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org iF4EAREIAAYFAk3iT+QACgkQv/wfOsykIRTtxQD+KCTGZhuzrZMzmYDvY5NFO0+F QQwdE0aYVntQWpHMG5YBAJsFT5wd7/8FxOIt3aL1lwFqXtKc9y9TrrNog95gnoVh =3Dn0hn -----END PGP SIGNATURE----- --0-1540096199-1306677805=:49014 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =
Hello Natalia and Andreas,

Thank you f= or the replies and suggestions.  I will lookup V4L. 

Nata= lia,

So your patch creates a generic webcam under KVM/Qemu to allow = many webcams to work?

My only concern is the following:   = I use specific Philips webcams, and one in particular has a long exposure m= odification that the PWC driver (Fedora 11 guest on Fedora 15 host) coupled= with Qastrocam-G2 (v4.9) allows the "shutter" to remain open through USB c= ontrol of the LED.  If the guest restorts to using a generic webcam dr= iver, I think this would preclude functionality that the native driver supp= orts ? 

Also, can you tell me - when KVM is running my guest, = should the PWC webcam driver be loaded and/or the /dev/video0 on the HOST (= F15), versus the guest (F11) ?   I am confused as to which components are supposed to be enabled or disabled while running the guest = webcam.   What I see is when I enable the webcam USB device in KVM, it= appears to disable the /dev/video0 on the host an brings it up in the gues= t.   And the pwc driver loads and remains on both host and guest. = ;

Peter


--- On Sun, 5/29/11, Natalia Portillo <= claunia@claunia.com> wrote:

From= : Natalia Portillo <claunia@claunia.com>
Subject: Re: [Qemu-devel]= Webcams under KVM and Linux
To: "Andreas F=E4rber" <andreas.faerber@= web.de>
Cc: "Peter Baitz" <ussenterprisencc1701@rocketmail.com>= , "QEMU Developers" <qemu-devel@nongnu.org>
Date: Sunday, May 29, = 2011, 1:53 PM

-----BEGIN PGP SIGNED MESSAGE= -----
Hash: SHA256

More concretely search for patches sent by me.

Even when EHCI is finished still is the problem of isochronous = transfer not working well because of timing issues on QEMU.

My patch= es overcome the need for ISO transfer and EHCI controllers completely, as w= ell as providing an universal device to the guest that works with every Win= dows >XP, every Linux and even Mac OS X.

El 29/05/2011, a las 14:= 37, Andreas F=E4rber escribi=F3:

> Hello,
>
> Am 29.= 05.2011 um 15:01 schrieb Peter Baitz:
>
>>
>>>= [...] You should notice that it is not just adding
>>> ISOC an= d USB 2.0 support, but also to prioritize the processing of isoc
>>= ;> packets on a virtual environment, and to provide enough throughput fo= r
>>> video streams
>>
>> [...] Please check= the qemu-devel mailing list archive, specifically regarding recent discuss= ions about EHCI (USB 2.0). Some of those threads address isochronous transfer as well.
>>
>> In the meantime, you could also= try to assign a complete host controller to the guest to get a webcam work= ing. I tried this a while ago, though the result was only moderately well w= orking here.
>
>> [...] I would indeed like to hear more ab= out what the project is adding to KVM - Qemu to allow video to work with we= bcams
> [...]
>> I was told I could try to add a complete ho= st controller to the guest, but am not entirely sure I understand what that= means?  Looking for specifics?  Is there a suggestion for doing = this during install of the KVM guest, or can this be done while the guest i= s running, or otherwise?
>
> Independent of the ongoing EHCI w= ork, I remember a patch specifically for webcams a while ago, try searching= the archives for V4L.
>
> Andreas

-----BEGIN PGP SIGNA= TURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtoo= ls.org

iF4EAREIAAYFAk3iT+QACgkQv/wfOsykIRTtxQD+KCTGZhuzrZMzmYDvY= 5NFO0+F
QQwdE0aYVntQWpHMG5YBAJsFT5wd7/8FxOIt3aL1lwFqXtKc9y9TrrNog95gnoVh=
=3Dn0hn
-----END PGP SIGNATURE-----
--0-1540096199-1306677805=:49014-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQzrs-00029g-Rd for qemu-devel@nongnu.org; Mon, 30 May 2011 06:38:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQzrr-00072e-VY for qemu-devel@nongnu.org; Mon, 30 May 2011 06:38:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQzrr-00072Z-Oh for qemu-devel@nongnu.org; Mon, 30 May 2011 06:38:39 -0400 Message-ID: <4DE373AB.2040100@redhat.com> Date: Mon, 30 May 2011 12:38:35 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <559799.53196.qm@web65313.mail.ac2.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: Peter Baitz , QEMU Developers Hi, >> I was told I could try to add a complete host controller to the guest, >> but am not entirely sure I understand what that means? Looking for >> specifics? Is there a suggestion for doing this during install of the >> KVM guest, or can this be done while the guest is running, or otherwise? > > Independent of the ongoing EHCI work, I remember a patch specifically > for webcams a while ago, try searching the archives for V4L. Latest master (aka upcoming 0.15) has a bunch of iso xfer fixes merged and using usb 1.1 webcams with usb-host should work reasonable well. Using usb 2.0 cams with usb-host obviously depend on upcoming EHCI for usb 2.0 support. There are also some glitches not tracked down yet. The usb 2.0 cam in built into my Lenovo T500 starts streaming but stops quickly (after 1-2 frames) for not-yet known reasons. I think people are also working on camera emulation, i.e. pass any (even non-usb) v4l devices as usb webcam to the guest. No idea what the status here is. cheers, Gerd From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QR1vW-0004yu-5v for qemu-devel@nongnu.org; Mon, 30 May 2011 08:50:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QR1vU-0002qr-Ai for qemu-devel@nongnu.org; Mon, 30 May 2011 08:50:34 -0400 Received: from 149.red-80-37-155.staticip.rima-tde.net ([80.37.155.149]:62526 helo=mail.claunia.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QR1vS-0002qj-3d for qemu-devel@nongnu.org; Mon, 30 May 2011 08:50:32 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha256; boundary="Apple-Mail-58--112374352" From: Natalia Portillo In-Reply-To: <654825.49014.qm@web65303.mail.ac2.yahoo.com> Date: Mon, 30 May 2011 13:50:23 +0100 Message-Id: References: <654825.49014.qm@web65303.mail.ac2.yahoo.com> Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Baitz Cc: =?iso-8859-1?Q?Andreas_F=E4rber?= , QEMU Developers , Hoffmann Gerd This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-58--112374352 Content-Type: multipart/alternative; boundary=Apple-Mail-57--112374400 --Apple-Mail-57--112374400 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Exactly what my webcam does is: Takes a frame from ANY available V4L2 device (/dev/video0), caches it, = and sends it completely to the guest before requesting any other frame. With this way you need your host driver loaded, but you will get never a = blackout. What it happens is a thing commonly known in game emulators (like for = example ePSX) as framedrop, that is, you get a slower framerate but not = blackouts. The guest sees a common USB Video Class Device webcam with no controls = (this can be enhanced easily), so basically you cannot change any = parameter. However all the webcams I tested automatically managed that in the = firmware with no intervention from any of the drivers (host or guest), = changing white balance and brightness to the adequate values. You can see it working without KVM in: http://www.youtube.com/watch?v=3D_Yo9TWPDXCo http://www.youtube.com/watch?v=3DfzGYvjZzx6E The webcam emulation works with TCG (without KVM), albeit slower, enough = to do videoconference because of the following: Using direct connection method (USB passthrough) even when the ISO xfers = and ECHI 2.0 are completely emulated will always find the following: the = host is faster than the guest, so the real webcam will always be = streaming faster than the guest can process it. Frames are sent in pieces, and if the frame does not arrive completely = from start to end on all pieces the guest will blackout, and continue = black until it receives a complete frame. With fast webcams, like 60 fps ones, this will happen so commonly that = there will be no image at all. You can easily see this in VMWare, Parallels or VirtualBox, all of them = emulate ISO xfers and EHCI 2.0 and when using a webcam it's not really = practical. Framedrop prevents that. =46rom the 60 frames sent in a second by the = host, if the guest can process only 10, it will receive 10 complete = frames, and see the webcam as a 10fps one. That's atomic. Also my patch supports, as I already said, any V4L2 device including = webcams, DV cameras, TV tuners from any kind of interface be it = Firewire, USB, PCI, Serial, AGP, so on. El 29/05/2011, a las 15:03, Peter Baitz escribi=F3: > Hello Natalia and Andreas, >=20 > Thank you for the replies and suggestions. I will lookup V4L. =20 >=20 > Natalia, >=20 > So your patch creates a generic webcam under KVM/Qemu to allow many = webcams to work? >=20 > My only concern is the following: I use specific Philips webcams, = and one in particular has a long exposure modification that the PWC = driver (Fedora 11 guest on Fedora 15 host) coupled with Qastrocam-G2 = (v4.9) allows the "shutter" to remain open through USB control of the = LED. If the guest restorts to using a generic webcam driver, I think = this would preclude functionality that the native driver supports ? =20 >=20 > Also, can you tell me - when KVM is running my guest, should the PWC = webcam driver be loaded and/or the /dev/video0 on the HOST (F15), versus = the guest (F11) ? I am confused as to which components are supposed to = be enabled or disabled while running the guest webcam. What I see is = when I enable the webcam USB device in KVM, it appears to disable the = /dev/video0 on the host an brings it up in the guest. And the pwc = driver loads and remains on both host and guest. =20 >=20 > Peter >=20 >=20 > --- On Sun, 5/29/11, Natalia Portillo wrote: >=20 > From: Natalia Portillo > Subject: Re: [Qemu-devel] Webcams under KVM and Linux > To: "Andreas F=E4rber" > Cc: "Peter Baitz" , "QEMU = Developers" > Date: Sunday, May 29, 2011, 1:53 PM >=20 > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 >=20 > More concretely search for patches sent by me. >=20 > Even when EHCI is finished still is the problem of isochronous = transfer not working well because of timing issues on QEMU. >=20 > My patches overcome the need for ISO transfer and EHCI controllers = completely, as well as providing an universal device to the guest that = works with every Windows >XP, every Linux and even Mac OS X. >=20 > El 29/05/2011, a las 14:37, Andreas F=E4rber escribi=F3: >=20 > > Hello, > >=20 > > Am 29.05.2011 um 15:01 schrieb Peter Baitz: > >=20 > >>=20 > >>> [...] You should notice that it is not just adding > >>> ISOC and USB 2.0 support, but also to prioritize the processing of = isoc > >>> packets on a virtual environment, and to provide enough throughput = for > >>> video streams > >>=20 > >> [...] Please check the qemu-devel mailing list archive, = specifically regarding recent discussions about EHCI (USB 2.0). Some of = those threads address isochronous transfer as well. > >>=20 > >> In the meantime, you could also try to assign a complete host = controller to the guest to get a webcam working. I tried this a while = ago, though the result was only moderately well working here. > >=20 > >> [...] I would indeed like to hear more about what the project is = adding to KVM - Qemu to allow video to work with webcams > > [...] > >> I was told I could try to add a complete host controller to the = guest, but am not entirely sure I understand what that means? Looking = for specifics? Is there a suggestion for doing this during install of = the KVM guest, or can this be done while the guest is running, or = otherwise? > >=20 > > Independent of the ongoing EHCI work, I remember a patch = specifically for webcams a while ago, try searching the archives for = V4L. > >=20 > > Andreas >=20 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG/MacGPG2 v2.0.17 (Darwin) > Comment: GPGTools - http://gpgtools.org >=20 > iF4EAREIAAYFAk3iT+QACgkQv/wfOsykIRTtxQD+KCTGZhuzrZMzmYDvY5NFO0+F > QQwdE0aYVntQWpHMG5YBAJsFT5wd7/8FxOIt3aL1lwFqXtKc9y9TrrNog95gnoVh > =3Dn0hn > -----END PGP SIGNATURE----- --Apple-Mail-57--112374400 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 http://www.youtube.c= om/watch?v=3D_Yo9TWPDXCo

The webcam = emulation works with TCG (without KVM), albeit slower, enough to do = videoconference because of the following:

Using = direct connection method (USB passthrough) even when the ISO xfers and = ECHI 2.0 are completely emulated will always find the following: the = host is faster than the guest, so the real webcam will always be = streaming faster than the guest can process it.
Frames are = sent in pieces, and if the frame does not arrive completely from start = to end on all pieces the guest will blackout, and continue black until = it receives a complete frame.

With fast = webcams, like 60 fps ones, this will happen so commonly that there will = be no image at all.

You can easily see this in = VMWare, Parallels or VirtualBox, all of them emulate ISO xfers and EHCI = 2.0 and when using a webcam it's not really = practical.

Framedrop prevents that. =46rom the = 60 frames sent in a second by the host, if the guest can process only = 10, it will receive 10 complete frames, and see the webcam as a 10fps = one.
That's atomic.

Also my patch = supports, as I already said, any V4L2 device including webcams, DV = cameras, TV tuners from any kind of interface be it Firewire, USB, PCI, = Serial, AGP, so on.

El 29/05/2011, a las 15:03, = Peter Baitz escribi=F3:

Hello Natalia and = Andreas,

Thank you for the replies and suggestions.  I will = lookup V4L. 

Natalia,

So your patch creates a = generic webcam under KVM/Qemu to allow many webcams to work?

My = only concern is the following:   I use specific Philips = webcams, and one in particular has a long exposure modification that the = PWC driver (Fedora 11 guest on Fedora 15 host) coupled with Qastrocam-G2 = (v4.9) allows the "shutter" to remain open through USB control of the = LED.  If the guest restorts to using a generic webcam driver, I = think this would preclude functionality that the native driver supports = ? 

Also, can you tell me - when KVM is running my guest, = should the PWC webcam driver be loaded and/or the /dev/video0 on the = HOST (F15), versus the guest (F11) ?   I am confused as to = which components are supposed to be enabled or disabled while running the = guest webcam.   What I see is when I enable the webcam USB device = in KVM, it appears to disable the /dev/video0 on the host an brings it = up in the guest.   And the pwc driver loads and remains on both = host and guest. 

Peter


--- On Sun, 5/29/11, = Natalia Portillo <claunia@claunia.com> = wrote:

From: Natalia Portillo <claunia@claunia.com>
Subject= : Re: [Qemu-devel] Webcams under KVM and Linux
To: "Andreas F=E4rber" = <andreas.faerber@web.de>
C= c: "Peter Baitz" <ussenterprisencc1701@r= ocketmail.com>, "QEMU Developers" <qemu-devel@nongnu.org>
Dat= e: Sunday, May 29, 2011, 1:53 PM

-----BEGIN PGP SIGNED MESSAGE-----
Hash: = SHA256

More concretely search for patches sent by me.

Even when EHCI is finished still is the problem of = isochronous transfer not working well because of timing issues on = QEMU.

My patches overcome the need for ISO transfer and EHCI = controllers completely, as well as providing an universal device to the = guest that works with every Windows >XP, every Linux and even Mac OS = X.

El 29/05/2011, a las 14:37, Andreas F=E4rber = escribi=F3:

> Hello,
>
> Am 29.05.2011 um 15:01 = schrieb Peter Baitz:
>
>>
>>> [...] You = should notice that it is not just adding
>>> ISOC and USB = 2.0 support, but also to prioritize the processing of = isoc
>>> packets on a virtual environment, and to provide = enough throughput for
>>> video streams
>> =
>> [...] Please check the qemu-devel mailing list archive, = specifically regarding recent discussions about EHCI (USB 2.0). Some of = those threads address isochronous transfer as well.
>>
>> In the meantime, you could = also try to assign a complete host controller to the guest to get a = webcam working. I tried this a while ago, though the result was only = moderately well working here.
>
>> [...] I would indeed = like to hear more about what the project is adding to KVM - Qemu to = allow video to work with webcams
> [...]
>> I was told I = could try to add a complete host controller to the guest, but am not = entirely sure I understand what that means?  Looking for = specifics?  Is there a suggestion for doing this during install of = the KVM guest, or can this be done while the guest is running, or = otherwise?
>
> Independent of the ongoing EHCI work, I = remember a patch specifically for webcams a while ago, try searching the = archives for V4L.
>
> Andreas

-----BEGIN PGP = SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org

iF4EAREIAAYFAk3iT+QACgkQv= /wfOsykIRTtxQD+KCTGZhuzrZMzmYDvY5NFO0+F
QQwdE0aYVntQWpHMG5YBAJsFT5wd7/8= FxOIt3aL1lwFqXtKc9y9TrrNog95gnoVh
=3Dn0hn
-----END PGP = SIGNATURE-----

= --Apple-Mail-57--112374400-- --Apple-Mail-58--112374352 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: Mensaje firmado digitalmente content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org iF4EAREIAAYFAk3jkpAACgkQv/wfOsykIRRaUgD8ChPlwUbcFFI9+YniHy+oQ+oE n+pgWEjysBDIxvBcEawBAIyhdb3V3IojU7yIQmRuTmG5isaexQwXDY3L663ZZ2Wt =N+08 -----END PGP SIGNATURE----- --Apple-Mail-58--112374352-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QR3td-0005qn-VH for qemu-devel@nongnu.org; Mon, 30 May 2011 10:56:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QR3td-0006qa-4y for qemu-devel@nongnu.org; Mon, 30 May 2011 10:56:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QR3tc-0006qV-Q5 for qemu-devel@nongnu.org; Mon, 30 May 2011 10:56:45 -0400 Message-ID: <4DE3B020.2010904@redhat.com> Date: Mon, 30 May 2011 16:56:32 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <654825.49014.qm@web65303.mail.ac2.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Natalia Portillo Cc: Peter Baitz , =?ISO-8859-1?Q?Andreas_F=E4rber?= , QEMU Developers On 05/30/11 14:50, Natalia Portillo wrote: > Exactly what my webcam does is: > > Takes a frame from ANY available V4L2 device (/dev/video0), caches it, > and sends it completely to the guest before requesting any other frame. I think you can double-buffer (i.e. let the host driver fill one buffer while sending the other one to the guest). Probably gives a slightly higher frame rate, but maybe at cost of added latencies. > The guest sees a common USB Video Class Device webcam with no controls > (this can be enhanced easily), so basically you cannot change any parameter. > However all the webcams I tested automatically managed that in the > firmware with no intervention from any of the drivers (host or guest), > changing white balance and brightness to the adequate values. Nice. Patches are waiting for EHCI being merged I guess? cheers, Gerd From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QR5Tp-00033H-VM for qemu-devel@nongnu.org; Mon, 30 May 2011 12:38:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QR5QU-0004lk-Af for qemu-devel@nongnu.org; Mon, 30 May 2011 12:34:48 -0400 Received: from nm30.bullet.mail.ac4.yahoo.com ([98.139.52.227]:32426) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QR5QU-0004ld-3C for qemu-devel@nongnu.org; Mon, 30 May 2011 12:34:46 -0400 Message-ID: <2522.8641.qm@web65305.mail.ac2.yahoo.com> Date: Mon, 30 May 2011 09:34:43 -0700 (PDT) From: Peter Baitz In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1313974051-1306773283=:8641" Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Natalia Portillo Cc: =?iso-8859-1?Q?Andreas_F=E4rber?= , QEMU Developers , Hoffmann Gerd --0-1313974051-1306773283=:8641 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Sounds great Natalia. Two things I'd like to let you all know. (1)=A0 I am using a VM guest because I need the slightly older pwc driver i= n Fedora 11 which works with long exposure mods - so that is why I was tryi= ng it in a VM.=A0=A0 If you use a generic or use the hosts pwc driver, it w= ill break certain things.=A0 That's why it's important the guest driver is = used for me anyway. (2) I tried this with VMware Player, and you will be happen to know, even t= hough the guest OS detected the pwc webcam and loaded the driver and the vi= deo device /dev/video0 and lsusb shows the Philips cam there, all video sof= tware tested reports it cannot find the video camera.=A0=A0=A0 Opposite of = this is KVM/Qemu which does all the same as described, but at least video s= oftware reports it finds the webcam, but no video at this time - since you = all are working on that.=A0=A0=A0=A0=A0 So KVM might be doing better in thi= s regard.=20 Peter --- On Mon, 5/30/11, Natalia Portillo wrote: From: Natalia Portillo Subject: Re: [Qemu-devel] Webcams under KVM and Linux To: "Peter Baitz" Cc: "Andreas F=E4rber" , "QEMU Developers" , "Hoffmann Gerd" Date: Monday, May 30, 2011, 12:50 PM Exactly what my webcam does is: Takes a frame from ANY available V4L2 device (/dev/video0), caches it, and = sends it completely to the guest before requesting any other frame. With this way you need your host driver loaded, but you will get never a bl= ackout. What it happens is a thing commonly known in game emulators (like for examp= le ePSX) as framedrop, that is, you get a slower framerate but not blackout= s. The guest sees a common USB Video Class Device webcam with no controls (thi= s can be enhanced easily), so basically you cannot change any parameter.How= ever all the webcams I tested automatically managed that in the firmware wi= th no intervention from any of the drivers (host or guest), changing white = balance and brightness to the adequate values. You can see it working without KVM in:http://www.youtube.com/watch?v=3D_Yo9= TWPDXCohttp://www.youtube.com/watch?v=3DfzGYvjZzx6E The webcam emulation works with TCG (without KVM), albeit slower, enough to= do videoconference because of the following: Using direct connection method (USB passthrough) even when the ISO xfers an= d ECHI 2.0 are completely emulated will always find the following: the host= is faster than the guest, so the real webcam will always be streaming fast= er than the guest can process it.Frames are sent in pieces, and if the fram= e does not arrive completely from start to end on all pieces the guest will= blackout, and continue black until it receives a complete frame. With fast webcams, like 60 fps ones, this will happen so commonly that ther= e will be no image at all. You can easily see this in VMWare, Parallels or VirtualBox, all of them emu= late ISO xfers and EHCI 2.0 and when using a webcam it's not really practic= al. Framedrop prevents that. From the 60 frames sent in a second by the host, i= f the guest can process only 10, it will receive 10 complete frames, and se= e the webcam as a 10fps one.That's atomic. Also my patch supports, as I already said, any V4L2 device including webcam= s, DV cameras, TV tuners from any kind of interface be it Firewire, USB, PC= I, Serial, AGP, so on. El 29/05/2011, a las 15:03, Peter Baitz escribi=F3: Hello Natalia and Andreas, Thank you for the replies and suggestions.=A0 I will lookup V4L.=A0=20 Natalia, So your patch creates a generic webcam under KVM/Qemu to allow many webcams= to work? My only concern is the following:=A0=A0 I use specific Philips webcams, and= one in particular has a long exposure modification that the PWC driver (Fe= dora 11 guest on Fedora 15 host) coupled with Qastrocam-G2 (v4.9) allows th= e "shutter" to remain open through USB control of the LED.=A0 If the guest = restorts to using a generic webcam driver, I think this would preclude func= tionality that the native driver supports ?=A0=20 Also, can you tell me - when KVM is running my guest, should the PWC webcam= driver be loaded and/or the /dev/video0 on the HOST (F15), versus the gues= t (F11) ?=A0=A0 I am confused as to which=0A components are supposed to be = enabled or disabled while running the guest webcam. =A0 What I see is when = I enable the webcam USB device in KVM, it appears to disable the /dev/video= 0 on the host an brings it up in the guest. =A0 And the pwc driver loads an= d remains on both host and guest.=A0=20 Peter --- On Sun, 5/29/11, Natalia Portillo wrote: From: Natalia Portillo Subject: Re: [Qemu-devel] Webcams under KVM and Linux To: "Andreas F=E4rber" Cc: "Peter Baitz" , "QEMU Developers" = Date: Sunday, May 29, 2011, 1:53 PM -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 More concretely search for patches sent by=0A me. Even when EHCI is finished still is the problem of isochronous transfer not= working well because of timing issues on QEMU. My patches overcome the need for ISO transfer and EHCI controllers complete= ly, as well as providing an universal device to the guest that works with e= very Windows >XP, every Linux and even Mac OS X. El 29/05/2011, a las 14:37, Andreas F=E4rber escribi=F3: > Hello, >=20 > Am 29.05.2011 um 15:01 schrieb Peter Baitz: >=20 >>=20 >>> [...] You should notice that it is not just adding >>> ISOC and USB 2.0 support, but also to prioritize the processing of isoc >>> packets on a virtual environment, and to provide enough throughput for >>> video streams >>=20 >> [...] Please check the qemu-devel mailing list archive, specifically reg= arding recent discussions about EHCI (USB 2.0). Some of those threads addre= ss isochronous=0A transfer as well. >>=20 >> In the meantime, you could also try to assign a complete host controller= to the guest to get a webcam working. I tried this a while ago, though the= result was only moderately well working here. >=20 >> [...] I would indeed like to hear more about what the project is adding = to KVM - Qemu to allow video to work with webcams > [...] >> I was told I could try to add a complete host controller to the guest, b= ut am not entirely sure I understand what that means?=A0 Looking for specif= ics?=A0 Is there a suggestion for doing this during install of the KVM gues= t, or can this be done while the guest is running, or otherwise? >=20 > Independent of the ongoing EHCI work, I remember a patch specifically for= webcams a while ago, try searching the archives for V4L. >=20 > Andreas -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment:=0A GPGTools - http://gpgtools.org iF4EAREIAAYFAk3iT+QACgkQv/wfOsykIRTtxQD+KCTGZhuzrZMzmYDvY5NFO0+F QQwdE0aYVntQWpHMG5YBAJsFT5wd7/8FxOIt3aL1lwFqXtKc9y9TrrNog95gnoVh =3Dn0hn -----END PGP SIGNATURE----- --0-1313974051-1306773283=:8641 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Sounds great Natalia.

Two things I'd l= ike to let you all know.

(1)  I am using a VM guest because I n= eed the slightly older pwc driver in Fedora 11 which works with long exposu= re mods - so that is why I was trying it in a VM.   If you use a = generic or use the hosts pwc driver, it will break certain things.  Th= at's why it's important the guest driver is used for me anyway.

(2) = I tried this with VMware Player, and you will be happen to know, even thoug= h the guest OS detected the pwc webcam and loaded the driver and the video = device /dev/video0 and lsusb shows the Philips cam there, all video softwar= e tested reports it cannot find the video camera.    Opposit= e of this is KVM/Qemu which does all the same as described, but at least vi= deo software reports it finds the webcam, but no video at this time - since you all are working on that.      So KVM might be= doing better in this regard.

Peter

--- On Mon, 5/30/11, = Natalia Portillo <claunia@claunia.com> wrote:

From: Natalia Portillo <claunia@claunia.com>
S= ubject: Re: [Qemu-devel] Webcams under KVM and Linux
To: "Peter Baitz" &= lt;ussenterprisencc1701@rocketmail.com>
Cc: "Andreas F=E4rber" <an= dreas.faerber@web.de>, "QEMU Developers" <qemu-devel@nongnu.org>, = "Hoffmann Gerd" <kraxel@redhat.com>
Date: Monday, May 30, 2011, 12= :50 PM

Exactly what my webcam does is:
=
Takes a frame from ANY available V4L2 device (/dev/video0), = caches it, and sends it completely to the guest before requesting any other= frame.

With this way you need your host driver loaded, but you will get never a blackout.

What i= t happens is a thing commonly known in game emulators (like for example ePS= X) as framedrop, that is, you get a slower framerate but not blackouts.

The guest sees a common USB Video Class Device webcam= with no controls (this can be enhanced easily), so basically you cannot ch= ange any parameter.
However all the webcams I tested automaticall= y managed that in the firmware with no intervention from any of the drivers= (host or guest), changing white balance and brightness to the adequate val= ues.

You can see it working without KVM in:
<= div>http://www.youtube.com/watch?v=3D_Yo9TWPDXCo
=

The webcam emulation = works with TCG (without KVM), albeit slower, enough to do videoconference b= ecause of the following:

Using direct connection m= ethod (USB passthrough) even when the ISO xfers and ECHI 2.0 are completely= emulated will always find the following: the host is faster than the guest= , so the real webcam will always be streaming faster than the guest can pro= cess it.
Frames are sent in pieces, and if the frame does not arr= ive completely from start to end on all pieces the guest will blackout, and= continue black until it receives a complete frame.

With fast webcams, like 60 fps ones, this will happen so commonly that th= ere will be no image at all.

You can easily see th= is in VMWare, Parallels or VirtualBox, all of them emulate ISO xfers and EHCI 2.0 and when using a webcam it's not really practical.

=
Framedrop prevents that. From the 60 frames sent in a second by = the host, if the guest can process only 10, it will receive 10 complete fra= mes, and see the webcam as a 10fps one.
That's atomic.
=
Also my patch supports, as I already said, any V4L2 device i= ncluding webcams, DV cameras, TV tuners from any kind of interface be it Fi= rewire, USB, PCI, Serial, AGP, so on.

El 29/05/2011= , a las 15:03, Peter Baitz escribi=F3:

Hello Natalia and Andreas,

Thank you for the replies and su= ggestions.  I will lookup V4L. 

Natalia,

So your p= atch creates a generic webcam under KVM/Qemu to allow many webcams to work?=

My only concern is the following:   I use specific Philips webcams,= and one in particular has a long exposure modification that the PWC driver= (Fedora 11 guest on Fedora 15 host) coupled with Qastrocam-G2 (v4.9) allow= s the "shutter" to remain open through USB control of the LED.  If the= guest restorts to using a generic webcam driver, I think this would preclu= de functionality that the native driver supports ? 

Also, can = you tell me - when KVM is running my guest, should the PWC webcam driver be= loaded and/or the /dev/video0 on the HOST (F15), versus the guest (F11) ?&= nbsp;  I am confused as to which=0A components are supposed to be enab= led or disabled while running the guest webcam.   What I see is when I= enable the webcam USB device in KVM, it appears to disable the /dev/video0= on the host an brings it up in the guest.   And the pwc driver loads = and remains on both host and guest. 

Peter


--- On <= b>Sun, 5/29/11, Natalia Portillo <claunia@claunia.com> wrote:

From: Natalia Portillo <claunia@claunia.com>
Subject: Re: [Qemu-devel] Webcams un= der KVM and Linux
To: "Andreas F=E4rber" <andreas.faerber@web.de>
Cc: "Peter Baitz" <
ussenterprisencc1701@rocketmail.com= >, "QEMU Developers" <qemu-devel@nongnu.org>
Date: Sunday, May 29, 2011, 1:53 PM
-----BEGIN PGP SIGNED MESSAGE---= --
Hash: SHA256

More concretely search for patches sent by=0A me.=

Even when EHCI is finished still is the problem of isochronous tran= sfer not working well because of timing issues on QEMU.

My patches o= vercome the need for ISO transfer and EHCI controllers completely, as well = as providing an universal device to the guest that works with every Windows= >XP, every Linux and even Mac OS X.

El 29/05/2011, a las 14:37, = Andreas F=E4rber escribi=F3:

> Hello,
>
> Am 29.05.2= 011 um 15:01 schrieb Peter Baitz:
>
>>
>>> [..= .] You should notice that it is not just adding
>>> ISOC and US= B 2.0 support, but also to prioritize the processing of isoc
>>>= ; packets on a virtual environment, and to provide enough throughput for>>> video streams
>>
>> [...] Please check the= qemu-devel mailing list archive, specifically regarding recent discussions= about EHCI (USB 2.0). Some of those threads address isochronous=0A transfe= r as well.
>>
>> In the meantime, you could also try to = assign a complete host controller to the guest to get a webcam working. I t= ried this a while ago, though the result was only moderately well working h= ere.
>
>> [...] I would indeed like to hear more about what= the project is adding to KVM - Qemu to allow video to work with webcams> [...]
>> I was told I could try to add a complete host contr= oller to the guest, but am not entirely sure I understand what that means?&= nbsp; Looking for specifics?  Is there a suggestion for doing this dur= ing install of the KVM guest, or can this be done while the guest is runnin= g, or otherwise?
>
> Independent of the ongoing EHCI work, I r= emember a patch specifically for webcams a while ago, try searching the arc= hives for V4L.
>
> Andreas

-----BEGIN PGP SIGNATURE----= -
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment:=0A GPGTools - http://gpgt= ools.org

iF4EAREIAAYFAk3iT+QACgkQv/wfOsykIRTtxQD+KCTGZhuzrZMzmYD= vY5NFO0+F
QQwdE0aYVntQWpHMG5YBAJsFT5wd7/8FxOIt3aL1lwFqXtKc9y9TrrNog95gno= Vh
=3Dn0hn
-----END PGP SIGNATURE-----

--0-1313974051-1306773283=:8641-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QR74H-0001DE-2b for qemu-devel@nongnu.org; Mon, 30 May 2011 14:20:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QR74F-0003r0-QA for qemu-devel@nongnu.org; Mon, 30 May 2011 14:19:57 -0400 Received: from 149.red-80-37-155.staticip.rima-tde.net ([80.37.155.149]:64792 helo=mail.claunia.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QR74E-0003qK-Rr for qemu-devel@nongnu.org; Mon, 30 May 2011 14:19:55 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: Natalia Portillo In-Reply-To: <4DE3B020.2010904@redhat.com> Date: Mon, 30 May 2011 19:19:47 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <654825.49014.qm@web65303.mail.ac2.yahoo.com> <4DE3B020.2010904@redhat.com> Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Peter Baitz , =?iso-8859-1?Q?Andreas_F=E4rber?= , QEMU Developers -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 El 30/05/2011, a las 15:56, Gerd Hoffmann escribi=F3: > On 05/30/11 14:50, Natalia Portillo wrote: >> Exactly what my webcam does is: >>=20 >> Takes a frame from ANY available V4L2 device (/dev/video0), caches = it, >> and sends it completely to the guest before requesting any other = frame. >=20 > I think you can double-buffer (i.e. let the host driver fill one = buffer while sending the other one to the guest). Probably gives a = slightly higher frame rate, but maybe at cost of added latencies. Indeed you can infinite-buffer it, but there is really no gain, the = added latency makes an effective lower frame rate (total number of real = frames seen by the guest in percentage) >> The guest sees a common USB Video Class Device webcam with no = controls >> (this can be enhanced easily), so basically you cannot change any = parameter. >> However all the webcams I tested automatically managed that in the >> firmware with no intervention from any of the drivers (host or = guest), >> changing white balance and brightness to the adequate values. >=20 > Nice. Patches are waiting for EHCI being merged I guess? Patches are on RFC on June 2010 ML messages. There are some updates I did to the emulation (internal conversion from = YUV2 to MJPEG, gives twice the framerate when the host webcam is YUV2 = only) that I have not sent to RFC yet. There are also some things that can be enhanced (conversion of more = strange RAWs like OV511's, show the guest the controls of the real = webcam) easily but I won't do that until a legal problem about the usage = of my emulation code along with all the rest of QEMU by a commercial = vendor in violation of GPL is solved. It works really well with USB 1.1 (up to 24fps with KVM, up to 10fps = with TCG), but your when EHCI is merged it will allow bigger resolutions = easily The most curious and interesting thing is that, while the specification = says there can be webcams using bulk transfers (that's what mine is = doing) I've seen NONE in wild. All do ISO. Peter about your exact problem you may have more luck requesting that = feature to the corresponding linux's driver maintainer. > cheers, > Gerd -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org iF4EAREIAAYFAk3j38QACgkQv/wfOsykIRQfjAEAgrl7eaK6qD4urzZCyGWEYoL2 yaEJbHEDybANWSOAVDkBALyMIVjvVCHzSq3wVH/8fh2Hc6Yp235PrMHduUzdC7Xj =3DpXPT -----END PGP SIGNATURE----- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QR9NX-0002cj-Iw for qemu-devel@nongnu.org; Mon, 30 May 2011 16:48:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QR9NW-0000w4-KF for qemu-devel@nongnu.org; Mon, 30 May 2011 16:47:59 -0400 Received: from ipmail06.adl6.internode.on.net ([150.101.137.145]:50392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QR9NW-0000vs-7P for qemu-devel@nongnu.org; Mon, 30 May 2011 16:47:58 -0400 From: Brad Hards Date: Tue, 31 May 2011 06:47:52 +1000 References: <559799.53196.qm@web65313.mail.ac2.yahoo.com> <4DE373AB.2040100@redhat.com> In-Reply-To: <4DE373AB.2040100@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105310647.52536.bradh@frogmouth.net> Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, claunia@claunia.com On Mon, 30 May 2011 08:38:35 pm Gerd Hoffmann wrote: > I think people are also working on camera emulation, i.e. pass any (even > non-usb) v4l devices as usb webcam to the guest. No idea what the > status here is. I have it in early development. Its far from complete - just enough for the software (e.g. cheese or uvcview on the guest) to believe that there really is a UVC device there and try to open it. I wasn't planning on being able to connect any V4L(2) device to the emulation. I was thinking more along the lines of a gstreamer output, or a fixed image, or a test pattern. Natalia: if possible, could you provide an overview of your work in this area? Brad From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRC3F-0005z7-IS for qemu-devel@nongnu.org; Mon, 30 May 2011 19:39:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRC3E-0005DR-8y for qemu-devel@nongnu.org; Mon, 30 May 2011 19:39:13 -0400 Received: from 149.red-80-37-155.staticip.rima-tde.net ([80.37.155.149]:50283 helo=mail.claunia.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRC3D-0005CV-83 for qemu-devel@nongnu.org; Mon, 30 May 2011 19:39:12 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: Natalia Portillo In-Reply-To: <201105310647.52536.bradh@frogmouth.net> Date: Tue, 31 May 2011 00:39:02 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <559799.53196.qm@web65313.mail.ac2.yahoo.com> <4DE373AB.2040100@redhat.com> <201105310647.52536.bradh@frogmouth.net> Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brad Hards Cc: qemu-devel@nongnu.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 El 30/05/2011, a las 21:47, Brad Hards escribi=F3: > On Mon, 30 May 2011 08:38:35 pm Gerd Hoffmann wrote: >> I think people are also working on camera emulation, i.e. pass any = (even >> non-usb) v4l devices as usb webcam to the guest. No idea what the >> status here is. > I have it in early development. Its far from complete - just enough = for the=20 > software (e.g. cheese or uvcview on the guest) to believe that there = really is=20 > a UVC device there and try to open it. >=20 > I wasn't planning on being able to connect any V4L(2) device to the = emulation.=20 > I was thinking more along the lines of a gstreamer output, or a fixed = image, or=20 > a test pattern. >=20 > Natalia: if possible, could you provide an overview of your work in = this area? The best should be for you to check for the patches I sent (june 2010 on = the ML) and enhance what is left to be done. Reinventing the wheel is non-sense. > Brad -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org iF4EAREIAAYFAk3kKpcACgkQv/wfOsykIRQ+OQEAurhvZGDv4j+ut50vT75PLF3R KGsAEBsBkgnP1c+De68A/R3RWheXXnBFSh2BCaTZYtykdYc8jVxCS76uFLWUDqRL =3DFs+h -----END PGP SIGNATURE----- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRD2J-00046p-FG for qemu-devel@nongnu.org; Mon, 30 May 2011 20:42:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRD2I-0005Yp-IX for qemu-devel@nongnu.org; Mon, 30 May 2011 20:42:19 -0400 Received: from smtpout3.three.com.au ([202.124.68.59]:30749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRD2I-0005Yl-82 for qemu-devel@nongnu.org; Mon, 30 May 2011 20:42:18 -0400 Received: from auumvs2fe01.three.com.au (auhgvpsmtp.three.com.au [10.176.77.86]) by smtpout3.three.com.au (Postfix) with ESMTP id 392429FEFB for ; Tue, 31 May 2011 10:42:15 +1000 (EST) Received: from saxicola.localnet ([10.170.163.81]) by auumvs2fe01.three.com.au with ESMTP id p4V0gmfq027220-p4V0gmfr027220 for ; Tue, 31 May 2011 10:42:49 +1000 From: Brad Hards Date: Tue, 31 May 2011 10:41:38 +1000 References: <559799.53196.qm@web65313.mail.ac2.yahoo.com> <201105310647.52536.bradh@frogmouth.net> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105311041.38827.bradh@frogmouth.net> Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Tue, 31 May 2011 09:39:02 AM Natalia Portillo wrote: > > Natalia: if possible, could you provide an overview of your work in this > > area? > > The best should be for you to check for the patches I sent (june 2010 on > the ML) and enhance what is left to be done. Sorry I wasn't clear. I'll try to ask more direct questions: 1. Are you still working in this area? 2. Do you have changes on top of the June 2010 set? 3. Would you like to review incremental patches relative to your changes, or should I just work independently? That is, do I send the changes to you or to Gerd? > Reinventing the wheel is non-sense. Thanks for the support :-( Brad From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRIxw-0006Kd-Jt for qemu-devel@nongnu.org; Tue, 31 May 2011 03:02:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRIxv-0007um-H3 for qemu-devel@nongnu.org; Tue, 31 May 2011 03:02:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRIxv-0007uZ-9f for qemu-devel@nongnu.org; Tue, 31 May 2011 03:02:11 -0400 Message-ID: <4DE49265.6010300@redhat.com> Date: Tue, 31 May 2011 09:01:57 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <654825.49014.qm@web65303.mail.ac2.yahoo.com> <4DE3B020.2010904@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Natalia Portillo Cc: Peter Baitz , =?ISO-8859-1?Q?Andreas_F=E4rber?= , QEMU Developers Hi, >>> Takes a frame from ANY available V4L2 device (/dev/video0), >>> caches it, and sends it completely to the guest before requesting >>> any other frame. >> >> I think you can double-buffer (i.e. let the host driver fill one >> buffer while sending the other one to the guest). Probably gives a >> slightly higher frame rate, but maybe at cost of added latencies. > > Indeed you can infinite-buffer it, but there is really no gain, the > added latency makes an effective lower frame rate (total number of > real frames seen by the guest in percentage) Just two buffers, so capture and sending to the guest can be parallelized. More buffers don't really help and just increase latency. >> Nice. Patches are waiting for EHCI being merged I guess? > > Patches are on RFC on June 2010 ML messages. There are some updates I > did to the emulation (internal conversion from YUV2 to MJPEG, gives > twice the framerate when the host webcam is YUV2 only) that I have > not sent to RFC yet. Can you repost the latest version for review so we can get the bits merged? > There are also some things that can be enhanced (conversion of more > strange RAWs like OV511's, show the guest the controls of the real > webcam) easily but I won't do that until a legal problem about the > usage of my emulation code along with all the rest of QEMU by a > commercial vendor in violation of GPL is solved. Thats fine, we can always add it later once the legal issues are sorted. > It works really well with USB 1.1 (up to 24fps with KVM, up to 10fps > with TCG), but your when EHCI is merged it will allow bigger > resolutions easily Great. > The most curious and interesting thing is that, while the > specification says there can be webcams using bulk transfers (that's > what mine is doing) I've seen NONE in wild. All do ISO. Using bulk certainly makes sense for a virtual device. cheers, Gerd