* [Qemu-devel] Re: [PATCH] spice: add audio
2010-11-09 16:29 [Qemu-devel] " Gerd Hoffmann
@ 2010-11-09 16:36 ` malc
2010-11-09 16:56 ` Gerd Hoffmann
2010-11-09 20:55 ` malc
1 sibling, 1 reply; 11+ messages in thread
From: malc @ 2010-11-09 16:36 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Tue, 9 Nov 2010, Gerd Hoffmann wrote:
> Add support for the spice audio interface. With this patch applied
> audio can be forwarded over the network from/to the spice client. Both
> recording and playback is supported.
>
> The driver is first in the driver list, but the can_be_default flag is
> set only in case spice is active. So if you have the spice protocol
> enabled the spice audio driver is the default one, otherwise whatever
> comes first after spice in the list. Overriding the default using
> QEMU_AUDIO_DRV works in any case.
>
> [ v2: audio codestyle: add spaces before open parenthesis ]
> [ v2: add const to silence array ]
Is this somehow testable?
[..snip..]
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Qemu-devel] Re: [PATCH] spice: add audio
2010-11-09 16:36 ` [Qemu-devel] " malc
@ 2010-11-09 16:56 ` Gerd Hoffmann
2010-11-09 17:35 ` malc
0 siblings, 1 reply; 11+ messages in thread
From: Gerd Hoffmann @ 2010-11-09 16:56 UTC (permalink / raw)
To: malc; +Cc: qemu-devel
On 11/09/10 17:36, malc wrote:
> On Tue, 9 Nov 2010, Gerd Hoffmann wrote:
>
>> Add support for the spice audio interface. With this patch applied
>> audio can be forwarded over the network from/to the spice client. Both
>> recording and playback is supported.
>>
>> The driver is first in the driver list, but the can_be_default flag is
>> set only in case spice is active. So if you have the spice protocol
>> enabled the spice audio driver is the default one, otherwise whatever
>> comes first after spice in the list. Overriding the default using
>> QEMU_AUDIO_DRV works in any case.
>>
>> [ v2: audio codestyle: add spaces before open parenthesis ]
>> [ v2: add const to silence array ]
>
> Is this somehow testable?
/me guesses there are no pre-built spice packages for your linux system,
so you have to build spice yourself. In short:
* Fetch, build + install celt, version 0.5.1 is needed.
* Fetch, build + install spice-protocol
* Fetch, build + install spice
You can download the bits from:
http://www.celt-codec.org/
http://www.spice-space.org/
With this in place you should be able to build qemu with spice support
(configure should detect it).
The add '-spice port=$number,disable-ticketing' to your qemu command
line. Start spice client (part of the spice package) this way:
spicec -h localhost -p $number
Note that spice doesn't work (yet) on bigendian machines, so don't try
that on your ppc box.
cheers,
Gerd
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Qemu-devel] Re: [PATCH] spice: add audio
2010-11-09 16:56 ` Gerd Hoffmann
@ 2010-11-09 17:35 ` malc
0 siblings, 0 replies; 11+ messages in thread
From: malc @ 2010-11-09 17:35 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Tue, 9 Nov 2010, Gerd Hoffmann wrote:
> On 11/09/10 17:36, malc wrote:
> > On Tue, 9 Nov 2010, Gerd Hoffmann wrote:
> >
> > > Add support for the spice audio interface. With this patch applied
> > > audio can be forwarded over the network from/to the spice client. Both
> > > recording and playback is supported.
> > >
> > > The driver is first in the driver list, but the can_be_default flag is
> > > set only in case spice is active. So if you have the spice protocol
> > > enabled the spice audio driver is the default one, otherwise whatever
> > > comes first after spice in the list. Overriding the default using
> > > QEMU_AUDIO_DRV works in any case.
> > >
> > > [ v2: audio codestyle: add spaces before open parenthesis ]
> > > [ v2: add const to silence array ]
> >
> > Is this somehow testable?
>
> /me guesses there are no pre-built spice packages for your linux system, so
> you have to build spice yourself. In short:
>
> * Fetch, build + install celt, version 0.5.1 is needed.
> * Fetch, build + install spice-protocol
> * Fetch, build + install spice
>
> You can download the bits from:
>
> http://www.celt-codec.org/
> http://www.spice-space.org/
>
> With this in place you should be able to build qemu with spice support
> (configure should detect it).
>
> The add '-spice port=$number,disable-ticketing' to your qemu command line.
> Start spice client (part of the spice package) this way:
>
> spicec -h localhost -p $number
>
> Note that spice doesn't work (yet) on bigendian machines, so don't try that on
> your ppc box.
>
Thanks.
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Qemu-devel] Re: [PATCH] spice: add audio
2010-11-09 16:29 [Qemu-devel] " Gerd Hoffmann
2010-11-09 16:36 ` [Qemu-devel] " malc
@ 2010-11-09 20:55 ` malc
1 sibling, 0 replies; 11+ messages in thread
From: malc @ 2010-11-09 20:55 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Tue, 9 Nov 2010, Gerd Hoffmann wrote:
> Add support for the spice audio interface. With this patch applied
> audio can be forwarded over the network from/to the spice client. Both
> recording and playback is supported.
>
> The driver is first in the driver list, but the can_be_default flag is
> set only in case spice is active. So if you have the spice protocol
> enabled the spice audio driver is the default one, otherwise whatever
> comes first after spice in the list. Overriding the default using
> QEMU_AUDIO_DRV works in any case.
>
Applied.
[..snip..]
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Re: [PATCH] spice: add audio
[not found] <20101109211021.45EC22A34D@zimbra14-e2.priv.proxad.net>
@ 2010-11-09 22:27 ` François Revol
2010-11-09 23:31 ` malc
2010-11-10 9:48 ` Gerd Hoffmann
0 siblings, 2 replies; 11+ messages in thread
From: François Revol @ 2010-11-09 22:27 UTC (permalink / raw)
To: qemu-devel
>
>> Add support for the spice audio interface. With this patch applied
>> audio can be forwarded over the network from/to the spice client. Both
>> recording and playback is supported.
>>
>> The driver is first in the driver list, but the can_be_default flag is
>> set only in case spice is active. So if you have the spice protocol
>> enabled the spice audio driver is the default one, otherwise whatever
>> comes first after spice in the list. Overriding the default using
>> QEMU_AUDIO_DRV works in any case.
>>
>
> Applied.
Seems there is more interest than twolame :^)
Now, if only VNC had standardized audio passthrough yet...
I guess I'd have to propose...
François.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Re: [PATCH] spice: add audio
2010-11-09 22:27 ` [Qemu-devel] Re: [PATCH] spice: add audio François Revol
@ 2010-11-09 23:31 ` malc
2010-11-10 9:48 ` Gerd Hoffmann
1 sibling, 0 replies; 11+ messages in thread
From: malc @ 2010-11-09 23:31 UTC (permalink / raw)
To: François Revol; +Cc: qemu-devel
On Tue, 9 Nov 2010, Fran?ois Revol wrote:
> >
> >> Add support for the spice audio interface. With this patch applied
> >> audio can be forwarded over the network from/to the spice client. Both
> >> recording and playback is supported.
> >>
> >> The driver is first in the driver list, but the can_be_default flag is
> >> set only in case spice is active. So if you have the spice protocol
> >> enabled the spice audio driver is the default one, otherwise whatever
> >> comes first after spice in the list. Overriding the default using
> >> QEMU_AUDIO_DRV works in any case.
> >>
> >
> > Applied.
>
> Seems there is more interest than twolame :^)
The main point is that this thing is unimplementable via wav driver or
audio capture support (none of those deals with recording).
>
> Now, if only VNC had standardized audio passthrough yet...
> I guess I'd have to propose...
>
> Fran?ois.
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Re: [PATCH] spice: add audio
2010-11-09 22:27 ` [Qemu-devel] Re: [PATCH] spice: add audio François Revol
2010-11-09 23:31 ` malc
@ 2010-11-10 9:48 ` Gerd Hoffmann
2010-11-10 10:36 ` Daniel P. Berrange
1 sibling, 1 reply; 11+ messages in thread
From: Gerd Hoffmann @ 2010-11-10 9:48 UTC (permalink / raw)
To: François Revol; +Cc: qemu-devel
Hi,
> Now, if only VNC had standardized audio passthrough yet...
> I guess I'd have to propose...
The qemu vnc server has support already, and I think Daniel (added to
Cc:) has some experimental patches for the gtk-vnc widget.
cheers,
Gerd
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Re: [PATCH] spice: add audio
2010-11-10 9:48 ` Gerd Hoffmann
@ 2010-11-10 10:36 ` Daniel P. Berrange
2010-11-10 11:37 ` Gerd Hoffmann
0 siblings, 1 reply; 11+ messages in thread
From: Daniel P. Berrange @ 2010-11-10 10:36 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: François Revol, qemu-devel
On Wed, Nov 10, 2010 at 10:48:39AM +0100, Gerd Hoffmann wrote:
> Hi,
>
> >Now, if only VNC had standardized audio passthrough yet...
> >I guess I'd have to propose...
>
> The qemu vnc server has support already, and I think Daniel (added to
> Cc:) has some experimental patches for the gtk-vnc widget.
Yes I do have patches, but I'm yet to get it to work reliably enough for
anyone to use for real. eg any time there are large frambuffer updates
due to, say, dragging a window around, audio will drop out. Until I can
prove that it is even semi-reliable I'm not going to include the code in
gtk-vnc, because I don't want to commit to supporting something that may
well be fundamentally broken/unusable for live audio playback.
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Re: [PATCH] spice: add audio
2010-11-10 10:36 ` Daniel P. Berrange
@ 2010-11-10 11:37 ` Gerd Hoffmann
2010-11-10 11:50 ` Daniel P. Berrange
0 siblings, 1 reply; 11+ messages in thread
From: Gerd Hoffmann @ 2010-11-10 11:37 UTC (permalink / raw)
To: Daniel P. Berrange; +Cc: François Revol, qemu-devel
On 11/10/10 11:36, Daniel P. Berrange wrote:
> On Wed, Nov 10, 2010 at 10:48:39AM +0100, Gerd Hoffmann wrote:
>> The qemu vnc server has support already, and I think Daniel (added to
>> Cc:) has some experimental patches for the gtk-vnc widget.
>
> Yes I do have patches, but I'm yet to get it to work reliably enough for
> anyone to use for real. eg any time there are large frambuffer updates
> due to, say, dragging a window around, audio will drop out. Until I can
> prove that it is even semi-reliable I'm not going to include the code in
> gtk-vnc, because I don't want to commit to supporting something that may
> well be fundamentally broken/unusable for live audio playback.
Do you know where the dropouts come from?
I think one issue are latencies within qemu. The qemu vnc server is
busy for a while when doing bulky screen updates and blocks other stuff
while it runs. I've seen dropouts with vnc + bulky screen updates too.
The smaller the audio buffers used by the device/guest are the more
visible this effect is. When enabling the threaded vnc server this
becomes alot better, did you try that?
Another problem might be the outgoing tcp pipeline being flooded with
screen updates, leading to high network latencies for the audio data as
vnc (unlike spice) sends everything over the same tcp connection.
Finally it could be gtk-vnc itself being busy with something and not
playing audio in a timely manner (not very likely IMHO).
cheers,
Gerd
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Re: [PATCH] spice: add audio
2010-11-10 11:37 ` Gerd Hoffmann
@ 2010-11-10 11:50 ` Daniel P. Berrange
2010-11-10 13:21 ` Gerd Hoffmann
0 siblings, 1 reply; 11+ messages in thread
From: Daniel P. Berrange @ 2010-11-10 11:50 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: François Revol, qemu-devel
On Wed, Nov 10, 2010 at 12:37:04PM +0100, Gerd Hoffmann wrote:
> On 11/10/10 11:36, Daniel P. Berrange wrote:
> >On Wed, Nov 10, 2010 at 10:48:39AM +0100, Gerd Hoffmann wrote:
> >>The qemu vnc server has support already, and I think Daniel (added to
> >>Cc:) has some experimental patches for the gtk-vnc widget.
> >
> >Yes I do have patches, but I'm yet to get it to work reliably enough for
> >anyone to use for real. eg any time there are large frambuffer updates
> >due to, say, dragging a window around, audio will drop out. Until I can
> >prove that it is even semi-reliable I'm not going to include the code in
> >gtk-vnc, because I don't want to commit to supporting something that may
> >well be fundamentally broken/unusable for live audio playback.
>
> Do you know where the dropouts come from?
Not entirely, it is still rather work in progress to debug it.
Part of the issues is that even QEMU + one of the standard
pulseaudio/alsa/sdl audio backends doesn't seem very reliable
to me, so I've not got a reliable benchmark to compare VNC
audio against. Just testing with mpg123 in the guest, audio
will often simply stop after a few seconds of playback to the
host.
> I think one issue are latencies within qemu. The qemu vnc server is
> busy for a while when doing bulky screen updates and blocks other stuff
> while it runs. I've seen dropouts with vnc + bulky screen updates too.
> The smaller the audio buffers used by the device/guest are the more
> visible this effect is. When enabling the threaded vnc server this
> becomes alot better, did you try that?
It looks like the threaded server is disabled by default, so I've
not been using it thus far. I'll give it a try though.
Is there a particular audio device that is considered to work 'best' ?
I've been using ac97 mostly, but if your new ICH6 device is thought
to be significantly better I'll try that instead.
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Re: [PATCH] spice: add audio
2010-11-10 11:50 ` Daniel P. Berrange
@ 2010-11-10 13:21 ` Gerd Hoffmann
0 siblings, 0 replies; 11+ messages in thread
From: Gerd Hoffmann @ 2010-11-10 13:21 UTC (permalink / raw)
To: Daniel P. Berrange; +Cc: François Revol, qemu-devel
On 11/10/10 12:50, Daniel P. Berrange wrote:
> On Wed, Nov 10, 2010 at 12:37:04PM +0100, Gerd Hoffmann wrote:
>> Do you know where the dropouts come from?
>
> Not entirely, it is still rather work in progress to debug it.
> Part of the issues is that even QEMU + one of the standard
> pulseaudio/alsa/sdl audio backends doesn't seem very reliable
> to me, so I've not got a reliable benchmark to compare VNC
> audio against.
Well, on a standard fedora install alsa ends up being routed to
pulseaudio anyway. Not sure what happens with SDL, I suspect it goes
via alsa to pulseaudio too.
So I've bothered with pulseaudio (and spice) only in my testing.
Came up with these patches for pulseaudio:
http://cgit.freedesktop.org/spice/qemu/log/?h=pulse
These patches make pulseaudio work alot better for me.
They are waiting to be reviewed by Fengguang right now.
> Just testing with mpg123 in the guest, audio
> will often simply stop after a few seconds of playback to the
> host.
Fedora 14 + rhythmbox works rock solid for me.
Win7 + media player works too but has dropouts now and then, I think
this is because win7 uses a very small dma buffer for the audio data. I
don't see the sound stopping altogether.
> Is there a particular audio device that is considered to work 'best' ?
> I've been using ac97 mostly, but if your new ICH6 device is thought
> to be significantly better I'll try that instead.
Naturally I'm testing with the new intel-hda device ;)
It has some advantages, for example it just got MSI support so it
doesn't has to share the IRQ line with other devices (when the guest
supports it). I think there is nothing which makes a major difference
compared to ac97. I don't know ac97 that well though.
cheers,
Gerd
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-11-10 13:21 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20101109211021.45EC22A34D@zimbra14-e2.priv.proxad.net>
2010-11-09 22:27 ` [Qemu-devel] Re: [PATCH] spice: add audio François Revol
2010-11-09 23:31 ` malc
2010-11-10 9:48 ` Gerd Hoffmann
2010-11-10 10:36 ` Daniel P. Berrange
2010-11-10 11:37 ` Gerd Hoffmann
2010-11-10 11:50 ` Daniel P. Berrange
2010-11-10 13:21 ` Gerd Hoffmann
2010-11-09 16:29 [Qemu-devel] " Gerd Hoffmann
2010-11-09 16:36 ` [Qemu-devel] " malc
2010-11-09 16:56 ` Gerd Hoffmann
2010-11-09 17:35 ` malc
2010-11-09 20:55 ` malc
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).