libcdio  2.0.0
mmc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012
3  2016 Rocky Bernstein <rocky@gnu.org>
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
36 #ifndef CDIO_MMC_H_
37 #define CDIO_MMC_H_
38 
39 #include <cdio/cdio.h>
40 #include <cdio/types.h>
41 #include <cdio/dvd.h>
42 #include <cdio/audio.h>
43 #include <cdio/mmc_util.h>
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif /* __cplusplus */
48 
49 /* On GNU/Linux see <linux/byteorder/big_endian.h> and
50  <linux/byteorder/little_endian.h>
51 */
52 #ifdef WORDS_BIGENDIAN
53 # if !defined(__LITTLE_ENDIAN_BITFIELD) && !defined(__BIG_ENDIAN_BITFIELD)
54 # define __MMC_BIG_ENDIAN_BITFIELD
55 # endif
56 #else
57 # if !defined(__LITTLE_ENDIAN_BITFIELD) && !defined(__BIG_ENDIAN_BITFIELD)
58 # define __MMC_LITTLE_ENDIAN_BITFIELD
59 # endif
60 #endif
61 
69  typedef struct cdio_mmc_request_sense {
70 #if defined(__MMC_BIG_ENDIAN_BITFIELD)
71  uint8_t valid : 1;
72  uint8_t error_code : 7;
73 #else
74  uint8_t error_code : 7;
75  uint8_t valid : 1;
76 #endif
77  uint8_t segment_number;
78 #if defined(__MMC_BIG_ENDIAN_BITFIELD)
79  uint8_t filemark : 1;
81  uint8_t eom : 1;
84  uint8_t ili : 1;
85  uint8_t reserved1 : 1;
86  uint8_t sense_key : 4;
87 #else
88  uint8_t sense_key : 4;
89  uint8_t reserved1 : 1;
90  uint8_t ili : 1;
91  uint8_t eom : 1;
94  uint8_t filemark : 1;
96 #endif
97  uint8_t information[4];
99  uint8_t command_info[4];
100  uint8_t asc;
101  uint8_t ascq;
102  uint8_t fruc;
103  uint8_t sks[3];
104  uint8_t asb[46];
106 
107 
111  typedef enum {
126 
138  typedef enum {
154  = 0x1e,
216 
273 
277  typedef enum {
289 
291  typedef enum {
299 
303  typedef enum {
311 
315  typedef enum {
326 
330  typedef enum {
335 
336 /* For backward compatibility. */
337 #define CDIO_MMC_GPCMD_READ_DISC_INFO CDIO_MMC_GPCMD_READ_DISC_INFORMATION
338 #define CDIO_MMC_GPCMD_READ_DISC_STRUCTURE CDIO_MMC_GPMD_READ_DVD_STRUCTURE
339 
340 
343  {
344  uint8_t selection; /* Only the lower 4 bits are used. */
345  uint8_t volume;
346  } GNUC_PACKED;
347 
349 
354  {
356  } GNUC_PACKED;
357 
359 
361 
362 
366 typedef enum {
375 
376 
380 typedef enum {
421  CDIO_MMC_FEATURE_MCODE_UPGRADE = 0x104, /* Ability for the device to
422  accept new microcode via
423  the interface */
438 
439 typedef enum {
447 
448 
453 #define MAX_CDB_LEN 12
454 
459 typedef struct mmc_cdb_s {
460  uint8_t field[MAX_CDB_LEN];
461 } mmc_cdb_t;
462 
467  typedef struct mmc_feature_list_header_s {
468  unsigned char length_msb;
469  unsigned char length_1sb;
470  unsigned char length_2sb;
471  unsigned char length_lsb;
472  unsigned char reserved1;
473  unsigned char reserved2;
474  unsigned char profile_msb;
475  unsigned char profile_lsb;
477 
482  typedef enum mmc_direction_s {
493 #define SCSI_MMC_HAS_DIR_NONE 1
494 
495  typedef struct mmc_subchannel_s
496  {
497  uint8_t reserved;
498  uint8_t audio_status;
499  uint16_t data_length;
500  uint8_t format;
501  uint8_t address: 4;
502  uint8_t control: 4;
503  uint8_t track;
504  uint8_t index;
505  uint8_t abs_addr[4];
506  uint8_t rel_addr[4];
508 
509 #define CDIO_MMC_SET_COMMAND(cdb, command) \
510  cdb[0] = command
511 
512 #define CDIO_MMC_SET_READ_TYPE(cdb, sector_type) \
513  cdb[1] = (sector_type << 2)
514 
515 #define CDIO_MMC_GETPOS_LEN16(p, pos) \
516  (p[pos]<<8) + p[pos+1]
517 
518 #define CDIO_MMC_GET_LEN16(p) \
519  (p[0]<<8) + p[1]
520 
521 #define CDIO_MMC_GET_LEN32(p) \
522  (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3];
523 
524 #define CDIO_MMC_SET_LEN16(cdb, pos, len) \
525  cdb[pos ] = (len >> 8) & 0xff; \
526  cdb[pos+1] = (len ) & 0xff
527 
528 #define CDIO_MMC_SET_READ_LBA(cdb, lba) \
529  cdb[2] = (lba >> 24) & 0xff; \
530  cdb[3] = (lba >> 16) & 0xff; \
531  cdb[4] = (lba >> 8) & 0xff; \
532  cdb[5] = (lba ) & 0xff
533 
534 #define CDIO_MMC_SET_START_TRACK(cdb, command) \
535  cdb[6] = command
536 
537 #define CDIO_MMC_SET_READ_LENGTH24(cdb, len) \
538  cdb[6] = (len >> 16) & 0xff; \
539  cdb[7] = (len >> 8) & 0xff; \
540  cdb[8] = (len ) & 0xff
541 
542 #define CDIO_MMC_SET_READ_LENGTH16(cdb, len) \
543  CDIO_MMC_SET_LEN16(cdb, 7, len)
544 
545 #define CDIO_MMC_SET_READ_LENGTH8(cdb, len) \
546  cdb[8] = (len ) & 0xff
547 
548 #define CDIO_MMC_MCSB_ALL_HEADERS 0xf
549 
550 #define CDIO_MMC_SET_MAIN_CHANNEL_SELECTION_BITS(cdb, val) \
551  cdb[9] = val << 3;
552 
562  mmc_audio_volume_t *p_volume);
563 
572  /*out*/ cdio_subchannel_t *p_subchannel);
573 
578  const char *mmc_audio_state2str( uint8_t i_audio_state );
579 
586  int mmc_get_blocksize ( CdIo_t *p_cdio );
587 
593  uint8_t mmc_get_cmd_len(uint8_t mmc_cmd);
594 
601  lsn_t mmc_get_disc_last_lsn( const CdIo_t *p_cdio );
602 
612  discmode_t mmc_get_discmode( const CdIo_t *p_cdio );
613 
614 
615  typedef enum {
622 
629 
630 
639  cdio_dvd_struct_t *s);
640 
647  int mmc_get_tray_status ( const CdIo_t *p_cdio );
648 
657  bool mmc_get_hwinfo ( const CdIo_t *p_cdio,
658  /* out*/ cdio_hwinfo_t *p_hw_info );
659 
660 
667  int mmc_get_media_changed(const CdIo_t *p_cdio);
668 
680  char * mmc_get_mcn(const CdIo_t *p_cdio);
681 
694  char * mmc_get_track_isrc(const CdIo_t *p_cdio, track_t i_track);
695 
705  uint8_t * mmc_read_cdtext (const CdIo_t *p_cdio);
706 
716  cdio_mmc_feature_interface_t e_interface );
717 
718 
737  driver_return_code_t mmc_read_data_sectors ( CdIo_t *p_cdio, void *p_buf,
738  lsn_t i_lsn,
739  uint16_t i_blocksize,
740  uint32_t i_blocks );
741 
746  driver_return_code_t mmc_read_sectors ( const CdIo_t *p_cdio, void *p_buf,
747  lsn_t i_lsn, int read_sector_type,
748  uint32_t i_blocks);
749 
766  mmc_run_cmd( const CdIo_t *p_cdio, unsigned int i_timeout_ms,
767  const mmc_cdb_t *p_cdb,
768  cdio_mmc_direction_t e_direction, unsigned int i_buf,
769  /*in/out*/ void *p_buf );
770 
791  mmc_run_cmd_len( const CdIo_t *p_cdio, unsigned int i_timeout_ms,
792  const mmc_cdb_t *p_cdb, unsigned int i_cdb,
793  cdio_mmc_direction_t e_direction, unsigned int i_buf,
794  /*in/out*/ void *p_buf );
795 
813  int mmc_last_cmd_sense ( const CdIo_t *p_cdio,
814  cdio_mmc_request_sense_t **pp_sense);
815 
820  uint16_t i_blocksize);
821 
829  const char *mmc_cmd2str(uint8_t command);
830 
831 
832 
833 #ifdef __cplusplus
834 }
835 #endif /* __cplusplus */
836 
852 
853 #ifndef DO_NOT_WANT_OLD_MMC_COMPATIBILITY
854 #define CDIO_MMC_GPCMD_START_STOP CDIO_MMC_GPCMD_START_STOP_UNIT
855 #define CDIO_MMC_GPCMD_ALLOW_MEDIUM_REMOVAL \
856  CDIO_MMC_GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL
857 #endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/
858 
859 #endif /* CDIO_MMC_H_ */
860 
861 /*
862  * Local variables:
863  * c-file-style: "ruby"
864  * tab-width: 8
865  * indent-tabs-mode: nil
866  * End:
867  */
mmc_have_interface
bool_3way_t mmc_have_interface(CdIo_t *p_cdio, cdio_mmc_feature_interface_t e_interface)
CDIO_MMC_FEATURE_MORPHING
@ CDIO_MMC_FEATURE_MORPHING
Definition: mmc.h:383
cdio_mmc_level_t
cdio_mmc_level_t
Definition: mmc.h:615
mmc_subchannel_s::abs_addr
uint8_t abs_addr[4]
Definition: mmc.h:505
CDIO_MMC_GPCMD_PLAY_AUDIO_TI
@ CDIO_MMC_GPCMD_PLAY_AUDIO_TI
Definition: mmc.h:185
cdio_mmc_request_sense::information
uint8_t information[4]
Definition: mmc.h:97
CDIO_MMC_LEVEL_3
@ CDIO_MMC_LEVEL_3
Definition: mmc.h:619
bool_3way_t
bool_3way_t
Definition: types.h:236
debug_cdio_mmc_feature
cdio_mmc_feature_t debug_cdio_mmc_feature
cdio_mmc_request_sense::additional_sense_len
uint8_t additional_sense_len
Definition: mmc.h:98
mmc_subchannel_s::rel_addr
uint8_t rel_addr[4]
Definition: mmc.h:506
CDIO_MMC_GPCMD_CD_PLAYBACK_STATUS
@ CDIO_MMC_GPCMD_CD_PLAYBACK_STATUS
Definition: mmc.h:267
CDIO_MMC_GPCMD_SEND_KEY
@ CDIO_MMC_GPCMD_SEND_KEY
Definition: mmc.h:223
CDIO_MMC_READTOC_FMT_ATIP
@ CDIO_MMC_READTOC_FMT_ATIP
Definition: mmc.h:308
mmc_feature_list_header_s::profile_lsb
unsigned char profile_lsb
Definition: mmc.h:475
CDIO_MMC_FEATURE_FORMATABLE
@ CDIO_MMC_FEATURE_FORMATABLE
Definition: mmc.h:395
CDIO_MMC_GPCMD_READ_DVD_STRUCTURE
@ CDIO_MMC_GPCMD_READ_DVD_STRUCTURE
Definition: mmc.h:242
CDIO_MMC_GPCMD_SET_SPEED
@ CDIO_MMC_GPCMD_SET_SPEED
Definition: mmc.h:249
mmc_get_cmd_len
uint8_t mmc_get_cmd_len(uint8_t mmc_cmd)
CDIO_MMC_READ_SUB_ST_ERROR
@ CDIO_MMC_READ_SUB_ST_ERROR
Definition: mmc.h:284
cdio_mmc_request_sense::segment_number
uint8_t segment_number
Definition: mmc.h:77
mmc_feature_list_header_s::length_1sb
unsigned char length_1sb
Definition: mmc.h:469
mmc_audio_volume_entry_s
Definition: mmc.h:342
mmc_feature_list_header_s::length_2sb
unsigned char length_2sb
Definition: mmc.h:470
CDIO_MMC_SENSE_KEY_BLANK_CHECK
@ CDIO_MMC_SENSE_KEY_BLANK_CHECK
Definition: mmc.h:120
CDIO_MMC_GET_CONF_ALL_FEATURES
@ CDIO_MMC_GET_CONF_ALL_FEATURES
Definition: mmc.h:367
CDIO_MMC_READTOC_FMT_PMA
@ CDIO_MMC_READTOC_FMT_PMA
Definition: mmc.h:307
cdio.h
The top-level header for libcdio: the CD Input and Control library. Applications include this for any...
CDIO_MMC_FEATURE_CORE
@ CDIO_MMC_FEATURE_CORE
Definition: mmc.h:382
CDIO_MMC_GPCMD_ERASE_10
@ CDIO_MMC_GPCMD_ERASE_10
Definition: mmc.h:166
CDIO_MMC_ALL_PAGES
@ CDIO_MMC_ALL_PAGES
Definition: mmc.h:324
types.h
Common type definitions used pervasively in libcdio.
mmc_cdb_s
A Command Descriptor Block (CDB) used in sending MMC commands.
Definition: mmc.h:459
mmc_audio_volume_entry_s::selection
uint8_t selection
Definition: mmc.h:344
CDIO_MMC_READ_SUB_ST_PLAY
@ CDIO_MMC_READ_SUB_ST_PLAY
Definition: mmc.h:279
CDIO_MMC_FAULT_FAIL_PAGE
@ CDIO_MMC_FAULT_FAIL_PAGE
Definition: mmc.h:321
lsn_t
int32_t lsn_t
Definition: types.h:266
mmc_cdb_s::field
uint8_t field[MAX_CDB_LEN]
Definition: mmc.h:460
driver_return_code_t
driver_return_code_t
Definition: device.h:205
mmc_audio_get_volume
driver_return_code_t mmc_audio_get_volume(CdIo_t *p_cdio, mmc_audio_volume_t *p_volume)
CDIO_MMC_GPCMD_SEEK_10
@ CDIO_MMC_GPCMD_SEEK_10
Definition: mmc.h:165
CDIO_MMC_GPCMD_REPORT_KEY
@ CDIO_MMC_GPCMD_REPORT_KEY
Definition: mmc.h:224
CDIO_MMC_GPCMD_WRITE_AND_VERIFY_10
@ CDIO_MMC_GPCMD_WRITE_AND_VERIFY_10
Definition: mmc.h:167
cdio_mmc_request_sense::asc
uint8_t asc
Definition: mmc.h:100
mmc_cmd2str
const char * mmc_cmd2str(uint8_t command)
cdio_mmc_read_disc_info_datatype_t
cdio_mmc_read_disc_info_datatype_t
Definition: mmc.h:330
cdio_mmc_request_sense_t
struct cdio_mmc_request_sense cdio_mmc_request_sense_t
CDIO_MMC_READ_SUB_ST_INVALID
@ CDIO_MMC_READ_SUB_ST_INVALID
Definition: mmc.h:278
cdio_mmc_get_conf_t
cdio_mmc_get_conf_t
Definition: mmc.h:366
CDIO_MMC_FEATURE_DVD_CSS
@ CDIO_MMC_FEATURE_DVD_CSS
Definition: mmc.h:427
CDIO_MMC_READ_DISC_INFO_TRACK
@ CDIO_MMC_READ_DISC_INFO_TRACK
Definition: mmc.h:332
mmc_subchannel_s::audio_status
uint8_t audio_status
Definition: mmc.h:498
mmc_get_media_changed
int mmc_get_media_changed(const CdIo_t *p_cdio)
CDIO_MMC_CDR_PARMS_PAGE
@ CDIO_MMC_CDR_PARMS_PAGE
Definition: mmc.h:318
CDIO_MMC_FEATURE_INTERFACE_SCSI
@ CDIO_MMC_FEATURE_INTERFACE_SCSI
Definition: mmc.h:441
CDIO_MMC_GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL
@ CDIO_MMC_GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL
Definition: mmc.h:153
mmc_get_blocksize
int mmc_get_blocksize(CdIo_t *p_cdio)
CDIO_MMC_FEATURE_CD_RW_CAV
@ CDIO_MMC_FEATURE_CD_RW_CAV
Definition: mmc.h:404
CDIO_MMC_FEATURE_DEFECT_MGMT
@ CDIO_MMC_FEATURE_DEFECT_MGMT
Definition: mmc.h:396
debug_cdio_mmc_feature_profile
cdio_mmc_feature_profile_t debug_cdio_mmc_feature_profile
CDIO_MMC_FEATURE_ENHANCED_DEFECT
@ CDIO_MMC_FEATURE_ENHANCED_DEFECT
Definition: mmc.h:406
CDIO_MMC_GPCMD_MODE_SELECT_6
@ CDIO_MMC_GPCMD_MODE_SELECT_6
Definition: mmc.h:144
CDIO_MMC_GPCMD_PAUSE_RESUME
@ CDIO_MMC_GPCMD_PAUSE_RESUME
Definition: mmc.h:195
CDIO_MMC_FEATURE_INTERFACE_UNSPECIFIED
@ CDIO_MMC_FEATURE_INTERFACE_UNSPECIFIED
Definition: mmc.h:440
CDIO_MMC_SENSE_KEY_ILLEGAL_REQUEST
@ CDIO_MMC_SENSE_KEY_ILLEGAL_REQUEST
Definition: mmc.h:117
CDIO_MMC_SENSE_KEY_ABORTED_COMMAND
@ CDIO_MMC_SENSE_KEY_ABORTED_COMMAND
Definition: mmc.h:123
CDIO_MMC_SENSE_KEY_NOT_READY
@ CDIO_MMC_SENSE_KEY_NOT_READY
Definition: mmc.h:114
CDIO_MMC_GPCMD_PLAYBACK_CONTROL
@ CDIO_MMC_GPCMD_PLAYBACK_CONTROL
Definition: mmc.h:268
CDIO_MMC_CAPABILITIES_PAGE
@ CDIO_MMC_CAPABILITIES_PAGE
Definition: mmc.h:323
CDIO_MMC_GPCMD_READ_TOC
@ CDIO_MMC_GPCMD_READ_TOC
Definition: mmc.h:174
CDIO_MMC_GPCMD_READ_MEDIA_SERIAL_12
@ CDIO_MMC_GPCMD_READ_MEDIA_SERIAL_12
Definition: mmc.h:240
track_t
uint8_t track_t
Definition: types.h:276
CDIO_MMC_POWER_PAGE
@ CDIO_MMC_POWER_PAGE
Definition: mmc.h:320
CDIO_MMC_READ_TYPE_MODE2
@ CDIO_MMC_READ_TYPE_MODE2
Definition: mmc.h:295
CDIO_MMC_SENSE_KEY_OBSOLETE
@ CDIO_MMC_SENSE_KEY_OBSOLETE
Definition: mmc.h:124
mmc_feature_list_header_s::length_lsb
unsigned char length_lsb
Definition: mmc.h:471
debug_cdio_mmc_gpcmd
cdio_mmc_gpcmd_t debug_cdio_mmc_gpcmd
CDIO_MMC_FEATURE_CD_SAO
@ CDIO_MMC_FEATURE_CD_SAO
Definition: mmc.h:411
CDIO_MMC_GPCMD_GET_PERFORMANCE
@ CDIO_MMC_GPCMD_GET_PERFORMANCE
Definition: mmc.h:241
CDIO_MMC_FEATURE_RT_STREAMING
@ CDIO_MMC_FEATURE_RT_STREAMING
Definition: mmc.h:430
CDIO_MMC_FEATURE_INTERFACE_IEEE_1394A
@ CDIO_MMC_FEATURE_INTERFACE_IEEE_1394A
Definition: mmc.h:444
cdio_mmc_sense_key_t
cdio_mmc_sense_key_t
Definition: mmc.h:111
mmc_subchannel_s::format
uint8_t format
Definition: mmc.h:500
cdio_mmc_feature_list_header_t
struct mmc_feature_list_header_s cdio_mmc_feature_list_header_t
Format of header block in data returned from an MMC GET_CONFIGURATION command.
mmc_subchannel_s::track
uint8_t track
Definition: mmc.h:503
mmc_subchannel_s
Definition: mmc.h:495
cdio_mmc_request_sense::sense_key
uint8_t sense_key
Definition: mmc.h:88
mmc_get_disc_last_lsn
lsn_t mmc_get_disc_last_lsn(const CdIo_t *p_cdio)
cdio_mmc_request_sense::asb
uint8_t asb[46]
Definition: mmc.h:104
CDIO_MMC_READ_TYPE_M2F2
@ CDIO_MMC_READ_TYPE_M2F2
Definition: mmc.h:297
CDIO_MMC_GPCMD_REPAIR_TRACK
@ CDIO_MMC_GPCMD_REPAIR_TRACK
Definition: mmc.h:207
CDIO_MMC_FEATURE_FIRMWARE_DATE
@ CDIO_MMC_FEATURE_FIRMWARE_DATE
Definition: mmc.h:435
mmc_read_sectors
driver_return_code_t mmc_read_sectors(const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, int read_sector_type, uint32_t i_blocks)
mmc_feature_list_header_s
Format of header block in data returned from an MMC GET_CONFIGURATION command.
Definition: mmc.h:467
CDIO_MMC_FEATURE_RANDOM_WRITABLE
@ CDIO_MMC_FEATURE_RANDOM_WRITABLE
Definition: mmc.h:391
CDIO_MMC_FEATURE_MCODE_UPGRADE
@ CDIO_MMC_FEATURE_MCODE_UPGRADE
Definition: mmc.h:421
mmc_set_blocksize
driver_return_code_t mmc_set_blocksize(const CdIo_t *p_cdio, uint16_t i_blocksize)
CDIO_MMC_GPCMD_RESERVE_TRACK
@ CDIO_MMC_GPCMD_RESERVE_TRACK
Definition: mmc.h:203
mmc_audio_read_subchannel
driver_return_code_t mmc_audio_read_subchannel(CdIo_t *p_cdio, cdio_subchannel_t *p_subchannel)
CDIO_MMC_FEATURE_DVD_PR_2_LAYER
@ CDIO_MMC_FEATURE_DVD_PR_2_LAYER
Definition: mmc.h:415
CdIo_t
struct _CdIo CdIo_t
Definition: cdio.h:47
CDIO_MMC_READ_TYPE_MODE1
@ CDIO_MMC_READ_TYPE_MODE1
Definition: mmc.h:294
CDIO_MMC_READ_TYPE_CDDA
@ CDIO_MMC_READ_TYPE_CDDA
Definition: mmc.h:293
CDIO_MMC_GPCMD_PLAY_TRACK_REL_12
@ CDIO_MMC_GPCMD_PLAY_TRACK_REL_12
Definition: mmc.h:233
mmc_subchannel_s::control
uint8_t control
Definition: mmc.h:502
mmc_read_cdtext
uint8_t * mmc_read_cdtext(const CdIo_t *p_cdio)
mmc_cdb_t
struct mmc_cdb_s mmc_cdb_t
A Command Descriptor Block (CDB) used in sending MMC commands.
discmode_t
discmode_t
Definition: disc.h:36
SCSI_MMC_DATA_READ
@ SCSI_MMC_DATA_READ
Definition: mmc.h:483
CDIO_MMC_GPCMD_READ_12
@ CDIO_MMC_GPCMD_READ_12
Definition: mmc.h:231
CDIO_MMC_SENSE_KEY_VENDOR_SPECIFIC
@ CDIO_MMC_SENSE_KEY_VENDOR_SPECIFIC
Definition: mmc.h:121
CDIO_MMC_GPCMD_START_STOP_UNIT
@ CDIO_MMC_GPCMD_START_STOP_UNIT
Definition: mmc.h:151
cdio_mmc_subchannel_t
struct mmc_subchannel_s cdio_mmc_subchannel_t
CDIO_MMC_GPCMD_WRITE_10
@ CDIO_MMC_GPCMD_WRITE_10
Definition: mmc.h:164
CDIO_MMC_SENSE_KEY_COPY_ABORTED
@ CDIO_MMC_SENSE_KEY_COPY_ABORTED
Definition: mmc.h:122
mmc_subchannel_s::address
uint8_t address
Definition: mmc.h:501
CDIO_MMC_GPCMD_READ_CDDA
@ CDIO_MMC_GPCMD_READ_CDDA
Definition: mmc.h:269
mmc_get_track_isrc
char * mmc_get_track_isrc(const CdIo_t *p_cdio, track_t i_track)
CDIO_MMC_FEATURE_MULTI_READ
@ CDIO_MMC_FEATURE_MULTI_READ
Definition: mmc.h:388
CDIO_MMC_SENSE_KEY_RECOVERED_ERROR
@ CDIO_MMC_SENSE_KEY_RECOVERED_ERROR
Definition: mmc.h:113
CDIO_MMC_GPCMD_REPORT_LUNS
@ CDIO_MMC_GPCMD_REPORT_LUNS
Definition: mmc.h:220
CDIO_MMC_GPCMD_MECHANISM_STATUS
@ CDIO_MMC_GPCMD_MECHANISM_STATUS
Definition: mmc.h:259
cdio_mmc_request_sense::error_code
uint8_t error_code
Definition: mmc.h:74
mmc_get_dvd_struct_physical
discmode_t mmc_get_dvd_struct_physical(const CdIo_t *p_cdio, cdio_dvd_struct_t *s)
CDIO_MMC_FEATURE_INTERFACE_ATAPI
@ CDIO_MMC_FEATURE_INTERFACE_ATAPI
Definition: mmc.h:442
CDIO_MMC_FEATURE_INCR_WRITE
@ CDIO_MMC_FEATURE_INCR_WRITE
Definition: mmc.h:392
CDIO_MMC_GPCMD_READ_DISC_INFORMATION
@ CDIO_MMC_GPCMD_READ_DISC_INFORMATION
Definition: mmc.h:199
mmc_feature_list_header_s::profile_msb
unsigned char profile_msb
Definition: mmc.h:474
CDIO_MMC_GPCMD_PLAY_TRACK_REL_10
@ CDIO_MMC_GPCMD_PLAY_TRACK_REL_10
Definition: mmc.h:186
CDIO_MMC_FEATURE_DVD_PRW
@ CDIO_MMC_FEATURE_DVD_PRW
Definition: mmc.h:407
CDIO_MMC_READ_SUB_ST_COMPLETED
@ CDIO_MMC_READ_SUB_ST_COMPLETED
Definition: mmc.h:282
CDIO_MMC_AUDIO_CTL_PAGE
@ CDIO_MMC_AUDIO_CTL_PAGE
Definition: mmc.h:319
CDIO_MMC_GPCMD_CLOSE_TRACK_SESSION
@ CDIO_MMC_GPCMD_CLOSE_TRACK_SESSION
Definition: mmc.h:213
mmc_util.h
Multimedia Command (MMC) "helper" routines that don't depend on anything other than headers.
CDIO_MMC_GPCMD_SYNCHRONIZE_CACHE
@ CDIO_MMC_GPCMD_SYNCHRONIZE_CACHE
Definition: mmc.h:169
cdio_mmc_request_sense::reserved1
uint8_t reserved1
Definition: mmc.h:89
CDIO_MMC_GPCMD_MODE_SENSE_10
@ CDIO_MMC_GPCMD_MODE_SENSE_10
Definition: mmc.h:208
debug_cdio_mmc_mode_page
cdio_mmc_mode_page_t debug_cdio_mmc_mode_page
cdio_mmc_read_cd_type_t
cdio_mmc_read_cd_type_t
Definition: mmc.h:291
cdio_mmc_request_sense::eom
uint8_t eom
Definition: mmc.h:91
CDIO_MMC_GPCMD_INQUIRY
@ CDIO_MMC_GPCMD_INQUIRY
Definition: mmc.h:142
mmc_feature_list_header_s::length_msb
unsigned char length_msb
Definition: mmc.h:468
CDIO_MMC_GPCMD_SEND_DISC_STRUCTURE
@ CDIO_MMC_GPCMD_SEND_DISC_STRUCTURE
Definition: mmc.h:263
mmc_last_cmd_sense
int mmc_last_cmd_sense(const CdIo_t *p_cdio, cdio_mmc_request_sense_t **pp_sense)
CDIO_MMC_GPCMD_READ_BUFFER
@ CDIO_MMC_GPCMD_READ_BUFFER
Definition: mmc.h:171
CDIO_MMC_GPCMD_PLAY_AUDIO_10
@ CDIO_MMC_GPCMD_PLAY_AUDIO_10
Definition: mmc.h:177
cdio_mmc_request_sense::ili
uint8_t ili
Definition: mmc.h:90
CDIO_MMC_FEATURE_WRITE_PROTECT
@ CDIO_MMC_FEATURE_WRITE_PROTECT
Definition: mmc.h:386
CDIO_MMC_FEATURE_PROFILE_LIST
@ CDIO_MMC_FEATURE_PROFILE_LIST
Definition: mmc.h:381
cdio_mmc_request_sense
Definition: mmc.h:69
mmc_get_hwinfo
bool mmc_get_hwinfo(const CdIo_t *p_cdio, cdio_hwinfo_t *p_hw_info)
CDIO_MMC_GPCMD_PLAY_AUDIO_MSF
@ CDIO_MMC_GPCMD_PLAY_AUDIO_MSF
Definition: mmc.h:182
mmc_subchannel_s::index
uint8_t index
Definition: mmc.h:504
CDIO_MMC_LEVEL_NONE
@ CDIO_MMC_LEVEL_NONE
Definition: mmc.h:620
mmc_audio_volume_s
Definition: mmc.h:353
CDIO_MMC_GPCMD_TEST_UNIT_READY
@ CDIO_MMC_GPCMD_TEST_UNIT_READY
Definition: mmc.h:139
cdio_mmc_direction_t
enum mmc_direction_s cdio_mmc_direction_t
cdio_mmc_request_sense::ascq
uint8_t ascq
Definition: mmc.h:101
cdio_mmc_feature_profile_t
cdio_mmc_feature_profile_t
Definition: mmc_util.h:36
CDIO_MMC_FEATURE_DVD_READ
@ CDIO_MMC_FEATURE_DVD_READ
Definition: mmc.h:390
debug_cdio_mmc_read_cd_type
cdio_mmc_read_cd_type_t debug_cdio_mmc_read_cd_type
debug_cdio_mmc_read_sub_state
cdio_mmc_read_sub_state_t debug_cdio_mmc_read_sub_state
CDIO_MMC_GPCMD_READ_ALL_SUBCODES
@ CDIO_MMC_GPCMD_READ_ALL_SUBCODES
Definition: mmc.h:271
CDIO_MMC_GPCMD_SECURITY_PROTOCOL_OUT
@ CDIO_MMC_GPCMD_SECURITY_PROTOCOL_OUT
Definition: mmc.h:244
CDIO_MMC_GPCMD_SET_STREAMING
@ CDIO_MMC_GPCMD_SET_STREAMING
Definition: mmc.h:245
CDIO_MMC_GPCMD_MODE_SELECT_10
@ CDIO_MMC_GPCMD_MODE_SELECT_10
Definition: mmc.h:205
MAX_CDB_LEN
#define MAX_CDB_LEN
Definition: mmc.h:453
CDIO_MMC_FEATURE_CD_RW_MEDIA_WRITE
@ CDIO_MMC_FEATURE_CD_RW_MEDIA_WRITE
Definition: mmc.h:414
CDIO_MMC_FEATURE_SECTOR_ERASE
@ CDIO_MMC_FEATURE_SECTOR_ERASE
Definition: mmc.h:394
cdio_mmc_request_sense::command_info
uint8_t command_info[4]
Definition: mmc.h:99
CDIO_MMC_SENSE_KEY_HARDWARE_ERROR
@ CDIO_MMC_SENSE_KEY_HARDWARE_ERROR
Definition: mmc.h:116
cdio_mmc_request_sense::filemark
uint8_t filemark
Definition: mmc.h:94
mmc_audio_volume_entry_s::volume
uint8_t volume
Definition: mmc.h:345
CDIO_MMC_FEATURE_CDDA_EXT_PLAY
@ CDIO_MMC_FEATURE_CDDA_EXT_PLAY
Definition: mmc.h:418
CDIO_MMC_FEATURE_LU_SN
@ CDIO_MMC_FEATURE_LU_SN
Definition: mmc.h:433
PRAGMA_END_PACKED
#define PRAGMA_END_PACKED
Definition: types.h:169
mmc_get_mcn
char * mmc_get_mcn(const CdIo_t *p_cdio)
CDIO_MMC_GET_CONF_CURRENT_FEATURES
@ CDIO_MMC_GET_CONF_CURRENT_FEATURES
Definition: mmc.h:369
CDIO_MMC_FEATURE_RESTRICT_OVERW
@ CDIO_MMC_FEATURE_RESTRICT_OVERW
Definition: mmc.h:402
CDIO_MMC_GPCMD_READ_CDXA
@ CDIO_MMC_GPCMD_READ_CDXA
Definition: mmc.h:270
cdio_mmc_request_sense::sks
uint8_t sks[3]
Definition: mmc.h:103
cdio_mmc_feature_interface_t
cdio_mmc_feature_interface_t
Definition: mmc.h:439
CDIO_MMC_GPCMD_MODE_SENSE_6
@ CDIO_MMC_GPCMD_MODE_SENSE_6
Definition: mmc.h:146
CDIO_MMC_GPCMD_WRITE_12
@ CDIO_MMC_GPCMD_WRITE_12
Definition: mmc.h:239
debug_cdio_mmc_feature_interface
cdio_mmc_feature_interface_t debug_cdio_mmc_feature_interface
mmc_direction_s
mmc_direction_s
Definition: mmc.h:482
mmc_run_cmd
driver_return_code_t mmc_run_cmd(const CdIo_t *p_cdio, unsigned int i_timeout_ms, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, void *p_buf)
CDIO_MMC_GPCMD_READ_CD
@ CDIO_MMC_GPCMD_READ_CD
Definition: mmc.h:260
cdio_hwinfo
Structure to return CD vendor, model, and revision-level strings obtained via the INQUIRY command
Definition: device.h:122
CDIO_MMC_SENSE_KEY_DATA_PROTECT
@ CDIO_MMC_SENSE_KEY_DATA_PROTECT
Definition: mmc.h:119
cdio_dvd_struct_t
Definition: dvd.h:122
CDIO_MMC_GPCMD_READ_BUFFER_CAPACITY
@ CDIO_MMC_GPCMD_READ_BUFFER_CAPACITY
Definition: mmc.h:214
CDIO_MMC_GPCMD_BLANK
@ CDIO_MMC_GPCMD_BLANK
Definition: mmc.h:221
mmc_get_drive_mmc_cap
cdio_mmc_level_t mmc_get_drive_mmc_cap(CdIo_t *p_cdio)
mmc_feature_list_header_s::reserved1
unsigned char reserved1
Definition: mmc.h:472
CDIO_MMC_GPCMD_READ_CAPACITIY
@ CDIO_MMC_GPCMD_READ_CAPACITIY
Definition: mmc.h:161
CDIO_MMC_GPCMD_SEND_CUE_SHEET
@ CDIO_MMC_GPCMD_SEND_CUE_SHEET
Definition: mmc.h:215
CDIO_MMC_FEATURE_CD_TAO
@ CDIO_MMC_FEATURE_CD_TAO
Definition: mmc.h:410
CDIO_MMC_GPCMD_LOAD_UNLOAD
@ CDIO_MMC_GPCMD_LOAD_UNLOAD
Definition: mmc.h:228
CDIO_MMC_FEATURE_INTERFACE_IEEE_1394
@ CDIO_MMC_FEATURE_INTERFACE_IEEE_1394
Definition: mmc.h:443
GNUC_PACKED
PRAGMA_BEGIN_PACKED struct mmc_audio_volume_entry_s GNUC_PACKED
CDIO_MMC_FEATURE_RANDOM_READABLE
@ CDIO_MMC_FEATURE_RANDOM_READABLE
Definition: mmc.h:387
CDIO_MMC_R_W_ERROR_PAGE
@ CDIO_MMC_R_W_ERROR_PAGE
Definition: mmc.h:316
CDIO_MMC_GPCMD_PLAY_AUDIO_12
@ CDIO_MMC_GPCMD_PLAY_AUDIO_12
Definition: mmc.h:225
mmc_audio_state2str
const char * mmc_audio_state2str(uint8_t i_audio_state)
CDIO_MMC_FEATURE_MRW
@ CDIO_MMC_FEATURE_MRW
Definition: mmc.h:405
CDIO_MMC_GPCMD_READ_10
@ CDIO_MMC_GPCMD_READ_10
Definition: mmc.h:162
CDIO_MMC_GPCMD_READ_FORMAT_CAPACITIES
@ CDIO_MMC_GPCMD_READ_FORMAT_CAPACITIES
Definition: mmc.h:160
CDIO_MMC_GPCMD_WRITE_BUFFER
@ CDIO_MMC_GPCMD_WRITE_BUFFER
Definition: mmc.h:170
CDIO_MMC_READ_SUB_ST_PAUSED
@ CDIO_MMC_READ_SUB_ST_PAUSED
Definition: mmc.h:281
CDIO_MMC_FEATURE_WRITE_ONCE
@ CDIO_MMC_FEATURE_WRITE_ONCE
Definition: mmc.h:400
cdio_mmc_read_sub_state_t
cdio_mmc_read_sub_state_t
Definition: mmc.h:277
CDIO_MMC_READ_SUB_ST_NO_STATUS
@ CDIO_MMC_READ_SUB_ST_NO_STATUS
Definition: mmc.h:286
mmc_get_discmode
discmode_t mmc_get_discmode(const CdIo_t *p_cdio)
mmc_read_data_sectors
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)
CDIO_MMC_WRITE_PARMS_PAGE
@ CDIO_MMC_WRITE_PARMS_PAGE
Definition: mmc.h:317
CDIO_MMC_GPCMD_FORMAT_UNIT
@ CDIO_MMC_GPCMD_FORMAT_UNIT
Definition: mmc.h:141
CDIO_MMC_READTOC_FMT_SESSION
@ CDIO_MMC_READTOC_FMT_SESSION
Definition: mmc.h:305
cdio_mmc_mode_page_t
cdio_mmc_mode_page_t
Definition: mmc.h:315
CDIO_MMC_SENSE_KEY_UNIT_ATTENTION
@ CDIO_MMC_SENSE_KEY_UNIT_ATTENTION
Definition: mmc.h:118
CDIO_MMC_FEATURE_POWER_MGMT
@ CDIO_MMC_FEATURE_POWER_MGMT
Definition: mmc.h:416
CDIO_MMC_READTOC_FMT_FULTOC
@ CDIO_MMC_READTOC_FMT_FULTOC
Definition: mmc.h:306
cdio_mmc_readtoc_t
cdio_mmc_readtoc_t
Definition: mmc.h:303
CDIO_MMC_GPCMD_SET_READ_AHEAD
@ CDIO_MMC_GPCMD_SET_READ_AHEAD
Definition: mmc.h:230
CDIO_MMC_FEATURE_REMOVABLE_MEDIUM
@ CDIO_MMC_FEATURE_REMOVABLE_MEDIUM
Definition: mmc.h:385
CDIO_MMC_READ_TYPE_M2F1
@ CDIO_MMC_READ_TYPE_M2F1
Definition: mmc.h:296
mmc_subchannel_s::data_length
uint16_t data_length
Definition: mmc.h:499
cdio_mmc_request_sense::valid
uint8_t valid
Definition: mmc.h:75
CDIO_MMC_GPCMD_GET_CONFIGURATION
@ CDIO_MMC_GPCMD_GET_CONFIGURATION
Definition: mmc.h:180
cdio_mmc_gpcmd_t
cdio_mmc_gpcmd_t
The opcode-portion (generic packet commands) of an MMC command.
Definition: mmc.h:138
CDIO_MMC_READ_DISC_INFO_STANDARD
@ CDIO_MMC_READ_DISC_INFO_STANDARD
Definition: mmc.h:331
CDIO_MMC_READTOC_FMT_TOC
@ CDIO_MMC_READTOC_FMT_TOC
Definition: mmc.h:304
mmc_subchannel_s::reserved
uint8_t reserved
Definition: mmc.h:497
CDIO_MMC_LEVEL_1
@ CDIO_MMC_LEVEL_1
Definition: mmc.h:617
CDIO_MMC_FEATURE_INTERFACE_FIBRE_CH
@ CDIO_MMC_FEATURE_INTERFACE_FIBRE_CH
Definition: mmc.h:445
CDIO_MMC_GET_CONF_NAMED_FEATURE
@ CDIO_MMC_GET_CONF_NAMED_FEATURE
Definition: mmc.h:372
SCSI_MMC_DATA_NONE
@ SCSI_MMC_DATA_NONE
Definition: mmc.h:485
mmc_audio_volume_s::port
mmc_audio_volume_entry_t port[4]
Definition: mmc.h:355
CDIO_MMC_GPCMD_SEND_OPC_INFORMATION
@ CDIO_MMC_GPCMD_SEND_OPC_INFORMATION
Definition: mmc.h:204
CDIO_MMC_GPCMD_SECURITY_PROTOCOL_IN
@ CDIO_MMC_GPCMD_SECURITY_PROTOCOL_IN
Definition: mmc.h:222
CDIO_MMC_FEATURE_DVD_PR
@ CDIO_MMC_FEATURE_DVD_PR
Definition: mmc.h:408
CDIO_MMC_GPCMD_READ_SUBCHANNEL
@ CDIO_MMC_GPCMD_READ_SUBCHANNEL
Definition: mmc.h:172
CDIO_MMC_GPCMD_GET_EVENT_STATUS
@ CDIO_MMC_GPCMD_GET_EVENT_STATUS
Definition: mmc.h:193
CDIO_MMC_SENSE_KEY_MEDIUM_ERROR
@ CDIO_MMC_SENSE_KEY_MEDIUM_ERROR
Definition: mmc.h:115
audio.h
The top-level header for CD audio-related libcdio calls. These control playing of the CD-ROM through ...
CDIO_MMC_GPCMD_READ_MSF
@ CDIO_MMC_GPCMD_READ_MSF
Definition: mmc.h:246
CDIO_MMC_LEVEL_WEIRD
@ CDIO_MMC_LEVEL_WEIRD
Definition: mmc.h:616
CDIO_MMC_GPCMD_VERIFY_10
@ CDIO_MMC_GPCMD_VERIFY_10
Definition: mmc.h:168
cdio_mmc_feature_t
cdio_mmc_feature_t
Definition: mmc.h:380
debug_cdio_mmc_get_conf
cdio_mmc_get_conf_t debug_cdio_mmc_get_conf
PRAGMA_BEGIN_PACKED
#define PRAGMA_BEGIN_PACKED
Definition: types.h:168
SCSI_MMC_DATA_WRITE
@ SCSI_MMC_DATA_WRITE
Definition: mmc.h:484
mmc_run_cmd_len
driver_return_code_t mmc_run_cmd_len(const CdIo_t *p_cdio, unsigned int i_timeout_ms, const mmc_cdb_t *p_cdb, unsigned int i_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, void *p_buf)
CDIO_MMC_GPCMD_READ_TRACK_INFORMATION
@ CDIO_MMC_GPCMD_READ_TRACK_INFORMATION
Definition: mmc.h:201
CDIO_MMC_GPCMD_REQUEST_SENSE
@ CDIO_MMC_GPCMD_REQUEST_SENSE
Definition: mmc.h:140
mmc_feature_list_header_s::reserved2
unsigned char reserved2
Definition: mmc.h:473
CDIO_MMC_FEATURE_RIGID_RES_OVERW
@ CDIO_MMC_FEATURE_RIGID_RES_OVERW
Definition: mmc.h:409
mmc_get_tray_status
int mmc_get_tray_status(const CdIo_t *p_cdio)
CDIO_MMC_GPCMD_READ_HEADER
@ CDIO_MMC_GPCMD_READ_HEADER
Definition: mmc.h:176
CDIO_MMC_READ_TYPE_ANY
@ CDIO_MMC_READ_TYPE_ANY
Definition: mmc.h:292
dvd.h
Definitions for DVD access.
CDIO_MMC_SENSE_KEY_NO_SENSE
@ CDIO_MMC_SENSE_KEY_NO_SENSE
Definition: mmc.h:112
CDIO_MMC_FEATURE_TIME_OUT
@ CDIO_MMC_FEATURE_TIME_OUT
Definition: mmc.h:424
CDIO_MMC_TO_PROTECT_PAGE
@ CDIO_MMC_TO_PROTECT_PAGE
Definition: mmc.h:322
CDIO_MMC_LEVEL_2
@ CDIO_MMC_LEVEL_2
Definition: mmc.h:618
cdio_subchannel_s
Definition: audio.h:34
debug_cdio_mmc_readtoc
cdio_mmc_readtoc_t debug_cdio_mmc_readtoc
CDIO_MMC_READTOC_FMT_CDTEXT
@ CDIO_MMC_READTOC_FMT_CDTEXT
Definition: mmc.h:309
CDIO_MMC_FEATURE_CD_READ
@ CDIO_MMC_FEATURE_CD_READ
Definition: mmc.h:389
CDIO_MMC_FEATURE_DVD_R_RW_WRITE
@ CDIO_MMC_FEATURE_DVD_R_RW_WRITE
Definition: mmc.h:413
cdio_mmc_request_sense::fruc
uint8_t fruc
Definition: mmc.h:102
CDIO_MMC_READ_DISC_INFO_POW
@ CDIO_MMC_READ_DISC_INFO_POW
Definition: mmc.h:333

Generated for libcdio by doxygen 1.8.17