VMware sound on Feisty

| tags: ubuntu

Lots of pages out there address problems people have getting sound to work with VMware running on Linux hosting Windows but none of those solutions did it for me. VMware Workstation 6 insists on using /dev/dsp which for some strange reason I didn't have. I noticed I had /dev/dsp1 through /dev/dsp5 but no plain /dev/dsp. A few minutes fooling with Audacity showed me where each of those played, and /dev/dsp3 seems to play through the speakers on my Audigy 2 so I knew that was the one I wanted it to use. I simply did: sudo ln -s /dev/dsp3 /dev/dsp and that seemed to do the trick.

Now I bet there is other magic, probably some that I accidentally invoked, that is making this work. I'm going to attach the .asoundrc files to this post so that if I lose sound later, maybe I can reconstruct the current state.

asoundrc asoundrc.asoundconf

Update: I notice my symbolic link gets killed on reboot. Either I've got to figure out how to make it persistent, or I need to make VMware use /dev/dsp3.

Update 2: This page on writing udev rules taught me that I can get a symbolic link created on bootup just by adding a rule. I made a new file /etc/udev/rules.d/62-gb-symlinks.rules and in it I placed the single line: KERNEL=="dsp*", DRIVERS=="EMU10K1_Audigy", SYMLINK+="dspAudigy"

This rule says (I think) look for a device with a name that matches /dev/dsp*, and has a Audigy driver, then make a symbolic link to it named /dev/dspAudigy.

Then I simply edited the .vmx file for my VMware virtual machine and changed the sound.fileName line to read sound.fileName = "/dev/dspAudigy"

Now that always points to the sound channel I want my virtual machines to use.