Results 1 to 10 of 42

Thread: KDE4 Phonon and PulseAudio

Threaded View

  1. #1
    Join Date
    Apr 2008
    Ubuntu 9.10 Karmic Koala

    KDE4 Phonon and PulseAudio

    KDE4 Phonon and PulseAudio on Intrepid and Jaunty

    Read this entire post before doing anything!!!

    If you are not using KDE4 on Intrepid 8.10 or Jaunty 9.04 do not attempt this. If you are happy with your current Kubuntu Intrepid or Jaunty KDE4 sound setup I strongly suggest that you do not do this. If you have more than one hardware sound device and are having difficulties controlling them all in KDE4/Kubuntu, this may be for you.

    KDE4 comes with Phonon which is the new sound API and sound server for KDE applications. It is a partial replacement for the aRts sound server which was used in previous versions of KDE. Phonon is still very much a work in progress and it is expected that it will improve greatly as it matures so please be patient.

    I have two sound cards and a usb headset and a usb webcam with a mic. I could find no reasonable way to manage all this with Phonon so I use Pulseaudio. Hopefully Phonon will be able to take over many of these functions in the future but for now Pulseaudio will do the work.

    First, an important point, I installed KDE4 on top of Gnome, I use them both so I am probably using quite a few packages that do not come with the Intrepid or Jaunty Kubuntu install. Just be aware that you may need to get many packages from the repos to satisfy all the dependencies of the packages necessary for this to work if you have installed only Intrepid Kubuntu. If someone could let me know exactly what they needed to install to get all this to work properly it would be much appreciated.

    Here's what I did to get PulseAudio managing all the sound for me in Intrepid KDE4.

    ************************************************** ************************************************** ********

    Setting Up Pulse
    First you need to get pulseaudio installed and set up properly if it is not already. You can get all the pulseaudio packages with your package manager. You also need to get a few other items and set up alsa, xine, gstreamer, phonon and pulseaudio for maximum usability.

    Launching Pulseaudio
    Pulseaudio does not start by default with KDE (for me anyway) so you need to put a launcher in System Settings/Autostart. I also made a launcher for padevchooser to get the Pulse Audio Applet in the KDE panel. You can also see post #9 in this thread for how to start pulseaudio automatically in KDE4.2

    Open System Settings/Advanced/Autostart. Select Add program, type pulseaudio -D in the box and select Run in Terminal and Do not close when command exits click OK. In permissions check Is executable. In Application/Name type Pulseaudio and check that the Command is pulseadio -D so it starts with the defaults from click OK. To set up the padevchooser launcher it is basically the same just change pulseaudio to padevchooser.

    Log out, log back in and pulseaudio should be running and you should have the Pulse Audio Applet in your panel. Click on the applet and choose Volume Control.
    If, when you try to open the volume control you get a message
    connection refused
    That means that pulseaudio is not running. This means that something is wrong with the Autostart launcher so you should check that and make sure it is set up correctly.

    You can also start the pulseaudio daemon from a terminal with
    pulseaudio -D
    If you need to stop pulseaudio for any reason use this command
    killall pulseaudio
    To avoid confusion and difficulties please read through the rest of this post before following the directions in the the link since it was not written with KDE users in mind but will direct you to the the packages you need and give you some basic pulseaudio setup information if you are unfamiliar with it.

    For Jaunty

    ************************************************** *****************************
    Setting up KDE4

    In System Settings/Sound make default the first preferred option and in Backend you can prefer either gstreamer or xine since we will set them both up for pulseaudio. If you change these while an application is playing you may lose its sound output and need to restart the application.

    ALSA setup
    In Settings/Default Sound Card asoundconf.gtk choose PulseAudio. This will send everything that goes to alsa to PulseAudio. (asoundconf.gtk is a little gui that sets the alsa default sound card)

    gstreamer Setup
    In Settings/Multimedia System Selector/Audio/plugin select the PulseAudio Sound Server and set Device to Default.

    xine setup
    Start xine, open the Setup window and select the Audio tab. For audio driver to use select pulseaudio and leave device used for pulseaudio empty.

    Log out and log back in and click on the Pulse Audio Applet and choose Volume Control. This will open the pulseaudio volume control. Start up Amarok or some other application that plays sound and make it play something. You should see it in the Volume Control Playback tab and all your hardware sound devices in the Output tab. You can adjust the volume sliders or mute the stream or right click on the stream and change its Output Device.

    In the Settings menu you should now have Pulse Audio Preferences Sound Server Preferences. You can open that and in the Simultaneous Output tab check the box "Add virtual device for simultaneous output on all local sound cards" and have a virtual device in the Pulseaudio Volume Control/Output Devices that will direct the sound to all your sound hardware at the same time, you can direct a stream to it and control the volume like with any other output device, not a bad thing.

    Sound Capture and recording
    Phonon does not currently offer a alsa default device or a pulseaudio device for sound capture and recording in System Settings/Sound. For applications using Phonon there is currently no way to direct them to use the pulseaudio input devices so for now you are stuck with choosing hardware devices in System Settings/Sound for sound capture/recording. This is not so bad because Phonon gives you a lot of choices including the ability to capture hardware output streams as well as inputs.

    ************************************************** **********************

    If you are having more general problems with setting up your sound or want some more in depth information you can always go to the 10,000 page guide here

    If this does not work for you or you have questions or comments or something to add concerning KDE4 and sound, please post here. This is very much a first draft but everything has to start somewhere.....and the first thing I need to know is if this creates a total nightmare for Kubuntu Intrepid users.

    Best regards,
    Last edited by markbuntu; May 10th, 2009 at 04:05 AM.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts