User Tools

Site Tools


extendinglibhimd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
extendinglibhimd [2012/01/29 22:11] – created glaubitzextendinglibhimd [2012/02/02 00:20] glaubitz
Line 2: Line 2:
  
 This section covers the extension of the //libhimd// library and integrating these features into [[qhimdtransfer]]. This section covers the extension of the //libhimd// library and integrating these features into [[qhimdtransfer]].
 +
 +===== Background and motivation =====
 +
 +//libhimd// is the part of linux-minidisc which abstracts access to HiMD hardware. Tasks include:
 +
 +  * reading and decrypting audio data tracks (MP3/PCM/ATRAC3/ATRAC3+) from HiMD medium
 +  * writing and encrypting audio data tracks (MP3/PCM/ATRAC3/ATRAC3+) to HiMD medium
 +  * deleting, renaming, rearranging and grouping audio data tracks
 +  * sending special SCSI commands over USB to control and inquire the HiMD hardware (format, erase all, read discid etc)
 +
 +===== Current status =====
 +
 +Currently, //libhimd// implements only a limited set of the planned features it should have. Reading and decrypting audio tracks has been fully implemented. The official git repository source code supports reading and decrypting of MP3 audio data and PCM/ATRAC3/ATRAC3+ tracks written with a known constant encryption keys which have been recorded with the HiMD models **Sony MZ-RH1/MZ-M100/MZ-M200** (see: [[https://wiki.physik.fu-berlin.de/linux-minidisc/doku.php#status]]). With an additional secret root key not included in the official source code, PCM/ATRAC3/ATRAC3+ tracks written with different encryption keys can be read. The read support is therefore considered to be feature complete.
 +
 +As for writing to HiMD, initial support has been implemented with a large patch set in March 2011 (see: [[https://lists.fu-berlin.de/pipermail/linux-minidisc/2011-March/msg00002.html]]). This code implements solely writing MP3s as these use a rather simple encryption (the audio data is basically XOR'ed) and still very experimental, but it has been finally shown to work (see: [[https://lists.fu-berlin.de/pipermail/linux-minidisc/2012-January/msg00005.html]]). It currently supports MP3 tracks with 128kbps/44.1kHz only. Writing the track names is not properly working either. Support for writing PCM/ATRAC3/ATRAC3+ is currently missing completely as it requires additional support for 3DES encryption and generating valid MAC (mandatory access control) list entries. However, it is possible to add support for writing PCM/ATRAC3/ATRAC3+ on the MZ-RH1/MZ-M100/MZ-M200 models without the need of writing valid MAC list entries and by using the aforementioned constant encryption key. The main part of this project task would therefore be extending the write support and polishing it. Also, write support has not been integrated into the GUI, [[qhimdtransfer]], yet.
 +
 +Deleting, renaming, rearranging and grouping audio data tracks is currently not supported at all, but at least the capability of renaming a track has been implemented through the patch which added MP3 write support. Due to some remaining bugs, tracks names are not properly written to the track index file on the HiMD, however.
 +
 +Sending SCSI commands has not been implemented into //libhimd// yet. However, there is a fully working example code in the git repository in the subfolder //basictools// which implements the supported SCSI command set through //libscg//, the Linux SCSI layer and the SCSI abstraction layer which is part of the //dvd+rw-tools// (see: [[https://wiki.physik.fu-berlin.de/linux-minidisc/doku.php?id=scsisupport]]). The latter will be the **preferred implementation** as it works out of the box on the most important operating systems and does not require any additional dependencies.
 +
 +===== Proposed project plan =====
 +
 +Stemming from the aforementioned current state of //libhimd//, the following tasks arise as the next steps in development:
 +
 +  * finalize and polish MP3 write support
 +  * add write support for PCM/ATRAC3/ATRAC3+ files (MZ-RH1 with //constant// key only)
 +  * implement and fix existing for functions for renaming and deleting tracks
 +  * integrate SCSI code proposed in [[https://lists.fu-berlin.de/pipermail/linux-minidisc/2010-December/msg00000.html]] into //libhimd//, (see [[http://users.physik.fu-berlin.de/~glaubitz/linux-minidisc/himdscsitest_dvd-tools.c]] for example source code using //transport.hxx//)
extendinglibhimd.txt · Last modified: 2012/02/28 20:42 by glaubitz

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki