Audio support in VmWare

Continuing with the audio theme, this week I will explain the arcane black magic rituals (ie., undocumented or at least badly documented) required to get audio working on Plan 9 when running inside a VmWare instance.

Maybe I will write instructions on how to install Plan 9 from scratch under VmWare, but the process should not be too painful now that a patch to disable vga acceleration by default when under VmWare has been accepted in the standard distribution.

After you have Plan 9 up and running one needs to enable SB16 emulation in VmWare, this is not possible with the GUI configuration tools, so after sacrificing a goat to the God of Mysterious Ways and adding the default audio device using the GUI interface you should find the .vmx configuration file for your Plan 9 VmWare image, open it in a text editor and make sure it contains the following lines:

sound.virtualDev = "sb16"
sound.baseAddr = "0x220"
sound.dma16 = "5"
sound.irq = "7" 
sound.autodetect = "FALSE"

This should work most remotely recent VmWare version. Now all we need to do is configure Plan 9 to use the virtual SB16, and this part is quite trivial despite the IMHO rather obtuse device configuration line because Plan 9 actually has proper documentation you can read and find with lookman(1) ;)

term% 9fat:
term% grep audio0 /n/9fat/plan9.ini
audio0=type=sb16 port=0x220 irq=7 dma=5

Make sure that the audio0 line is part of the configuration for whatever kernel you are going to use and reboot (if you are only booting one kernel just make sure that line is somewhere in your plan9.ini).

Now reboot and all that is left is to mount your new audio device with:

term% bind -a '#A' /dev/

Of course you will want to put that in your $home/lib/profile or riostart script so it is up and working in all your namespaces.

Thanks to Federico G. Benavento (aka fgb) for initially pointing out to me that this was possible and thanks to that after some archaeological research on unofficial VmWare docs I got it to work.


To post a comment you need to login first.