protonscr

No in-game sound in BPM, sound ok in DM

steamclosed reviewedAudio
ValveSoftware/steam-for-linux#2953 · opened 2013-10-30 by teeedubb · updated 2019-07-18 · 5 comments · github
Tteeedubb 2013-10-30 github

Hey all,

Ive been slowly setting up steam on ubuntu 13.10 x64 minimal with a Openbox desktop environment with no pulse audio, only alsa. In Big Picture Mode I get the ambient and navigation sounds but no sound in either l4d2 or serious sam 3 and disabling all GUI sounds has no effect. If I launch the games from Desktop Mode I get sound in both games. Looking at the game logs the sound device is busy when launching a game via BPM. I am using a ~/.asoundrc, with out it I get no sound at all:

    pcm.!default {
    type hw
    card 0
    device 3
    }

    ctl.!default {
    type hw
    card 0
    device 3
    }

Steam cli output when running two games, first from desktop mode, 2nd in BPM. Cav Story + will crash instantly on load if run from BPM, fine in DM.

http://paste.ubuntu.com/6329569/

I've tried using the following environmental variables with out any luck

    SDL_AUDIODRIVER=alsa
    STEAM_RUNTIME=0 steam

I only have the one sound card enabled and only one module loaded in /proc/asound/modules. I can load steam desktop mode, launch a game - get sound, close the game, switch to steam bpm, launch a game with no sound. I get sound in both xbmc + chromium too.

Not sure if this is a bug or if I'm missing something obvious? Is steam BPM not ALSA compatible? Has anyone got it working with pure ALSA?

Original forum thread http://steamcommunity.com/app/221410/discussions/0/810939351350711180/

TTele42 2013-10-30 github

When using .asoundrc you ignore the common configs aimed at making sound have less hassle with alsa, in this case, you should look into adding dmix to your .asoundrc simular to:

pcm.amix {
  type dmix
  slave.pcm "hw:NVidia,0,3"
}

pcm.asnoop {
  type dsnoop
  slave.pcm "hw:SB,0,0"
}

# duplex device combining our PCM devices defined above
pcm.aduplex {
  type asym
  playback.pcm "amix"
  capture.pcm "asnoop"
}

pcm.!default {
  type plug
  slave.pcm "aduplex"
}

dmix allows for two or more clients with the same audio channels to use a device at the same time. Most distros have this tucked away in a system config.

I am writing this from memory, so it would be good to cross-reference and adapt it to your needs.

Tteeedubb 2013-10-31 github

Thanks for the help. Unfortunately I was unable to get any sound using your example, but I have never been abe to get my head around .asoundrc. However using a .asoundrc I found on the net linked to below I now get sound in game via bpm :)

http://dl.dropboxusercontent.com/u/18371907/asoundrc

Tteeedubb 2013-11-02 github

OK the config above gave me stuttery sound and after some googling + trial and error I have gotten your example to work with my system:

pcm.amix {
  type dmix
  ipc_key 50557
  slave {
                pcm "hw:CARD=NVidia,DEV=3"
                period_time 0
                period_size 1024        # 1024
                buffer_size 8192        # 8192
                periods 128             # added
                rate 48000             # added
        }
}

pcm.asnoop {
  type dsnoop
  slave.pcm "hw:SB,0,0"
}

# duplex device combining our PCM devices defined above
pcm.aduplex {
  type asym
  playback.pcm "amix"
  capture.pcm "asnoop"
}

pcm.!default {
  type plug
  slave.pcm "aduplex"
}

Working well in both chromium and steam bpm. Thanks!

Tteeedubb 2013-11-08 github

After a bit more testing the above .asoundrc would cause skipping after some time, and tweaking the settings didnt make it any better. Ive installed pulse audio and now the audio in the l4d2 intro plays without skipping.

Kkisak-valve maintainer 2017-09-22 github

Closing as this a system config issue and appears to have been resolved.

Launch options