Sound in VirtualBox from MacOS X Host
By Brian Leonard on Aug 12, 2008
Lack of sound has been a big drag on my day to day use of OpenSolaris, often forcing me to return to OS X when I need to hear something. Earlier today Gregg pointed me to New OSS Drivers Fix Sound Issues in OpenSolaris on Mac OS X - and lo and behold - they do - at least in VirtualBox.
Some other things to note is that in VirtualBox for Mac OS X, the audio is disabled by default. To enable the audio, select Settings (the OpenSolaris virtual machine must be powered down) and then Audio. Select Enable Audio and set the Host Audio Driver to CoreAudio:
Leave the Audio Controller as ICH AC97. Now when you start OpenSolaris, it will believe it has the Intel AC97 audio controller. If you installed the OSS drivers w/out first enabling the audio, you can run ossdetect to rediscover the devices. If all goes well, you should see the audio driver in the Device Driver Utility:
You can also run osstest to ensure the package is correctly installed:
bleonard@opensolaris:~$ osstest Sound subsystem and version: OSS 4.0 (b1016/200806171344) (0x00040003) Platform: SunOS/i86pc 5.11 snv_86 \*\*\* Scanning sound adapter #-1 \*\*\* /dev/oss/ich0/pcm0 (audio engine 0): Intel ICH (2415) Note! Device is in use (by PID 0/VMIX) but will try anyway - Performing audio playback test... <left> OK <right> OK <stereo> OK <measured srate="" 47860.00="" hz="" (-0.29%)="">I also tested this build of OSS (1016) on my native installation of OpenSolaris and was disappointed that I still hear silence. Oh well, I'll try once again when OSS build 1017 is released.
\*\*\* All tests completed OK \*\*\* bleonard@opensolaris:~$