Ubuntu Forums Archive Viewer

Howto: Pulseadio and VMWare with 2 soundcards

Archived thread 1085047 from Outdated Tutorials & Tips. Markdown source: Outdated_Tutorials_&_Tips/thread_1085047_Howto_Pulseadio_and_VMWare_with_2_soundcards.md

Original URL About this archive
#1

Ok this is for everyone who had no luck with other Pulseaudio + VMWare solutions or who doesn't want to mess too much with the default settings. I have done this with Ubuntu 8.10, but this solution should apply to any Linux running Pulseadio and is very easy to reverse, so there is little chance of breaking more then you solve. Also, trouble with any other app that can not work with Pulseadio is solved with this setup.

You need a free PCI (or PCIe 1x) slot, so this is not for laptops. This will cost you between 20 and 0 bucks depending on how much extra hardware you have lying around and how cheap you can get stuff.

You are going to need one extra soundcard and a cable to loop the audio-out (green) of one of the cards to the line-in (blue) of the other. This cable has 2 identical audio jacks at both ends.

  1. Install the extra soundcard.

If you don't see 2 audio devises, your other card is not recognized yet and you'll have to figure out why.

  1. Boot back into your system and check what you have when you type 'ls /dev/dsp*' into the console. You should have a dsp and a dsp1 or some such.

Close the package manager window.

  1. Go to your package manager and install the 'pavucontrol' and 'padevchooser' packages if they aren't there already.

Close the window. Close padevchooser.

  1. Start padevchooser. You will have a little audio jack icon in your systray now. Click on it and go to the 'Configure Local Sound Server' option. You will have a window with 3 tabs. Uncheck all boxes in all tabs.

Close pavucontrol.

  1. Start pavucontrol and go to the 'Output Devises' tab. Set your primary audio card as default with the little down arrow icon.
  1. Close all apps that make sound and kill Pulseaudio with with the 'killall pulseaudio' command.

Leave the settings directing the sound to your secondary soundcard.

  1. Start VMWare. Now you can figure out witch of your cards is dsp or dsp1 with directing the virtual sound to either dsp or dsp1 and checking it with your speakers when you play a sound inside your virtual machine.

Leave the mic-in and audio-out cables of your primary card just the way they were when you started this guide.

  1. Now use the audio loop cable to loop from the audio-out of your secondary card to the line-in of your primary one.

(Don't close the console window you started Pulseadio in until you reboot)

  1. Start 'pulseadio' while your VM is still playing music. Pulseadio will fail to hook on your secondary soundcard and just uses the primary one.

Even after reboot, Pulseadio should leave your secondary card alone now.

  1. It should all work now. Pulse only hooks on your primary card and the sound feed from the VM goes to your secondary (and is looped to your primary one though the line-in).

Set the hardware acceleration to None and the Sample rate conversion quality to Low. This should remove/reduce the sound stutter.

  1. If your virtual OS is Windows, go to Control Panel>Sound and Audio> Audio>Sound Playback>Advanced>Performance

I hope this guide helps! Cheers! Bob.