LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-24-2004, 01:13 PM   #1
kryptobs2000
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 306

Rep: Reputation: 30
How do I get dmixing in ALSA?


I need dmixing for a few things, but I can't get it working. I havn't tried, since I have no idea where to start. I don't know much about linux, I've googled it, and come up with some stupidass scripts and shit that make no sense to me. Can anyone help me get this working please? I'm using slack 10 with the 2.4 kernel, and the latest version of alsa.
 
Old 07-24-2004, 05:19 PM   #2
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
Have you read through the documentation at www.alsa-project.org on software mixing?

http://www.alsa-project.org/alsa-doc/doc-php/asoundrc.php?module=Generic#softmix

It's a fairly complete page, it'd be useful for you if you skimmed through the early section. However, the software mixing section does walk you through it pretty much.

Last edited by SBing; 07-24-2004 at 05:20 PM.
 
Old 07-24-2004, 06:15 PM   #3
rjerina
Member
 
Registered: Jul 2004
Location: Albuquerque, NM
Distribution: Slackware 10
Posts: 47

Rep: Reputation: 15
when i followed that guide, aplay was working fine multi-channel, when when i had xmms going and started vmware, sound server crashed...

ALSA lib pcm_hw.c:1155snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy

** WARNING **: alsa_setup(): Failed to open pcm device (hw:0,0): Device or resource busy

no sound from anything after that.

Last edited by rjerina; 07-24-2004 at 06:18 PM.
 
Old 07-24-2004, 08:47 PM   #4
kryptobs2000
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 306

Original Poster
Rep: Reputation: 30
I saw that, but I didn't understand it. They don't explain what things are like this:

A very interesting and potentially extremely useful aspect of this plugin is using it combined with the default plugin name. In theory this means all applications that have native ALSA support will share the sound device. In practice not many applications are able to take advantage of this functionality yet. However if you have time to test and report your findings to the application developers it is worth a try:

pcm.!default {
type plug
slave.pcm "dmixer"
}


pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:1,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
bindings {
0 0
1 1
}
}

ctl.dmixer {
type hw
card 0
}


(To use it with your own name just change the word !default above)

Maybe it's just common knowledge if you use linux, but where am I supposed to be putting that shit at? It's just some code, and it obviously dosn't go into some random text file, and I can't see where it says to put it. And what do I replace !defualt with? What is my 'own name' does that mean I can call it whatever the hell I want or what? I'm sorry if I'm sounding really dumb about this, but it just makes no sense to me.
 
Old 07-24-2004, 09:35 PM   #5
kryptobs2000
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 306

Original Poster
Rep: Reputation: 30
mmk, well I made a .asoundrc in my root directory, and here's it's contents:

pcm.!default {
type hw
card 0
}

pcm.!default {
type plug
slave.pcm "dmixer"
}


pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:1,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
bindings {
0 0
1 1
}
}

ctl.dmixer {
type hw
card 0
}

ctl.!default {
type hw
card 0
}

I guess that's how it's supposed to be I dunno. But when I add the second part that should enable the dmix plugin, I no longer have sound, and it says no such device exists when starting kde.

Last edited by kryptobs2000; 07-24-2004 at 09:36 PM.
 
Old 07-24-2004, 10:34 PM   #6
rjerina
Member
 
Registered: Jul 2004
Location: Albuquerque, NM
Distribution: Slackware 10
Posts: 47

Rep: Reputation: 15
try changing "pcm "hw:1,0"" to pcm "hw:0,0"
 
Old 07-25-2004, 04:11 AM   #7
kryptobs2000
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 306

Original Poster
Rep: Reputation: 30
Ok, thanks, that worked I guess. I have sound back, dunno if dmixing is working. I wanted to get that so I could play cod, but I still can't. Is there something else I have to do? Do I gotta have oss emulation or something too?
 
Old 07-25-2004, 01:39 PM   #8
rjerina
Member
 
Registered: Jul 2004
Location: Albuquerque, NM
Distribution: Slackware 10
Posts: 47

Rep: Reputation: 15
Quote:
Originally posted by kryptobs2000
Ok, thanks, that worked I guess. I have sound back, dunno if dmixing is working. I wanted to get that so I could play cod, but I still can't. Is there something else I have to do? Do I gotta have oss emulation or something too?
i have no idea. i got multi-channel sound testing with asound (like the instructions say to do), but when i had xmms playing and opened VMWare to boot Windows XP, all sound stopped. If someone could help us out here, it'd be pretty f'in schweet.
 
Old 07-25-2004, 02:22 PM   #9
kryptobs2000
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 306

Original Poster
Rep: Reputation: 30
Well I found out my problem in cod was I was telling wine to use oss, so I changed that to alsa, I'm still having problems running it, but thats for the other thread. So thanks for the help guys, hope you find out the answer to your problem rjenina
 
Old 06-20-2005, 06:43 AM   #10
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
vmware requires oss emulation last I looked
 
Old 12-08-2005, 09:35 AM   #11
fireedo
Member
 
Registered: Feb 2005
Location: Indonesia,Sidoarjo
Posts: 342

Rep: Reputation: 30
I can get multichannel sound but the second sound is choppy? can anyone help me?
I use this :
Code:
pcm.!default {
type hw
card 0
}

pcm.!default {
type plug
slave.pcm "dmixer"
}


pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
bindings {
0 0
1 1
}
}

ctl.dmixer {
type hw
card 0
}

ctl.!default {
type hw 
card 0
}
 
Old 12-08-2005, 11:08 AM   #12
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You could try increase the buffer_size, say 16384 or 32768
also maybe set the rate to 48000

More infos :
http://alsa.opensrc.org/index.php?page=AlsaSharing
 
Old 12-08-2005, 11:28 AM   #13
fireedo
Member
 
Registered: Feb 2005
Location: Indonesia,Sidoarjo
Posts: 342

Rep: Reputation: 30
alright....but how if I try to remove "rate xxxxx"?
but anyway things works now....thanx a lot for your help
 
Old 12-08-2005, 12:34 PM   #14
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
An upgrade to Slackware 10.2 or at least to ALSA 1.0.9 will help too - starting with ALSA 1.0.9 (which comes with Slackware 10.2) the DMIX is automatically enabled!

No need for those fancy .asoundrc files there.

Eric
 
Old 12-08-2005, 10:26 PM   #15
fireedo
Member
 
Registered: Feb 2005
Location: Indonesia,Sidoarjo
Posts: 342

Rep: Reputation: 30
that thing doesnt work for me coz I'm using USB soundcard (extigy) so I have setup "asoundrc"
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel-2.6.3 compiled with alsa but xmms alsa output dont plays demmylls Linux - General 3 09-01-2006 04:32 AM
Alsa sound *jumpy*: alsa-space: xrun of at least 11.449 msecs. resetting stream qwijibow Linux - General 6 04-22-2006 07:35 PM
ALSA-oss compatability works, but not programs intended for alsa ? qwijibow Linux - Software 5 03-14-2004 07:28 AM
ALSA on Debian, Kernel Source is There Alsa dosent see it? pfizur Linux - Software 3 12-27-2003 08:46 AM
2.6.0 minus built-in ALSA drivers + ALSA 1.0.0rc2 Tino27 Slackware 3 12-19-2003 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:24 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