Move another routine from mmc.c into mmc_hl_cmds.c
This commit is contained in:
@@ -657,14 +657,6 @@ mmc_audio_read_subchannel (CdIo_t *p_cdio,
|
|||||||
*/
|
*/
|
||||||
lsn_t mmc_get_disc_last_lsn( const CdIo_t *p_cdio );
|
lsn_t mmc_get_disc_last_lsn( const CdIo_t *p_cdio );
|
||||||
|
|
||||||
/**
|
|
||||||
Close tray using a MMC START STOP UNIT command.
|
|
||||||
@param p_cdio the CD object to be acted upon.
|
|
||||||
@return DRIVER_OP_SUCCESS (0) if we got the status.
|
|
||||||
return codes are the same as driver_return_code_t
|
|
||||||
*/
|
|
||||||
driver_return_code_t mmc_close_tray( CdIo_t *p_cdio );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Return the discmode as reported by the MMC Read (FULL) TOC
|
Return the discmode as reported by the MMC Read (FULL) TOC
|
||||||
command.
|
command.
|
||||||
|
|||||||
@@ -31,6 +31,14 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/**
|
||||||
|
Close tray using a MMC START STOP UNIT command.
|
||||||
|
@param p_cdio the CD object to be acted upon.
|
||||||
|
@return DRIVER_OP_SUCCESS (0) if we got the status.
|
||||||
|
return codes are the same as driver_return_code_t
|
||||||
|
*/
|
||||||
|
driver_return_code_t mmc_close_tray( CdIo_t *p_cdio );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Detects if a disc (CD or DVD) is erasable or not.
|
Detects if a disc (CD or DVD) is erasable or not.
|
||||||
|
|
||||||
|
|||||||
@@ -199,7 +199,33 @@ get_tray_status (const void *p_user_data)
|
|||||||
return mmc_get_tray_status( p_env->cdio );
|
return mmc_get_tray_status( p_env->cdio );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Read sectors using SCSI-MMC GPCMD_READ_CD.
|
/**
|
||||||
|
Read sectors using SCSI-MMC GPCMD_READ_CD.
|
||||||
|
*/
|
||||||
|
driver_return_code_t
|
||||||
|
mmc_read_data_sectors ( CdIo_t *p_cdio, void *p_buf,
|
||||||
|
lsn_t i_lsn, uint16_t i_blocksize,
|
||||||
|
uint32_t i_blocks )
|
||||||
|
{
|
||||||
|
return mmc_read_cd(p_cdio,
|
||||||
|
p_buf, /* place to store data */
|
||||||
|
i_lsn, /* lsn */
|
||||||
|
0, /* read_sector_type */
|
||||||
|
false, /* digital audio play */
|
||||||
|
false, /* return sync header */
|
||||||
|
0, /* header codes */
|
||||||
|
true, /* return user data */
|
||||||
|
false, /* return EDC ECC */
|
||||||
|
false, /* return C2 Error information */
|
||||||
|
0, /* subchannel selection bits */
|
||||||
|
ISO_BLOCKSIZE, /* blocksize*/
|
||||||
|
i_blocks /* Number of blocks. */);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Read sectors using SCSI-MMC GPCMD_READ_CD.
|
||||||
Can read only up to 25 blocks.
|
Can read only up to 25 blocks.
|
||||||
*/
|
*/
|
||||||
driver_return_code_t
|
driver_return_code_t
|
||||||
@@ -1014,22 +1040,6 @@ mmc_run_cmd_len( const CdIo_t *p_cdio, unsigned int i_timeout_ms,
|
|||||||
p_cdb, e_direction, i_buf, p_buf);
|
p_cdb, e_direction, i_buf, p_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
Close tray using a MMC START STOP UNIT command.
|
|
||||||
@param p_cdio the CD object to be acted upon.
|
|
||||||
@return DRIVER_OP_SUCCESS (0) if we got the status.
|
|
||||||
return codes are the same as driver_return_code_t
|
|
||||||
*/
|
|
||||||
driver_return_code_t
|
|
||||||
mmc_close_tray( CdIo_t *p_cdio )
|
|
||||||
{
|
|
||||||
if (p_cdio) {
|
|
||||||
return mmc_start_stop_unit(p_cdio, false, false, 0, 0);
|
|
||||||
} else {
|
|
||||||
return DRIVER_OP_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Return a string containing the name of the given feature
|
Return a string containing the name of the given feature
|
||||||
*/
|
*/
|
||||||
@@ -1338,31 +1348,6 @@ mmc_is_disctype_rewritable (cdio_mmc_feature_profile_t disctype) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
Read sectors using SCSI-MMC GPCMD_READ_CD.
|
|
||||||
*/
|
|
||||||
driver_return_code_t
|
|
||||||
mmc_read_data_sectors ( CdIo_t *p_cdio, void *p_buf,
|
|
||||||
lsn_t i_lsn, uint16_t i_blocksize,
|
|
||||||
uint32_t i_blocks )
|
|
||||||
{
|
|
||||||
return mmc_read_cd(p_cdio,
|
|
||||||
p_buf, /* place to store data */
|
|
||||||
i_lsn, /* lsn */
|
|
||||||
0, /* read_sector_type */
|
|
||||||
false, /* digital audio play */
|
|
||||||
false, /* return sync header */
|
|
||||||
0, /* header codes */
|
|
||||||
true, /* return user data */
|
|
||||||
false, /* return EDC ECC */
|
|
||||||
false, /* return C2 Error information */
|
|
||||||
0, /* subchannel selection bits */
|
|
||||||
ISO_BLOCKSIZE, /* blocksize*/
|
|
||||||
i_blocks /* Number of blocks. */);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Read sectors using SCSI-MMC GPCMD_READ_CD.
|
Read sectors using SCSI-MMC GPCMD_READ_CD.
|
||||||
Can read only up to 25 blocks.
|
Can read only up to 25 blocks.
|
||||||
|
|||||||
@@ -24,6 +24,22 @@
|
|||||||
#include <cdio/cdio.h>
|
#include <cdio/cdio.h>
|
||||||
#include <cdio/mmc_cmds.h>
|
#include <cdio/mmc_cmds.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Close tray using a MMC START STOP UNIT command.
|
||||||
|
@param p_cdio the CD object to be acted upon.
|
||||||
|
@return DRIVER_OP_SUCCESS (0) if we got the status.
|
||||||
|
return codes are the same as driver_return_code_t
|
||||||
|
*/
|
||||||
|
driver_return_code_t
|
||||||
|
mmc_close_tray( CdIo_t *p_cdio )
|
||||||
|
{
|
||||||
|
if (p_cdio) {
|
||||||
|
return mmc_start_stop_unit(p_cdio, false, false, 0, 0);
|
||||||
|
} else {
|
||||||
|
return DRIVER_OP_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Eject using MMC commands. If CD-ROM is "locked" we'll unlock it.
|
Eject using MMC commands. If CD-ROM is "locked" we'll unlock it.
|
||||||
Command is not "immediate" -- we'll wait for the command to complete.
|
Command is not "immediate" -- we'll wait for the command to complete.
|
||||||
|
|||||||
@@ -432,5 +432,3 @@ main(int argc, const char *argv[])
|
|||||||
|
|
||||||
return exitrc;
|
return exitrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user