ports/141630: [VirtualBox with PulseAudio don't work.
Noriyoshi Kawano
bowie at nrik.jp
Tue Dec 15 10:40:04 UTC 2009
>Number: 141630
>Category: ports
>Synopsis: [VirtualBox with PulseAudio don't work.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Tue Dec 15 10:40:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Noriyoshi Kawano
>Release: FreeBSD-9-CURRENT
>Organization:
>Environment:
FreeBSD brain.nrik.jp 9.0-CURRENT FreeBSD 9.0-CURRENT #20: Mon Dec 7 16:57:01
JST 2009 root at brain.nrik.jp:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
emulators/virtualbox(3.0.51.r22902_3) has an option called "PULSEAUDIO".
I validate it and did build, but pulseaudio support does not become effective.
I can choose only OSS or Null by the Audio setting of the virtual machine even
if I start GUI of VirtualBox. It is similar in VBoxManage.
Only in the case of Linux, it seems to become effective.
>How-To-Repeat:
1. install emulators/virtualbox with "PULSEAUDIO=on"
2. run VirutalBox
3. create VM
4. open audio setting screen
>Fix:
attach a patch.
Patch attached with submission follows:
Index: virtualbox/files/patch-configure
===================================================================
RCS file: /home/ncvs/ports/emulators/virtualbox/files/patch-configure,v
retrieving revision 1.2
diff -u -8 -p -r1.2 patch-configure
--- virtualbox/files/patch-configure 23 Oct 2009 14:29:50 -0000 1.2
+++ virtualbox/files/patch-configure 15 Dec 2009 07:38:55 -0000
@@ -1,20 +1,66 @@
---- configure.orgi 2009-05-31 13:43:50.000000000 +0200
-+++ configure 2009-05-31 13:45:47.000000000 +0200
+--- configure.orig 2009-09-03 23:05:43.000000000 +0900
++++ configure 2009-12-15 14:27:28.000000000 +0900
@@ -102,7 +102,7 @@
XSLTPROC="xsltproc"
GENISOIMAGE="genisoimage"
MKISOFS="mkisofs"
-LIBCRYPTO="-lcrypto"
+LIBCRYPTO="-lcrypto -lssl"
LIBPTHREAD="-lpthread"
LIBCAP="-lcap"
GSOAP=""
-@@ -1698,7 +1698,7 @@
+@@ -119,6 +119,8 @@
+ if [ "$OS" = "freebsd" ]; then
+ INCCURL="-I/usr/local/include"
+ LIBCURL="-L/usr/local/lib -lcurl"
++ INCPULSE="-I/usr/local/include"
++ LIBPULSE="-L/usr/local/lib"
+ else
+ INCCURL=""
+ LIBCURL="-lcurl"
+@@ -1176,7 +1178,7 @@
+ #endif
+ }
+ EOF
+- if test_compile "-lpulse" pulse pulse; then
++ if test_compile "$INCPULSE $LIBPULSE -lpulse" pulse pulse; then
+ test_execute
+ fi
+ }
+@@ -1768,7 +1770,7 @@
cat $ODIR.tmp_src.cc >> $LOG
echo "using the following command line:" >> $LOG
echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so" >> $LOG
- $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so >> $LOG 2>&1
+ $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so -pthread >> $LOG 2>&1
if [ $? -eq 0 ]; then
found=1
break
+@@ -2283,6 +2285,15 @@
+ [ $WITH_QT4 -eq 1 ] && check_qt4
+ [ $WITH_PYTHON -eq 1 ] && check_python
+
++# PulseAudio
++if [ "$OS" = "linux" -o "$OS" = "freebsd" ]; then
++ if [ $WITH_PULSE -eq 1 ]; then
++ check_pulse
++ else
++ cnf_append "VBOX_WITH_PULSE" ""
++ fi
++fi
++
+ # Linux-specific
+ if [ "$OS" = "linux" ]; then
+ # don't check for the static libstdc++ in the PUEL version as we build the
+@@ -2300,11 +2311,6 @@
+ else
+ cnf_append "VBOX_WITH_ALSA" ""
+ fi
+- if [ $WITH_PULSE -eq 1 ]; then
+- check_pulse
+- else
+- cnf_append "VBOX_WITH_PULSE" ""
+- fi
+ if [ $WITH_DBUS -eq 0 ]; then
+ cnf_append "VBOX_WITH_DBUS" ""
+ fi
Index: virtualbox/files/patch-src-VBox-Devices-Audio-audio.c
===================================================================
RCS file: virtualbox/files/patch-src-VBox-Devices-Audio-audio.c
diff -N virtualbox/files/patch-src-VBox-Devices-Audio-audio.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ virtualbox/files/patch-src-VBox-Devices-Audio-audio.c 15 Dec 2009 07:38:55 -0000
@@ -0,0 +1,14 @@
+--- src/VBox/Devices/Audio/audio.c.orig 2009-12-15 14:54:13.000000000 +0900
++++ src/VBox/Devices/Audio/audio.c 2009-12-15 14:53:54.000000000 +0900
+@@ -73,6 +73,11 @@
+ &pulse_audio_driver,
+ # endif
+ #endif /* RT_OS_LINUX */
++#ifdef RT_OS_FREEBSD
++# ifdef VBOX_WITH_PULSE
++ &pulse_audio_driver,
++# endif
++#endif
+ #ifdef RT_OS_DARWIN
+ &coreaudio_audio_driver,
+ #endif
Index: virtualbox/files/patch-src-VBox-Devices-Makefile.kmk
===================================================================
RCS file: /home/ncvs/ports/emulators/virtualbox/files/patch-src-VBox-Devices-Makefile.kmk,v
retrieving revision 1.1
diff -u -8 -p -r1.1 patch-src-VBox-Devices-Makefile.kmk
--- virtualbox/files/patch-src-VBox-Devices-Makefile.kmk 6 Nov 2009 14:17:06 -0000 1.1
+++ virtualbox/files/patch-src-VBox-Devices-Makefile.kmk 15 Dec 2009 07:38:55 -0000
@@ -1,15 +1,26 @@
---- src/VBox/Devices/Makefile.kmk.orig 2009-11-01 22:50:39.000000000 +0100
-+++ src/VBox/Devices/Makefile.kmk 2009-11-01 22:50:52.000000000 +0100
+--- src/VBox/Devices/Makefile.kmk.orig 2009-09-10 04:34:07.000000000 +0900
++++ src/VBox/Devices/Makefile.kmk 2009-12-15 14:34:40.000000000 +0900
@@ -31,8 +31,10 @@
include $(PATH_SUB_CURRENT)/PC/VMI/Makefile.kmk
endif
include $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
-include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
-include $(PATH_SUB_CURRENT)/Storage/testcase/Makefile.kmk
+ifdef VBOX_WITH_TESTCASES
+ include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
+ include $(PATH_SUB_CURRENT)/Storage/testcase/Makefile.kmk
+endif
ifndef VBOX_OSE
include $(PATH_SUB_CURRENT)/Storage/VBoxHDDFormats/Makefile.kmk
endif
+@@ -956,6 +958,10 @@
+ Drivers_SOURCES.linux+= \
+ Audio/pulseaudio.c \
+ Audio/pulse_stubs.c
++ Drivers_DEFS.freebsd += VBOX_WITH_PULSE
++ Drivers_SOURCES.freebsd+= \
++ Audio/pulseaudio.c \
++ Audio/pulse_stubs.c
+ endif
+
+ ifdef VBOX_WITH_USB
Index: virtualbox/files/patch-src-VBox-Frontends-VBoxManage-VBoxManageHelp.cpp
===================================================================
RCS file: virtualbox/files/patch-src-VBox-Frontends-VBoxManage-VBoxManageHelp.cpp
diff -N virtualbox/files/patch-src-VBox-Frontends-VBoxManage-VBoxManageHelp.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ virtualbox/files/patch-src-VBox-Frontends-VBoxManage-VBoxManageHelp.cpp 15 Dec 2009 07:38:55 -0000
@@ -0,0 +1,37 @@
+--- src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp.orig 2009-12-15 15:16:21.000000000 +0900
++++ src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp 2009-12-15 15:14:01.000000000 +0900
+@@ -41,6 +41,11 @@
+ #else
+ bool fSolaris = false;
+ #endif
++#ifdef RT_OS_FREEBSD
++ bool fFreeBSD = true;
++#else
++ bool fFreeBSD = false;
++#endif
+ #ifdef RT_OS_DARWIN
+ bool fDarwin = true;
+ #else
+@@ -62,6 +67,7 @@
+ fLinux = true;
+ fWin = true;
+ fSolaris = true;
++ fFreeBSD = true;
+ fDarwin = true;
+ fVRDP = true;
+ fVBoxSDL = true;
+@@ -227,6 +233,14 @@
+ #endif
+ );
+ }
++ if (fFreeBSD)
++ {
++ RTPrintf( "|oss"
++#ifdef VBOX_WITH_PULSE
++ "|pulse"
++#endif
++ );
++ }
+ if (fDarwin)
+ {
+ RTPrintf( "|coreaudio");
Index: virtualbox/files/patch-src-VBox-Frontends-VBoxManage-VBoxManageModifyVM.cpp
===================================================================
RCS file: virtualbox/files/patch-src-VBox-Frontends-VBoxManage-VBoxManageModifyVM.cpp
diff -N virtualbox/files/patch-src-VBox-Frontends-VBoxManage-VBoxManageModifyVM.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ virtualbox/files/patch-src-VBox-Frontends-VBoxManage-VBoxManageModifyVM.cpp 15 Dec 2009 07:38:55 -0000
@@ -0,0 +1,23 @@
+--- src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp.orig 2009-09-09 23:39:46.000000000 +0900
++++ src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp 2009-12-15 15:22:27.000000000 +0900
+@@ -1478,6 +1478,20 @@
+ # endif
+
+ #endif /* !RT_OS_SOLARIS */
++#ifdef RT_OS_FREEBSD
++ else if (!strcmp(audio, "oss"))
++ {
++ CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
++ CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
++ }
++# ifdef VBOX_WITH_PULSE
++ else if (!strcmp(audio, "pulse"))
++ {
++ CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Pulse));
++ CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
++ }
++# endif
++#endif /* !RT_OS_FREEBSD */
+ #ifdef RT_OS_DARWIN
+ else if (!strcmp(audio, "coreaudio"))
+ {
Index: virtualbox/files/patch-src-VBox-Frontends-VirtualBox-src-VBoxVMSettingsAudio.cpp
===================================================================
RCS file: virtualbox/files/patch-src-VBox-Frontends-VirtualBox-src-VBoxVMSettingsAudio.cpp
diff -N virtualbox/files/patch-src-VBox-Frontends-VirtualBox-src-VBoxVMSettingsAudio.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ virtualbox/files/patch-src-VBox-Frontends-VirtualBox-src-VBoxVMSettingsAudio.cpp 15 Dec 2009 07:38:55 -0000
@@ -0,0 +1,20 @@
+--- src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsAudio.cpp.orig 2009-06-12 20:31:37.000000000 +0900
++++ src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsAudio.cpp 2009-12-15 15:27:02.000000000 +0900
+@@ -89,14 +89,14 @@
+ #endif
+ #if defined Q_OS_LINUX || defined Q_OS_FREEBSD
+ mCbAudioDriver->addItem (vboxGlobal().toString (KAudioDriverType_OSS));
++# ifdef VBOX_WITH_PULSE
++ mCbAudioDriver->addItem (vboxGlobal().toString (KAudioDriverType_Pulse));
++# endif
+ #endif
+ #if defined Q_OS_LINUX
+ # ifdef VBOX_WITH_ALSA
+ mCbAudioDriver->addItem (vboxGlobal().toString (KAudioDriverType_ALSA));
+ # endif
+-# ifdef VBOX_WITH_PULSE
+- mCbAudioDriver->addItem (vboxGlobal().toString (KAudioDriverType_Pulse));
+-# endif
+ #endif
+ #if defined Q_OS_MACX
+ mCbAudioDriver->addItem (vboxGlobal().toString (KAudioDriverType_CoreAudio));
Index: virtualbox/files/patch-src-VBox-Main-AudioAdapterImpl.cpp
===================================================================
RCS file: virtualbox/files/patch-src-VBox-Main-AudioAdapterImpl.cpp
diff -N virtualbox/files/patch-src-VBox-Main-AudioAdapterImpl.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ virtualbox/files/patch-src-VBox-Main-AudioAdapterImpl.cpp 15 Dec 2009 07:38:56 -0000
@@ -0,0 +1,14 @@
+--- src/VBox/Main/AudioAdapterImpl.cpp.orig 2009-12-15 14:45:08.000000000 +0900
++++ src/VBox/Main/AudioAdapterImpl.cpp 2009-12-15 14:45:42.000000000 +0900
+@@ -261,6 +261,11 @@
+ #if defined (RT_OS_LINUX) || defined (RT_OS_FREEBSD) || defined(VBOX_WITH_SOLARIS_OSS)
+ case AudioDriverType_OSS:
+ #endif
++#ifdef RT_OS_FREEBSD
++# ifdef VBOX_WITH_PULSE
++ case AudioDriverType_Pulse:
++# endif
++#endif
+ #ifdef RT_OS_DARWIN
+ case AudioDriverType_CoreAudio:
+ #endif
Index: virtualbox/files/patch-src-VBox-Main-ConsoleImpl2.cpp
===================================================================
RCS file: virtualbox/files/patch-src-VBox-Main-ConsoleImpl2.cpp
diff -N virtualbox/files/patch-src-VBox-Main-ConsoleImpl2.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ virtualbox/files/patch-src-VBox-Main-ConsoleImpl2.cpp 15 Dec 2009 07:38:56 -0000
@@ -0,0 +1,18 @@
+--- src/VBox/Main/ConsoleImpl2.cpp.orig 2009-12-15 14:48:58.000000000 +0900
++++ src/VBox/Main/ConsoleImpl2.cpp 2009-12-15 14:48:42.000000000 +0900
+@@ -1605,6 +1605,15 @@
+ break;
+ }
+ #endif
++#ifdef RT_OS_FREEBSD
++# ifdef VBOX_WITH_PULSE
++ case AudioDriverType_Pulse:
++ {
++ rc = CFGMR3InsertString(pCfg, "AudioDriver", "pulse"); RC_CHECK();
++ break;
++ }
++# endif
++#endif
+ #ifdef RT_OS_DARWIN
+ case AudioDriverType_CoreAudio:
+ {
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list