LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 02-03-2006, 02:37 AM   #1
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Rep: Reputation: 15
RealTek ALC850 Not Sharing Sound


Hello, all. After my recent mostly-success of migrating to Linux, my roommate has decided to follow suit. His hardware is almost identical to my own (as I picked it for him when he was building a new box) and so the transition is going about as smoothly as my own.

One notable difference between the two machines is the sound card. I am using a SoundBlaster X-Gamer Pro 5.1 (EMU10K1 chipset) and he is using the RealTek ALC850 onboard sound (AC97 chipset) which came with the A8N-SLI motherboard we both use. For my part, I disabled the onboard sound in the BIOS.

On his machine, the snd_intel8x0 and snd_ac97_codec modules load perfectly. The aRTS daemon is running and he launches KDE. If he opens one program which requires sound, it works properly. However, opening two causes the second program to fail to obtain a sound stream with an error message very much like "OSS: failed to open /dev/dsp: resource is busy" or some derivative. We've tried switching manually specifying ALSA as KDE's sound system, but this just produces a different error message which means the same thing.

We've tried a number of applications in a number of orders, all with the same results: the first program to ask for sound gets it and everyone else is without sound until that program lets go. Running "lsof" on his machine reveals that the application is using "/dev/dsp"; on my machine, when I have two applications successfully coexisting on the sound card, they're both using "/dev/dsp0".

Any ideas what's going on here? We're both rather new to the Linux desktop and, despite the many hangups we've been experiencing, are rather enjoying it. I personally have found my development environment much happier for hard links.

If you need any further information, we can provide it on a whim. Thanks for reading; cheers!
 
Old 02-04-2006, 03:59 PM   #2
halvy
Member
 
Registered: Aug 2005
Location: Anchorage, Alaska (soon EU, hopefully)
Distribution: Anything NOT SystemD (ie. M$) related.
Posts: 918

Rep: Reputation: 42
first remember not only is linux a little over 10 years old, but it is even newer on the desktop and lacks the backing of large corporations that m$ has enjoyed for over 20 years.

when you say 'open two programs requiring sound'.. what exactly do you mean.

and is 'everything 'else' identical to the first mach?

is YOUR mach 'ok'?

this issue can be many, many things.

i'm not sure any of the servers you are using are capable (normally) of playing two different sounds (at once).. without special setups.

some programs (like vlc) require the sound system (the server that plays system sounds-- like windows opening, etc) to be OFF for sound to work in it.

it could be your driver-- sometimes there are people working on better drivers.. than even what the maintainers are offering through your repositories.. but you need to investigate this.

esd i believe was created to allow for playing more than one sound at a time.. but don't quote me.

there are some newer sound systems avilible as well, so check them out.

i install as many of them as possible, so when a prog needs them, it can call it up.

as far as setting the system up to 'stop & start' servers.. that is something that is over my head, but certainly 'doable'.. however NORMALLY a program should be able to 'at least' call a server up.. if not 'turn it off' afterwards, which may also be an issue here.

good luck, lettuce know
 
Old 02-04-2006, 06:09 PM   #3
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
I'm familiar with Linux's age and lack of corporate backing, yes. It would seem that it's doing quite well, considering; all of the necessary pieces seem to be there, but my lack of experience in using them (especially as opposed to my 15 years of using Microsoft OSes) is preventing me from being able to configure them properly. At least, this is what I suspect to be the problem. So I come here.

When I say "open two programs requiring sound", I mean that there are two applications which will output some kind of audio. Examples of a "program requiring sound" in this case are VLC, MPlayer, XMMS, AmaroK, DOSBox, GAIM, and so on. The use of the word "requiring" was a bit vague, I suppose.

Other than the sound card, the two machines are nearly identical. I believe mine has an additional hard drive, additional CD-ROM drive, and a floppy (which his does not - I haven't let that one die yet).

My machine's sound works fine except for a few minor glitches. If I turn the software amp up too high, I get a lot of fuzz and distortion; this isn't something that happened under Win2K, so I'd like to fix it in Linux. Additionally, the sound system sometimes chirps or clicks instead of playing a given wave, such as a sound effect in a video game. It will do this continuously for about a minute or two and then stop.

I am in the process of transitioning from Microsoft Windows to Debian Linux because I believe the latter will be more useable and more productive for my purposes, which involve amateur software development, standard desktop operations (e-mail, word processing, etc.), and computer gaming, among other things. I really like the feel of parts of the system, but I need to make sure I'm making the right decision here and not just being stubborn about Windows. In the year 2006, I'm sure Linux has the technology necessary to have multiple programs share the sound card nicely; Microsoft Windows has had this capability for some time and, in my experience, Linux is usually a bit ahead in that game. So, as I said, I imagine it's simply a matter of my inexperience and confusion getting in the way.

Mostly, I'm looking for suggestions as to where to start researching this problem. Any suggestions there?
 
Old 03-01-2006, 07:46 AM   #4
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
I'm still experiencing this difficulty with both my roommate's machine (only one application can emit sound despite the fact that aRts is running) and my own (the sound sometimes clicks or chirps instead of playing properly).

Does anyone have any ideas?
 
Old 03-01-2006, 11:09 AM   #5
halvy
Member
 
Registered: Aug 2005
Location: Anchorage, Alaska (soon EU, hopefully)
Distribution: Anything NOT SystemD (ie. M$) related.
Posts: 918

Rep: Reputation: 42
you can get kde to shut arts off after a set amount of time. this may be part of the problem. goto:

:kcontrol : Sound system : Auto-Suspend

set the time for a few seconds or even 1 or 2 to see if that helps.

do a: ps -A to see if it is shutting it down.

good luck, don't give up, let us know
 
Old 03-02-2006, 03:51 AM   #6
tvynr
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 143

Original Poster
Rep: Reputation: 15
Simply allowing the sound server to shut itself off doesn't solve the problem. If the sound server is off, an application that doesn't use aRts can dominate the sound card. We want all of the applications to share sound nicely.

I spent some time in the #kde IRC channel today and managed to obtain a couple pointers. Firstly, his software was not configured to use aRts properly as I thought it had been. We changed the settings on Amarok and VLC and installed the VLC aRts plugin. We also found out that the reason my sound card works fine is because the EMU10K1 chipset supports hardware-level muxing.

We have encountered two new problems, however.

#1: VLC's aRts plugin doesn't seem to work properly on his machine. If VLC is able to directly open /dev/dsp, it plays audio properly. If it isn't, the sound is choppy, as if samples are being dropped. VLC does not produce any useful information on the command line when this happens.

#2: We have a number of applications that do not use aRts. Using artsdsp seems to work okay on some of them, but on one particular application there is a problem. This application executes as follows:

* A shell script launches a binary loader
* The binary loader prepares some temorary files and then launches the main program binary
* The main program binary makes use of those temporary files and then attaches to the sound card

This means that launching the shell script or even the loader with artsdsp does not work, since the main program is what we need. However, the loader must be the program which executes the main program, since the main program relies on the loader for certain prep actions. So... is it possible to make a program execute with artsdsp in such a way that all child processes of that process are also using the aRts dsp device? That seems to be the only way for us to launch that program with sound.

Thanks for your help!
 
Old 03-02-2006, 04:51 AM   #7
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Arts is crap, ditch it. Just use ALSA directly for best results, have your roommate put this in their $HOME/.asoundrc file (if it doens't exist just create it) and see if you have any luck.
Code:
pcm.!default {
        type plug
        slave.pcm "swmixer"
}

pcm.swmixer {
        type dmix
        ipc_key 1234
        slave {
                pcm "hw:0,0"
                period_time 0
                period_size 1024
                buffer_size 4096
                rate 44100
        }
}
ctl.swmixer {
    type hw
    card 0
}
Remember that any apps set to output to Arts will need to be changed to output to Alsa.
 
Old 03-02-2006, 10:58 AM   #8
halvy
Member
 
Registered: Aug 2005
Location: Anchorage, Alaska (soon EU, hopefully)
Distribution: Anything NOT SystemD (ie. M$) related.
Posts: 918

Rep: Reputation: 42
with vlc (and possibly some of your other multimedia progs) it requires that you have your regular sound server OFF (ie the server that makes the 'system sounds' like when you open a window, etc), in order for it to give output. (at least with audio).

now unless this issue has been fix-- in general-- this is 'just the way it is', until someone (maybe you?) come along and resolve it.

also you said vlc does not give any useuful info with a particular problem when you launch it from the com line, but vlc has a seperate logging function that you may have over looked. (sorry if this seems lame, but i just want to make sure you have the basics covered).

it sounds like cs-cam may have given you something to at least help towards your goals.

i know we've been over this before, and you seemed to dismiss it or not agree, but the reason windows 'works' with most of the things is because they have had much more time and the luxery of working with most of the manufactures on these issues.

whereas linux multimedia abilities are one of the last hurdles for it.

the good part is, when we do get linux to work properly, it works infinitely better than windows ever could
 
Old 03-02-2006, 11:16 PM   #9
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Quote:
whereas linux multimedia abilities are one of the last hurdles for it.
Mmmmm, not really. The only problem is manufacturers not providing chip specifications and instruction sets. Like using the squillion-dollar sound card in the posters machine there were no problems, chip information available and it supports hardware mixing. Realtek on-board sound, problems. Life is unfair.
 
Old 03-03-2006, 02:01 AM   #10
halvy
Member
 
Registered: Aug 2005
Location: Anchorage, Alaska (soon EU, hopefully)
Distribution: Anything NOT SystemD (ie. M$) related.
Posts: 918

Rep: Reputation: 42
Quote:
Originally Posted by cs-cam
Mmmmm, not really. The only problem is manufacturers not providing chip specifications and instruction sets. Like using the squillion-dollar sound card in the posters machine there were no problems, chip information available and it supports hardware mixing. Realtek on-board sound, problems. Life is unfair.
well your argueing just to argue now.

regardless of your explaination, most everyone i know admits linux multimedia is a jumbled mess, for whatever reason.. and even you try to explain it away.
 
Old 03-03-2006, 02:57 AM   #11
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Sorry, unfortunately I don't know everything but if you'd like to post a contact email address I'd like to keep it handy for when I need to ask all those puzzling questions I previously thought answers didn't exist for.
 
Old 03-03-2006, 09:03 AM   #12
halvy
Member
 
Registered: Aug 2005
Location: Anchorage, Alaska (soon EU, hopefully)
Distribution: Anything NOT SystemD (ie. M$) related.
Posts: 918

Rep: Reputation: 42
Quote:
Originally Posted by cs-cam
Sorry, unfortunately I don't know everything but if you'd like to post a contact email address I'd like to keep it handy for when I need to ask all those puzzling questions I previously thought answers didn't exist for.
since i can't tell if your serious or not then here:

halvy at operamail dot com.

i am working on creating a debian based os which will be multimedia, hacker and amature radio centric.

i have done quite a bit of work on this so far and research.

i obviously don't have all the answers either except that when someone wants to do something specific concerning multimedia in linux, it is best to build the distro from scratch around one or two major programs that will be used-- instead of trying to get 'everything' to work at once.

sorta like when you are running servers, you usually pick the distro that is geared for that, in stead of the regular 'desktop' version.
 
  


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
Getting AC97 drivers use Realtek ALC850 SPDIF output Jaegermeister Linux - Hardware 14 05-01-2006 03:58 AM
Realtek alc850 sound problems TheCrizu Mandriva 1 09-24-2005 01:10 PM
Poor sound quality on ALC850 onboard sound (FC3) c_ryan Linux - Hardware 3 05-20-2005 03:58 AM
Problems with Realtek ALC850 sound chip Belegdol Linux - Hardware 2 04-08-2005 06:46 AM
2 in 1 : Realtek ALC850 and RADEON 9700 PRO ph0ngwh0ng Linux - Hardware 1 08-11-2004 03:00 PM

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

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