[Spice-devel] [PATCH v2] sndworker: add AudioVolume/AudioMute messages

Marc-André Lureau marcandre.lureau at gmail.com
Mon Jun 20 15:05:56 PDT 2011


hi

On Mon, Jun 20, 2011 at 11:53 PM, Christophe Fergeau
<cfergeau at redhat.com> wrote:
> Hi,
>
> On Mon, Jun 20, 2011 at 11:40:01PM +0200, Marc-André Lureau wrote:
>> These messages allow the guest to send the audio device volume to the
>> client. It uses an arbitrary scale of 16bits, which works good enough
>> for now.
>
> This adds this arbitrary scale to the protocol, is this scale "good enough"
> to be set in stone as is and be supported "forever"?

The resolution is 16 bits. qemu uses an internal scale of 8 bits. I
took 16bits, because that's enough for a PulseAudio 0..100% scale
(PA_VOLUME_NORM).

We can argue this is not really useful, AC97 uses scales of only 64
steps maximum. I don't know yet about the other devices (I have to
implement HDA at least)

So, the answer in short is that I don't know, but I know it can be
addressed later, for example when we use dB, which is way better for
emulated hw. But that needs even more work, I wanted the basics first.

>
>> @@ -193,7 +205,6 @@ static void snd_disconnect_channel(SndChannel *channel)
>>      channel->stream->watch = NULL;
>>      reds_stream_free(channel->stream);
>>      spice_marshaller_destroy(channel->send_data.marshaller);
>> -    free(channel);
>
> I haven't looked carefully at the whole patch, but this change seems out of
> place, does it really belong to this patch?

oops, I don't know why it's there.. Thanks will update the patch

-- 
Marc-André Lureau


More information about the Spice-devel mailing list