Make so we can call from driver. Some comment changes too.

This commit is contained in:
rocky
2006-04-05 02:20:06 +00:00
parent 1be50a03fc
commit d71d515ee6
2 changed files with 19 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
/* Common Multimedia Command (MMC) routines.
$Id: mmc.c,v 1.32 2006/04/04 02:06:13 rocky Exp $
$Id: mmc.c,v 1.33 2006/04/05 02:20:06 rocky Exp $
Copyright (C) 2004, 2005, 2006 Rocky Bernstein <rocky@panix.com>
@@ -191,7 +191,8 @@ set_blocksize_mmc (void *p_user_data, uint16_t i_blocksize)
return mmc_set_blocksize(p_env->cdio, i_blocksize);
}
/* Set CD-ROM drive speed (via MMC) */
/* Set the drive speed Set the drive speed in K bytes per second. (via
MMC). */
driver_return_code_t
set_speed_mmc (void *p_user_data, int i_speed)
{
@@ -200,6 +201,15 @@ set_speed_mmc (void *p_user_data, int i_speed)
return mmc_set_speed( p_env->cdio, i_speed );
}
/* Set the drive speed in CD-ROM speed units (via MMC). */
driver_return_code_t
set_drive_speed_mmc (void *p_user_data, int i_Kbs_speed)
{
generic_img_private_t *p_env = p_user_data;
if (!p_env) return DRIVER_OP_UNINIT;
return mmc_set_drive_speed( p_env->cdio, i_Kbs_speed );
}
/** Get the output port volumes and port selections used on AUDIO PLAY
commands via a MMC MODE SENSE command using the CD Audio Control
Page.
@@ -1363,7 +1373,7 @@ mmc_set_drive_speed( const CdIo_t *p_cdio, int i_drive_speed )
/*!
Set the drive speed.
Set the drive speed in K bytes per second.
@return the drive speed if greater than 0. -1 if we had an error. is -2
returned if this is not implemented for the current driver.

View File

@@ -1,6 +1,6 @@
/* private MMC helper routines.
$Id: mmc_private.h,v 1.9 2005/10/21 11:13:54 rocky Exp $
$Id: mmc_private.h,v 1.10 2006/04/05 02:20:07 rocky Exp $
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -97,8 +97,11 @@ char *get_mcn_mmc (const void *p_user_data);
driver_return_code_t set_blocksize_mmc (void *p_user_data,
uint16_t i_blocksize);
/* Set CD-ROM drive speed (via MMC) */
driver_return_code_t set_speed_mmc (void *p_user_data, int i_speed);
/* Set the drive speed in CD-ROM speed units (via MMC). */
driver_return_code_t set_drive_speed_mmc (void *p_user_data, int i_speed);
/* Set CD-ROM drive speed in K bytes per second. (via MMC) */
driver_return_code_t set_speed_mmc (void *p_user_data, int i_Kbs_speed);
/***********************************************************
Miscellaenous other "private" routines. Probably need