From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NffAV-00051a-E9 for qemu-devel@nongnu.org; Thu, 11 Feb 2010 14:57:43 -0500 Received: from [199.232.76.173] (port=53056 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NffAV-00051N-3J for qemu-devel@nongnu.org; Thu, 11 Feb 2010 14:57:43 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NffAS-0000d0-E9 for qemu-devel@nongnu.org; Thu, 11 Feb 2010 14:57:42 -0500 Received: from mail-fx0-f222.google.com ([209.85.220.222]:50292) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NffAR-0000cl-Tc for qemu-devel@nongnu.org; Thu, 11 Feb 2010 14:57:40 -0500 Received: by fxm22 with SMTP id 22so1701734fxm.16 for ; Thu, 11 Feb 2010 11:57:37 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <12d708831002111107n2c8f61c9j70ffd777979d0858@mail.gmail.com> References: <12d708831002101540m1061cc8ag2e5d31c6d73f31c0@mail.gmail.com> <12d708831002102247n3438bf09h502d1f4050723f3d@mail.gmail.com> <12d708831002102303t777e6f83g563311cc0f9cf1a1@mail.gmail.com> <12d708831002111107n2c8f61c9j70ffd777979d0858@mail.gmail.com> Date: Thu, 11 Feb 2010 19:57:35 +0000 Message-ID: <12d708831002111157u7b7fbcc5sd761790ff18c6033@mail.gmail.com> Subject: Re: [Qemu-devel] Audio latency From: Alberich de megres Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: qemu-devel@nongnu.org Another interesting thing: on guest side, when i leave the screen quiet, for example just showing desktop with no animations at all (so there's no change in what should be drawed) things improve a lot of, and then i coudl hear a song perfectly. The screen is 1680x1050. the same thing happens when i low screen resolution to 800x600 Could be the emulated VGA graphic adapter latency? I suppose that i haven't 2D acceleration so CPU has to paint the screen everytime a change is done. On Thu, Feb 11, 2010 at 7:07 PM, Alberich de megres wrote: > On Thu, Feb 11, 2010 at 8:42 AM, malc wrote: >> On Thu, 11 Feb 2010, Alberich de megres wrote: >> >>> On Thu, Feb 11, 2010 at 7:53 AM, malc wrote: >>> > On Thu, 11 Feb 2010, Alberich de megres wrote: >>> > >>> >> I'm using the alsa driver. >>> >> Even I tried to change some values using the export and some flags >>> >> that -audio-help shows, but nothing significant. >>> > >>> > Please do not top post. >>> >>> Sorrry!! >>> >>> > >>> >> >>> >> >>> >> On Thu, Feb 11, 2010 at 1:03 AM, malc wrote: >>> >> > On Thu, 11 Feb 2010, Alberich de megres wrote: >>> >> > >>> >> >> Hi! >>> >> >> >>> >> >> I'm running qemu on suse, and i got a very high audio latency. Fo= r >>> >> >> example, using windows latency is about 4s and audio gets distort= ed >>> >> >> with little cuts. >>> > >>> > How do you measure it? >>> With a program called dpc latency, it's for windows. >>> >>> > >>> >> >> On the host side (suse), i changed the audio pci device latency t= o 99 >>> >> >> but this only improves a little bit. >>> > >>> > As in: with setpci? >>> Yes. I also tired, on host, to low latency to VGA to 10. >> >> That's completely unrelated latency [1] >> >>> > >>> >> >> Other thing i noticed is when lowering video resolution, the audi= o >>> >> >> latency gets better and better. >>> > >>> > Lowering video resolution of what? Guest, host? >>> >>> Yes, it was on guest. Even for example if i change the desktop or >>> switch to a text terminal when things works better what suggested me >>> that could be something with painting the screen. But i'm not shure if >>> its just only a side effect of a bad launch command, or something >>> else. >>> >>> > >>> >> >> I started played with source code, but i'm just a newbie on qemu. >>> >> >> Anyone can point some light to me please? >>> >> >> >>> >> >> thanks guys!! >>> >> > >>> >> > -audio-help is your friend, from there you can deduce (at the very= least) >>> >> > which audio driver your qemu uses. >>> >> > >>> > >>> > It would also help to know which version of QEMU you run and exactly = how >>> > you invoke it. >>> >>> You're right..sorry: >>> >>> qemu-kvm -cpu core2duo -smp 2 -m 1024 -hda /home/nine/imgs/hda1.img >>> -vga std =A0-usbdevice tablet >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-name t1 =A0-net nic,macaddr=3D55:54:00:= 12:34:56 -net >>> tap,ifname=3Dtap1,script=3Dno >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-soundhw ac97 >> >> I can't help you with kvm and windows, that said here are the things >> to try: >> =A0a. Vanilla qemu >> =A0b. No smp >> > The same thing. > When playing sounds, i get little cuts. > > >> And i'm not saying that those will help, just trying to collect more >> data points. >> >> P.S. 4 seconds of latency is sortof insane, especially given that >> =A0 =A0 default buffering for ALSA is nowhere near that, not by a >> =A0 =A0 longest shot. >> >> [1] http://www.reric.net/linux/pci_latency.html >> >> -- >> mailto:av1474@comtv.ru >> >