11.3 x86_64 Sound Issues with multiple apps (digital pass through)

So I recently added a different soundcard that had a coaxial out connection, chipset is C-Media 8768. I got xine configured and got the audio pass through working correctly, my receiver correctly displays DTS/Dolby when an appropriate stream is played. However the issues come in when multiple applications try to play sound at the same time. If one application is playing audio a second application cannot also start to play. So if im watching a movie or listening to music I cannot hear skype if a call comes in (and I have to stop the application using the audio the restart the application that I want the audio to be used in next). Separately all applications can play audio by themselves.

From what ive read it should be as simple as setting up alsa dmix, but I havent really found any good guides to get this setup correctly. Ive tried some configs Ive found but they havent had the expected outcomes. The last thing I tried was to create an ~/.asoundrc file with the following config.


pcm.dmixer {
	type plug
	slave.pcm "dmix"
	hint {
		show on
		description "DMix: ALSA Software Mixer"
	}
}

pcm.dmixout {
	# Just pass this on to the system dmix
	type plug
	slave {
		pcm "dmix"
	}
}

However that caused issues where I couldnt get sound to play from stereo streams (the dts/dolby streams still played correctly. Could someone point me in the right direction in how to get dmix setup correctly, or whatever it is I need to setup to get this working right.

Here’s the details from the output from aplay -L. Im using the iec958 device and have it configured in xine to use that with pass through, and in the kde media settings I have that as the preferred device for the output of all types.


:~> aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
front:CARD=CMI8768,DEV=0
    C-Media CMI8768, C-Media PCI DAC/ADC
    Front speakers
rear:CARD=CMI8768,DEV=0
    C-Media CMI8768, C-Media PCI 2nd DAC
    Rear speakers
surround40:CARD=CMI8768,DEV=0
    C-Media CMI8768, C-Media PCI 2nd DAC
    4.0 Surround output to Front and Rear speakers
surround41:CARD=CMI8768,DEV=0
    C-Media CMI8768, C-Media PCI 2nd DAC
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=CMI8768,DEV=0
    C-Media CMI8768, C-Media PCI 2nd DAC
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=CMI8768,DEV=0
    C-Media CMI8768, C-Media PCI 2nd DAC
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=CMI8768,DEV=0
    C-Media CMI8768, C-Media PCI 2nd DAC
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=CMI8768,DEV=0
    C-Media CMI8768, C-Media PCI DAC/ADC
    IEC958 (S/PDIF) Digital Audio Output

Hello baaldemon, I think we have talked before. I must ask if you use KDE, I would do the following menu / Personnel Settings / General Tab / Computer Administration / Multimedia. Under Device Preference (Left) Music & Video I would have my analog or PCM audio at the top and I would not put digital at the top of the list. I might also add that when watching a movie, only one audio stream can be handled in Dolby Digital 5.1.

So, I could be using Amarok, out digital, but not passthrough and get a skype call or really play any other audio, but for Dolby Digital, there is no mixing that. You got to drop the passthrough to get anything else out of your computer. No mixer is going do that for you. My thoughts are I don’t want to be interrupted while watching a movie or I am using more than one computer while I do.

Thank You,

Yeah we have talked, in my thread asking for sound card suggestions.

Also I completely understand when 5.1 audio is playing that it cannot be interrupted. Under the multimedia settings when showing advanced devices I have a total of 5 devices that show (when show advanced is checked). Out of the 5 only two devices will actually output a test sound C-Media CMI8768 (PCI DAC/ADC) and C-Media CMI8768, C-Media PCI DAC/ADC (IEC958 (S/PDIF) Digital Audio Output)

Ive tried changing the the order with no changes in how the audio actually performs in applications, in skype if anything other than the IEC958 is selected as the device to use it wont output anything even when it is the only sound item running.

Would the problem be in that to setup gxine properly I modified the ~/.xine/conf file so that the passthrough was used. Since Im using the xine backend for the audio system is this global (at least global in the sense of the current user) change what is stopping the mixing from being allowed to happen? If so how do I specify Pass Through only be used by my video application only?

Would the problem be in that to setup gxine properly I modified the ~/.xine/conf file so that the passthrough was used. Since Im using the xine backend for the audio system is this global (at least global in the sense of the current user) change what is stopping the mixing from being allowed to happen? If so how do I specify Pass Through only be used by my video application only?
So let me answer this question based on what I have found. The xine config file seems to affect XINE, GXINE, Kaffeine/KDE3 & Kaffeine/KDE4 except that the KDE4 version of Kaffeine is looking in a different place. As best I can tell, nothing else is using it. The options you select in the KDE multimedia setup, even if using xine backend, seems to work based on your choices there, not in xine. I have determined that if you place the digital output at top of the kde multimedia list, then at minimum, the ability to adjust volume levels in kde may be lost. It seems best, to keep PCM/Analog items at the top of the list and to move all outputs that work towards the top, but not the top. Selecting passthrough mode in xine, bypasses any KDE audio setup.

I had one KDE setup that once I placed the digital at the top, that I lost the ability to control volume in general and the ability to have simultaneous outputs in KDE, which is your problem. I was never able to determine what had changed in KDE and then before I got to the bottom of it, I upgraded to openSUSE 11.3. I remember playing further, but ended up loading openSUSE 11.3 again after KDE 4.5.1 had screwed up everything. Right now I stick firmly using KDE 4.4.4.

So now I have audio working just like I like. While I have played around with different backends, I have ended up loading VLC and using it instead of xine. I loaded the VLC-backend as I remember, and left the device order at the default which placed PCM at the top of the list. When using passthrough of xine based programs, they seem unaffected by the KDE multimedia setup in any way. This does not give a solution path to you, unless loading the VLC backend helps to fix your setup, but it is a clue as to what I have seen happen with xine & KDE.

Thank You,