KDE audio with ALSA and Arts, how?

James Richard Tyrer tyrerj at acm.org
Sun May 2 18:21:30 BST 2004


Sean Schertell wrote:
> On Sunday 02 May 2004 02:32 pm, James Richard Tyrer wrote:
> 
>>Sean Schertell wrote:
>>
>>>On Sunday 02 May 2004 01:09 am, James Richard Tyrer wrote:
>>>
>>>>kde at schertell.com wrote:
>>>>
>>>>>Can someone please explain how to get KDE 3.2.2 to use alsa?  I've got a
>>>>>2.6.5 kernel and alsa is running but doesn't really work with KDE.  Here
>>>>>are some clues:
>>>>>
>>>>>1) The test sound works well from the control center, but I don't hear
>>>>>the KDE startup sound or any other KDE sounds.
>>>>>
>>>>>2) JuK sounds a bit "garbled" when set to use arts output
>>>>>(unlistenable).
>>>>>
>>>>>3) JuK produces no sound and skips to the next track when set to use
>>>>>GStreamer output.
>>>>>
>>>>>Help please!  I don't understand how KDE and arts and oss and gstreamer
>>>>>and alsa are supposed to all work together ?!  Mostly, I just want to
>>>>>get JuK sounding okay again.
>>>>>
>>>>>If you have any clues at all, please enlighten me!
>>>>
>>>>I'm not sure of your problem.
>>>>
>>>>IIUC, you must have the latest version of ALSA to use with the new
>>>>Kernel. Do you have ALSA 1.0.4?  If not, upgrading ALSA is the first
>>>>thing that I would suggest.
>>>>
>>>>There was a bug in KDE that you had to select ALSA in the Sound System
>>>>KCM. I don't know if that is still necessary, but I would then try that
>>>>as well.
>>>
>>>Thanks for your help... but actually, I do have the latest 1.04 ALSA and
>>>I've tried selecting ALSA or Threaded Open Sound System in Control Center
>>>-- same results.  I think maybe I've got too many sound modules loaded or
>>>something. Any other ideas?
>>
>>You must have: "/etc/modules.conf" setup correctly for it to work.
>>
>>There are copy and paste level instructions for most sound cards at:
>>
>>	http://www.alsa-project.org/alsa-doc/
>>
>>--
>>JRT
> 
> 
> 
> Thanks JRT,
> 
> Actually, I think I read somewhere that that file is no longer relevant under 
> a 2.6 kernel.  Can't remember what you're supposed to do instead -- I worked 
> on this for about 10 hours so I read a *lot* of stuff... but I still don't 
> understand how all of these things are supposed to work together:
> 
> * arts
> * arstd
> * oss
> * alsa
> * alsa with oss compatibility
> * gstreamer
> 
> Crikey, could they possibly make sound any more confusing on Linux even if 
> they tried?!  :-(

*Some* of this is simple.  OSS is the old system that is being replaced by 
ALSA.  So, if you are using ALSA, you don't use OSS, but ALSA has OSS 
compatibility so that it will work with older programs that don't support 
ALSA output yet.  It that was all, we wouldn't have any issues.

Then on top of that, KDE uses the aRts sound system.  This provides a 
higher level API to KDE applications using sound.  Like many UNIX things, 
aRts runs a daemon -- that wound be: "artsd".  You don't have to worry 
about the daemons, they are created by the aRts system when needed.

There are problems with aRts.  It doesn't seem to want to work with 
everything.  I find that to run the ALSAPlayer that I must first kill all 
of the instances of: "artsd".  I consider this to be a serious bug.

Then you are also using GStreamer program which I haven't tried yet (this 
is odd since I tend to try everything but I have been busy helping my 
Father move so that will probably have to wait two weeks or so).

It appears that GStreamer fits in the same place that aRts does.  It is a 
layer between the actual sound system and the applications using sound to 
provide a higher level API.  It is possible that GStreamer isn't getting 
along with aRts.

These two sound API systems: GStreamer and aRts both need to access the 
proper Linux device.  aRts will probably use: "/dev/dsp" although ALSA is 
supposed to use: "/dev/snd/*" and the current method refers to them by 
their "major number" rather than device name.  Device (psudo) files have a 
major and minor number to identify them to the system.  In any case, you 
should check the permissions of:

	/dev/dsp*
	/dev/audio*
	/dev/midi*
	/dev/mixer*
	/dev/sequencer 	
	/dev/sound/*
	/dev/beep

There seems to be a disagreement on whether the ALSA device directory 
should be named: "snd" or "sound".  I made a link:

	sound -> snd

in the: "/dev/" directory to eliminate this issue.

These devices all need to have the correct ownership and permissions for 
sound to work.  The orthodox UNIX method is to have them: root:sound:660. 
You then must have a group: "sound" and all user accounts that are 
permitted to use the sound system must be members of the group: "sound". 
Alternately, they can be: root:root:666, but this is considered to be bad 
security.  If you have PAM installed and running, you will find that the 
ownership and permissions of these devices might be changing and that this 
is screwing things up.  If you are using PAM and want those permissions 
with the group: "sound", you need to edit [as root]: 
"/etc/security/console.perms".  Change this line to read:

	<console>  0660 <sound>      0660 root.sound

Then use: "KUser" to set up the: "sound" group.  Restart KDE to see if this 
helps.  If not, IIWU, I would install ALSAPlayer and kill all: "artsd" and 
anything that is GStreamer and see if it works.

There is also Jack which I installed but have no idea how to use.  But, it 
might let you use more than one sound system at the same time.

--
JRT
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list