Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

steam has trouble with alsa plug pcm #2962

Closed
buscher opened this issue Nov 4, 2013 · 13 comments
Closed

steam has trouble with alsa plug pcm #2962

buscher opened this issue Nov 4, 2013 · 13 comments

Comments

@buscher
Copy link

buscher commented Nov 4, 2013

Hi,

I am a pure alsa user and while toying around with alsa I noticed that steam can't "handle" plug pcms.

I have the following pcm which duplicates the output and outputs its on 2 devices.

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

pcm.xxx {
type plug
slave.pcm {
type multi
slaves {
a { channels 2 pcm "hw:2,0" } # usb headset
b { channels 2 pcm "hw:1,0" } # intern pci soundcard
}
bindings {
0 { slave a channel 0 }
1 { slave a channel 1 }
2 { slave b channel 0 }
3 { slave b channel 1 }
}
}
ttable [
[ 1 0 1 0 ] # left -> a.left, b.left
[ 0 1 0 1 ] # right -> a.right, b.right
]
}

when trying to play a video(non-flash) or play a game, I just get noise, or steam crashes.

NOTE: without steam it works fine, I tried ioquake3, ut2004, minecraft mplayer/mplayer2/mpv, speaker-test.

A good example is VVVVVV as it works without steam, and it does work fine without steam, but inside steam (all 32bit) I just get noise or no sound.

@gdrewb-valve
Copy link
Contributor

Steam often uses middleware for sound (OpenAL or Miles usually) so this may need to be passed on.

@ghost ghost self-assigned this Nov 4, 2013
@buscher
Copy link
Author

buscher commented Nov 4, 2013

ok, I forgot to mention that I run steam like this

ALSOFT_DRIVERS=alsa SDL_AUDIODRIVER=alsa AUDIODEV=xxx steam

so sdl and openal are using alsa, and according to the alsoftrc.sample it uses "default" as default pcm, which points to xxx.
So everything is fine.

@buscher
Copy link
Author

buscher commented Nov 8, 2013

as a test to see if steam picks up the correct pcm, I tried

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

ALSOFT_DRIVERS=alsa SDL_AUDIODRIVER=alsa AUDIODEV=null steam

and steam does indeed play no sound, for the videos and stuff

BUT the video in steam is waaaay to fast! there is somethign wrong

@gdrewb-valve
Copy link
Contributor

Valve note: #2832 also mentions video playing too fast.

@buscher
Copy link
Author

buscher commented Nov 9, 2013

ok, after further investigation it is perfectly normal that videos sync to audio.
Even aplay plays WAY too fast using the null pcm.

But anyway, back to the main problem, it proves that steam picks up the correct pcm, the inital config is still a problem.

@TDYK
Copy link

TDYK commented Nov 17, 2013

Hi!
Today I got a new PC, and can not get sound in Steam with alsa. No sound in games (Bastion tested, Dota2 not even loading) and in game videos in Store.

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: MID [HDA Intel MID], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: MID [HDA Intel MID], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: MID [HDA Intel MID], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0

cat /proc/asound/cards
0 [MID ]: HDA-Intel - HDA Intel MID
HDA Intel MID at 0xf7914000 irq 47
1 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7910000 irq 46
2 [U0x93a0x2620 ]: USB-Audio - USB Device 0x93a:0x2620
USB Device 0x93a:0x2620 at usb-0000:00:14.0-3, full speed
3 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xf7080000 irq 17

cat ~/.asoundrc
pcm.!default {
type hw
card 1
}

ctl.!default {
type hw
card 1
}

Steam - System information says:
Sound card:
Audio device: Intel Haswell HDMI

All other programms (like VLC or Iceweasel) play sound perfectly.
Tried
steam
AUDIODEV='!default' steam
SDL_AUDIODRIVER=alsa AUDIODEV='!default' steam
and so on, always same thing "Audio device: Intel Haswell HDMI"

Using Debian Sid/Experimental, Linux GnuMD 3.11-2-amd64 SMP Debian 3.11.8-1 (2013-11-13) x86_64 GNU/Linux,

Best regards,
Dmitri.

@TDYK
Copy link

TDYK commented Nov 17, 2013

Workaround: In alsa-base.conf added "options snd-hda-intel index=1,0,2", аnd now it is

Sound card:
Audio device: Realtek ALC887-VD

But steel it remains, that Steam is ignoring .asoundrc cofig files.

Best regards,
Dmitrii.

@buscher
Copy link
Author

buscher commented Nov 17, 2013

uhm, I think it should be
AUDIODEV=default

and NOT

AUDIODEV=!default

at least that how it works for me.
Your bug seems like a totally different bug from what I reported.
Please open a new bug for it, otherwise its just getting more and more confussing for the devs.

@kisak-valve
Copy link
Member

Hello @buscher, are you still experiencing this issue on an up to date system?

@buscher
Copy link
Author

buscher commented Sep 30, 2017

Yes, I just retested with latest released (not beta) steam and up to date system.

pcm.!default { type plug slave.pcm "null" }
in /etc/asound.conf

ALSOFT_DRIVERS=alsa SDL_AUDIODRIVER=alsa AUDIODEV=null steam

still causes problems. Video is way too fast and "choppy".

@kisak-valve
Copy link
Member

I personally do not consider that test case as valid because there is no steam-compatible x86 hardware in the wild that does not have at least one audio device, which leaves this issue being about the type multi section of your originally posted config. Also, there most likely is something using the audio device before the steam game starts. Adding dmix before the type multi section may help.

Specific to video playback in steam, web content including the HTML5 videos on steam's store pages are rendered by libcef, and this would need to be pursued upstream.

@buscher
Copy link
Author

buscher commented Oct 21, 2017

Sorry, I lost interest in this bug report. What should we do? close it? leave it open forever?
As I think you are right that dmix would help here, I would go for upstream fix needed (aka libcef) and close the rest as invalid?

@kisak-valve
Copy link
Member

If you don't want to pursue this further, that's totally fine. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants