Include the capability of volume sync to set volume or mute to default sink-input/source-output of guest. --- src/vdagentd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/vdagentd.c b/src/vdagentd.c index b5c7d14..652feff 100644 --- a/src/vdagentd.c +++ b/src/vdagentd.c @@ -40,6 +40,7 @@ #include "vdagentd-proto.h" #include "vdagentd-proto-strings.h" #include "vdagentd-uinput.h" +#include "vdagentd-audio.h" #include "vdagentd-xorg-conf.h" #include "vdagent-virtio-port.h" #include "session-info.h" @@ -101,6 +102,7 @@ static void send_capabilities(struct vdagent_virtio_port *vport, VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_SPARSE_MONITORS_CONFIG); VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_GUEST_LINEEND_LF); VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_MAX_CLIPBOARD); + VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_AUDIO_VOLUME_SYNC); vdagent_virtio_port_write(vport, VDP_CLIENT_PORT, VD_AGENT_ANNOUNCE_CAPABILITIES, 0, @@ -379,6 +381,18 @@ int virtio_port_read_complete( syslog(LOG_DEBUG, "Set max clipboard: %d", msg->max); max_clipboard = msg->max; break; + case VD_AGENT_AUDIO_VOLUME_SYNC: { + if (message_header->size < sizeof(VDAgentAudioVolumeSync)) + goto size_error; + + VDAgentAudioVolumeSync *msg = (VDAgentAudioVolumeSync *)data; + if (msg->is_playback) { + vdagent_audio_playback_sync(msg->mute, msg->nchannels, msg->volume); + } else { + vdagent_audio_record_sync(msg->mute, msg->nchannels, msg->volume); + } + break; + } default: syslog(LOG_WARNING, "unknown message type %d, ignoring", message_header->type); -- 2.1.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel