View previous topic :: View next topic |
Author |
Message |
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Thu Oct 23, 2003 12:16 pm Post subject: ALSA, dmix, 2.6 kernel |
|
|
My question: how can I get dmix going? I use nforce audio (intel8x0), and the alsa driver doesnt support hardware mixing.
Theres plenty of threads around, presumably for 2.4 kernel users, because these guides involve editing "your alsa config", whereas us 2.6 users dont have this (right?). To get 2.6 with alsa going, all I did was compile it into the kernel, emerge inject alsa-driver, emerge alsa-utils, and use alsamixer to unmute the channels.
All I'd like to do is try dmix, so I can play multiple audio streams at once. I've tried ESD, and arts, and didn't like them. I'd at least like to give dmix a go, before sticking my sb live back in
cheers. _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
Helena Veteran
Joined: 02 Apr 2003 Posts: 1114 Location: Den Dolder, The Netherlands
|
Posted: Thu Oct 23, 2003 1:21 pm Post subject: Re: ALSA, dmix, 2.6 kernel |
|
|
dsd wrote: |
Theres plenty of threads around, presumably for 2.4 kernel users, because these guides involve editing "your alsa config", whereas us 2.6 users dont have this (right?). To get 2.6 with alsa going, all I did was compile it into the kernel, emerge inject alsa-driver, emerge alsa-utils, and use alsamixer to unmute the channels.
|
I don't know about dmix, but you may want to check out this thread https://forums.gentoo.org/viewtopic.php?t=97157 where some advice is given on ALSA & 2.6. |
|
Back to top |
|
|
romaninsh n00b
Joined: 09 Jun 2003 Posts: 13
|
Posted: Sun Nov 30, 2003 3:58 am Post subject: |
|
|
2.6 kernel only provides low level driver. alsa-libs uses /etc/asound.conf or asoundrc. Here is a good guide to setting up dmix:
http://alsa.opensrc.org/index.php?page=DmixPlugin
dispite i failed to make xmms/mplaye/kde3.2 to produce sound together, it might help you. |
|
Back to top |
|
|
arkanlor n00b
Joined: 06 Jan 2004 Posts: 30
|
Posted: Wed Feb 11, 2004 3:34 pm Post subject: |
|
|
i created an asound.conf in /etc but somehow it is ignored
does it work for somebody else? |
|
Back to top |
|
|
arkanlor n00b
Joined: 06 Jan 2004 Posts: 30
|
Posted: Wed Feb 11, 2004 4:12 pm Post subject: |
|
|
would be interesting if any 2.6.x user has made alsa to use dmixing
i can dmix with alsaplayer, but my slave-pcm arent created at boot-time, my asound.conf is completely ignored.
maybe i got something wrong. |
|
Back to top |
|
|
mlsfit138 Guru
Joined: 20 Sep 2003 Posts: 406 Location: Washington
|
Posted: Thu Feb 12, 2004 6:50 am Post subject: |
|
|
That dmix plugin guide left me confused as to where i'm supposed to put the asoundrc file. It said: Quote: | 3) configure .asoundrc for aoss-testing:
# ~/.asoundrc:
pcm.dsp0 {
type plug
slave.pcm "hw:0"
}
# or:
# pcm.dsp0 pcm.default
# if "default" hasn't been redefined
ctl.mixer0 {
type hw
card 0
}
| which makes me think that it should go in the user's home directory, but how much sense does that make? It seems unlikely that when alsa starts up at boot time that it would search the user's home directories.
I have a somewhat related question: If my alsa sound drivers do not support hardware mixing, does that necessarily mean that my sound card is not capable of hardware mixing? Could it be an incomplete driver problem? I use the via_82xx sound driver. if anyone could fill me in, I'd appreciate it. Thanks _________________ "Everytime you justify
another good in you dies"
-Converge, The Saddest Day, Petitioning the Empty Sky |
|
Back to top |
|
|
Woody Guru
Joined: 30 Nov 2002 Posts: 592 Location: Milwaukee
|
Posted: Thu Feb 12, 2004 4:51 pm Post subject: |
|
|
Yes it is ~/.asoundrc. |
|
Back to top |
|
|
TyroneSlothrop n00b
Joined: 27 Sep 2003 Posts: 39 Location: Franconia, Central Europe
|
Posted: Thu Feb 12, 2004 8:25 pm Post subject: |
|
|
And it's in fact read every time you start something alsa... i was wondering myself... _________________ warning: potentially offensive but true nonetheless... |
|
Back to top |
|
|
mlsfit138 Guru
Joined: 20 Sep 2003 Posts: 406 Location: Washington
|
Posted: Fri Feb 13, 2004 3:45 pm Post subject: |
|
|
TyroneSlothrop wrote: | And it's in fact read every time you start something alsa... i was wondering myself... | nice doo. _________________ "Everytime you justify
another good in you dies"
-Converge, The Saddest Day, Petitioning the Empty Sky |
|
Back to top |
|
|
jernst n00b
Joined: 28 May 2004 Posts: 23
|
Posted: Fri May 28, 2004 6:17 pm Post subject: |
|
|
FYI the dmix plugin works just fine with me (kernel=2.6.5). |
|
Back to top |
|
|
k_One n00b
Joined: 03 Nov 2003 Posts: 7
|
Posted: Sat May 29, 2004 3:25 pm Post subject: |
|
|
Quote: | FYI the dmix plugin works just fine with me (kernel=2.6.5). |
what kind of audio card do you have ?
what your ~/.asoundrc cinf ?
bacause I can't get it work;
I'm using :
-kernel-2.6.5
-the built-in alsa driver
-and I have a intel8x0 card |
|
Back to top |
|
|
jernst n00b
Joined: 28 May 2004 Posts: 23
|
Posted: Sat May 29, 2004 3:52 pm Post subject: |
|
|
k_One wrote: |
what kind of audio card do you have ?
|
Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 16).
Quote: |
what your ~/.asoundrc cinf ?
|
Code: |
$ cat ~/.asoundrc
pcm.!default {
type plug
slave.pcm dmixer
}
pcm.dmixer {
type dmix
ipc_key 1024 # This must be a unique IPC key (see ipcs output)
ipc_key_add_uid true # UID will be added to IPC key
slave {
pcm "hw:0"
period_time 0
period_size 1024 # Must be power of 2 for alsa-oss
buffer_size 8192 # ditto
rate 44100
}
}
|
Quote: |
I'm using :
-kernel-2.6.5
-the built-in alsa driver
|
same here
I didn't make anything else.
Hope it helps, |
|
Back to top |
|
|
MasterX Veteran
Joined: 26 Jun 2003 Posts: 1165
|
Posted: Sun May 30, 2004 6:10 am Post subject: |
|
|
Do you know why dmix does not work for mplayer?
I can run xine and amarok together, but not mplayer and amarok |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Sun May 30, 2004 9:40 am Post subject: |
|
|
you need to merge the latest mplayer from ~ and switch to using the alsa9 audio driver in your config. you then need to set it up to use the dmixed pcm output that you have set up in ~/.asoundrc _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
MasterX Veteran
Joined: 26 Jun 2003 Posts: 1165
|
Posted: Sun May 30, 2004 4:08 pm Post subject: |
|
|
dsd wrote: | you need to merge the latest mplayer from ~ and switch to using the alsa9 audio driver in your config. you then need to set it up to use the dmixed pcm output that you have set up in ~/.asoundrc |
I do have the latest version of mplayer (1_pre4_r3), I have set it to use alsa9 audio driver. The only thing I do not know how to do is to set it up to "use the dmixed pcm output that you have set up in ~/.asoundrc"
BTW, the " ~/.asoundrc" is the one jenrst posted.
One more thing. When you create the " ~/.asoundrc", do you need to reboot the system or restart the alsa script? I did not do any of the above! How do I know that alsa is using " ~/.asoundrc"?
Thank you |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Wed Jun 09, 2004 5:05 pm Post subject: |
|
|
sorry for the late response
with mplayer-1.0_pre4-r4
you just need to do
Code: | echo "ao=alsa1x:dmixer" >> /etc/mplayer.conf |
where "dmixer" is the name of the dmix device you have configured in ~/.asoundrc
there is no need to restart anything when changing .asoundrc, it is read every time you play a sound. _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
Kimmo_S n00b
Joined: 10 Apr 2004 Posts: 45
|
Posted: Thu Jul 08, 2004 3:42 pm Post subject: It still looks like it is not transparent. Why, oh why? |
|
|
I am not sure if I got everything right, but this messing with daemons and plugins feels enormously frustrating to me.
I mean, why can't they make a _transparent_ software mixer? Why must every software be "updated" and "configured" to support the software mixing thing? Why on Earth couldn't they make a plugin that needs no attention from the actual software, but just lets the software open and open the sound device? Why must mplayer, arts and others _know_ about the dmix plugin and _select_ it? That is not transparent.
How are people ever going to use outdated or sluggishly updated software with dmix? I mean, for this much trouble, someone could have made the plugin truly transparent, so that software using it wouldn't need to know it exists. So that software would just think it is opening an ordinary PCM device all for itself. Configuring the dmix plugin should be enough and would be enough if it was truly transparent.
How will I use timidity with dmix? If I want to use dmix to mix the output of two timidity instances, afaik. it is a _no_ can _do_, because timidity has not been _updated_ (graahh) with support for dmix! Why couldn't someone do it in such a way that one timidity would know nothing about the other, but just think it is opening the only PCM device in town? |
|
Back to top |
|
|
Kimmo_S n00b
Joined: 10 Apr 2004 Posts: 45
|
Posted: Thu Jul 08, 2004 4:51 pm Post subject: Let's check it again... |
|
|
Surprisingly, I could make two instances of Timidity to play at the same time. I guess it supports ALSA natively then.
But I could not make modplugplay cmdline client to use dmix. And I could not use XMMS OSS plugin to play at the same time with anything else. So it is still not transparent. And my Gentoo system doesn't have the aoss script, even if I did want to use such thing.
Does anyone have experiences with the following situations:
1. Mixing a 44100Hz source to 48000Hz in dmix. I know it works, but does it hurt sound quality? I couldn't say yes or no.
2. Using an application with ALSA 0.5 API with dmix plugin. Does it work or not?
3. Using the Allegro library to play a game's MIDI music through timidity, and SFX directly. With SB 128 this needs transparent dmix'ing to hear both. |
|
Back to top |
|
|
foxtrot n00b
Joined: 25 Nov 2003 Posts: 30 Location: Atlanta, GA
|
Posted: Thu Jul 08, 2004 5:27 pm Post subject: Re: It still looks like it is not transparent. Why, oh why? |
|
|
Kimmo_S wrote: |
I mean, why can't they make a _transparent_ software mixer? Why must every software be "updated" and "configured" to support the software mixing thing? Why on Earth couldn't they make a plugin that needs no attention from the actual software, but just lets the software open and open the sound device? Why must mplayer, arts and others _know_ about the dmix plugin and _select_ it? That is not transparent.
|
To me, the problem is that this is something that should be handled by the driver. Both my nForce 2 board and my KT-600 based board, in theory, have hardware mixers. (Both also support 5.1 audio in hardware, as well, but that's another gripe for another time...) But neither can play more than one sound at once, not because the hardware doesn't support it, but because the driver doesn't. nVidia doesn't care enough about us Linux users to bother to write a driver (hence, we use the Intel 8x0 driver...); and I'm not sure VIA writes drivers for anything other than Windows to begin with.
I'm almost to the point where I'm gonna go out and just buy a pair of Sound Blaster Audigy cards, one for each box. So far, that looks like it's the only way to get functional hardware mixing and 5.1 audio support in Linux.
-JDF |
|
Back to top |
|
|
Nibor n00b
Joined: 19 Dec 2003 Posts: 4
|
Posted: Tue Jul 20, 2004 10:38 pm Post subject: |
|
|
Yeah! Well, hi ...
With much of trying and reading, looking for help in the forums, I finally got dmix to work with mplayer!
I just created the file ~/.asoundrc like posted earlier in this thread and then I could start mplayer with the following command, maybe it helps someone =)
Code: | mplayer -ao alsa:device=dmixer ... |
Yay, thank you, 'forum' ^^
Well, I'll stop this useless post now Sorry...
- nibor - |
|
Back to top |
|
|
|