11 #include <sys/cdefs.h> 
   43 #define CMD_PIOREAD 16   
   44 #define CMD_DMAREAD 17   
   46 #define CMD_GETTOC2 19   
   50 #define CMD_RELEASE 23   
   66 #define ERR_DISC_CHG    2    
   69 #define ERR_NO_ACTIVE   5    
   91 #define CDDA_SECTORS    2    
  100 #define CDROM_READ_WHOLE_SECTOR 0x1000     
  101 #define CDROM_READ_DATA_AREA    0x2000     
  110 #define CD_SUB_Q_CHANNEL        0     
  111 #define CD_SUB_CURRENT_POSITION 1     
  113 #define CD_SUB_MEDIA_CATALOG    2     
  115 #define CD_SUB_TRACK_ISRC       3     
  124 #define CDROM_READ_PIO 0     
  125 #define CDROM_READ_DMA 1     
  134 #define CD_STATUS_BUSY      0    
  135 #define CD_STATUS_PAUSED    1    
  136 #define CD_STATUS_STANDBY   2    
  137 #define CD_STATUS_PLAYING   3    
  138 #define CD_STATUS_SEEKING   4    
  139 #define CD_STATUS_SCANNING  5    
  140 #define CD_STATUS_OPEN      6    
  141 #define CD_STATUS_NO_DISC   7    
  151 #define CD_CDROM    0x10     
  152 #define CD_CDROM_XA 0x20     
  154 #define CD_GDROM    0x80     
  178 #define TOC_LBA(n) ((n) & 0x00ffffff) 
  184 #define TOC_ADR(n) ( ((n) & 0x0f000000) >> 24 ) 
  190 #define TOC_CTRL(n) ( ((n) & 0xf0000000) >> 28 ) 
  196 #define TOC_TRACK(n) ( ((n) & 0x00ff0000) >> 16 ) 
int cdrom_reinit()
Re-initialize the GD-ROM drive. 
void cdrom_shutdown()
Shutdown the CD reading system. 
TOC structure returned by the BIOS. 
Definition: cdrom.h:166
int cdrom_read_sectors_ex(void *buffer, int sector, int cnt, int mode)
Read one or more sector from a CD-ROM. 
int cdrom_set_sector_size(int size)
Set the sector size for read sectors. 
int cdrom_read_sectors(void *buffer, int sector, int cnt)
Read one or more sector from a CD-ROM in PIO mode. 
int cdrom_init()
Initialize the GD-ROM for reading CDs. 
int cdrom_exec_cmd(int cmd, void *param)
Execute a CD-ROM command. 
int cdrom_cdda_pause()
Pause CDDA audio playback. 
uint32 cdrom_locate_data_track(CDROM_TOC *toc)
Locate the sector of the data track. 
int cdrom_change_dataype(int sector_part, int cdxa, int sector_size)
Change the datatype of disc. 
int cdrom_cdda_resume()
Resume CDDA audio playback after a pause. 
unsigned long uint32
32-bit unsigned integer 
Definition: types.h:28
int cdrom_cdda_play(uint32 start, uint32 end, uint32 loops, int mode)
Play CDDA audio tracks or sectors. 
int cdrom_get_status(int *status, int *disc_type)
Get the status of the GD-ROM drive. 
int cdrom_read_toc(CDROM_TOC *toc_buffer, int session)
Read the table of contents from the disc. 
int cdrom_reinit_ex(int sector_part, int cdxa, int sector_size)
Re-initialize the GD-ROM drive with custom parameters. 
int cdrom_get_subcode(void *buffer, int buflen, int which)
Read subcode data from the most recently read sectors. 
int cdrom_spin_down()
Spin down the CD.