Phonon

From openSUSE


Applicable to openSUSE-11.0 KDE4


Contents

Phonon in openSUSE


This page is still very much a draft and not proven/verified. Use at your own risk.

Phonon overview


In KDE 4 developers are using a new multimedia API, known as Phonon. Phonon is intended to provide a common interface on top of other systems, such as GStreamer. http://en.wikipedia.org/wiki/Phonon_(KDE)

Phonon is a new KDE technology that offers a consistent API to use audio or video within multimedia applications. The API is designed to be Qt-like, and as such, it offers KDE developers a familiar style of functionality. Firstly, it is important to state what Phonon is not: it is not a new sound server, and will not compete with xine, GStreamer, ESD, aRts, etc. Rather, due to the ever-shifting nature of multimedia programming, it offers a consistent API that wraps around these other multimedia technologies. Then, for example, if GStreamer decided to alter its API, only Phonon needs to be adjusted, instead of each KDE application individually.

Phonon engines/backends

Phonon is powered by what the developers call "engines" and there is one engine for each supported backend.

Currently for KDE-4 there are various backends/engines in development:

The goal for KDE 4.0 is to have one 'certified to work' engine, and a few additional optional engines. http://mail.kde.org/pipermail/phonon-backends/2006-October/000003.html

A backend library list is maintained here: http://phonon.kde.org/cms/1034

It is planned that a Phonon backend can make use of GStreamer (or NMM or Xine or whatever else might make sense, DirectX on Windows, QuickTime on MacOS). Phonon is only a comparatively simply multimedia API while the backend is the adaptor between the Phonon API and a (full featured) media framework.

Other engines that have been suggested include DirectShow (for the Windows platform), and QuickTime (for the Mac OS X platform). Development on these additional engines has not yet started, as the Phonon core developers are more concerned with making sure that the API is feature-complete before worrying about additional engines. If the Phonon developers attempt to maintain too many engines at once while the API is still in flux, the situation could become quite messy (If you would like to contribute by writing an engine, jump into the #phonon channel at irc.freenode.org).


Common Phonon problems

The reference for this section is http://phonon.kde.org/cms/1032 (as of 12-Aug-2008). Its possible some (most ? ) of these "common problems" do not apply to openSUSE (this is still to be checked).

No sound

The follow causes have been documented:

  • Permission issues
  • Incorrect default ordering of the audio devices. Phonon tries to detect which device is S/PDIF or USB or Modem or whatever and order/hide the devices as needed. But as the information is sometimes missing Phonon cannot always determine the type of device correctly.
  • Missing device entries This is caused by ALSA/HAL/Solid reporting the exact same name for different devices. This ambiguity results in only one of the devices getting shown

Phonon plays to the wrong device

This is related to the above problem. If one believes the default setting is correct (and wants to change it for their system) then open the KDE 4 System Settings and click on the Sound icon. In there one has the possibility to define a preference for devices for different categories of applications. E.g. to change the output device for JuK or Amarok you'd click on the Music category and then move the devices around such that the most preferred device is on top of the list. If this device should fail for some reason (e.g. an unplugged USB device) Phonon will fall back to the next device in the list.

Phonon causes a crash

This could be a bug. Bugs have been reported with xine PulseAudio (output to crash). If such is happening, one could try to (re)move xine's PulseAudio plugin. It is located in /usr/lib/xine/plugins//xineplug_ao_out_pulseaudio.so. If it still crashes install all the debug packages (especially for xinelib) for your distri and get a backtrace by attaching gdb with "gdb " and then type "thread apply all bt" at the gdb prompt. Report the bug at bugs.kde.org.

Devices from /etc/asound.conf or ~/.asoundrc are not listed

Phonon uses a function introduced in alsa-libs 1.0.14 to find those devices. To make this function list your entry you may need to add a name hint. E.g.

         hint {
             show on
             description "Name to display for the device"
         }
     A complete example that adds a new volume control named Phonon to your mixer:
     pcm.softvolPhonon {
         type softvol
         slave.pcm "default:CARD=0"
         control {
             name "Phonon"
             card 0
         }
         min_dB -51.0
         max_dB 0.0
         resolution 100
         hint {
             show on
             description "My Soundcard with extra Volume Control"
         }
     }

Note: Since openSUSE-11 ships with alsa-1.0.16, the above may not be applicable to openSUSE-11.0. This requires confirmation.

Links