Welcome to
 Welcome to riocar.org! Friday, August 6th 
Main Menu
· Web Links
· Downloads
· BBS/Forums
· Lens Compare
· Boot Logos
· Button Guide
· Developer Info
· Drive Upgrade
· FAQ
· Geek Guide
· Photo Gallery


  
rio car dot org Developer Information



Category: Main -> The Empeg Player App

 
·   Serial Port Commands
·   Player Config Options in config.ini
·   Player Command Line Arguments
·   Player Return Codes
·   FID files (Where The Music Lives)

 
·  Serial Port Commands
 (Entry last updated on December 10th, 2002)

These are the basic commands that can be sent through the serial port (might work with the USB port but haven't tested it) to control your empeg.

[ Switch to empeg channel
(space) Play
W pause
p Previous Song
n Next Song
F Fast forward
B Rewind
] Switch to radio
1-9 FM Preset
. FM Down
; FM UP
` Radio preset store
O FM preset
= AUX Input
+ Volume +
- Volume -
x Volume +
z Volume -
K Loudness down
L Loudness up
s Full Screen On/Off (CD-MD CH button)
v Next Visual
q Drop to Shell
r Restarts Player
Sleep On/Off
f Seek?
b Seek?
m enter menu / select item
n right in menu
p left in menu
* go back up one level
enter confirm character(s) entered so far
# Play FID (given in hexadecimal representation, e.g. "#100" for the entire player)
#+ Append FID (given in hexadecimal representation, e.g. "#100" for the entire player) - 2.0Beta 13 and above
#- Enqueue FID (given in hexadecimal representation, e.g. "#100" for the entire player) - 2.0Beta 13 and above
#! Insert FID (given in hexadecimal representation, e.g. "#100" for the entire player) - 2.0Beta 13 and above

Contributed by Sven Müller (www.incase.de) - Updates from 2.0 Beta 13 release notes, thanks to Mark Cushman for pointing them out - Tom

Back to Top
·  Player Config Options in config.ini
 (Entry last updated on April 30th, 2008)

The config.ini file consists of some separate sections that each might contain one or more options. The basic format of the file is:
[section1]
option1=value

[section2]
option2=value
option3=value
...
The following directives may be placed into the empeg player's configuration file, /empeg/var/config.ini. The "Ver" column contains the software version(s) this works on, I skipped denoting entries that were available in (non public) 1.1 alphas), I also skipped pre 1.0 versions.
Ver Section Option Description
1/2 Startup ReserveCache=n n = number of chunks to reduce the caching area by Each chunk is 64kBytes. The player usually reserves 180 chunks (MkII developer image v1.03, likely different for V2/V3, and might be different on the MkI or MkIIa) for file caching, and reduces this amount by the value of ReserveCache. If ReserveCache is present, the player reports the size of its file cache upon startup. There has been info on a "ReduceCache" setting floating around. There isn't any mentioning of such a setting in the player (according to Roger Lipscombe, it isn't even mentioned in the source, so it probably never existed).
1/2 controls stalk_side=x x = "left" or "right" (without the quotes) defines the way in which the (Sony) stalk interface is mounted. The stalk interface is connected to the empeg through the tuner module.
1/2 Options name=x set the name of the empeg/rio-car device to "x"
spindown=x A value of 1 (default) tells the player software to spin the disc(s) down whenever possible. A value of 0 disables this. Note that this only controls what the player app does. A HiJack kernel has its own spindown feature which can be disabled with "spindown_seconds=0" in the HiJack section of config.ini.
1/2 User Info Email=x sets the owner's email address (as displayed in the "about" screen)
Phone=x sets the owner's phone number
Name=x sets the owner's name
1/2 Network DHCP=x if 1 ignores all other entries in this section and uses a DHCP server instead. if 0 uses the configuration from the following entries:
Gateway=a.b.c.d sets the default gateway to a.b.c.d (standard decimal representation of the gateways IP address)
Netmask=a.b.c.d sets the netmask for the empeg's ethernet interface
IPAddress=a.b.c.d sets the local IP address of the empeg's ethernet port
1/2 sense mute=x sets the telephone mute mode:
0 mute when input is 0V
x mute when input is 12V
y never mute
1/2 power off_timeout=x sets the timeout for going from sleep mode to off when in car. Value is given in 10th of a second
1/2 tuner region=x x = "europe" or "america"(?)
1/2 output timecodes=x 0 Timecodes & FID numbers are not displayed.
1 prints Timecodes & FID numbers to serial port.
NOTE: timecodes=x will probably be dropped in a future software release.
notify=x 0 does not output song / artist / etc. on the serial port.
1 puts song / artist / genre / etc. on the serial port.
1/2 display caching=x 0 Disable disk activity icon.
1 Enable disk activity icon.
visual_names=x 0 Don't display visual names when cycling through them using the remote
1 Display visual names when switching them using the remote
1/2 synchronize seq_num=x Thanks to roger's post, the functionality of this settings is now known:
Basically, it keeps a count of how many times you've synchronised. This much is correct. It's used to ensure that you don't get caught out in this scenario:
  1. Connect to empeg at home. Make some changes. Don't sync. Leave emplode open.
  2. Go to work.
  3. Connect to empeg at work. Make some changes. Sync. Close emplode.
  4. Go home.
  5. Attempt to sync.
I hope anyone can see what this means:
DO NOT CHANGE THIS UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING. Well, I wouldn't advise anyone to try the above szenario anyway.
1/2 serial car_rate=n Set serial port speed while docked to n.
1/2 menu Quit=x 0 Disables an entry in the menu that allows termination of the player executable (and thereby a drop to shell on serial port)
1 Enables that entry
2 custom shuffle[0-9]=[,{-}=[...]] Define custom shuffle modes, this is a more complex issue, see below.
Custom shuffle modes can be defined in the "custom" section of config.ini. Each shuffle mode is defined by a line that starts with the tag "shuffle", followed by a number, followed by the equal sign, followed by a menu name, then a comma seperated list of parameters and their associated factor. The parameters listed will each be multiplied by their associated factor and then summed up. The songs in the playlist are then sorted by their associated summed parameter*factor product, starting with the highest sum. The default shuffle modes are defined by the following lines:
   Random,RANDOM=1 
   Least often played,PLAYS=1,RANDOM=2 
   Least recently played,TIME=32000,RANDOM=2000 
   By year,-YEAR=32768,RANDOM=1

The following parameters are available:

Parameter name Explanation and range info
RANDOM a random number in the range of 0-32000
PLAYS the play count of the song (ranging from 0 up)
TIME (only on MkII): A measure from 0-32000 for how long it's been since the song was last played. The higher the number, the more recently the song was played. Note: The Least recently played, built-in random mode obviously only works on MkII players.
YEAR The year tag of the song (usually 1900 up to the currentyear).
MTIME modification time (Unix filesystem info on when the file was last modified). I guess that this is also scaled to the 0-32000 range.
CTIME creation time (denotes the time of creation of a file), the same guess applies here.
SKIPS number of times a song was skipped. NOTE: as of software 2.0beta3, this parameter exists, but is not yet actually updated by the player software, so currently, it is always 0.

If a parameter name is preceeded by a minus sign ("-"), the factor is actually substracted from the other factors. Let's have a look at the default random modes:
Random,RANDOM=1
Not much to say, the "RANDOM" mode is well, random (only).
Least often played,PLAYS=1,RANDOM=2 
Hmm, this is actually: PLAYS*1+RANDOM*2 which I don't really understand. PLAYS is the number of times a song was played, so it is (at least currently) a rather low number, I would guess in the range of 0-100, while RANDOM is in the range of 0-32000 and is also multiplied by 2, so the Least often played random mode will basically be random, and only sort the least often played songs to the front in a minimal way. I would personally increase the factor for plays to at least 1000.
Least recently played,TIME=32000,RANDOM=2000 
Well, this could be simplified to "TIME=16,RANDOM=1". Or more mathmatically: TIME*16+RANDOM*1. This is more logical to me. TIME is favoured over RANDOM by a factor of 16, so the songs that where played recently get a high order number, and will only be scrambled randomly just a little.
By year,-YEAR=32768,RANDOM=1
This resolves to YEAR*(-32768)+RANDOM*1, so with the range of the RANDOM parameter (0-32000), this actually sorts the playlist by the YEAR tag (more recent songs first), randomizing only the songs of each year seperately.

Contributed by Sven Müller (www.incase.de)

Back to Top
·  Player Command Line Arguments
 (Entry last updated on January 8th, 2002)

./player -i 

This will start the player with any empty (current) playlist. The player itself says "-i" is maiking it ignore emergency persist data.

./player -u

This will start the player with the USB server enabled (whatever that means).


Contributed by Sven Müller (www.incase.de)

Back to Top
·  Player Return Codes
 (Entry last updated on January 8th, 2002)

The player seems to return 0 if exited using the menu or "q" command on the serial interface. It seems to return 42 if exited during synchronization (after the file system check).

Contributed by Sven Müller (www.incase.de)

Back to Top
·  FID files (Where The Music Lives)
 (Entry last updated on January 8th, 2002)

On the Empeg, your music files and metadata are stored in files commonly called FIDs. FIDs are made of a 28 bit wide object number plus a 4 bit wide type descriptor:

The filenames in /drive[01]/fids/ are hexadecimal representations of the respective FID, with leading zeroes being stripped. Currently only two type descriptors are defined:
*0 is the actual object data - in the case of a playlist, this is 4 bytes per playlist entry which is simply the fids of the items it contains.
The *1 files are the tag files, which are plain text and have fields, eg:
type=tune
length=xxxxx
title=Country House
artist=Blur
genre=Indie
year=1997
(length refers to the length of the *0 file).

User tags currently can't be added with the software but are stored and preserved by downloaders (pc & linux).

There is something special about some of the FIDs though:

FID Name(s) from fids.h cat meaning
0 FID_VERSION e contains the player softwares version
1 FID_OWNER, FID_ID e contains the owner information
2 FID_TAGINDEX e should be /drive0/var/tags
3 FID_STATICDATABASE e should be /drive0/var/database
4 FID_DYNAMICDATABASE o I have no idea
5 FID_PLAYLISTDATABASE e should be /drive0/var/playlists
6 FID_CONFIGFILE e should be /drive0/var/config.ini
0x100 FID_ROOTPLAYLIST v root of playlist tree
0x110 FID_LOSTANDFOUND v the unconnected items playlist
0x120 FID_FIRSTNORMAL v the first custom playlist or the first song (depending on the upload order)

where yellow represents educated guesses (cat = "e"), red represents open questions (cat = "o") and green is indicating verified information (cat = "v").

The tag files (/drive[01]/fids/*1) currently include the following tags (color codes and categories as above):

tag line cat meaning
artist= v Artist of that track
source= v Source of that track or playlist (name of the album usually)
title= v Title of that track or playlist
tracknr= v Track number (if track is part of an album)
type= e either "tune" or "playlist"
year= v Year of release of that track
genre= v Genre of track
duration= v Duration of track milliseconds
codec= e Codec for this track, currently only "mp3" is supported, this will change with software v2.*
bitrate= e the (average) bitrate of that track (in kbit/s). is actually two indicators: "f" for fixed speed or "v" for variable speed (bitrate) followed by "s" for stereo and "m" for mono tracks.
samplerate= e The sample rate of the (uncompressed) soundfile, usually 44100 (the sample rate of a standard music CD)
length= v length of track in bytes (filesize of *0 file)
offset= e start of real music data in the file (or length of id3 tag infos at start of file)
pickpercent= v pick x percent of the playlist's content at random on each pass.
pickn= v pick x entries from the playlist at random on each pass
options=x e/v

x is a hex value with the following bits having known functionality. Any functionality besides bits 0x08, 0x10 and 0x20 are currently unknown, but the emptool sources give away some hints on upcoming functionality:

Bits Meaning cat
0x02 treat entire playlist as one song e
0x04 play playlist without gaps e
0x08 always randomize playlist v
0x10 auto repeat playlist v
0x20 ignore playlist as child (don't play this list as part of its parent playlist) v

Also, there are some special FIDs one should know about:

FID Type Description
0 virtual Version information about the player
1 virtual Owner information
2 virtual Tag index (sorry, don't know what this means)
3 virtual Static database (not sure on this)
4 virtual Dynamic database (not sure on this either)
5 virtual Playlist database (same applies to this)
6 virtual config file (I guess this means the config.ini file)
100 real Root playlist
110 real Lost and found (unconnected items in emplode)
120 real lowest FID for uploaded songs/playlists

Where the "virtual" type means that they don't exist in /drive[01]/fids as files, while the "real" type exists there. Also, for the "real" type, the corresponding tag files (last character of the filename is 1, like 101 for the root playlists tag file) exist as well.


Contributed by Sven Müller (www.incase.de)

Back to Top


Copyright © 2001-2018 riocar.org
All logos and trademarks on this site are property of their respective owners. The comments are property of their posters.