View Full Version : Why is sound such a problem for me?


Daravon
07-02-08, 12:39 AM
I simply cannot get my system to behave (8.04/gnome and kde).

Here it is, it's very simple: I ALWAYS want spdif to be output. ALWAYS. When I play music. When I watch youtube videos. When I watch movies. ALWAYS. I don't care what the analog is doing, because it's not hooked up. I only have SPDIF hooked up. It's my only way to get sound. Furthermore, I don't want ANY system sounds to play, at least not when I have something else playing. I want it to pass the audio out without any mixing. Software volume control would be the only thing I'd be interested in.

This seems to be impossible for me to get. Right now my spdif only works if forced with mplayer.

This is an extremely frustrating problem I keep having with linux, ever since I switched: proliferation of GUI tools that muck everything up! I have my sound control panel in gnome, my kmix, my kcontrol, and the settings of the individual player. Beween all these I don't know what is happening that is preventing spdif from working. I don't understand why I can't just tell alsa what to do after my application dumps it's sound to alsa.

It's not hardware...forcing with mplayer -ao alsa:device=spdif always works. But then, simply using mplayer without the options does not work, and neither does amarok, or anything else. IEC958 is NOT muted in alasmixer. I just want the damn spdif to work, what do I have to do to get it to do so? It used to work all the time, and sometimes it still does. Sometimes! What the heck is causing it? Is there an alsa config file somewhere I can edit?

mythmaster
07-02-08, 09:08 AM
ALSA has an OSS emulation module. I believe I had to install the asound-plugins package to get it. Afterwards (and don't ask me why), ANYTHING I sent to OSS (including games, etc.) would mystically play properly through SPDIF (which is the only audio connection I have, as well). I didn't tell the desktop to use OSS, because I don't want to hear system sounds, either.

This is the same in Mythtv. The only way it will play through SPDIF (for me, anyway) is to set the audio output to /dev/dsp (which is the OSS device). Then, I could tell it to use 5.1 and passthrough the DD & DTS. Note that on passthrough, you don't get software volume control, but you do on everything else.

jimsiff
07-02-08, 03:42 PM
OSS emulation is a good idea since some apps haven't been changed to use ALSA yet.

Here's an interesting article on setting up/finding the correct sound interface to use for S/PDIF output:

Troubleshooting Digital Out (http://alsa.opensrc.org/DigitalOut)

Check out the section "Alternate Method to Find Device."

I use the following syntax to point directly to my S/PDIF Out connection:ALSA:plughw:0,1

You can set S/PDIF as your default sound output in ~/.asoundrc or globally using /etc/asound.conf.

newlinux
07-02-08, 03:47 PM
I have the following in my .asoundrc to pipe all output through my spdif:


pcm.!default {
type plug
slave {
pcm "spdif"
rate 48000
format S16_LE
}
}


Seems to work well for me - I believe I have myth sending output to ALSA:default, as spdif is the default based on the .asoundrc.

Daravon
07-02-08, 06:14 PM
pcm.!default {
type plug
slave {
pcm "spdif"
rate 48000
format S16_LE
}
}


Sounds good, but I don't understand all of the options. What is the 'type' and 'slave {}' bits? I'm not sure I want to upsample my CD-based material to 48kHz either.

I added this to my .asoundrc yesterday and it's been behaving itself so far. I might have it fixed. But it's different than what you put. Note, I don't use Myth at all right now, just amarok and mplayer and sometimes vlc and audacity.


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