Proposed additions to the portable_audio_player namespace

David Zeuthen david at fubar.dk
Tue Mar 7 11:43:23 PST 2006


Hi,

On Mon, 2006-03-06 at 22:48 -0600, Gabriel Burt wrote:
> Hi!  Danny Kukawka has been helping us get some new devices added to the
> USB music players FDI file.  In addition to getting those new devices
> in, I asked Danny about adding some useful keys to the
> portable_audio_player namespace.  

Cool!

> Certain mass storage Digital Audio
> Players place their music/files in particular directories, and some
> accept playlist files.  I am proposing embedding that information into
> the HAL FDI files.  I think it is comparable to the information
> contained in the in/output_formats keys.  It would allow music players
> to be smarter about where they put files and whether and where they
> read/write playlists onto devices, without each application having to
> uniquely identify each player (that's what HAL is for!).

Yup, I think this makes tons of sense. Ideally we'd have some kind of
DAP library comparable to what gphoto2 is for cameras and then that
library can maintain and ship these files (just like gphoto2
provides .fdi files for the devices it support). 

Until then I suppose it's OK to include these in the hal tarball.

> These are the new keys I am proposing for inclusion in the
> portable_audio_player namespace:
> 
> Key (type)      portable_audio_player.filename_format (string)
> Values          examples:
> 			MUSIC/%Track
> 			%Artist/%Album/%Track
> 			mp3s/%Artist/%Album - %Track
> Mandatory       no
> Description     If portable_audio_player.access_method = "storage",
> this may contain a string that will be used to format the file's name
> and path before writing it to the device.  If audio files must be placed
> in a particular subdirectory, or the device only allows one
> sub-directory deep hierarchies, that information should be embedded
> here. The variables available for this string are %Artist, %Album, and %
> Track.  Applications using this key are responsible for substituting the
> appropriate values for these variables when formatting the file's
> name/path.

Should probably also include %TrackNumber? Just thinking out loud..

> Key (type)      portable_audio_player.audio_folders (stlist)
> Values          example: files/music/ voice/ linein/
> Mandatory       no
> Description     If portable_audio_player.access_method = "storage",
> this may contain a white-space separated list of folders in which music
> can be found.  Paths relative to the mount point of the device.
> 
> Key (type)      portable_audio_player.playlist_format (string)
> Values          example: audio/x-mpegurl
> Mandatory       no
> Description     Set to the MIME-type of the playlist format accepted by
> this device.  Leave blank if none.

Should probably be a strlist, yes? A player might accept more than one
playlist format.

> Key (type)      portable_audio_player.playlist_folder (string)
> Values          example: playlists/
> Mandatory       no
> Description     Set to the folder in which playlists belong.  Leave
> blank if playlist files are not supported.
> 
> Thanks,

Btw, are the output_formats and input_formats useful? IIRC they are both
a mixture of containers and actual encoding formats. I dunno how to fix
that or if it's even a problem; I'm not an expert in the audio / sound
domain..

Can you send a patch to the spec (doc/spec/hal-spec.xml.in in CVS) for
these? That would be useful. Thanks.

Cheers,
David




More information about the hal mailing list