From 4b2df53c087cd9df02d66686da40ae4f600f3904 Mon Sep 17 00:00:00 2001
Message-Id: <4b2df53c087cd9df02d66686da40ae4f600f3904.1358959439.git.minovotn@redhat.com>
From: Markus Armbruster <armbru@redhat.com>
Date: Wed, 23 Jan 2013 15:52:27 +0100
Subject: [PATCH 1/7] Revert "audio/spice: add support for volume control"

RH-Author: Markus Armbruster <armbru@redhat.com>
Message-id: <1358956353-15195-2-git-send-email-armbru@redhat.com>
Patchwork-id: 47666
O-Subject: [RHEL-6.4 PATCH qemu-kvm 1/7] Revert "audio/spice: add support for volume control"
Bugzilla: 884253
RH-Acked-by: Ademar de Souza Reis Jr. <areis@redhat.com>
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>

This reverts commit b5d4f54bfcdd5d6f587233887f0c76ddaf1ae4e8.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 audio/spiceaudio.c | 41 -----------------------------------------
 1 file changed, 41 deletions(-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 audio/spiceaudio.c | 41 -----------------------------------------
 1 file changed, 41 deletions(-)

diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c
index cb3f128..a5c0d6b 100644
--- a/audio/spiceaudio.c
+++ b/audio/spiceaudio.c
@@ -202,26 +202,7 @@ static int line_out_ctl (HWVoiceOut *hw, int cmd, ...)
         }
         spice_server_playback_stop (&out->sin);
         break;
-    case VOICE_VOLUME:
-        {
-#if ((SPICE_INTERFACE_PLAYBACK_MAJOR >= 1) && (SPICE_INTERFACE_PLAYBACK_MINOR >= 2))
-            SWVoiceOut *sw;
-            va_list ap;
-            uint16_t vol[2];
-
-            va_start (ap, cmd);
-            sw = va_arg (ap, SWVoiceOut *);
-            va_end (ap);
-
-            vol[0] = sw->vol.l / ((1ULL << 16) + 1);
-            vol[1] = sw->vol.r / ((1ULL << 16) + 1);
-            spice_server_playback_set_volume (&out->sin, 2, vol);
-            spice_server_playback_set_mute (&out->sin, sw->vol.mute);
-#endif
-            break;
-        }
     }
-
     return 0;
 }
 
@@ -323,26 +304,7 @@ static int line_in_ctl (HWVoiceIn *hw, int cmd, ...)
         in->active = 0;
         spice_server_record_stop (&in->sin);
         break;
-    case VOICE_VOLUME:
-        {
-#if ((SPICE_INTERFACE_RECORD_MAJOR >= 2) && (SPICE_INTERFACE_RECORD_MINOR >= 2))
-            SWVoiceIn *sw;
-            va_list ap;
-            uint16_t vol[2];
-
-            va_start (ap, cmd);
-            sw = va_arg (ap, SWVoiceIn *);
-            va_end (ap);
-
-            vol[0] = sw->vol.l / ((1ULL << 16) + 1);
-            vol[1] = sw->vol.r / ((1ULL << 16) + 1);
-            spice_server_record_set_volume (&in->sin, 2, vol);
-            spice_server_record_set_mute (&in->sin, sw->vol.mute);
-#endif
-            break;
-        }
     }
-
     return 0;
 }
 
@@ -375,9 +337,6 @@ struct audio_driver spice_audio_driver = {
     .max_voices_in  = 1,
     .voice_size_out = sizeof (SpiceVoiceOut),
     .voice_size_in  = sizeof (SpiceVoiceIn),
-#if ((SPICE_INTERFACE_PLAYBACK_MAJOR >= 1) && (SPICE_INTERFACE_PLAYBACK_MINOR >= 2))
-    .ctl_caps       = VOICE_VOLUME_CAP
-#endif
 };
 
 void qemu_spice_audio_init (void)
-- 
1.7.11.7

