I migrated almost all my media consumption onto a Linux based, Ubuntu, Intel atom based Nettop with an Nvidia ION chipset a while ago. Previously i had tried a couple of media players, Popcorn hour and others, which where awful to use to say the least. Sure they played a lot of content but their user interfaces where all terrible.
I think this is a terrific combo. A silent nettop, Ubuntu and XBMC satisfies all my media consumption needs for now.
But to keep us on track with the story. We also have an aging PS/2 here for playing games on etc. This is where Stepmania comes in. On the PS/2 we have two Dance pads that are quite fun to play with. Since I have a general quest trying to stop using optical mediums, such as CDs and DVDs, I’m working on retiring the PS/2 as well, keeping the box count at a minimum.
Thus I started investigating Linux alternatives for the games on the PS/2. Singstar got replaced by Performous which is also capable of handling dance pads but this feature seems not really finished yet. (As a side note here, the wireless Singstar microphones worked flawlessly in Ubuntu 10.10. Just plug the receiver into the USB port on the computer and you are done)
Getting sound to work with Stepmania on this system was however not as easy. Installing the application was an easy task. Even though no Debian packages exists, that I’m aware of, there is precompiled binaries for download at the Stepmania web page.
But then when launching the application, it starts up totally muted. The log says something like:
ALSA: Advanced Linux Sound Architecture Driver Version 1.0.23. ALSA Driver: 0: HDA NVidia [NVidia], device 0: ALC888 Analog [ALC888 Analog], 1/1 subdevices avail ALSA Driver: 0: HDA NVidia [NVidia], device 1: ALC888 Digital [ALC888 Digital], 1/1 subdevices avail ALSA Driver: 0: HDA NVidia [NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI], 0/1 subdevices avail Couldn't load driver ALSA: Not enough substreams for hardware mixing, using software mixing ALSA: Software mixing at 44100hz Sound driver: ALSA-sw
Looking at the output above it’s not aparent which of the three devices that gets used. To list the available sinks in the system use the command
which on my system yields
card 0: NVidia [HDA NVidia], device 0: ALC888 Analog [ALC888 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: NVidia [HDA NVidia], device 1: ALC888 Digital [ALC888 Digital] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI] Subdevices: 1/1 Subdevice #0: subdevice #0
And since I use the HDMI connection to connect the computer to my TV I want my output to use card 0 device 3. This information could of course be retrieved from the log above as well.
To tell Stepmania to really use this device fire up your favorite editor and edit the file Data/StepMania.iniFind the lines that says
and change that to
Almost done. This worked somewhat for me but for some strange reason Stepmania almost always terminated with an error (Couldn’t open card) the first time i ran it. Successive invocations always seemed to work. After some investigation it seems like PulseAudio might be the bad guy in this scenario.
The solution is to tell PulseAudio to step back while Stepmania is executing. Starting Stepmania with the pasuspender tool like this
has worked nicely for me.
The final question is why on earth Stepmania have a problem with this to begin with. All other applications works correctly, using the device i configured. A guess is that Stepmania tries to be a bit to smart for it’s own good. Hopefully the upcoming 4.0 release will do a better job here.