From 0fe110548dc9b06974ab1fc4c93fa319bd726786 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 12 Apr 1999 14:35:08 +0000 Subject: Forgot to add this file. CDROM device parameters. --- Lib/plat-linux2/CDROM.py | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ Lib/plat-sunos5/CDIO.py | 73 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 Lib/plat-linux2/CDROM.py create mode 100644 Lib/plat-sunos5/CDIO.py diff --git a/Lib/plat-linux2/CDROM.py b/Lib/plat-linux2/CDROM.py new file mode 100644 index 0000000..015df1a --- /dev/null +++ b/Lib/plat-linux2/CDROM.py @@ -0,0 +1,80 @@ +# Generated by h2py from /usr/include/linux/cdrom.h +CD_MINS = 74 +CD_SECS = 60 +CD_FRAMES = 75 +CD_SYNC_SIZE = 12 +CD_HEAD_SIZE = 4 +CD_SUBHEAD_SIZE = 8 +CD_XA_HEAD = (CD_HEAD_SIZE+CD_SUBHEAD_SIZE) +CD_XA_SYNC_HEAD = (CD_SYNC_SIZE+CD_XA_HEAD) +CD_FRAMESIZE = 2048 +CD_FRAMESIZE_RAW = 2352 +CD_FRAMESIZE_RAW1 = (CD_FRAMESIZE_RAW-CD_SYNC_SIZE) +CD_FRAMESIZE_RAW0 = (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE) +CD_FRAMESIZE_RAWER = 2646 +CD_EDC_SIZE = 4 +CD_ZERO_SIZE = 8 +CD_ECC_SIZE = 276 +CD_XA_TAIL = (CD_EDC_SIZE+CD_ECC_SIZE) +CD_FRAMESIZE_SUB = 96 +CD_MSF_OFFSET = 150 +CD_CHUNK_SIZE = 24 +CD_NUM_OF_CHUNKS = 98 +CD_FRAMESIZE_XA = CD_FRAMESIZE_RAW1 +CD_BLOCK_OFFSET = CD_MSF_OFFSET +CDROM_LBA = 0x01 +CDROM_MSF = 0x02 +CDROM_DATA_TRACK = 0x04 +CDROM_LEADOUT = 0xAA +CDROM_AUDIO_INVALID = 0x00 +CDROM_AUDIO_PLAY = 0x11 +CDROM_AUDIO_PAUSED = 0x12 +CDROM_AUDIO_COMPLETED = 0x13 +CDROM_AUDIO_ERROR = 0x14 +CDROM_AUDIO_NO_STATUS = 0x15 +CDROM_MODE1_SIZE = 512 +CDROM_MODE1_SIZE = 2048 +CDROM_MODE2_SIZE = 2336 +CDROMPAUSE = 0x5301 +CDROMRESUME = 0x5302 +CDROMPLAYMSF = 0x5303 +CDROMPLAYTRKIND = 0x5304 +CDROMREADTOCHDR = 0x5305 +CDROMREADTOCENTRY = 0x5306 +CDROMSTOP = 0x5307 +CDROMSTART = 0x5308 +CDROMEJECT = 0x5309 +CDROMVOLCTRL = 0x530a +CDROMSUBCHNL = 0x530b +CDROMREADMODE2 = 0x530c +CDROMREADMODE1 = 0x530d +CDROMREADAUDIO = 0x530e +CDROMEJECT_SW = 0x530f +CDROMMULTISESSION = 0x5310 +CDROM_GET_UPC = 0x5311 +CDROMRESET = 0x5312 +CDROMVOLREAD = 0x5313 +CDROMREADRAW = 0x5314 +CDROMREADCOOKED = 0x5315 +CDROMSEEK = 0x5316 +CDROMPLAYBLK = 0x5317 +CDROMREADALL = 0x5318 +CDROMCLOSETRAY = 0x5319 +CDROMLOADFROMSLOT = 0x531a +SCMD_READ_TOC = 0x43 +SCMD_PLAYAUDIO_MSF = 0x47 +SCMD_PLAYAUDIO_TI = 0x48 +SCMD_PAUSE_RESUME = 0x4B +SCMD_READ_SUBCHANNEL = 0x42 +SCMD_PLAYAUDIO10 = 0x45 +SCMD_READ_HEADER = 0x44 +SCMD_PLAYAUDIO12 = 0xA5 +SCMD_PLAYTRACK_REL12 = 0xA9 +SCMD_CD_PLAYBACK_CONTROL = 0xC9 +SCMD_CD_PLAYBACK_STATUS = 0xC4 +ERR_RECOVERY_PARMS = 0x01 +DISCO_RECO_PARMS = 0x02 +FORMAT_PARMS = 0x03 +GEOMETRY_PARMS = 0x04 +CERTIFICATION_PARMS = 0x06 +CACHE_PARMS = 0x38 diff --git a/Lib/plat-sunos5/CDIO.py b/Lib/plat-sunos5/CDIO.py new file mode 100644 index 0000000..d766b50 --- /dev/null +++ b/Lib/plat-sunos5/CDIO.py @@ -0,0 +1,73 @@ +# Generated by h2py from /usr/include/sys/cdio.h +CDROM_LBA = 0x01 +CDROM_MSF = 0x02 +CDROM_DATA_TRACK = 0x04 +CDROM_LEADOUT = 0xAA +CDROM_AUDIO_INVALID = 0x00 +CDROM_AUDIO_PLAY = 0x11 +CDROM_AUDIO_PAUSED = 0x12 +CDROM_AUDIO_COMPLETED = 0x13 +CDROM_AUDIO_ERROR = 0x14 +CDROM_AUDIO_NO_STATUS = 0x15 +CDROM_DA_NO_SUBCODE = 0x00 +CDROM_DA_SUBQ = 0x01 +CDROM_DA_ALL_SUBCODE = 0x02 +CDROM_DA_SUBCODE_ONLY = 0x03 +CDROM_XA_DATA = 0x00 +CDROM_XA_SECTOR_DATA = 0x01 +CDROM_XA_DATA_W_ERROR = 0x02 +CDROM_BLK_512 = 512 +CDROM_BLK_1024 = 1024 +CDROM_BLK_2048 = 2048 +CDROM_BLK_2056 = 2056 +CDROM_BLK_2336 = 2336 +CDROM_BLK_2340 = 2340 +CDROM_BLK_2352 = 2352 +CDROM_BLK_2368 = 2368 +CDROM_BLK_2448 = 2448 +CDROM_BLK_2646 = 2646 +CDROM_BLK_2647 = 2647 +CDROM_BLK_SUBCODE = 96 +CDROM_NORMAL_SPEED = 0x00 +CDROM_DOUBLE_SPEED = 0x01 +CDROM_QUAD_SPEED = 0x03 +CDROM_TWELVE_SPEED = 0x0C +CDROM_MAXIMUM_SPEED = 0xff +CDIOC = (0x04 << 8) +CDROMPAUSE = (CDIOC|151) +CDROMRESUME = (CDIOC|152) +CDROMPLAYMSF = (CDIOC|153) +CDROMPLAYTRKIND = (CDIOC|154) +CDROMREADTOCHDR = (CDIOC|155) +CDROMREADTOCENTRY = (CDIOC|156) +CDROMSTOP = (CDIOC|157) +CDROMSTART = (CDIOC|158) +CDROMEJECT = (CDIOC|159) +CDROMVOLCTRL = (CDIOC|160) +CDROMSUBCHNL = (CDIOC|161) +CDROMREADMODE2 = (CDIOC|162) +CDROMREADMODE1 = (CDIOC|163) +CDROMREADOFFSET = (CDIOC|164) +CDROMGBLKMODE = (CDIOC|165) +CDROMSBLKMODE = (CDIOC|166) +CDROMCDDA = (CDIOC|167) +CDROMCDXA = (CDIOC|168) +CDROMSUBCODE = (CDIOC|169) +CDROMGDRVSPEED = (CDIOC|170) +CDROMSDRVSPEED = (CDIOC|171) +SCMD_READ_TOC = 0x43 +SCMD_PLAYAUDIO_MSF = 0x47 +SCMD_PLAYAUDIO_TI = 0x48 +SCMD_PAUSE_RESUME = 0x4B +SCMD_READ_SUBCHANNEL = 0x42 +SCMD_PLAYAUDIO10 = 0x45 +SCMD_PLAYTRACK_REL10 = 0x49 +SCMD_READ_HEADER = 0x44 +SCMD_PLAYAUDIO12 = 0xA5 +SCMD_PLAYTRACK_REL12 = 0xA9 +SCMD_CD_PLAYBACK_CONTROL = 0xC9 +SCMD_CD_PLAYBACK_STATUS = 0xC4 +SCMD_READ_CDDA = 0xD8 +SCMD_READ_CDXA = 0xDB +SCMD_READ_ALL_SUBCODES = 0xDF +CDROM_MODE2_SIZE = 2336 -- cgit v0.12