LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-10-2005, 12:44 PM   #1
systemparadox
Member
 
Registered: Jul 2004
Location: Tavistock, Devon, England
Distribution: Slackware 9.1, Mandrake 9.0/9.1/10.0, LFS 6.0, Knoppix 3.1/3.3
Posts: 73

Rep: Reputation: 15
Intel8x0 soundcard- cannot play multiple sounds (Thinkpad T23)


I used to have an IBM Thinkpad T20 with a Crystal CS426x soundcard. This worked fine- I could play sounds from any program whether they used OSS, Alsa, Arts or whatever, and I could play as many sounds as I liked simultaneously (and they did not lag behind).

I have now upgraded to a Thinkpad T23, which has a whole load of integrated intel devices. My soundcard shows up as "00:1f.5 Multimedia audio controller: Intel Corp. 82801CA/CAM AC'97 Audio (rev 02)" in lspci. After some problems caused by me being stupid and losing my kernel config, I got the snd-intel8x0 module compiled and working with my 2.6.8.1 kernel.

Sound still works with all programs, but I can only play one sound at a time. To fix this I tried using Arts, which was already set up and running on KDE. This worked, but I cannot tell all apps to use Arts, particularly console apps, which I use a lot (and often when KDE isn't running too).

Also, the sound lags. For example, when I press pause on XMMS it takes half a second or so to stop- likewise with any sound playing on any other app. This lag also means that the analyser on XMMS doesn't match up- so much so that I have turned it off- it's very annoying.

Some searching pointed me to the user submitted tips on the alsa website, but these don't seem to have made any difference- this is the main reason for this thread- the tips look promising, but I need some help. I currently have the following in my /etc/asound.conf (I did not have any asound.conf until a few minutes ago, but it is referenced in /usr/share/alsa/alsa.conf so it should affect things I guess):

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

bindings {
0 0
1 1
}
}

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

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

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

ctl.mixer0 {
type hw
card 0
}
I have no idea what the above settings do, or how to debug them- I would very much appreciate some pointers.

Thankyou in advance
Simon
 
Old 06-13-2005, 03:31 AM   #2
dub.wav
Member
 
Registered: Aug 2003
Location: Norway
Distribution: FC4
Posts: 83

Rep: Reputation: 20
What applications did you test it with? Did you disable ARTS?
Dmix only works with programs that use ALSA.

I recommend trying out the settings from the amarok wiki, http://amarok.kde.org/wiki/index.php..._Dmix_for_ALSA or google cache if you can't access it (I can't). They worked for me on another card which uses the same driver.
 
Old 06-13-2005, 03:52 AM   #3
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
Did you set all the apps. that use sound to use ALSA? If they're trying to use something else, it also won't work.
 
Old 06-20-2005, 01:07 PM   #4
systemparadox
Member
 
Registered: Jul 2004
Location: Tavistock, Devon, England
Distribution: Slackware 9.1, Mandrake 9.0/9.1/10.0, LFS 6.0, Knoppix 3.1/3.3
Posts: 73

Original Poster
Rep: Reputation: 15
I tried disabling arts and telling it to use alsa. Neither worked. I did manage to get multiple sounds in the console from two instances of madplay using the aoss oss compatibility libraries, but I have not got any native alsa apps to work!

Why isn't it possible to just route all sounds going to /dev/dsp or whatever to an alsa input device (which will support multiple PCM streams), and then get alsa to mix them all together along with any sounds from apps which use alsa directly and send them to the real card?

Does my "new" soundcard not support hardware mixing then?

I think I really do need OSS support, and changing all the shortcuts or aliasing all the commands to use 'aoss [command]' is just not an option.

Thanks
Simon
 
Old 02-16-2006, 03:25 PM   #5
systemparadox
Member
 
Registered: Jul 2004
Location: Tavistock, Devon, England
Distribution: Slackware 9.1, Mandrake 9.0/9.1/10.0, LFS 6.0, Knoppix 3.1/3.3
Posts: 73

Original Poster
Rep: Reputation: 15
Thumbs up

FINALLY FIXED!
(Well, sortof)

Ok here's the solution...

Upgrade to latest ALSA (upgrade kernel if needs be- probably a good idea anyway). Versions above something like 1.0.9 have dmix setup and enabled by default.

Now most (ALSA-aware) apps will either use dmix by default, or you should specify "dmix" as the device to use.

Most OSS apps should work using the "aoss" wrapper lib ("aoss [command]").

Some apps have bugs.
XMMS is the killer. I did almost all my testing with that and found that when using a new ALSA it would cut out randomly and was not able to resume from a pause. Sometimes it would crash randomly as well.
Reason? Newer ALSA has dmix enabled. XMMS was not written with dmix in mind and does things only work on a physical channel of a hardware mixing soundcard.

See XMMS bugzilla bug 1716: http://bugs.xmms.org/show_bug.cgi?id=1716

Yes, you do need to patch and recompile XMMS.
(Though you really shouldn't have a problem doing that IMHO- especially if you want to get hardware working.)

Googling for "xmms dmix bug" gives plenty of results to help with lockups and cut outs.

I found that increasing XMMS's buffer size settings for the ALSA output plugin to be the same as the OSS output plugin fixed all other problems.

So to summarise...
- It's not stupidly difficult to setup anymore.
- It does work.
- But the apps either need to work with ALSA or the aoss wrapper.
- And not have dmix related bugs.

Hope this is helpful to some of the poor people out there who are stuck with intel8x0's (and similar rubbish) in their laptops.
Simon
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware 10.2, 2.6.13 kernel recompile, and a Thinkpad T23 SocialEngineer Slackware 8 10-23-2005 06:46 PM
Cant play multiple sounds at once in Knoppix slashjunior Linux - Hardware 2 06-17-2005 11:44 AM
Mandrake 10.1 in IBM Thinkpad T23 tantotea Mandriva 3 03-11-2005 10:47 AM
Suse on t23 thinkpad sachinnshah Linux - Networking 0 09-27-2004 12:47 AM
alsa not letting me play multiple sounds. e1000 Linux - Hardware 5 05-01-2004 08:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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