MME Configuration Basics

This chapter explains the basics of MME configuration. It includes:


Note: When you are configuring your MME system, you should make sure that you install all the components required to support the media formats you will be processing. For information about formats supported by third party components and the required MME components for these, see the appendix Binary File Dependencies.

About configuring the MME

The MME offers a wide range of configuration options that you can use to configure the behavior of:

The MME uses two configuration files:

config.h
This file contains the configuration values that are loaded into the MME at compile time.
mme.conf
This file contains the settings that the MME loads at startup. These values can be modified by the end user and take effect when the MME is restarted.

Compiled configuration

The file config.h is located in the source tree at /lib/public/mme/config.h. Changes you may make to config.h have no effect on the MME. The file lists the values for the MME's CONFIG_* constants, and is included for information only. The MME uses the values in this file if any one of the following conditions apply:

MME command-line options

You can use command-line options to configure the MME at startup. For details, see mme in the chapter MME Utilities Reference.

MME user managed configuration

You can change the MME configuration by changing the settings in the user-managed configuration file, mme.conf. You can edit this XML file to change user-managed MME settings.

The MME does not include a defined schema for mme.conf, but the file must be a well-formed and correct XML file. The main document element in mme.conf must be called <Configuration>. This element contains hierarchically arranged configuration elements. At the highest level are global configuration settings, such as the initial language (locale) setting. The file also includes elements defining configuration of synchronization, copying, playback, device control, etc.

Location of the configuration file mme.conf

The configuration file mme.conf is located at etc/ (or the equivalent in the staging directory). This directory also includes the sample MCD configuration files mcd.conf and mcd.mnt.

Default configuration values

The default mme.conf file is shipped with all its elements except the base element <Configuration> commented out so that, by default, the MME uses no values in this file and uses default settings.

How the MME determines the source of the configuration

The MME uses the following logic to determine how to configure itself on startup:

  1. If you specify the -c command line option, the MME attempts to use the specified configuration file. If the file does not exist, execution aborts. Note that the specified file may be a relative path or an absolute path.
  2. If you don't use the -c command line option, the MME looks for the file /etc/mme.conf. If the file exists, the MME uses values from any readable elements in that file, and use defaults for all other settings.
  3. If you don't use the -c command line option and the default file /etc/mme.conf does not exist, the MME runs from the defaults as specified in config.h.

In summary, if a file is specified, it must exist. If nothing is specified, MME looks for the default configuration file /etc/mme/mme.conf. If that file does not exist, the MME uses internal defaults.

Using the configuration file mme.conf

You do not need to set values for all elements in mme.conf. The MME uses only those values for the elements it finds in mme.conf. If it does not find an element or is unable to read an element in mme.conf, the MME uses the defaults set at compile time.

This behavior means that:

Changing the contents of mme.conf does not automatically change the MME configuration settings. To change the MME configuration, you can either modify the default mme.conf file, or create and modify a new mme.conf file and use the -c option at startup to point the MME to this new file.

Modifying the default mme.conf file

To change a configuration value in the configuration file mme.conf:

  1. If necessary, remove the comments around the element and all elements in its path. For example, for the element <dvdvideo>, which is inside <dvdifo>, you must make sure that no elements in the path <Configuration>/<Database>/<Synchronization>/<MDS>/<dvdifo> are commented so that the MME can find your configured element <dvdvideo>.
  2. Change the configuration settings of the element, as required.
  3. Save mme.conf.
  4. Restart the MME.

Configuration element attributes

Some elements in mme.conf have attributes. The MME accepts the following values for these attributes:

Using a copy of the mme.conf file

If you use a copy of the mme.conf file:

  1. Make a copy of the mme.conf file and save it in a directory of your choosing.
  2. Change the configuration settings in the new mme.conf file.
  3. Restart the MME and use the -c command-line option to tell it to use the modified mme.conf file.

Configuration elements

All MME configuration elements from mme.conf are under the base configuration element Configuration. Unless otherwise stated, a value of 0 (zero) means “Use the default”.


Note: In the tables listing configuration elements, element attributes are shown in italics: attribute. Elements that require more detailed explanation than can be provided in a table are treated at the end of each section.

Using functions to configure behavior

Many MME functions that configure behavior for specific operations or permissions, such as seek or playback characteristics, device and disk region, or parental control. For more information, see the descriptions for the API functions in the MME API Library reference>.

Configuring memory usage

For optimal performance, you should give careful consideration to how you configure memory usage for your MME environement. This section provides some basic information Configuring memory usage for:

qdb memory usage

The memory used by qdb can be influenced by defining caching PRAGMAs in the various MME schema files. The PRAGMAs control the amount of memory used for caching by SQLite3 library.

The default value for these PRAGMAs is 500. Because the MME has many connections to qdb opened at any given time, reducing the default caching values can reduce qdb memory usage by several megabytes.

Applying the following to the mme.sql, mme_temp.sql and mme_library.sql schemas will limit the number of 1.5K memory pages used for caching on each database connection:

PRAGMA cache_size=1;
PRAGMA default_cache_size=1;

Note: Reducing qdb caching values can affect the performance of queries to the database, and therefore overall MME performance. You should measure performance with different cache values to find the optimal values for your environment.

See also the chapter PRAGMA in the QDB Developer's Guide.

io-fs memory usage

A wide range of caching methods can be used for io-fs. These methods can be configured by command-line options when starting io-fs. When using the io-fs as a driver for iPod and PFS devices rather than as a general purpose filesystem, caching can be limited to reduce memory requirements. For example, the following options have been used with success to reduce memory usage with minimal impact on performance:

# io-fs-media -cpages=16,bundles=1,wad=0 -ddevice

Note: To completely disable caches to tmpfs, use the options below.
# io-fs-media -cpages=4,bundles=0,wads=0,throngs=0 -ddevice

See also io-fs-media, iofs-ipod.so and iofs-pfs.so.

io-media memory usage

The memory used by io-media depends on:

A queue consists of multiple buffers of 32K multiplied by the MRA size. The MRA size is dependant on the specific characteristics of the media format (sample size, stereo/mono, etc.). The number of buffers on the queue is configurable via the io-media.cfg file.

io-media uses two queues:

You can use the io-media mmf_graphbuilder queue* options to reduce the size of the queue buffers and the depth of the queues used by io-media.


Note: In general, reducing the queue sizes increases the risk of introducing “audio drops” during playback due to CPU load and media access latencies. Whenever you make changes to queue sizes, you should test your environment thoroughly for playback integrity.

See also io-media-generic.

Global settings

This section lists global configuration elements.

<ControlContext> element

The <ControlContext> element contains global configuration elements. Its PathPrefix attribute sets the location for control contexts.

By default, the mountpath to the resource manager API for the MME is /dev/mme, and all MME control contexts are created under this path.

You can use the <ControlContext> element's optional PathPrefix attribute to configure an alternate prefix for the control context path. For example:

<ControlContext PathPrefix="/dev/mme_rearseat">

The table below lists global configuration elements contained under the <ControlContext> element.

Element Default Description
<Maximum> 10 Maximum number of control contexts.
<Unblock> false MME API unblocking capability. See Enabling the unblock capability below.

Enabling the unblock capability

Use the <Unblock> configuration element to enable the MME function mme_set_api_timeout():

<Unblock enabled="true"/>

By default, <Unblock> is set to false, disabling the MME unblocking capability.

Effects of setting the <Unblock> element to true

Enabling the MME unblock capabilities affects MME behavior as follows:

<Locale> element

The <Locale> element set the default language code. Its default is en (for English). For more information, see the chapter Configuring Internationalization in this guide.

Global settings constants

The table below lists the defaults for global MME constants.

Constant Value Description
CONFIG_DEF_MAX_CONTROLCONTEXTS 10 Maximum control contexts.