Saturday, September 17, 2011

HD Audio in VMware Fusion 4 and VMware Workstation 8

I was part of Interactive/Virtual devices team at VMware and it was a great learning experience.

In my last 18 months at VMware, I worked on designing and implementing virtual HD Audio device and now since releases of VMware Fusion 4 and VMware Workstation 8 have been made public I can talk about it :)

In addition to Windows Vista and above guests, virtual HD Audio device should work out-of-box for Mac OS Lion 10.7 guests on Fusion 4.0 and hence Fusion users will be able to get sound from their Mac OS guests. Linux guests (3.0+) are supported as well. Patch submitted to Linux kernel that enabled support for Linux guests with VMware HD Audio device.

Virtual HD Audio supports upto 7.1 surround sound, 192kHz sampling frequency, 32-bit samples.

I just downloaded the Fusion 4.0.1 GA and was eager to checkout how well the feature works with Windows 7 guest. Here is a screenshot...

From Blogger Pictures



We've had trouble getting good sound quality with surround sound on Linux hosts with VMware Workstation 8 with default settings.

If you want good quality surround sound support on Linux hosts with Workstation then I'd recommend using channel-mapped device string as follows: (We couldn't implement this programmatically because of stability issues with alsa-lib that enumerates devices on Linux).

1) Suspend/Power off the VM.
2) Run `aplay -L` on your Linux host terminal
3) If you are playing 5.1 surround sound from the guest then copy surround51:CARD=vendor-name,DEV=num
For e.g. `surround51:CARD=Live,DEV=0`
4) Open .vmx config file of the VM in a text editor and edit sound.fileName field
For e.g. sound.fileName="surround51:CARD=Live,DEV=0"
sound.autodetect = "FALSE" should be edited too.

5) Resume/Power on the VM

Similarly if you face quality issues with regular stereo sound on Linux host with Workstation 8.0 then you can try the above mentioned suggestion with device string starting with "front".

5 comments:

Aaron W. Hsu said...

Thanks for this! it sounds really good, but I just upgraded my VMWare image to HD Audio, and I get crackling and pops. I'm trying to do the Stereo speaker setting as I'm on a laptop with only two speakers. Even putting that in the sound.fileName field (the "front" version of the line) doesn't seem to work. Is this a known issue that is fixed somewhere? I notice others with this same problem. Slackware64 13.37

Bankim Bhavsar said...

Aaron,

Can you email me .vmx and vmware.log file of the VM?
I can only provide limited help since I no longer work at VMware.

bankim.bhavsar@gmail.com

Bankim.

Unknown said...

thanks for this! my is sounds really bad, and I' have VMware Workstation 8 in ubuntu 11.10 with os lion 10.7 guest vm // soun card HDA Intel, ALC272X

helpme please

Unknown said...

thanks for this! my is sounds really bad, and I' have VMware Workstation 8 in ubuntu 11.10 with os lion 10.7 guest vm // soun card HDA Intel, ALC272X

helpme please

Bankim Bhavsar said...

@Julio: Can you email me .vmx file of the VM and vmware.log to bankim.bhavsar@gmail.com?

I'll see if I can help...