libcdio  2.1.0
Macros | Enumerations | Functions | Variables
mmc_util.h File Reference

Multimedia Command (MMC) "helper" routines that don't depend on anything other than headers. More...

#include <cdio/device.h>

Go to the source code of this file.

Macros

#define MMC_READ_TIMEOUT_DEFAULT   3*60*1000
 
#define MMC_TIMEOUT_DEFAULT   6000
 

Enumerations

enum  cdio_mmc_feature_profile_t {
  CDIO_MMC_FEATURE_PROF_NON_REMOVABLE = 0x0001, CDIO_MMC_FEATURE_PROF_REMOVABLE = 0x0002, CDIO_MMC_FEATURE_PROF_MO_ERASABLE = 0x0003, CDIO_MMC_FEATURE_PROF_MO_WRITE_ONCE = 0x0004,
  CDIO_MMC_FEATURE_PROF_AS_MO = 0x0005, CDIO_MMC_FEATURE_PROF_CD_ROM = 0x0008, CDIO_MMC_FEATURE_PROF_CD_R = 0x0009, CDIO_MMC_FEATURE_PROF_CD_RW = 0x000A,
  CDIO_MMC_FEATURE_PROF_DVD_ROM = 0x0010, CDIO_MMC_FEATURE_PROF_DVD_R_SEQ = 0x0011, CDIO_MMC_FEATURE_PROF_DVD_RAM = 0x0012, CDIO_MMC_FEATURE_PROF_DVD_RW_RO = 0x0013,
  CDIO_MMC_FEATURE_PROF_DVD_RW_SEQ = 0x0014, CDIO_MMC_FEATURE_PROF_DVD_R_DL_SEQ = 0x0015, CDIO_MMC_FEATURE_PROF_DVD_R_DL_JR = 0x0016, CDIO_MMC_FEATURE_PROF_DVD_PRW = 0x001A,
  CDIO_MMC_FEATURE_PROF_DVD_PR = 0x001B, CDIO_MMC_FEATURE_PROF_DDCD_ROM = 0x0020, CDIO_MMC_FEATURE_PROF_DDCD_R = 0x0021, CDIO_MMC_FEATURE_PROF_DDCD_RW = 0x0022,
  CDIO_MMC_FEATURE_PROF_DVD_PRW_DL = 0x002A, CDIO_MMC_FEATURE_PROF_DVD_PR_DL = 0x002B, CDIO_MMC_FEATURE_PROF_BD_ROM = 0x0040, CDIO_MMC_FEATURE_PROF_BD_SEQ = 0x0041,
  CDIO_MMC_FEATURE_PROF_BD_R_RANDOM = 0x0042, CDIO_MMC_FEATURE_PROF_BD_RE = 0x0043, CDIO_MMC_FEATURE_PROF_HD_DVD_ROM = 0x0050, CDIO_MMC_FEATURE_PROF_HD_DVD_R = 0x0051,
  CDIO_MMC_FEATURE_PROF_HD_DVD_RAM = 0x0052, CDIO_MMC_FEATURE_PROF_NON_CONFORM = 0xFFFF
}
 

Functions

const char * mmc_feature2str (int i_feature)
 
void mmc_get_drive_cap (CdIo_t *p_cdio, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap)
 
const char * mmc_feature_profile2str (int i_feature_profile)
 
bool mmc_is_disctype_bd (cdio_mmc_feature_profile_t disctype)
 
bool mmc_is_disctype_cdrom (cdio_mmc_feature_profile_t disctype)
 
bool mmc_is_disctype_dvd (cdio_mmc_feature_profile_t disctype)
 
bool mmc_is_disctype_hd_dvd (cdio_mmc_feature_profile_t disctype)
 
bool mmc_is_disctype_overwritable (cdio_mmc_feature_profile_t disctype)
 
bool mmc_is_disctype_rewritable (cdio_mmc_feature_profile_t disctype)
 

Variables

uint32_t mmc_read_timeout_ms
 
const char mmc_sense_key2str [16][40]
 
uint32_t mmc_timeout_ms
 

Detailed Description

Multimedia Command (MMC) "helper" routines that don't depend on anything other than headers.

Macro Definition Documentation

◆ MMC_READ_TIMEOUT_DEFAULT

#define MMC_READ_TIMEOUT_DEFAULT   3*60*1000

The default read timeout is 3 minutes.

◆ MMC_TIMEOUT_DEFAULT

#define MMC_TIMEOUT_DEFAULT   6000

The default timeout (non-read) is 6 seconds.

Enumeration Type Documentation

◆ cdio_mmc_feature_profile_t

Profile profile codes used in GET_CONFIGURATION - PROFILE LIST.

Enumerator
CDIO_MMC_FEATURE_PROF_NON_REMOVABLE 

Re-writable disc, capable of changing behavior

CDIO_MMC_FEATURE_PROF_REMOVABLE 

disk Re-writable; with removable media

CDIO_MMC_FEATURE_PROF_MO_ERASABLE 

Erasable Magneto-Optical disk with sector erase capability

CDIO_MMC_FEATURE_PROF_MO_WRITE_ONCE 

Write Once Magneto-Optical write once

CDIO_MMC_FEATURE_PROF_AS_MO 

Advance Storage Magneto-Optical

CDIO_MMC_FEATURE_PROF_CD_ROM 

Read only Compact Disc capable

CDIO_MMC_FEATURE_PROF_CD_R 

Write once Compact Disc capable

CDIO_MMC_FEATURE_PROF_CD_RW 

CD-RW Re-writable Compact Disc capable

CDIO_MMC_FEATURE_PROF_DVD_ROM 

Read only DVD

CDIO_MMC_FEATURE_PROF_DVD_R_SEQ 

Re-recordable DVD using Sequential recording

CDIO_MMC_FEATURE_PROF_DVD_RAM 

Re-writable DVD

CDIO_MMC_FEATURE_PROF_DVD_RW_RO 

Re-recordable DVD using Restricted Overwrite

CDIO_MMC_FEATURE_PROF_DVD_RW_SEQ 

Re-recordable DVD using Sequential recording

CDIO_MMC_FEATURE_PROF_DVD_R_DL_SEQ 

DVD-R/DL sequential recording

CDIO_MMC_FEATURE_PROF_DVD_R_DL_JR 

DVD-R/DL layer jump recording

CDIO_MMC_FEATURE_PROF_DVD_PRW 

DVD+RW - DVD ReWritable

CDIO_MMC_FEATURE_PROF_DVD_PR 

DVD+R - DVD Recordable

CDIO_MMC_FEATURE_PROF_DDCD_ROM 

Read only DDCD

CDIO_MMC_FEATURE_PROF_DDCD_R 

DDCD-R Write only DDCD

CDIO_MMC_FEATURE_PROF_DDCD_RW 

Re-Write only DDCD

CDIO_MMC_FEATURE_PROF_DVD_PRW_DL 

"DVD+RW/DL

CDIO_MMC_FEATURE_PROF_DVD_PR_DL 

DVD+R - DVD Recordable double layer

CDIO_MMC_FEATURE_PROF_BD_ROM 

BD-ROM

CDIO_MMC_FEATURE_PROF_BD_SEQ 

BD-R sequential recording

CDIO_MMC_FEATURE_PROF_BD_R_RANDOM 

BD-R random recording

CDIO_MMC_FEATURE_PROF_BD_RE 

BD-RE

CDIO_MMC_FEATURE_PROF_HD_DVD_ROM 

HD-DVD-ROM

CDIO_MMC_FEATURE_PROF_HD_DVD_R 

HD-DVD-R

CDIO_MMC_FEATURE_PROF_HD_DVD_RAM 

"HD-DVD-RAM

CDIO_MMC_FEATURE_PROF_NON_CONFORM 

The Logical Unit does not conform to any Profile.

Function Documentation

◆ mmc_feature2str()

const char* mmc_feature2str ( int  i_feature)
Parameters
i_featureMMC feature number
Returns
string containing the name of the given feature

◆ mmc_feature_profile2str()

const char* mmc_feature_profile2str ( int  i_feature_profile)

Return a string containing the name of the given feature

◆ mmc_get_drive_cap()

void mmc_get_drive_cap ( CdIo_t p_cdio,
cdio_drive_read_cap_t p_read_cap,
cdio_drive_write_cap_t p_write_cap,
cdio_drive_misc_cap_t p_misc_cap 
)

Get drive capabilities for a device.

Parameters
p_cdiothe CD object to be acted upon.
p_read_caplist of read capabilities that are set on return
p_write_caplist of write capabilities that are set on return
p_misc_caplist of miscellaneous capabilities (that are neither read nor write related) that are set on return

◆ mmc_is_disctype_bd()

bool mmc_is_disctype_bd ( cdio_mmc_feature_profile_t  disctype)

◆ mmc_is_disctype_cdrom()

bool mmc_is_disctype_cdrom ( cdio_mmc_feature_profile_t  disctype)

◆ mmc_is_disctype_dvd()

bool mmc_is_disctype_dvd ( cdio_mmc_feature_profile_t  disctype)

◆ mmc_is_disctype_hd_dvd()

bool mmc_is_disctype_hd_dvd ( cdio_mmc_feature_profile_t  disctype)

◆ mmc_is_disctype_overwritable()

bool mmc_is_disctype_overwritable ( cdio_mmc_feature_profile_t  disctype)

◆ mmc_is_disctype_rewritable()

bool mmc_is_disctype_rewritable ( cdio_mmc_feature_profile_t  disctype)

Variable Documentation

◆ mmc_read_timeout_ms

uint32_t mmc_read_timeout_ms

Set this to the maximum value in milliseconds that we will wait on an MMC read command.

◆ mmc_sense_key2str

const char mmc_sense_key2str[16][40]

Maps a mmc_sense_key_t into a string name.

◆ mmc_timeout_ms

uint32_t mmc_timeout_ms

Set this to the maximum value in milliseconds that we will wait on an MMC command.