LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   dmix fails to work by default OR with config file (https://www.linuxquestions.org/questions/linux-general-1/dmix-fails-to-work-by-default-or-with-config-file-388330/)

Lord Estraven 12-01-2005 12:25 PM

dmix fails to work by default OR with config file
 
My Ensoniq 1371 is a nice card, but unfortunately does not do hardware mixing. I'm using ALSA 1.0.10, so dmix should be enabled by default... But it's not, and I am unable to play more than one sound at a time without using a sound server suck as ARTS (which results in a nice little delay). I've tried asound.conf and .asoundrc files from various places, and not a single one got dmix working. What the heck is wrong with dmix?

cs-cam 12-01-2005 04:39 PM

Join the club :p

Lord Estraven 12-01-2005 06:07 PM

Yeah, I get it, this a common problem. Any idea why it exists?

cs-cam 12-01-2005 06:43 PM

If I did I'd have it working by now.

foo_bar_foo 12-01-2005 09:49 PM

you don't say what you tried in .asoundrc try this (i'm sure it will need some tweeking but it's a start)
Code:

pcm.ens1371 {
  type hw
  card 0
  device 0
}

pcm.dmixer {
  type dmix
  ipc_key 1111
  slave {
    pcm ens1371
  }
}

pcm.!default {
  type plug
  slave {
    pcm dmixer
    format S16_LE
    channels 2
  }
}

pcm.dsp {
    type plug
    slave.pcm "dmixer"
}

pcm.dsp0 {
    type plug
    slave.pcm "dmixer"
}


Lord Estraven 12-02-2005 03:59 PM

Okay, will try. Can that be put in asound.conf instead of .asoundrc though? Not a big problem, I just like to have ALSA stuff system-wide.

(In case it helps, the SB128 has a second channel - /dev/adsp. You have to manually tell applications to use this if you want them to use it when /dev/dsp is being used by something else, and it doesn't always work anyay.)

Lord Estraven 12-02-2005 05:35 PM

Well, there's a slight difference... Namely, that I now have to use OSS emulation or I get really crappy sound. But I still can't play multiple sounds at once, as shown by my attempt to use aplay and JuK at the same time:

Code:

[proteus@localhost ~]$ aplay /usr/share/sounds/alsa/Front_Center.wav
ALSA lib pcm_dmix.c:819:(snd_pcm_dmix_open) unable to open slave
aplay: main:544: audio open error: Device or resource busy


Lord Estraven 12-02-2005 05:42 PM

Nope, sorry, my bad... It works! :D Thanks!

Well, sort of works. I can play two .wav files at the same time, and get sound from both, BUT I can't use aplay or anything else that uses the audio directly when aRTs is running. How does aRTs manage to hog /dev/dsp so completely? Is there a way to make it share, now that I can support multiple channels?

Edit: This is really damn weird - I can play two things at the same time with aplay, but BZFlag prevents XMMS from accessing /dev/dsp and vice versa. WTH?

foo_bar_foo 12-02-2005 10:18 PM

Quote:

Originally posted by Lord Estraven
How does aRTs manage to hog /dev/dsp so completely? Is there a way to make it share, now that I can support multiple channels?

Edit: This is really damn weird - I can play two things at the same time with aplay, but BZFlag prevents XMMS from accessing /dev/dsp and vice versa. WTH?

arts get a lock on /dev/dsp
and want everything to go tru arts (that's kinda what sound servers do)
so arts can't be running

after arts is not running try the alsa output on xmms
basically /dev/dsp was before when there was sound mixing and polling and OSS and possibly even alsa oss emulation locks /dev/dsp or it can (i never really figured it out) -- this is why arts was written in the first place. to fix /dev/dsp so it could do software mixing -- so try to make sure everything uses alsa set the setting using gstreamer for gstreamer apps and make sure all soundservers are not running (arts) (esd)

Lord Estraven 12-03-2005 02:18 PM

Reinstalled and switched to XFCE-svn, which doesn't use a sound server. Now dmix works without any config file. I have no idea why.:confused:

Anyway... Before, I had XMMS using the ALSA plugin, and BZFlag of course uses ALSA. I'm guessing that config files somewhere from the previous version of ALSA were preserved last time I upgraded.


All times are GMT -5. The time now is 01:26 AM.