Configuring mm-pnp

You can configure mm-pnp through its configuration file. This file defines the directories and device paths used for writing media databases and managing playback. It also defines parameters that control how content from specific device types is synchronized and stored.

The mm-pnp command line doesn't support any configuration options; you must use the configuration file to define any nondefault settings for multimedia services and to customize synchronization and database management for different device types. The configuration file offers a convenient way to change the behavior of mm-pnp without modifying and recompiling the code.

Note: The mm-pnp program defines default values for all configuration options so there are no mandatory option settings for the configuration file.

Configuration file contents

The configuration file is a text file with one setting defined per line. Each line consists of an option name, followed by the equal sign (=), followed by an option value. You can enter comments by starting lines with the number sign (#).

The first section of the file defines settings that affect the operations of the other multimedia services used by mm-pnp. These settings are independent of the device type, and they include:
  • the hardware device that mm-renderer uses for audio output
  • the PPS directories to scan for mount objects and QDB database configuration objects
  • the mountpoints used by each multimedia service (expressed as device paths in /dev)
  • the prefix that QDB uses in database names
  • the maximum number of concurrent synchronizations across all device types
In the default configuration file (/etc/mm/mm-pnp.conf), the first section looks like this:
audio_device=snd:/dev/snd/pcmPreferredp
qdb_mountpoint=/dev/qdb
renderer_mountpoint=NULL
pps_pub_root=/pps/qnx
pps_qdb_root=/pps/qnx
qdb_db_modifier=db_
sync_mountpoint=/dev/mmsync
sync_max=5
The subsequent sections define settings that affect how mm-pnp uses the other services:
  • the directory used to hold the raw storage files for media databases
  • the files that define the schema and initial contents of databases
  • a flag indicating whether to play a device's media content right after synchronizing that content
  • the location within the device's filesystem to look for media files
  • other flags that control which information gets synchronized
Each of these sections must begin with a line that names the device type being configured (with the name enclosed in square brackets). The name of the device type must be one of the following:
  • device_unknown
  • device_local
  • device_usb
  • device_ipod
  • device_pfs
  • device_audiocd
  • device_datacd
  • device_mmc
  • device_sd
In the default configuration file, the section that configures USB devices looks like this:
[device_usb]
sync_max=1
sync_path=/
sync_mask=0x4003
play_device=true
db_directory=Filename::/fs/tmpfs/
db_schema=SchemaFile::/etc/mm/sql/mmsync.sql
db_data_schema=DataSchemaFile::/etc/mm/sql/mmsync_data.sql

Global vs. device type synchronization limits

The global synchronization limit defined in the first section of the file applies over all type-specific synchronization limits defined in subsequent sections. For example, suppose you set sync_max to 5 in the first section but also to 3 in the device_usb section. If mm-pnp starts two synchronizations for USB devices while three synchronizations for other device types are in progress, the program won't start a third synchronization for a USB device. No more content from USB devices can be uploaded or played until one of the current synchronizations completes.

Note: You can set sync_max to 0 to disable synchronization for a particular device type or for all device types.