I've posted the following message on the alsa-user list a few times and gotten no response. Especially since it's a fairly complicated setup and probably a rare one that could reveal certain bugs that wouldn't be found otherwise, I thought I'd give the development list a shot so the people who know the nitty-gritty under the hood stuff can comment


I first started experimenting with the stereo -> 5.1 configuration and
got it to work great!

Then in the interests of everyone sharing the card, I fiddled around
with dmixing the new 5.1 device and succeeded - now stereo apps are
upmixed to 5.1, share with each other, AND share with real 5.1 apps.

Then I tried to throw OSS into the mix using AOSS.  Here's where my
problem is...

A stereo OSS app DOES work in the configuration - for a very short
amount of time.  After a variable amount of time (1 to 5 minutes,
roughly) the OSS app will be cruising along and then the next time it
tries to play a sound, it will freeze.  Not because the sound card is
blocked, because it happens when nothing else is accessing the card.
But, in the process of freezing, it does block the sound card as nothing
else (ALSA or OSS) can use it until I kill the OSS app.

After it happens once, it seems to happen very quickly every subsequent
time until I reboot.  By very quickly, I mean the OSS app may get one or
two sounds off before it freezes 10 seconds into execution.

Here is the asound.conf I am using -

  type plug
  slave.pcm "dsp0"

  type plug
  slave {
    pcm "mixed51"
    channels 6
    rate 48000
  ttable.0.0 1
  ttable.1.1 1
  ttable.0.2 1
  ttable.1.3 1
  ttable.0.4 0.2
  ttable.1.4 0.2
  ttable.0.5 0.5
  ttable.1.5 0.5

pcm.mixed51 {
  type dmix
  ipc_key 1099234
  ipc_key_add_uid TRUE
  slave {
    pcm "hw:0,1"
    rate 48000
    channels 6
    period_time 0
    period_size 1024
    buffer_time 0
    buffer_size 4096

ctl.mixer0 {
  type hw
  card 0

My soundcard is a CMIPCI (8738) and I am running ALSA 1.04_rc2, as
included in kernel 2.6.5.  Notice the hardware device is hw:0,1 as that
is the 5.1 device for this card.

The way I use this setup is as follows -

-OSS apps using AOSS obviously route directly to dsp0.  That upmixes the
stereo to 5.1 then uses mixed51 to dmix it.

-Stereo ALSA apps using the default PCM get rerouted to dsp0, or
alternately I tell them specifically to use dsp0

-5.1 ALSA apps I tell to use mixed51 directly as they don't need the
stereo->5.1 hack but DO need to share the card via dmix

Any explanations or solutions are MUCH appreciated - even if the official developer explanation is "don't do that, it doesn't work" tia

[This E-mail has been scanned by Declude Virus running on mail.rwgusa.net and is 

This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
Alsa-devel mailing list

Reply via email to