[Spice-devel] [PATCH] Implement sending audio to the client from a directory of FIFO queues

Alon Levy alevy at redhat.com
Tue Feb 12 09:48:16 PST 2013


Hi Andrew,

> This introduces a new Xorg.conf option, SpicePlaybackFIFODir, which
> will
> be monitored for files. The XSpice driver will mix and forward the
> audio
> data sent to those pipes to the Spice client.
> 
> This is designed to work with PulseAudio's module-pipe-sink, but
> should
> work with any audio output to a pipe. For example, use with this PA
> configuration option:
> 
>   load-module module-pipe-sink file=$FIFO_DIR/playback.fifo
>   format=s16 rate=44100 channels=2
> 
> making sure the format, rate, and channels match the Spice protocol
> settings.
> ---
> 
> A couple of small concerns worth talking about:
> 
> 1) The code starts up a new thread to do the mixing. Could we run
> into
> concurrency issues with mode switching, or during teardown? Doesn't
> seem to have been a problem in practice.

I don't know.

> 
> 2) There doesn't seem to be much teardown code in the QXL driver, so
> the audio thread effectively never quits until the driver exits.
> 
> 3) I disabled the CELT compression because it corrupted the audio. I
> guess CELT support may not be long for this world, so I didn't look
> further into it. That means data is sent over the pipe raw.

It's fine, raw audio > no audio, can always fix this later. And we all want Opus, but I don't see anyone working on it unfortunately.

About the patch itself, it will be much easier to review (and I do have some comments - the main one being coding standard, but also about the mixing) if you inline the patch - could you please? thanks,

Alon

> 
>  src/Makefile.am      |   2 +
>  src/qxl.h            |   6 +
>  src/qxl_driver.c     |  18 ++-
>  src/spiceqxl_audio.c | 318
>  +++++++++++++++++++++++++++++++++++++++++++++++++++
>  src/spiceqxl_audio.h |  31 +++++
>  5 files changed, 374 insertions(+), 1 deletion(-)
>  create mode 100644 src/spiceqxl_audio.c
>  create mode 100644 src/spiceqxl_audio.h
> 
> 
> 
> [Text
> Documents:0001-Implement-sending-audio-to-the-client-from-a-directo.patch]
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-patch
Size: 14867 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130212/9592075a/attachment-0001.bin>


More information about the Spice-devel mailing list