* [Qemu-devel] Emulate character device @ 2010-08-24 5:04 Thisara Rupasinghe 2010-08-24 7:16 ` Stefan Hajnoczi 0 siblings, 1 reply; 4+ messages in thread From: Thisara Rupasinghe @ 2010-08-24 5:04 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 466 bytes --] Hi all, I working on Android emulator and its based on the QEmu. And there I'm going to emulate camera using machines web cam. There I need to use machines character device "dev/vedio0" and stream that to the qemu environment. Therefore on the emulator that web cam stream will be available as the emulators character device "dev/video0". So how can I able to do that? I'm quite new to Qemu and please can anyone help me to do this? -- Thanks & Regards, Thisara. [-- Attachment #2: Type: text/html, Size: 535 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] Emulate character device 2010-08-24 5:04 [Qemu-devel] Emulate character device Thisara Rupasinghe @ 2010-08-24 7:16 ` Stefan Hajnoczi [not found] ` <AANLkTikNMtjAk4P01ro7rxN_unB_RP3MxMm3x_9ezAD2@mail.gmail.com> 0 siblings, 1 reply; 4+ messages in thread From: Stefan Hajnoczi @ 2010-08-24 7:16 UTC (permalink / raw) To: Thisara Rupasinghe; +Cc: qemu-devel On Tue, Aug 24, 2010 at 6:04 AM, Thisara Rupasinghe <thisarattr@gmail.com> wrote: > There I need to use machines > character device "dev/vedio0" and stream that to the qemu environment. > Therefore on the emulator that web cam stream will be available as the > emulators character device "dev/video0". So how can I able to do that? I'm > quite new to Qemu and please can anyone help me to do this? QEMU hardware emulation usually doesn't work at the Linux character device passthrough. In the source tree, look at hw/ which contains the emulated guest devices. These are emulated hardware devices that sit on busses like PCI, not Linux character device passthrough. For example, a real RTL8139 PCI network card is emulated. There is some support for USB device passthrough. If you have a USB webcam (even "internal" webcams are often USB) and Android supports USB webcams, then that might work. It really depends on what webcam devices the Android guest knows how to drive. QEMU either needs to pass through one of those devices or it needs hardware emulation so the guest thinks it is talking to a supported device. Stefan ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <AANLkTikNMtjAk4P01ro7rxN_unB_RP3MxMm3x_9ezAD2@mail.gmail.com>]
* Re: [Qemu-devel] Emulate character device [not found] ` <AANLkTikNMtjAk4P01ro7rxN_unB_RP3MxMm3x_9ezAD2@mail.gmail.com> @ 2010-08-24 9:13 ` Stefan Hajnoczi 2010-08-24 10:17 ` Thisara Rupasinghe 0 siblings, 1 reply; 4+ messages in thread From: Stefan Hajnoczi @ 2010-08-24 9:13 UTC (permalink / raw) To: Thisara Rupasinghe; +Cc: qemu-devel On Tue, Aug 24, 2010 at 10:02 AM, Thisara Rupasinghe <thisarattr@gmail.com> wrote: > Thank you very much for your information. > > That means i can pass web cam as usb device into the emulator. right? > If you can give me some directions, that will be very helpful. Please keep qemu-devel@nongnu.org CCed so others can help too. Passing a USB webcam into the Android guest would work if the Android OS has the required USB webcam driver. You could check the Android source tree or ask the developers to understand what webcam drivers are available. QEMU USB passthrough works like this: $ qemu -usb -usbdevice host:VVVV:DDDD Where VVVV is the vendor ID and DDDD is the product ID of the device. You can find these using lsusb(1) on the host. For example: $ lsusb Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 003: ID 413c:2003 Dell Computer Corp. Keyboard Bus 006 Device 002: ID 413c:3012 Dell Computer Corp. Optical Wheel Mouse If I want to pass through the keyboard, I use -usbdevice host:413c:2003. I haven't tested these steps, it's been a while since I used USB passthrough. For a full guide, try: http://bitbud.com/2008/08/09/usb-device-passthrough-under-kvm/ Stefan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] Emulate character device 2010-08-24 9:13 ` Stefan Hajnoczi @ 2010-08-24 10:17 ` Thisara Rupasinghe 0 siblings, 0 replies; 4+ messages in thread From: Thisara Rupasinghe @ 2010-08-24 10:17 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1514 bytes --] Thank you Stefan, I will work on this. Thanks for the support. On Tue, Aug 24, 2010 at 2:43 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote: > On Tue, Aug 24, 2010 at 10:02 AM, Thisara Rupasinghe > <thisarattr@gmail.com> wrote: > > Thank you very much for your information. > > > > That means i can pass web cam as usb device into the emulator. right? > > If you can give me some directions, that will be very helpful. > > Please keep qemu-devel@nongnu.org CCed so others can help too. > > Passing a USB webcam into the Android guest would work if the Android > OS has the required USB webcam driver. You could check the Android > source tree or ask the developers to understand what webcam drivers > are available. > > QEMU USB passthrough works like this: > $ qemu -usb -usbdevice host:VVVV:DDDD > > Where VVVV is the vendor ID and DDDD is the product ID of the device. > You can find these using lsusb(1) on the host. For example: > $ lsusb > Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub > Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub > Bus 006 Device 003: ID 413c:2003 Dell Computer Corp. Keyboard > Bus 006 Device 002: ID 413c:3012 Dell Computer Corp. Optical Wheel Mouse > > If I want to pass through the keyboard, I use -usbdevice host:413c:2003. > > I haven't tested these steps, it's been a while since I used USB > passthrough. For a full guide, try: > http://bitbud.com/2008/08/09/usb-device-passthrough-under-kvm/ > > Stefan > -- Thanks & Regards, Thisara. [-- Attachment #2: Type: text/html, Size: 2167 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-24 10:17 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-08-24 5:04 [Qemu-devel] Emulate character device Thisara Rupasinghe 2010-08-24 7:16 ` Stefan Hajnoczi [not found] ` <AANLkTikNMtjAk4P01ro7rxN_unB_RP3MxMm3x_9ezAD2@mail.gmail.com> 2010-08-24 9:13 ` Stefan Hajnoczi 2010-08-24 10:17 ` Thisara Rupasinghe
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).