LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-01-2005, 12:25 PM   #1
Lord Estraven
Member
 
Registered: Aug 2004
Distribution: Pardus
Posts: 53

Rep: Reputation: 15
Angry 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?
 
Old 12-01-2005, 04:39 PM   #2
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Join the club
 
Old 12-01-2005, 06:07 PM   #3
Lord Estraven
Member
 
Registered: Aug 2004
Distribution: Pardus
Posts: 53

Original Poster
Rep: Reputation: 15
Yeah, I get it, this a common problem. Any idea why it exists?
 
Old 12-01-2005, 06:43 PM   #4
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
If I did I'd have it working by now.
 
Old 12-01-2005, 09:49 PM   #5
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
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"
}
 
Old 12-02-2005, 03:59 PM   #6
Lord Estraven
Member
 
Registered: Aug 2004
Distribution: Pardus
Posts: 53

Original Poster
Rep: Reputation: 15
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.)
 
Old 12-02-2005, 05:35 PM   #7
Lord Estraven
Member
 
Registered: Aug 2004
Distribution: Pardus
Posts: 53

Original Poster
Rep: Reputation: 15
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
 
Old 12-02-2005, 05:42 PM   #8
Lord Estraven
Member
 
Registered: Aug 2004
Distribution: Pardus
Posts: 53

Original Poster
Rep: Reputation: 15
Nope, sorry, my bad... It works! 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?

Last edited by Lord Estraven; 12-02-2005 at 05:52 PM.
 
Old 12-02-2005, 10:18 PM   #9
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
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)
 
Old 12-03-2005, 02:18 PM   #10
Lord Estraven
Member
 
Registered: Aug 2004
Distribution: Pardus
Posts: 53

Original Poster
Rep: Reputation: 15
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.

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does your distro use alsa & dmix by default? acid_kewpie Linux - Distributions 6 05-31-2006 02:30 PM
Default GUI Config File Permaximus Slackware 4 11-05-2005 01:59 AM
where is torsmo's default config file? Godsmacker777 Linux - Software 4 03-07-2005 09:38 PM
**Default Config File for Linux Kernel Problems** geogecko Linux - Software 4 02-12-2004 12:45 PM
a working default config file for 2.6 demmylls Linux - General 9 12-25-2003 11:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration