BeagleBoard/XBMC

From eLinux.org
Jump to: navigation, search

WORK IN PROGRESS

Introduction

This page is a place holder to document information for getting XBMC running on BeagleBoard. My particular target is to get XBMC running on BeagleBoard_XM. There is currently a lot of information on the web regarding previous projects getting XBMC running on BeagleBoard, and I shall collate links to that information as some of it remains relevant to the XM.

The foundation of this work is the XBMC GSOC2010 project (link below), and my thanks go out to the folks that put in so much work and published it.

As of Aug 2012 I am using the following environment:

  • Hardware: BeagleBoard_XM rev B
  • Distribution: Angstrom 2012.05
  • Linux Kernel: 3.2.18
  • XBMC: 11.0 (Eden)
  • Build Environment: OpenEmbedded-Core

At present I have XBMC running on this platform but with a poor frame rate. The GUI runs on it's own at around 20fps, and video runs at 6fps. I'm currently investigating how to improve the video frame rate.

Relevant Differences between BeagleBoard and BeagleBoard_XM

This section is intended to collate the key differences between Beagleboard and BeagleBoard_XM regarding XBMC. Problems implementing XBMC based on older information have more often been due to differences in other environmental factors rather than the hardware. However, it's probably worth keeping a list here of differences in the hardware:

  • Default Arm core frequency: BeagleBoard = 600MHz, Beagleboard_XM = 800MHz
  • Max Arm core frequency: BeagleBoard = 720MHz, Beagleboard_XM = 1000MHz


XBMC

For detailed information please visit the official XBMC site at http://xbmc.org/. There is also a useful associated wiki here: http://wiki.xbmc.org/index.php?title=Main_Page

XBMC is a media player, which, through a very professional GUI provides access to multimedia sources (audio, video etc.) residing on local drives or internet feeds. This section is intended just to highlight some of the specifics that are useful to know about running XBMC on BeagleBoard_XM.

The processor on BeagleBoard_XM contains an OMAP device containing an ARM processing core. The ARM core is not powerful enough on it's own to run XBMC, but fortunately the OMAP device has some features which can help.

  • ARM core. By default this runs at 800MHz, but can simply be made to run at 1GHz providing a 25% uplift in processing power.
  • PowerVR SGX Graphics Engine. With the correct drivers, application software can make use of this acceleration engine to speed up the graphics. This speeds up rendering of the XBMC GUI menus but is NOT used for video or audio playback.
  • Image Video, Audio Accelerator. Includes TI's C64X DSP core and hardware for merging video and audio from other sources in the OMAP Processor. This block can be used to accelerate video and audio processing through use of audio and video codec software. Video is merged through use of frame buffers.

The key to getting a smooth running XBMC on the board is to offload a significant proportion of the processing from the ARM core and onto the acceleration engines. Obviously, reducing amount of processing required and the amount of data that has to be transfered between internal blocks also helps.

One key point to note with XBMC is that the processing required to handle the very professional looking GUI is significant, and that the GUI continues to operate even if a video is being played (even if there is no sign of the GUI on the screen). This allows the menu with the video controls to instantly pop up if the mouse is moved. XBMC allows a significant amount of customisation for the GUI (referred to as a Skin) and simplification of the skin can help reduce the processing significantly. XBMC is generally run on platforms with much more processing power than Beagleboard_XM and as a result, the default skin is quite complex to show off the capabilities.

The default video players used by XBMC (DVDplayer and PAPlayer) do not make use of the OMAPs video acceleration. Therefore all of the video decoding is done using the ARM core which places an undue burden on the processor (hence the slow 6 fps frame rate). XBMC provides the ability to use other players using a configuration file /userdata/playercorefactory.xml. See here for details on how to change this http://wiki.xbmc.org/index.php?title=External_players. My chosen player is omapfbplay (although at time of writing, I am unable to make omapfbplay work on my build).

The video images are stored in two framebuffers (one holds the current image, whilst the second is used to construct the next image). The frame buffers are fundamentally blocks of main memory (SDRAM) which are reserved when the linux kernel first boots up (The size of these buffers can be defined in the uenv.txt file used by U-boot).

The following diagram shows how I hope to have XBMC running on the OMAP processor hardware:

XBMC arch1.jpg

Current Focus

The following items are my current focus for this project:

  • Get omapfbplay running stand alone on the BeagleBoard_XM. Currently I get the following error, so it looks like I need to look at clock speeds in the IVA:

On Console: omapdss DISPC error: failed to set up scaling, fclk too low omapdss MANAGER error: dispc_ovl_setip failed for ovl 1 omapdss MANAGER error: configure_overlay 1 failed

On Terminal: [mpeg4 @ 0x157580] get_buffer() failed (0 0 2 0x41086440) Segmentation fault

  • Confirm if I need to increase OMAP supply voltage to support 1GHz operation.
  • Simplify Skin to make GUI processing easier.

Beagleboard_XM Links

Links that I have found have useful information directly relevant to Beagleboard_XM

https://groups.google.com/forum/?fromgroups#!topic/beagleboard/k7-1bBlwdqI

Beagleboard Links

The following are useful links that I have found which appear to be related to work done on BeagleBoard, so direct relevance is not clear.

http://elinux.org/BeagleBoard/GSoC/2010_Projects/XBMC#Documentation


Acknowledgements

Many thanks to the folks of XBMC GSOC2010, on which I'm basing my project.