LinuxQuestions.org
Visit Jeremy's Blog.
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 08-15-2005, 02:22 AM   #1
compujas
LQ Newbie
 
Registered: Jul 2005
Location: New Jersey, US
Distribution: Ubuntu, Debian
Posts: 8

Rep: Reputation: 0
alsa dmix in ubuntu


Not sure where else I would put this, so I'll put it here. I recently installed Ubuntu 5.04 (which I believe is the newest) and I'm having trouble getting dmix to work properly. I have searched for a few days now and have tried everything I've found which the results range from causing both alsa and esd to segfault, to my current state where dmix works with alsaplayer from a terminal, but it does not seem to work with applications.

My current .asoundrc is as follows

Code:
# ~/.asoundrc

# soundcard and device to use
pcm.snd_card {
        type hw
        card 0
        device 0
}

# dmix plugin configuration - playback mixer
pcm.pmix {
        type dmix
        ipc_key 1024 # unique IPC key

        slave {
                pcm "snd_card"
                period_time 0 # reset to the default value
                period_size 1024 # in bytes
                # buffer_size or periods can be commented
                # they both represent the same thing in different values
                buffer_size 8192 # in bytes
                # periods 128 # INT
                rate 44100
        }
        bindings {
                0 0
                1 1
        }
}

# redirect default PCM device into dmix (pmix) plugin
pcm.!default {
        type plug # auto rate conversion plugin
        slave.pcm "pmix"
}

# legacy OSS /dev/dsp support, also redirects intp dmix (pmix) plugin
pcm.dsp0 {
        type plug
        slave.pcm "pmix"
}
# redirect OSS control into used soundcard
ctl.dsp0 {
        type plug
        slave.pcm "snd_card"
}
# redirect OSS mixer into used soundcard
ctl.mixer0 {
        type plug
        slave.pcm "snd_card"
}
When I run several commands in a terminal such as

Code:
alsaplayer -o alsa some.mp3 &
for a few different mp3s at the same time, it works perfectly fine, multichannel, both songs play, no problem. But when I run xmms to use alsa, it will play with no problem, but no other application (including alsaplayer via terminal) will play sounds. I know that it is possible to get this to work on my computer because I have done it before, but I don't remember how.

Like I said, I have searched for solutions for a few days now and have tried everything I could find that detailed the solution. If anyone has any ideas or needs more details, please let me know. Thank you in advance.

[EDIT]: I forgot to mention that I do kill esd before trying anything to keep it from interfering, and if anyone can tell me how to prevent esd from starting up automatically, that would be great as well.

Last edited by compujas; 08-15-2005 at 02:23 AM.
 
Old 08-17-2005, 12:44 AM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
i'm really not at all sure but try this instead (back up the one you are using !)
Code:
# dmix plugin configuration - playback mixer
pcm.pmix {
        type dmix
        ipc_key 1024 # unique IPC key

        slave {
                pcm "hw:0,0"
                period_time 0 # reset to the default value
                period_size 1024 # in bytes
                # buffer_size or periods can be commented
                # they both represent the same thing in different values
                buffer_size 8192 # in bytes
                # periods 128 # INT
                rate 44100
        }
        bindings {
                0 0
                1 1
        }
}

# redirect default PCM device into dmix (pmix) plugin
pcm.!default {
        type plug # auto rate conversion plugin
        slave.pcm "pmix"
}

ctl.!default {
	type hw           
	card 0
        }

ctl.pmix {
	type hw
	card 0
    }

# legacy OSS /dev/dsp support, also redirects intp dmix (pmix) plugin

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

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

Last edited by foo_bar_foo; 08-17-2005 at 12:45 AM.
 
Old 08-17-2005, 09:54 AM   #3
compujas
LQ Newbie
 
Registered: Jul 2005
Location: New Jersey, US
Distribution: Ubuntu, Debian
Posts: 8

Original Poster
Rep: Reputation: 0
Well, I don't know if that was the problem or just that I didn't check everything I should have. It seems to work now, I had to changed the command gaim was using to play sounds. Apparently it liked "aplay -D plug:dmix %s" enough to work, but not with other sounds playing, but without -D plug:dmix it works fine with xmms playing. So I suppose that's good enough until I find something else that doesn't work. Thanks for the help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Alsa: dmix and surround routing Vookimedlo Linux - Software 13 09-07-2010 01:46 PM
ALSA dmix: Permission Denied Davidian1024 Linux - Software 0 10-09-2005 01:48 PM
ALSA dmix + Skype = no go zenith_zth Linux - Hardware 0 06-12-2005 05:38 PM
alsa and dmix for software mixing darkleaf Linux - Software 6 04-02-2005 03:20 AM
alsa,amd64,chroot and dmix wrongman Debian 0 03-17-2005 12:19 PM


All times are GMT -5. The time now is 06:02 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration