Add more MMC features and profiles such as ones used by the Plextor

DVDR PX-716A
This commit is contained in:
rocky
2005-02-07 12:06:29 +00:00
parent 5b70035a1f
commit ce6170ea9e
2 changed files with 56 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: mmc.h,v 1.1 2005/02/07 03:36:02 rocky Exp $
$Id: mmc.h,v 1.2 2005/02/07 12:06:29 rocky Exp $
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -184,8 +184,10 @@ typedef enum {
typedef enum {
CDIO_MMC_FEATURE_PROFILE_LIST = 0x000, /**< Profile List Feature */
CDIO_MMC_FEATURE_CORE = 0x001,
CDIO_MMC_FEATURE_REMOVABLE_MEDIUM = 0x002, /**< Removable Medium Feature */
CDIO_MMC_FEATURE_WRITE_PROTECT = 0x003, /**< Write Protect Feature */
CDIO_MMC_FEATURE_MORPHING = 0x002, /**< Report/prevent operational
changes */
CDIO_MMC_FEATURE_REMOVABLE_MEDIUM = 0x003, /**< Removable Medium Feature */
CDIO_MMC_FEATURE_WRITE_PROTECT = 0x004, /**< Write Protect Feature */
CDIO_MMC_FEATURE_RANDOM_READABLE = 0x010, /**< Random Readable Feature */
CDIO_MMC_FEATURE_MULTI_READ = 0x01D, /**< Multi-Read Feature */
CDIO_MMC_FEATURE_CD_READ = 0x01E, /**< CD Read Feature */
@@ -205,10 +207,16 @@ typedef enum {
Feature */
CDIO_MMC_FEATURE_CD_RW_CAV = 0x027, /**< CD-RW CAV Write Feature */
CDIO_MMC_FEATURE_MRW = 0x028, /**< MRW Feature */
CDIO_MMC_FEATURE_ENHANCED_DEFECT = 0x029, /**< Enhanced Defect Reporting */
CDIO_MMC_FEATURE_DVD_PRW = 0x02A, /**< DVD+RW Feature */
CDIO_MMC_FEATURE_DVD_PR = 0x02B, /**< DVD+R Feature */
CDIO_MMC_FEATURE_CD_TAO = 0x02D,
CDIO_MMC_FEATURE_CD_SAO = 0x02E,
CDIO_MMC_FEATURE_RIGID_RES_OVERW = 0x02C, /**< Rigid Restricted Overwrite */
CDIO_MMC_FEATURE_CD_TAO = 0x02D, /**< CD Track at Once */
CDIO_MMC_FEATURE_CD_SAO = 0x02E, /**< CD Mastering (Session at
Once) */
CDIO_MMC_FEATURE_DVD_R_RW_WRITE = 0x02F, /**< DVD-R/RW Write */
CDIO_MMC_FEATURE_CD_RW_MEDIA_WRITE= 0x037, /**< CD-RW Media Write Support */
CDIO_MMC_FEATURE_DVD_PR_2_LAYER = 0x03B, /**< DVD+R Double Layer */
CDIO_MMC_FEATURE_POWER_MGMT = 0x100, /**< Initiator and device directed
power management */
CDIO_MMC_FEATURE_CDDA_EXT_PLAY = 0x103, /**< Ability to play audio CDs
@@ -262,6 +270,8 @@ typedef enum {
CDIO_MMC_FEATURE_PROF_DDCD_ROM = 0x0020, /**< Read only DDCD */
CDIO_MMC_FEATURE_PROF_DDCD_R = 0x0021, /**< DDCD-R Write only DDCD */
CDIO_MMC_FEATURE_PROF_DDCD_RW = 0x0022, /**< Re-Write only DDCD */
CDIO_MMC_FEATURE_PROF_DVD_PR2 = 0x002B, /**< DVD+R - DVD Recordable
double layer */
CDIO_MMC_FEATURE_PROF_NON_CONFORM = 0xFFFF, /**< The Logical Unit does not
conform to any Profile. */
} mmc_feature_t;

View File

@@ -1,5 +1,5 @@
/*
$Id: util.c,v 1.32 2005/02/05 04:25:14 rocky Exp $
$Id: util.c,v 1.33 2005/02/07 12:06:29 rocky Exp $
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -266,6 +266,10 @@ print_mmc_drive_features(CdIo_t *p_cdio)
report( stdout,
"\tDVD+RW - DVD ReWritable");
break;
case CDIO_MMC_FEATURE_RIGID_RES_OVERW:
report( stdout,
"\tRigid Restricted Overwrite");
break;
case CDIO_MMC_FEATURE_PROF_DVD_PR:
report( stdout,
"\tDVD+R - DVD Recordable");
@@ -274,6 +278,10 @@ print_mmc_drive_features(CdIo_t *p_cdio)
report( stdout,
"\tRead only DDCD");
break;
case CDIO_MMC_FEATURE_PROF_DVD_PR2:
report( stdout,
"\tDVD+R Double Layer - DVD Recordable Double Layer");
break;
case CDIO_MMC_FEATURE_PROF_DDCD_R:
report( stdout,
"\tDDCD-R Write only DDCD");
@@ -305,27 +313,39 @@ print_mmc_drive_features(CdIo_t *p_cdio)
uint32_t i_interface_standard = CDIO_MMC_GET_LEN32(q);
report( stdout, "Core Feature\n");
switch(i_interface_standard) {
case 0:
case CDIO_MMC_FEATURE_INTERFACE_UNSPECIFIED:
report( stdout, "\tunspecified interface\n");
break;
case 1:
case CDIO_MMC_FEATURE_INTERFACE_SCSI:
report( stdout, "\tSCSI interface\n");
break;
case 2:
case CDIO_MMC_FEATURE_INTERFACE_ATAPI:
report( stdout, "\tATAPI interface\n");
break;
case 3:
case CDIO_MMC_FEATURE_INTERFACE_IEEE_1394:
report( stdout, "\tIEEE 1394 interface\n");
break;
case 4:
case CDIO_MMC_FEATURE_INTERFACE_IEEE_1394A:
report( stdout, "\tIEEE 1394A interface\n");
break;
case 5:
case CDIO_MMC_FEATURE_INTERFACE_FIBRE_CH:
report( stdout, "\tFibre Channel interface\n");
}
report( stdout, "\n");
break;
}
case CDIO_MMC_FEATURE_MORPHING:
report( stdout, "Morphing Feature\n" );
report( stdout,
"\tOperational Change Request/Notification %ssupported "
"via GET EVENT/STATUS NOTIFICATION\n",
(p[4] & 2) ? "": "not " );
report( stdout, "\tAsynchronous GET EVENT/STATUS NOTIFICATION "
"%ssupported\n",
(p[4] & 1) ? "": "not " );
break;
;
case CDIO_MMC_FEATURE_REMOVABLE_MEDIUM:
report( stdout, "Removable Medium Feature\n" );
switch(p[4] >> 5) {
@@ -410,6 +430,11 @@ print_mmc_drive_features(CdIo_t *p_cdio)
case CDIO_MMC_FEATURE_MRW:
report( stdout, "MRW Feature\n" );
break;
case CDIO_MMC_FEATURE_ENHANCED_DEFECT:
report( stdout, "Enhanced Defect Reporting\n" );
report( stdout, "\t%s-DRM mode is supported\n",
(p[4] & 1) ? "DRT": "Persistent" );
break;
case CDIO_MMC_FEATURE_DVD_PRW:
report( stdout, "DVD+RW Feature\n" );
break;
@@ -422,6 +447,15 @@ print_mmc_drive_features(CdIo_t *p_cdio)
case CDIO_MMC_FEATURE_CD_SAO:
report( stdout, "CD Mastering (Session at Once) Feature\n" );
break;
case CDIO_MMC_FEATURE_DVD_R_RW_WRITE:
report( stdout, "DVD-R/RW Write Feature\n" );
break;
case CDIO_MMC_FEATURE_CD_RW_MEDIA_WRITE:
report( stdout, "CD-RW Media Write Support\n" );
break;
case CDIO_MMC_FEATURE_DVD_PR_2_LAYER:
report( stdout, "DVD+R Double Layer\n" );
break;
case CDIO_MMC_FEATURE_POWER_MGMT:
report( stdout,
"Initiator and device directed power management\n" );