* Slow video output from webcam with qemu-xhci but smooth with usb-ehci
@ 2020-12-12 16:28 Diego Viola
2020-12-13 19:30 ` Diego Viola
2020-12-13 22:46 ` Diego Viola
0 siblings, 2 replies; 5+ messages in thread
From: Diego Viola @ 2020-12-12 16:28 UTC (permalink / raw)
To: qemu-devel
Hi,
I'm experiencing a lot of choppiness in the video output when I pass
through my USB webcam to the guest using qemu-xhci as follows:
qemu-system-x86_64 -enable-kvm -hda arch-zoom.qcow2 -m 4G -vga virtio
-device qemu-xhci,id=xhci -device
usb-host,bus=xhci.0,hostdevice=/dev/bus/usb/002/004
My webcam is:
Bus 002 Device 004: ID 04f2:b449 Chicony Electronics Co., Ltd Integrated Camera
I am using mpv /dev/video0 from the guest.
It works fine if I use usb-ehci instead, e.g.:
qemu-system-x86_64 -enable-kvm -hda arch-zoom.qcow2 -m 4G -vga virtio
-device usb-ehci,id=ehci -device
usb-host,bus=ehci.0,hostdevice=/dev/bus/usb/002/004
In this case, the video output from mpv /dev/video0 is not choppy.
My QEMU version is 5.2.0 -- I am running Arch Linux on the host and guest.
Any ideas please?
Thanks,
Diego
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Slow video output from webcam with qemu-xhci but smooth with usb-ehci
2020-12-12 16:28 Slow video output from webcam with qemu-xhci but smooth with usb-ehci Diego Viola
@ 2020-12-13 19:30 ` Diego Viola
2020-12-13 19:42 ` Diego Viola
2020-12-13 22:46 ` Diego Viola
1 sibling, 1 reply; 5+ messages in thread
From: Diego Viola @ 2020-12-13 19:30 UTC (permalink / raw)
To: qemu-devel
Not sure it's related but I'm seeing this on the guest now when I use
mpv --vo=drm on a tty:
[ 28.918606] xhci_hcd 0000:00:04.0: ERROR Transfer event TRB DMA ptr
not part of current TD ep_index 2 comp_code 13
[ 28.919816] xhci_hcd 0000:00:04.0: Looking for event-dma
000000012a8c7d80 trb-start 000000012a8c7d70 trb-end 000000012a8c7d70
seg-start 000000012a8c7000 seg-end 000000012a8c7ff0
[ 28.919818] xhci_hcd 0000:00:04.0: ERROR Transfer event TRB DMA ptr
not part of current TD ep_index 2 comp_code 13
[ 28.921019] xhci_hcd 0000:00:04.0: Looking for event-dma
000000012a8c7d90 trb-start 000000012a8c7d70 trb-end 000000012a8c7d70
seg-start 000000012a8c7000 seg-end 000000012a8c7ff0
[ 28.921023] xhci_hcd 0000:00:04.0: ERROR Transfer event TRB DMA ptr
not part of current TD ep_index 2 comp_code 13
[ 28.922203] xhci_hcd 0000:00:04.0: Looking for event-dma
000000012a8c7da0 trb-start 000000012a8c7d70 trb-end 000000012a8c7d70
seg-start 000000012a8c7000 seg-end 000000012a8c7ff0
Video is then a bit smoother.
Diego
On Sat, Dec 12, 2020 at 1:28 PM Diego Viola <diego.viola@gmail.com> wrote:
>
> Hi,
>
> I'm experiencing a lot of choppiness in the video output when I pass
> through my USB webcam to the guest using qemu-xhci as follows:
>
> qemu-system-x86_64 -enable-kvm -hda arch-zoom.qcow2 -m 4G -vga virtio
> -device qemu-xhci,id=xhci -device
> usb-host,bus=xhci.0,hostdevice=/dev/bus/usb/002/004
>
> My webcam is:
>
> Bus 002 Device 004: ID 04f2:b449 Chicony Electronics Co., Ltd Integrated Camera
>
> I am using mpv /dev/video0 from the guest.
>
> It works fine if I use usb-ehci instead, e.g.:
>
> qemu-system-x86_64 -enable-kvm -hda arch-zoom.qcow2 -m 4G -vga virtio
> -device usb-ehci,id=ehci -device
> usb-host,bus=ehci.0,hostdevice=/dev/bus/usb/002/004
>
> In this case, the video output from mpv /dev/video0 is not choppy.
>
> My QEMU version is 5.2.0 -- I am running Arch Linux on the host and guest.
>
> Any ideas please?
>
> Thanks,
> Diego
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Slow video output from webcam with qemu-xhci but smooth with usb-ehci
2020-12-13 19:30 ` Diego Viola
@ 2020-12-13 19:42 ` Diego Viola
0 siblings, 0 replies; 5+ messages in thread
From: Diego Viola @ 2020-12-13 19:42 UTC (permalink / raw)
To: qemu-devel
On Sun, Dec 13, 2020 at 4:30 PM Diego Viola <diego.viola@gmail.com> wrote:
>
> Not sure it's related but I'm seeing this on the guest now when I use
> mpv --vo=drm on a tty:
mpv --vo=drm /dev/video0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Slow video output from webcam with qemu-xhci but smooth with usb-ehci
2020-12-12 16:28 Slow video output from webcam with qemu-xhci but smooth with usb-ehci Diego Viola
2020-12-13 19:30 ` Diego Viola
@ 2020-12-13 22:46 ` Diego Viola
2020-12-17 20:24 ` Dr. David Alan Gilbert
1 sibling, 1 reply; 5+ messages in thread
From: Diego Viola @ 2020-12-13 22:46 UTC (permalink / raw)
To: qemu-devel
On Sat, Dec 12, 2020 at 1:28 PM Diego Viola <diego.viola@gmail.com> wrote:
>
> Hi,
>
> I'm experiencing a lot of choppiness in the video output when I pass
> through my USB webcam to the guest using qemu-xhci as follows:
>
> qemu-system-x86_64 -enable-kvm -hda arch-zoom.qcow2 -m 4G -vga virtio
> -device qemu-xhci,id=xhci -device
> usb-host,bus=xhci.0,hostdevice=/dev/bus/usb/002/004
>
> My webcam is:
>
> Bus 002 Device 004: ID 04f2:b449 Chicony Electronics Co., Ltd Integrated Camera
>
> I am using mpv /dev/video0 from the guest.
>
> It works fine if I use usb-ehci instead, e.g.:
>
> qemu-system-x86_64 -enable-kvm -hda arch-zoom.qcow2 -m 4G -vga virtio
> -device usb-ehci,id=ehci -device
> usb-host,bus=ehci.0,hostdevice=/dev/bus/usb/002/004
>
> In this case, the video output from mpv /dev/video0 is not choppy.
>
> My QEMU version is 5.2.0 -- I am running Arch Linux on the host and guest.
>
> Any ideas please?
>
> Thanks,
> Diego
OK, I just noticed that it's mostly at the beginning (when I first run
mpv) that the video is jerky/choppy, looks like mpv is still buffering
at that stage, after buffering gets to 99% the video is smoother (with
xhci).
Now I don't understand why buffering with ehci happens a lot faster/smoother.
Nevermind, not an issue after all.
Diego
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Slow video output from webcam with qemu-xhci but smooth with usb-ehci
2020-12-13 22:46 ` Diego Viola
@ 2020-12-17 20:24 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2020-12-17 20:24 UTC (permalink / raw)
To: Diego Viola, kraxel; +Cc: qemu-devel
* Diego Viola (diego.viola@gmail.com) wrote:
> On Sat, Dec 12, 2020 at 1:28 PM Diego Viola <diego.viola@gmail.com> wrote:
> >
> > Hi,
> >
> > I'm experiencing a lot of choppiness in the video output when I pass
> > through my USB webcam to the guest using qemu-xhci as follows:
> >
> > qemu-system-x86_64 -enable-kvm -hda arch-zoom.qcow2 -m 4G -vga virtio
> > -device qemu-xhci,id=xhci -device
> > usb-host,bus=xhci.0,hostdevice=/dev/bus/usb/002/004
> >
> > My webcam is:
> >
> > Bus 002 Device 004: ID 04f2:b449 Chicony Electronics Co., Ltd Integrated Camera
> >
> > I am using mpv /dev/video0 from the guest.
> >
> > It works fine if I use usb-ehci instead, e.g.:
> >
> > qemu-system-x86_64 -enable-kvm -hda arch-zoom.qcow2 -m 4G -vga virtio
> > -device usb-ehci,id=ehci -device
> > usb-host,bus=ehci.0,hostdevice=/dev/bus/usb/002/004
> >
> > In this case, the video output from mpv /dev/video0 is not choppy.
> >
> > My QEMU version is 5.2.0 -- I am running Arch Linux on the host and guest.
> >
> > Any ideas please?
> >
> > Thanks,
> > Diego
>
> OK, I just noticed that it's mostly at the beginning (when I first run
> mpv) that the video is jerky/choppy, looks like mpv is still buffering
> at that stage, after buffering gets to 99% the video is smoother (with
> xhci).
>
> Now I don't understand why buffering with ehci happens a lot faster/smoother.
I don't understand it either; but cc'ing in Gerd for his USB wisdom.
Dave
> Nevermind, not an issue after all.
>
> Diego
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-17 20:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-12 16:28 Slow video output from webcam with qemu-xhci but smooth with usb-ehci Diego Viola
2020-12-13 19:30 ` Diego Viola
2020-12-13 19:42 ` Diego Viola
2020-12-13 22:46 ` Diego Viola
2020-12-17 20:24 ` Dr. David Alan Gilbert
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).