iofs-ipod.so

iPod driver for io-fs

Syntax:

io-fs-media -dipod,options

Runs on:

ARM, PowerPC, SH, x86

Options:

The iofs-ipod options, in addition to the standard io-fs options, include:

acp=interface
The authentication chip interface. See Authentication chip interface below.
darates=[+]rate
Digital audio sampling rates to support. Required for digital audio support; see Adding digital sampling rates below.
eq=on | off
Disable the equalizer. The default value is on.
To disable the equalizer, start the iPod driver with the eq=off option. For example:
# io-fs-media -dipod,transport=ser:dev=/dev/serfpga3,eq=off
fileburst=number
The number of files to discover from the iPod at a time. By default, this value is 16. Increasing the size of the fileburst increases the speed at which files are discovered, but requires more system resources.
fnames=short | long
The type of filename io-fs-media should use for files on iPod devices. The default is “long”, which is not recommended for iPod devices. The behavior and implications of the different fnames options are as follows:

See About filenames below.

lang=lang_code
Set the iPod language. The default language is English (en_EN).
logfile=filepath
Print the log to the specified file instead of to stout.
mount=path
The path to mount the iPod at. By default, the device is mounted at /fs/ipodnum, where num starts at 0 and increments with each additional device mounted.
playback
Show entries representing the titles in the iPod playback engine from /fs/ipodn/.FS_info/playback . You can use these entries to access the information for the files the entries represent in the iPod's playback engine.
polltimeout=timeout
The timeout for polling, in milliseconds. By default, this value is 2000.
pref=preferences
Set preferences on iPods and iPhones at startup. See Preferences below.
restore=settings
Instruct the iPod to restore or keep the specified setting when it is removed from the system. See Restoring settings below.
rtimeout=time
The serial device command read timeout, in milliseconds. By default, this value is 5000.
sndchk=on | off | ipod
The sound check setting. Supported values are:
splash=[greyscale_icon_path]:[color_icon_path]:[big_color_icon_path]
Splash screen images to be displayed on the iPod device. Use colons to separate the different image paths. See Splash screens below.
storage
Turns on HD radio tagging support.
transport=type:options
Specifies the transport mechanism. Loads iofs-type-ipod.so and checks if it supports the transport interface. Only ser and usb are currently supported. See iofs-ser-ipod.so and iofs-usb-ipod.so in this Reference.
use
Print out a usage message to stdout and exit.
verbose=number
Enable verbosity levels. Higher verbosity levels provide increasing levels of detail for device transactions.

Description:

This module provides a media filesystem interface for iPod devices. An iPod can connect via its 30-pin Omni connector to a RS232 serial UART connection on the Neutrino system.

During playback, iPods usually deliver events every 500 milliseconds. This interval is not configurable.

Enabling MME support for iPods

To enable support for iPod devices with the MME, the contents of the MME's slots table (in mme_main.sql) must be modified to contain the filesystem mountpoint (by default, /fs/ipod0). For example:

INSERT INTO slots(path,zoneid, name, concurrency, slottype)
   VALUES('/fs/ipod0', 1, 'iPod', 1, 4);

Authentication chip interface

The acp option loads iofs-interface-ipod.so and checks if it supports an authentication chip interface. This option accepts one of the following values:

See Authenticating iPods in the MME Developer's Guide chapter Working with iPods.

About filenames

With long filenames, io-fs-media requires a large cache and operations can be slow. In order to access a filename, io-fs-media may need to load into the cache the filenames for all files in a directory on the iPod (which can be in the tens of thousands), and do a string comparison on every filename, starting with the first filename, until it reaches the file it has been requested to find.

With short filenames, io-fs-media can go directly to the requested entry, and devctls can be used to obtain the full filename and other information from the iPod. The operation is quick and does not require a large cache.

Restoring settings

The restore option is used to instruct the iPod to restore or keep the specified settings when it is removed from the system (unplugged). Valid settings are:

Separate the settings you want to specify by colons “:”. Precede settings you do not want to restore by an exclamation mark “!”. For example:

Adding digital sampling rates

The darates option is used to add digital sampling rates the iPod driver requires to support digital audio. The + attribute adds the required 32000, 44100 and 48000 sampling rates. Optional sampling rates, such as 8000, 11025, 16000, 22500 and 24000, can be added by using the rate attribute, listing them with a colon “:” separating each item in the list. For example, to add the minimum three sampling rates required for digital audio, plus the optional 22500 and 24000 rates, start the driver as follows:

# io-fs-media -dipod,transport=usb,acp=i2c,darates=+22500:24000

Preferences

The pref option sets preferences on iPods and iPhones at startup. It requires:

Multiple preferences are separated by colons (“:”). For example:

# io-fs-media -dipod,pref=video/on/k:ratio/wide/r

Supported classes and preference settings are listed in the table below:

Class Settings Behavior
video off Disable video output.
video on Enabled video output.
video ask Ask user if not in EI mode.
screen fill Fill entire screen.
screen fit Best fit while maintaining ratio.
format ntsc NTSC video format and timing.
format pal PAL video format and timing.
lineout off Line-out disabled (iPhones).
lineout on Line-out enabled (iPhones).
connection none No connection.
connection composite Composite video (interlaced).
connection svideo S-video (interlaced).
connection component Component Y/Pr/Pb (interlaced or progressive, based on model).
caption off Closed captioning disabled.
caption on Overlays closed captioning on video content before outputting.
ratio full Used when destination monitor has 4:3 ratio.
ratio wide Used when destination monitor has 16:9 ratio.
subtitle off Subtitles overlays are disabled.
subtitle on Overlays subtitle text on video before outputting.
audioalt off Alternate audio channel is disabled.
audioalt on Alternate audio channel is enabled.

Note: Due to a current Apple firmware limitation, closed captions are not supported on iPod Classic devices.

Setting persistence

The pref option k and r values determine what the iPod does with the setting when it is disconnected:

Splash screens

You can use the splash option to specify one or more of the following for the iPod splash screen, using colons to separate the different image paths, in this order:

The order of the image paths is fixed; that is, the first path is always the path to the greyscale image file, the second path is always the path to the small color image file, and the third path is always the path to the big color image file. Thus, for example, to load all three image files, you would start the iPod driver with the splash option like this:

# io-fs-media -dipod,transport=usb,acp=i2c,splash=path/greysplash.qnxlogo:path/colorsplash.qnxlogo:path/bigcolorsplash.qnxlogo

However, to load only a large image file, you would start the iPod driver with the splash option like this, leaving the unused image paths empty:

# io-fs-media -dipod,transport=usb,acp=i2c,splash=::path/bigcolorsplash.qnxlogo

Finally, if you do not want a big color image, simply omit the path; you do not need to add a colon to the end of your list. For example, to load only a small color image:

# io-fs-media -dipod,transport=usb,acp=i2c,splash=:path/colorsplash.qnxlogo

Uploading a splash screen to an iPod

To upload a splash screen to an iPod:

  1. Save the image you will use for the splash screen in the required format:
  2. Add to the beginning of the image file, an 8-byte header with the information described in Splash image file header below.
  3. Start the iPod driver with the splash specifying the path(s) to the splash screen image file(s).

Splash image file header

iPods expect splash image files to have an 8-byte header, as described in table below.

Bytes Format Description
0-1 16 bits, little endian Width of the image, in bits.
2-3 16 bits, little endian Height of the image, in bits.
4-7 32 bits, little endian Stride of the image, in bytes

Note: The stride of an image is the number of bytes used for each row in the image's file. For example, if an image is 15 bits wide, then its stride will probably (but not necessarily) be two bytes; that is 15 bits of image information, plus 1 bit of padding to byte-align the information.

For more information about iPod splash screen image formats, please refer to the Apple specifications.

iPod configuration selection at startup

iPods have a tendency to reset if you do not use the -c option when you start io-usb.

When you start io-usb, use the -c option so that the launcher application selects the iPod configuration to use, instead of just defaulting to the device's first configuration.

Examples:

Below are examples of how to start io-fs-media using the iPod driver for a serial connection and for a USB connection.

Serial connection

Start the iPod filesystem for an iPod with a serial cable connection:

# io-fs-media -dipod,transport=ser,acp=i2c

This command uses the default:

and is equivalent to:

# io-fs-media -dipod,transport=ser:dev=/dev/ser1, \
    acp=i2c:addr=0x10:path=/dev/i2c0

USB connection

Start the iPod filesystem for an iPod with a USB connection:

# io-fs-media -dipod,transport=usb,acp=i2c

This command is equivalent to:

# io-fs-media -dipod,transport=usb: \
    acp=i2c:addr=0x10:path=/dev/i2c0

See also:

io-fs-media, iofs-i2c-ipod.so, iofs-pfs.so, iofs-ser-ipod.so, iofs-usb-ipod.so, mme