SteamOS – Changing the Default Audio Device

Finally sat down to iron out a few audio quirks in my SteamOS audio setup.  Previously I had explored my sound issues on SteamOS and successfully got that ironed out.  However, some games seem to use not the audio setup from the “steam” profile, which launches the custom compositor and Steam itself, but the desktop users audio configuration.  Oddly enough, it is only a select few titles.  The solution?  Configure the default HDMI device under pulse.  Read on for more

Caution! : This article assumes you have already tried and successfully set your sound or fixed it with the previous suggested fixes.  As always, be sure to backup and files you modify first.  I assume no responsibility for any issues you face after attempting these steps.

Installation of alsa-utils

First thing to get alsa utils installed.  Add the following to your /etc/apt/sources.list file:

deb wheezy main contrib non-free
deb-src wheezy main contrib non-free

Then, add the following to /etc/apt/preferences so that SteamOS packages are not incorrectly replaced when your system is updated:

Package: *
Pin: release l=SteamOS
Pin-Priority: 900

Package: *
Pin: release l=Debian

Finally intall alsa-utils:

sudo apt-get update
sudo apt-get install alsa-utils

Identifying Your Card Details

Next, identify the proper device which to set the default.

aplay -l

Example set of results:

Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 0/1

The card you will want to set can be determined by a few sound checks:

aplay -D plughw:1,3 /usr/share/sounds/alsa/Front_Right.wav
aplay -D plughw:1,7 /usr/share/sounds/alsa/Front_Right.wav
aplay -D plughw:1,8 /usr/share/sounds/alsa/Front_Right.wav
aplay -D plughw:1,9 /usr/share/sounds/alsa/Front_Right.wav

The device you want is obviously the one that gives you sound.  If for some reason the command line outputs a play with no sound outputting, all is not lost.  That happened to me likely due to how sound is configured under SteamOS:

Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

Editing the appropriate files/configurations

Create a probe mapping for the device that plays audio. Below are the Nvidia mappings for each device in the /etc/modprobe.d/snd-hda-intel.conf configuration file.  If the file is not created, it will be created for you. :

Device 3=0x101
Device 7=0x102
Device 8=0x104
Device 9=0x108

This seems to be a known pulse audio issue with Nvidia HDMI out, some of which is mentioned in the relevant Nvidia article.  Below is an example configuration line for /etc/modprobe.d/snd-hda-intel.conf :

options snd-hda-intel probe_mask=0x102

Final Steps:

After editing the configuration file, reboot SteamOS and verify the default is set to the right card.  You can go a step further and disable unwanted cards, but that should not be necessary.  Restore any backup files if you experience any further issues.

Questions of comments?  Be sure to leave them in the comments section.



About professorkaos64

Posted on 20140112, in Games, Steam and tagged , , , , , . Bookmark the permalink. 1 Comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s