Add mmc routine to get the ISRC information on a CD that is in the q subchannel
but not showing up in the CDTEXT. Contributed by Scot C. Bontrager.
This commit is contained in:
5
THANKS
5
THANKS
@@ -75,3 +75,8 @@ Daniel Schwarz
|
|||||||
Robert William Fuller
|
Robert William Fuller
|
||||||
get_track_pregap_lba, get_track_pregap_lsn. Section on "CD-DA pregap"
|
get_track_pregap_lba, get_track_pregap_lsn. Section on "CD-DA pregap"
|
||||||
in libcdio manual.
|
in libcdio manual.
|
||||||
|
|
||||||
|
Scot C. Bontrager
|
||||||
|
mmc routine to get the ISRC information on a CD that is in the q subchannel
|
||||||
|
but not showing up in the CDTEXT.
|
||||||
|
|
||||||
|
|||||||
@@ -528,16 +528,29 @@ typedef struct mmc_cdb_s {
|
|||||||
driver_return_code_t mmc_audio_get_volume (CdIo_t *p_cdio, /*out*/
|
driver_return_code_t mmc_audio_get_volume (CdIo_t *p_cdio, /*out*/
|
||||||
mmc_audio_volume_t *p_volume);
|
mmc_audio_volume_t *p_volume);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Read Audio Subchannel information
|
Read Audio Subchannel information
|
||||||
|
|
||||||
@param p_cdio the CD object to be acted upon.
|
@param p_cdio the CD object to be acted upon.
|
||||||
@param p_subchannel place for returned subchannel information
|
@param p_subchannel place for returned subchannel information
|
||||||
*/
|
*/
|
||||||
driver_return_code_t
|
driver_return_code_t
|
||||||
mmc_audio_read_subchannel (CdIo_t *p_cdio,
|
mmc_audio_read_subchannel (CdIo_t *p_cdio,
|
||||||
/*out*/ cdio_subchannel_t *p_subchannel);
|
/*out*/ cdio_subchannel_t *p_subchannel);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Read ISRC Subchannel information. Contributed by
|
||||||
|
Scot C. Bontrager (scot@indievisible.org)
|
||||||
|
May 15, 2011 -
|
||||||
|
|
||||||
|
@param p_cdio the CD object to be acted upon.
|
||||||
|
@param track the track you to get ISRC info
|
||||||
|
@param buf place to put ISRC info
|
||||||
|
*/
|
||||||
|
driver_return_code_t
|
||||||
|
mmc_isrc_track_read_subchannel (CdIo_t *p_cdio, /*in*/ const track_t track,
|
||||||
|
/*out*/ char *p_isrc);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Return a string containing the name of the audio state as returned from
|
Return a string containing the name of the audio state as returned from
|
||||||
the Q_SUBCHANNEL.
|
the Q_SUBCHANNEL.
|
||||||
|
|||||||
@@ -475,6 +475,41 @@ mmc_audio_read_subchannel (CdIo_t *p_cdio, cdio_subchannel_t *p_subchannel)
|
|||||||
return i_rc;
|
return i_rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Read ISRC Subchannel information. Contributed by
|
||||||
|
Scot C. Bontrager (scot@indievisible.org)
|
||||||
|
May 15, 2011 -
|
||||||
|
|
||||||
|
@param p_cdio the CD object to be acted upon.
|
||||||
|
@param track the track you to get ISRC info
|
||||||
|
@param buf place to put ISRC info
|
||||||
|
*/
|
||||||
|
driver_return_code_t
|
||||||
|
mmc_isrc_track_read_subchannel (CdIo_t *p_cdio, /*in*/ const track_t track,
|
||||||
|
/*out*/ char *p_isrc)
|
||||||
|
{
|
||||||
|
mmc_cdb_t cdb = {{0, }};
|
||||||
|
driver_return_code_t i_rc;
|
||||||
|
char buf[28] = { 0, };
|
||||||
|
|
||||||
|
if (!p_cdio) return DRIVER_OP_UNINIT;
|
||||||
|
|
||||||
|
CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_SUBCHANNEL);
|
||||||
|
CDIO_MMC_SET_READ_LENGTH8(cdb.field, sizeof(buf));
|
||||||
|
|
||||||
|
cdb.field[1] = 0x0;
|
||||||
|
cdb.field[2] = 1 << 6;
|
||||||
|
cdb.field[3] = CDIO_SUBCHANNEL_TRACK_ISRC; /* 0x03 */
|
||||||
|
cdb.field[6] = track;
|
||||||
|
|
||||||
|
i_rc = mmc_run_cmd(p_cdio, mmc_timeout_ms, &cdb, SCSI_MMC_DATA_READ,
|
||||||
|
sizeof(buf), buf);
|
||||||
|
if (DRIVER_OP_SUCCESS == i_rc) {
|
||||||
|
strncpy(p_isrc, &buf[9], sizeof(buf)-9);
|
||||||
|
}
|
||||||
|
return i_rc;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get the block size used in read requests, via MMC (e.g. READ_10,
|
Get the block size used in read requests, via MMC (e.g. READ_10,
|
||||||
READ_MSF, ...)
|
READ_MSF, ...)
|
||||||
@@ -1015,9 +1050,6 @@ mmc_set_blocksize ( const CdIo_t *p_cdio, uint16_t i_blocksize)
|
|||||||
i_blocksize);
|
i_blocksize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local variables:
|
* Local variables:
|
||||||
|
|||||||
Reference in New Issue
Block a user