spice: add audio
PATCH 1/1 spice: add audio
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 ]
--- Makefile.objs | 1 + audio/audio.c | 3 + audio/audio_int.h | 1 + audio/spiceaudio.c | 327 ++++++++++++++++++++++++++++++++++++++++++++++++++++ ui/qemu-spice.h | 1 + ui/spice-core.c | 1 + 6 files changed, 334 insertions(+), 0 deletions(-) create mode 100644 audio/spiceaudio.c
Makefile.objs +1 -0
@@ -102,6 +102,7 @@ common-obj-$(CONFIG_SPICE) += ui/spice-core.o ui/spice-input.o ui/spice-display. audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o audio-obj-$(CONFIG_SDL) += sdlaudio.o audio-obj-$(CONFIG_OSS) += ossaudio.o +audio-obj-$(CONFIG_SPICE) += spiceaudio.o audio-obj-$(CONFIG_COREAUDIO) += coreaudio.o audio-obj-$(CONFIG_ALSA) += alsaaudio.o audio-obj-$(CONFIG_DSOUND) += dsoundaudio.o
audio/audio.c +3 -0
@@ -44,6 +44,9 @@that we generate the list. */ static struct audio_driver *drvtab[] = { +#ifdef CONFIG_SPICE + &spice_audio_driver, +#endifCONFIG_AUDIO_DRIVERS &no_audio_driver, &wav_audio_driver
audio/audio_int.h +1 -0
@@ -209,6 +209,7 @@ extern struct audio_driver coreaudio_audio_driver;extern struct audio_driver dsound_audio_driver;extern struct audio_driver esd_audio_driver;extern struct audio_driver pa_audio_driver; +extern struct audio_driver spice_audio_driver;extern struct audio_driver winwave_audio_driver;extern struct mixeng_volume nominal_volume;
audio/spiceaudio.c new file +327 -0
327 lines not on this page · raw message
ui/qemu-spice.h +1 -0
@@ -29,6 +29,7 @@ extern int using_spice;void qemu_spice_init (void );void qemu_spice_input_init (void ); +void qemu_spice_audio_init (void );void qemu_spice_display_init (DisplayState *ds);int qemu_spice_add_interface (SpiceBaseInstance *sin);
ui/spice-core.c +1 -0
@@ -361,6 +361,7 @@ void qemu_spice_init(void) using_spice =1 ;qemu_spice_input_init (); +qemu_spice_audio_init ();qemu_free (x509_key_file);qemu_free (x509_cert_file);
Signature · 1 line
1.7.1
Quoted 4 lines · Gerd Hoffmann
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.
Quoted 8 lines
The driver is first in the driver list, but the
can_be_defaultflag 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 usingQEMU_AUDIO_DRVworks in any case.[ v2: audio codestyle: add spaces before open parenthesis ] [ v2: add const to silence array ]
Is this somehow testable?
[..snip..]
Signature · 1 line
mailto:[email protected]
Quoted 12 lines · malc
Quoted 10 lines · Gerd Hoffmann
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_defaultflag 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 usingQEMU_AUDIO_DRVworks in any case.
Quoted 4 lines
Quoted 2 lines
[ 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
Quoted 33 lines · Gerd Hoffmann
Quoted 12 lines · malc
Quoted 10 lines · Gerd Hoffmann
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_defaultflag 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 usingQEMU_AUDIO_DRVworks in any case.Quoted 4 lines
Quoted 2 lines
[ 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 spiceYou 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).
Quoted 8 lines
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.
Signature · 1 line
mailto:[email protected]
malc
AppliedQuoted 10 lines · Gerd Hoffmann
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_defaultflag 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 usingQEMU_AUDIO_DRVworks in any case.
Applied.
[..snip..]
Signature · 1 line
mailto:[email protected]