Index: trunk/Config.kmk
===================================================================
--- trunk/Config.kmk	(revision 6055)
+++ trunk/Config.kmk	(revision 6056)
@@ -218,4 +218,6 @@
 # Enable ALSA support for Linux
 VBOX_WITH_ALSA = 1
+# Enable Pulse support for Linux
+VBOX_WITH_PULSE = 1
 # Disable WINMM support for Windows (not implemented)
 VBOX_WITH_WINMM =
Index: trunk/src/VBox/Devices/Audio/alsaaudio.c
===================================================================
--- trunk/src/VBox/Devices/Audio/alsaaudio.c	(revision 6055)
+++ trunk/src/VBox/Devices/Audio/alsaaudio.c	(revision 6056)
@@ -179,4 +179,10 @@
         return SND_PCM_FORMAT_U16_LE;
 
+    case AUD_FMT_S32:
+        return SND_PCM_FORMAT_S32_LE;
+
+    case AUD_FMT_U32:
+        return SND_PCM_FORMAT_U32_LE;
+
     default:
         dolog ("Internal logic error: Bad audio format %d\n", fmt);
@@ -219,4 +225,24 @@
         *endianness = 1;
         *fmt = AUD_FMT_U16;
+        break;
+
+    case SND_PCM_FORMAT_S32_LE:
+        *endianness = 0;
+        *fmt = AUD_FMT_S32;
+        break;
+
+    case SND_PCM_FORMAT_U32_LE:
+        *endianness = 0;
+        *fmt = AUD_FMT_U32;
+        break;
+
+    case SND_PCM_FORMAT_S32_BE:
+        *endianness = 1;
+        *fmt = AUD_FMT_S32;
+        break;
+
+    case SND_PCM_FORMAT_U32_BE:
+        *endianness = 1;
+        *fmt = AUD_FMT_U32;
         break;
 
Index: trunk/src/VBox/Devices/Audio/audio.c
===================================================================
--- trunk/src/VBox/Devices/Audio/audio.c	(revision 6055)
+++ trunk/src/VBox/Devices/Audio/audio.c	(revision 6056)
@@ -68,4 +68,7 @@
     &alsa_audio_driver,
 #endif
+#ifdef VBOX_WITH_PULSE
+    &pulse_audio_driver,
+#endif
 #endif
 #ifdef RT_OS_DARWIN
@@ -258,4 +261,7 @@
         return "U16";
 
+    case AUD_FMT_U32:
+        return "U32";
+
     case AUD_FMT_S8:
         return "S8";
@@ -263,4 +269,7 @@
     case AUD_FMT_S16:
         return "S16";
+
+    case AUD_FMT_S32:
+        return "S32";
     }
 
@@ -280,4 +289,8 @@
         return AUD_FMT_U16;
     }
+    else if (!strcasecmp (s, "u32")) {
+        *defaultp = 0;
+        return AUD_FMT_U32;
+    }
     else if (!strcasecmp (s, "s8")) {
         *defaultp = 0;
@@ -287,4 +300,8 @@
         *defaultp = 0;
         return AUD_FMT_S16;
+    }
+    else if (!strcasecmp (s, "s32")) {
+        *defaultp = 0;
+        return AUD_FMT_S32;
     }
     else {
@@ -498,4 +515,6 @@
     case AUD_FMT_S16:
     case AUD_FMT_U16:
+    case AUD_FMT_S32:
+    case AUD_FMT_U32:
         break;
     default:
@@ -523,4 +542,10 @@
         bits = 16;
         break;
+
+    case AUD_FMT_S32:
+        sign = 1;
+    case AUD_FMT_U32:
+        bits = 32;
+        break;
     }
     return info->freq == as->freq
@@ -545,4 +570,10 @@
     case AUD_FMT_U16:
         bits = 16;
+        break;
+
+    case AUD_FMT_S32:
+        sign = 1;
+    case AUD_FMT_U32:
+        bits = 32;
         break;
     }
Index: trunk/src/VBox/Devices/Audio/audio.h
===================================================================
--- trunk/src/VBox/Devices/Audio/audio.h	(revision 6055)
+++ trunk/src/VBox/Devices/Audio/audio.h	(revision 6056)
@@ -39,5 +39,7 @@
     AUD_FMT_S8,
     AUD_FMT_U16,
-    AUD_FMT_S16
+    AUD_FMT_S16,
+    AUD_FMT_U32,
+    AUD_FMT_S32
 } audfmt_e;
 
Index: trunk/src/VBox/Devices/Audio/audio_int.h
===================================================================
--- trunk/src/VBox/Devices/Audio/audio_int.h	(revision 6055)
+++ trunk/src/VBox/Devices/Audio/audio_int.h	(revision 6056)
@@ -213,4 +213,5 @@
 extern struct audio_driver fmod_audio_driver;
 extern struct audio_driver alsa_audio_driver;
+extern struct audio_driver pulse_audio_driver;
 extern struct audio_driver coreaudio_audio_driver;
 extern struct audio_driver dsound_audio_driver;
Index: trunk/src/VBox/Devices/Makefile.kmk
===================================================================
--- trunk/src/VBox/Devices/Makefile.kmk	(revision 6055)
+++ trunk/src/VBox/Devices/Makefile.kmk	(revision 6056)
@@ -598,4 +598,11 @@
 endif
 
+ifdef VBOX_WITH_PULSE
+ Drivers_DEFS.linux   += VBOX_WITH_PULSE
+ Drivers_SOURCES.linux+= \
+	Audio/pulseaudio.c
+ VBoxDD_LIBS.linux    += pulse
+endif
+
 ifdef VBOX_WITH_USB
  Drivers_DEFS         += VBOX_WITH_USB IN_USB_R3
Index: trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 6055)
+++ trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 6056)
@@ -241,4 +241,7 @@
  VirtualBox_DEFS         += VBOX_WITH_ALSA
 endif
+ifdef VBOX_WITH_PULSE
+ VirtualBox_DEFS         += VBOX_WITH_PULSE
+endif
 ifdef VBOX_OSE
  VirtualBox_DEFS         += VBOX_OSE
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp	(revision 6055)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp	(revision 6056)
@@ -2181,4 +2181,6 @@
     audioDriverTypes [CEnums::CoreAudioDriver] =
         tr ("CoreAudio", "AudioDriverType");
+    audioDriverTypes [CEnums::PulseAudioDriver] =
+        tr ("PulseAudio", "AudioDriverType");
 
     networkAttachmentTypes [CEnums::NoNetworkAttachment] =
Index: trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h	(revision 6055)
+++ trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h	(revision 6056)
@@ -860,12 +860,15 @@
 #if defined Q_WS_WIN32
     cbAudioDriver->insertItem (vboxGlobal().toString (CEnums::DSOUNDAudioDriver));
-#ifdef VBOX_WITH_WINMM
+# ifdef VBOX_WITH_WINMM
     cbAudioDriver->insertItem (vboxGlobal().toString (CEnums::WINMMAudioDriver));
-#endif
+# endif
 #elif defined Q_OS_LINUX
     cbAudioDriver->insertItem (vboxGlobal().toString (CEnums::OSSAudioDriver));
-#ifdef VBOX_WITH_ALSA
+# ifdef VBOX_WITH_ALSA
     cbAudioDriver->insertItem (vboxGlobal().toString (CEnums::ALSAAudioDriver));
-#endif
+# endif
+# ifdef VBOX_WITH_PULSE
+    cbAudioDriver->insertItem (vboxGlobal().toString (CEnums::PulseAudioDriver));
+# endif
 #elif defined Q_OS_MACX
     cbAudioDriver->insertItem (vboxGlobal().toString (CEnums::CoreAudioDriver));
Index: trunk/src/VBox/Main/AudioAdapterImpl.cpp
===================================================================
--- trunk/src/VBox/Main/AudioAdapterImpl.cpp	(revision 6055)
+++ trunk/src/VBox/Main/AudioAdapterImpl.cpp	(revision 6056)
@@ -227,14 +227,17 @@
             case AudioDriverType_NullAudioDriver:
 #ifdef RT_OS_WINDOWS
-#ifdef VBOX_WITH_WINMM
+# ifdef VBOX_WITH_WINMM
             case AudioDriverType_WINMMAudioDriver:
-#endif
+# endif
             case AudioDriverType_DSOUNDAudioDriver:
 #endif /* RT_OS_WINDOWS */
 #ifdef RT_OS_LINUX
             case AudioDriverType_OSSAudioDriver:
-#ifdef VBOX_WITH_ALSA
+# ifdef VBOX_WITH_ALSA
             case AudioDriverType_ALSAAudioDriver:
-#endif
+# endif
+# ifdef VBOX_WITH_PULSE
+            case AudioDriverType_PulseAudioDriver:
+# endif
 #endif /* RT_OS_LINUX */
 #ifdef RT_OS_DARWIN
Index: trunk/src/VBox/Main/ConsoleImpl2.cpp
===================================================================
--- trunk/src/VBox/Main/ConsoleImpl2.cpp	(revision 6055)
+++ trunk/src/VBox/Main/ConsoleImpl2.cpp	(revision 6056)
@@ -1329,4 +1329,11 @@
             }
 # endif
+# ifdef VBOX_WITH_PULSE
+            case AudioDriverType_PulseAudioDriver:
+            {
+                rc = CFGMR3InsertString(pCfg, "AudioDriver", "pulse");                  RC_CHECK();
+                break;
+            }
+# endif
 #endif /* RT_OS_LINUX */
 #ifdef RT_OS_DARWIN
Index: trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- trunk/src/VBox/Main/MachineImpl.cpp	(revision 6055)
+++ trunk/src/VBox/Main/MachineImpl.cpp	(revision 6056)
@@ -4827,10 +4827,17 @@
             audioDriver = AudioDriverType_OSSAudioDriver;
         else if (driver == L"alsa")
-#ifdef VBOX_WITH_ALSA
+# ifdef VBOX_WITH_ALSA
             audioDriver = AudioDriverType_ALSAAudioDriver;
-#else
+# else
             /* fall back to OSS */
             audioDriver = AudioDriverType_OSSAudioDriver;
-#endif
+# endif
+        else if (driver == L"pulse")
+# ifdef VBOX_WITH_PULSE
+            audioDriver = AudioDriverType_PulseAudioDriver;
+# else
+            /* fall back to OSS */
+            audioDriver = AudioDriverType_OSSAudioDriver;
+# endif
 #endif // RT_OS_LINUX
 #ifdef RT_OS_DARWIN
@@ -6700,4 +6707,11 @@
             }
 # endif
+# ifdef VBOX_WITH_PULSE
+            case AudioDriverType_PulseAudioDriver:
+            {
+                CFGLDRSetString (adapterNode, "driver", "pulse");
+                break;
+            }
+# endif
             case AudioDriverType_OSSAudioDriver:
             {
Index: trunk/src/VBox/Main/Makefile.kmk
===================================================================
--- trunk/src/VBox/Main/Makefile.kmk	(revision 6055)
+++ trunk/src/VBox/Main/Makefile.kmk	(revision 6056)
@@ -119,4 +119,7 @@
 ifdef VBOX_WITH_ALSA
 VBoxSVC_DEFS += VBOX_WITH_ALSA
+endif
+ifdef VBOX_WITH_PULSE
+VBoxSVC_DEFS += VBOX_WITH_PULSE
 endif
 ifdef VBOX_WITH_WINMM
@@ -296,4 +299,7 @@
 VBoxC_DEFS += VBOX_WITH_ALSA
 endif
+ifdef VBOX_WITH_PULSE
+VBoxC_DEFS += VBOX_WITH_PULSE
+endif
 ifdef VBOX_WITH_WINMM
 VBoxC_DEFS += VBOX_WITH_WINMM
Index: trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 6055)
+++ trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 6056)
@@ -8607,4 +8607,5 @@
     <const name="CoreAudioDriver"   value="5"/>
     <const name="MMPMAudioDriver"   value="6"/>
+    <const name="PulseAudioDriver"  value="7"/>
   </enum>
 
Index: trunk/src/VBox/Main/xml/VirtualBox-settings-linux.xsd
===================================================================
--- trunk/src/VBox/Main/xml/VirtualBox-settings-linux.xsd	(revision 6055)
+++ trunk/src/VBox/Main/xml/VirtualBox-settings-linux.xsd	(revision 6056)
@@ -94,4 +94,5 @@
         <xsd:enumeration value="oss"/>
         <xsd:enumeration value="alsa"/>
+        <xsd:enumeration value="pulse"/>
       </xsd:restriction>
     </xsd:simpleType>
