Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm relatively new to Linux. I'm using Sabayon, a flavour of Gentoo, atm. It's great - fast and pretty beats Vista and OSX. WINE is running my games reasonably.
I have one problem, related to sound. I have two soundcards in my PC, one is a Creative X-Fi, which Creative haven't released linux drivers for yet, so I'm using the other one; a C-Media CM6501. It's built into my motherboard, on the USB Bus. Odd. Sabayon sees it as a PnP audio device.
It works fine on some apps (beep media player, sauerbraten, etc), but others I have to pipe through EsounD. And EsounD sounds pretty bad when it comes to playing music it stutters a LOT. Especially in Windows stuff - it lags a second behind graphics.
So my question is this: can someone tell me either A) How to force ALSA to only use one card (hw:1), or B) How to setup JACK properly to replace EsounD?
welcome !
yea i think use alsa directly too.
jack is unfortunately still too esoteric for linux at large.
apps have to written specifically to be aware of jack and not all are (few actually are).
I've just realised something: ALSA might be messing up because the soundcard that works on my comp (the CMedia) doesn't have any drivers of it's own, it's listed as a PnP USB Audio device. Makes sense, since it's on the USB Bus, but what's the name of the driver for generic USB audio devices? I can't find the device in lspci | grep -i audio...
So I'm kind of stuck at the "Installing alsa-driver" step of the HOWTO ALSA/DMix page on the Gentoo Wiki.
you should be able t see your device with the command
aplay -l
and also
lsusb
some systems try to prevent usb audio devices from becoming primary soundcard (sound device 0)
so if you want it to be device 0 look in /etc/modprobe.d folder (or whatever it is for gentoo) for a line like
options snd-usb-audio index=0
sometimes it will be specifically set to something other than 0 and can be keeping your card in the background.
I found out it was snd-usb-audio earlier. 've got sound in WINE now, through OSS
But I can't get dmix running... when I emerge alsa-drivers (one of the things it said in the wiki to emerge), it spits out a load of errors about it already being in the kernel, which it's not, because I recompiled the alsa support to be modular. (I think)
I get errors in aplay, mpg123/321 etc. like this:
Code:
ALSA lib pcm_dmix.c:864:(snd_pcm_dmix_open) unable to open slave
Last edited by TehDooMCat; 04-04-2007 at 03:37 PM.
But I can't get dmix running... when I emerge alsa-drivers (one of the things it said in the wiki to emerge), it spits out a load of errors about it already being in the kernel, which it's not, because I recompiled the alsa support to be modular. (I think)
You should only enable sound support in kernel. Don't enable oss or alsa at all, not even as mods if you are installing alsa separately.
this is most likely not it since you got it basically working but make sure esd or artsd is not running.
ESD and aRts aren't running. I checked that.
Could it be my .asoundrc file? This is what it looks like:
Code:
pcm.ossmix {
type dmix
ipc_key 1024
slave {
pcm "hw:0,1" # make sure this matches the actual device
#period_time 0 # not necessary since ALSA 1.0pre
period_size 1024 # Use a power of 2
buffer_size 4096 # must be a multiple of period_size
#rate 44100 # not necessary; let alsa-lib handle this
}
bindings {
0 0
1 1 # bind only the first 2 channels
}
}
pcm.duplex
{
type asym
playback.pcm "ossmix"
capture.pcm "dsnoop"
}
# Everything shall be dmixed, so redefine "default":
# Note that this is _not_ a good idea, since dmix doesn't allow mmap access currently
pcm.!default {
type plug
slave.pcm "duplex"
}
# OSS via aoss should d(mix)stroyed:
pcm.dsp0 {
type plug
slave.pcm "duplex"
}
ctl.ossmix {
type sw
card 0
}
Basically copied & pasted from a website with a few changes. But it's still not software mixing properly, OSS still locks the card, and ALSA refuses to play anything in programs like amarok.
But I can't get dmix running... when I emerge alsa-drivers (one of the things it said in the wiki to emerge), it spits out a load of errors about it already being in the kernel, which it's not, because I recompiled the alsa support to be modular. (I think)
It does not matter whether ALSA is compiled in or as module, it's still kernel ALSA. ALSA-drivers work outside of kernel. With latest in-kernel ALSA dmix is enabled by default, no special effort is needed to use it.
It does not matter whether ALSA is compiled in or as module, it's still kernel ALSA. ALSA-drivers work outside of kernel. With latest in-kernel ALSA dmix is enabled by default, no special effort is needed to use it.
Then why didn't it show any signs of working, and why doesn't the alsa-driver method work with dmix for me either?
Come to think of it, Q2 of the year is this month, next month and June, so I may as well wait a few months for Creative to release the X-Fi drivers. Thanks for helping y'all, now I can at least enjoy some games while I wait for Creative to come out with the drivers I don't really mind if I can't listen to music and have game sounds at the same time. One usually drowns out the other anyway.
It probably is better not to have too many sound daemons running, ALSA is just enough. So I'd recommend removing esd, oss and arts USE flags followed by 'emerge -avND world'. Then adjust your sound apps to use "default" device, it is going to be dmix.
It probably is better not to have too many sound daemons running, ALSA is just enough. So I'd recommend removing esd, oss and arts USE flags followed by 'emerge -avND world'. Then adjust your sound apps to use "default" device, it is going to be dmix.
I've done that now. Nearly all the programs that want sound work now, in perfect harmony it was .asoundrc. I changed "hw:0,1" to "hw:1" and it works now. WINE still won't play nice with the other programs though, running it through aoss doesn't help either. I shall keep experimenting with regedit and the "Alsa Driver" key.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.