xorriso  1.5.4.pl02
About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.
  Fossies Dox: xorriso-1.5.4.pl02.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

mmc.c File Reference
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/time.h>
#include <pthread.h>
#include <ctype.h>
#include "error.h"
#include "sector.h"
#include "libburn.h"
#include "transport.h"
#include "mmc.h"
#include "spc.h"
#include "drive.h"
#include "debug.h"
#include "toc.h"
#include "structure.h"
#include "options.h"
#include "util.h"
#include "init.h"
#include "libdax_msgs.h"
Include dependency graph for mmc.c:

Go to the source code of this file.

Macros

#define O_BINARY   0
 
#define Libburn_support_dvd_plus_rW   1
 
#define Libburn_support_dvd_minusrw_overW   1
 
#define Libburn_support_dvd_raM   1
 
#define Libburn_support_dvd_r_seQ   1
 
#define Libburn_support_dvd_plus_R   1
 
#define Libburn_support_bd_r_readonlY   1
 
#define Libburn_support_bd_plus_r_srM   1
 
#define Libburn_wait_for_buffer_freE   0
 
#define Libburn_wait_for_buffer_min_useC   10000
 
#define Libburn_wait_for_buffer_max_useC   100000
 
#define Libburn_wait_for_buffer_tio_seC   120
 
#define Libburn_wait_for_buffer_min_perC   65
 
#define Libburn_wait_for_buffer_max_perC   95
 
#define Libburn_cd_max_read_speeD   (52 * 150)
 
#define Libburn_dvd_max_read_speeD   (24 * 1385)
 
#define Libburn_bd_max_read_speeD   (20 * 4495.625 + 0.5)
 
#define Libburn_cd_min_read_speeD   ( 1 * 150)
 
#define Libburn_dvd_min_read_speeD   ( 1 * 1385)
 
#define Libburn_bd_min_read_speeD   ( 1 * 4495.625 - 0.625)
 

Functions

static int mmc_get_configuration_al (struct burn_drive *d, int *alloc_len)
 
int mmc_function_spy (struct burn_drive *d, char *text)
 
int mmc_function_spy_ctrl (int do_tell)
 
int mmc_four_char_to_int (unsigned char *data)
 
int mmc_int_to_four_char (unsigned char *data, int num)
 
int mmc_start_if_needed (struct burn_drive *d, int flag)
 
int mmc_send_cue_sheet (struct burn_drive *d, struct cue_sheet *s)
 
int mmc_reserve_track (struct burn_drive *d, off_t size)
 
int mmc_read_track_info (struct burn_drive *d, int trackno, struct buffer *buf, int alloc_len)
 
int mmc_get_nwa (struct burn_drive *d, int trackno, int *lba, int *nwa)
 
void mmc_close_disc (struct burn_write_opts *o)
 
void mmc_close_session (struct burn_write_opts *o)
 
void mmc_close (struct burn_drive *d, int session, int track)
 
void mmc_get_event (struct burn_drive *d)
 
static int mmc_wait_for_buffer_free (struct burn_drive *d, struct buffer *buf)
 
void mmc_write_12 (struct burn_drive *d, int start, struct buffer *buf)
 
int mmc_write (struct burn_drive *d, int start, struct buffer *buf)
 
int mmc_fake_toc_entry (struct burn_toc_entry *entry, int session_number, int track_number, unsigned char *size_data, unsigned char *start_data, unsigned char *last_adr_data)
 
static int mmc_read_toc_fmt0_al (struct burn_drive *d, int *alloc_len)
 
static int mmc_read_toc_fmt0 (struct burn_drive *d)
 
int mmc_fake_toc (struct burn_drive *d)
 
static int mmc_register_leadout (struct burn_drive *d, int *highest_leadout, int toc_idx)
 
static int mmc_read_toc_al (struct burn_drive *d, int *alloc_len)
 
void mmc_read_toc (struct burn_drive *d)
 
int mmc_read_multi_session_c1 (struct burn_drive *d, int *trackno, int *start)
 
char * mmc_obtain_profile_name (int profile_number)
 
static int mmc_guess_profile (struct burn_drive *d, int flag)
 
static int mmc_read_disc_info_al (struct burn_drive *d, int *alloc_len)
 
void mmc_read_disc_info (struct burn_drive *d)
 
static int mmc_get_leadin_text_al (struct burn_drive *d, unsigned char **text_packs, int *alloc_len, int flag)
 
int mmc_get_leadin_text (struct burn_drive *d, unsigned char **text_packs, int *num_packs, int flag)
 
void mmc_read_atip (struct burn_drive *d)
 
int mmc_eval_read_error (struct burn_drive *d, struct command *c, char *what, int start_m, int start_s, int start_f, int end_m, int end_s, int end_f, int flag)
 
int mmc_read_cd_msf (struct burn_drive *d, int start_m, int start_s, int start_f, int end_m, int end_s, int end_f, int sec_type, int main_ch, const struct burn_read_opts *o, struct buffer *buf, int flag)
 
int mmc_read_cd (struct burn_drive *d, int start, int len, int sec_type, int main_ch, const struct burn_read_opts *o, struct buffer *buf, int flag)
 
void mmc_erase (struct burn_drive *d, int fast)
 
void mmc_read_lead_in (struct burn_drive *d, struct buffer *buf)
 
void mmc_perform_opc (struct burn_drive *d)
 
int mmc_set_streaming (struct burn_drive *d, int r_speed, int w_speed, int end_lba)
 
void mmc_set_speed (struct burn_drive *d, int r, int w)
 
void mmc_get_configuration (struct burn_drive *d)
 
static int mmc_read_format_capacities_al (struct burn_drive *d, int *alloc_len, int top_wanted)
 
int mmc_read_format_capacities (struct burn_drive *d, int top_wanted)
 
void mmc_sync_cache (struct burn_drive *d)
 
int mmc_read_buffer_capacity (struct burn_drive *d)
 
int mmc_format_unit (struct burn_drive *d, off_t size, int flag)
 
static int new_burn_speed_descr (struct burn_drive *d, int sd_source, struct burn_speed_descriptor **sd, int flag)
 
static int interpret_performance (struct burn_drive *d, struct command *c, int descr_type, int *alloc_len, int *max_descr, int *num_descr, int flag)
 
static int mmc_get_performance_al (struct burn_drive *d, int descr_type, int *alloc_len, int *max_descr, int flag)
 
int mmc_get_performance (struct burn_drive *d, int descr_type, int flag)
 
int mmc_get_write_performance (struct burn_drive *d)
 
int mmc_compose_mode_page_5 (struct burn_drive *d, struct burn_session *s, int tnum, const struct burn_write_opts *o, unsigned char *pd)
 
int mmc_read_10 (struct burn_drive *d, int start, int amount, struct buffer *buf)
 
int mmc_read_capacity (struct burn_drive *d)
 
static int mmc_read_disc_structure_al (struct burn_drive *d, int *alloc_len, int media_type, int layer_number, int format, int min_len, char **reply, int *reply_len, int flag)
 
int mmc_read_disc_structure (struct burn_drive *d, int media_type, int layer_number, int format, int min_len, char **reply, int *reply_len, int flag)
 
static int mmc_set_product_id (char *reply, int manuf_idx, int type_idx, int rev_idx, char **product_id, char **media_code1, char **media_code2, int flag)
 
int mmc_get_media_product_id (struct burn_drive *d, char **product_id, char **media_code1, char **media_code2, char **book_type, int flag)
 
int mmc_get_bd_spare_info (struct burn_drive *d, int *alloc_blocks, int *free_blocks, int flag)
 
int mmc_get_phys_format_info (struct burn_drive *d, int *disk_category, char **book_name, int *part_version, int *num_layers, int *num_blocks, int flag)
 
int mmc_setup_drive (struct burn_drive *d)
 
static void burn__add_to_text (char *text, int *text_len, char *to_add, int flag)
 
static void burn__add_hex_to_text (char *text, int *text_len, unsigned char *to_add, int add_length, int flag)
 
int burn_make_feature_text (struct burn_drive *d, unsigned int feature_code, unsigned char flags, unsigned char additional_length, unsigned char *feature_data, char **text, int flag)
 

Variables

int burn_support_untested_profiles
 
struct libdax_msgs * libdax_messenger
 
static unsigned char MMC_GET_MSINFO []
 
static unsigned char MMC_GET_TOC [] = { 0x43, 2, 2, 0, 0, 0, 0, 16, 0, 0 }
 
static unsigned char MMC_GET_TOC_FMT0 [] = { 0x43, 0, 0, 0, 0, 0, 0, 16, 0, 0 }
 
static unsigned char MMC_GET_ATIP [] = { 0x43, 2, 4, 0, 0, 0, 0, 16, 0, 0 }
 
static unsigned char MMC_GET_LEADTEXT [] = { 0x43, 2, 5, 0, 0, 0, 0, 4, 0, 0 }
 
static unsigned char MMC_GET_DISC_INFO []
 
static unsigned char MMC_READ_CD [] = { 0xBE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
 
static unsigned char MMC_BLANK [] = { 0xA1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
 
static unsigned char MMC_SEND_OPC [] = { 0x54, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
 
static unsigned char MMC_SET_SPEED []
 
static unsigned char MMC_WRITE_12 []
 
static unsigned char MMC_WRITE_10 [] = { 0x2A, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
 
static unsigned char MMC_GET_CONFIGURATION []
 
static unsigned char MMC_SYNC_CACHE [] = { 0x35, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
 
static unsigned char MMC_GET_EVENT [] = { 0x4A, 1, 0, 0, 0x7e, 0, 0, 0, 8, 0 }
 
static unsigned char MMC_CLOSE [] = { 0x5B, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
 
static unsigned char MMC_TRACK_INFO [] = { 0x52, 0, 0, 0, 0, 0, 0, 16, 0, 0 }
 
static unsigned char MMC_SEND_CUE_SHEET []
 
static unsigned char MMC_READ_BUFFER_CAPACITY []
 
static unsigned char MMC_FORMAT_UNIT [] = { 0x04, 0x11, 0, 0, 0, 0 }
 
static unsigned char MMC_SET_STREAMING []
 
static unsigned char MMC_GET_PERFORMANCE []
 
static unsigned char MMC_READ_FORMAT_CAPACITIES []
 
static unsigned char MMC_RESERVE_TRACK []
 
static unsigned char MMC_READ_10 []
 
static unsigned char MMC_READ_CAPACITY []
 
static unsigned char MMC_READ_DISC_STRUCTURE []
 
static unsigned char MMC_READ_CD_MSF []
 
static int mmc_function_spy_do_tell = 0
 
static int mmc_start_for_bit0 = 0
 

Macro Definition Documentation

◆ Libburn_bd_max_read_speeD

#define Libburn_bd_max_read_speeD   (20 * 4495.625 + 0.5)

Definition at line 184 of file mmc.c.

◆ Libburn_bd_min_read_speeD

#define Libburn_bd_min_read_speeD   ( 1 * 4495.625 - 0.625)

Definition at line 190 of file mmc.c.

◆ Libburn_cd_max_read_speeD

#define Libburn_cd_max_read_speeD   (52 * 150)

Definition at line 182 of file mmc.c.

◆ Libburn_cd_min_read_speeD

#define Libburn_cd_min_read_speeD   ( 1 * 150)

Definition at line 188 of file mmc.c.

◆ Libburn_dvd_max_read_speeD

#define Libburn_dvd_max_read_speeD   (24 * 1385)

Definition at line 183 of file mmc.c.

◆ Libburn_dvd_min_read_speeD

#define Libburn_dvd_min_read_speeD   ( 1 * 1385)

Definition at line 189 of file mmc.c.

◆ Libburn_support_bd_plus_r_srM

#define Libburn_support_bd_plus_r_srM   1

Definition at line 83 of file mmc.c.

◆ Libburn_support_bd_r_readonlY

#define Libburn_support_bd_r_readonlY   1

Definition at line 80 of file mmc.c.

◆ Libburn_support_dvd_minusrw_overW

#define Libburn_support_dvd_minusrw_overW   1

Definition at line 67 of file mmc.c.

◆ Libburn_support_dvd_plus_R

#define Libburn_support_dvd_plus_R   1

Definition at line 77 of file mmc.c.

◆ Libburn_support_dvd_plus_rW

#define Libburn_support_dvd_plus_rW   1

Definition at line 64 of file mmc.c.

◆ Libburn_support_dvd_r_seQ

#define Libburn_support_dvd_r_seQ   1

Definition at line 74 of file mmc.c.

◆ Libburn_support_dvd_raM

#define Libburn_support_dvd_raM   1

Definition at line 71 of file mmc.c.

◆ Libburn_wait_for_buffer_freE

#define Libburn_wait_for_buffer_freE   0

Definition at line 169 of file mmc.c.

◆ Libburn_wait_for_buffer_max_perC

#define Libburn_wait_for_buffer_max_perC   95

Definition at line 174 of file mmc.c.

◆ Libburn_wait_for_buffer_max_useC

#define Libburn_wait_for_buffer_max_useC   100000

Definition at line 171 of file mmc.c.

◆ Libburn_wait_for_buffer_min_perC

#define Libburn_wait_for_buffer_min_perC   65

Definition at line 173 of file mmc.c.

◆ Libburn_wait_for_buffer_min_useC

#define Libburn_wait_for_buffer_min_useC   10000

Definition at line 170 of file mmc.c.

◆ Libburn_wait_for_buffer_tio_seC

#define Libburn_wait_for_buffer_tio_seC   120

Definition at line 172 of file mmc.c.

◆ O_BINARY

#define O_BINARY   0

Definition at line 26 of file mmc.c.

Function Documentation

◆ burn__add_hex_to_text()

static void burn__add_hex_to_text ( char *  text,
int *  text_len,
unsigned char *  to_add,
int  add_length,
int  flag 
)
static

Definition at line 5481 of file mmc.c.

Referenced by burn_make_feature_text().

◆ burn__add_to_text()

static void burn__add_to_text ( char *  text,
int *  text_len,
char *  to_add,
int  flag 
)
static

Definition at line 5471 of file mmc.c.

Referenced by burn_make_feature_text().

◆ burn_make_feature_text()

int burn_make_feature_text ( struct burn_drive d,
unsigned int  feature_code,
unsigned char  flags,
unsigned char  additional_length,
unsigned char *  feature_data,
char **  text,
int  flag 
)

◆ interpret_performance()

◆ mmc_close()

◆ mmc_close_disc()

◆ mmc_close_session()

◆ mmc_compose_mode_page_5()

◆ mmc_erase()

◆ mmc_eval_read_error()

int mmc_eval_read_error ( struct burn_drive d,
struct command c,
char *  what,
int  start_m,
int  start_s,
int  start_f,
int  end_m,
int  end_s,
int  end_f,
int  flag 
)

◆ mmc_fake_toc()

◆ mmc_fake_toc_entry()

◆ mmc_format_unit()

◆ mmc_four_char_to_int()

◆ mmc_function_spy()

◆ mmc_function_spy_ctrl()

int mmc_function_spy_ctrl ( int  do_tell)

Definition at line 289 of file mmc.c.

References mmc_function_spy_do_tell.

◆ mmc_get_bd_spare_info()

int mmc_get_bd_spare_info ( struct burn_drive d,
int *  alloc_blocks,
int *  free_blocks,
int  flag 
)

◆ mmc_get_configuration()

void mmc_get_configuration ( struct burn_drive d)

◆ mmc_get_configuration_al()

◆ mmc_get_event()

◆ mmc_get_leadin_text()

int mmc_get_leadin_text ( struct burn_drive d,
unsigned char **  text_packs,
int *  num_packs,
int  flag 
)

Definition at line 2297 of file mmc.c.

References mmc_function_spy(), and mmc_get_leadin_text_al().

Referenced by burn_disc_get_leadin_text().

◆ mmc_get_leadin_text_al()

static int mmc_get_leadin_text_al ( struct burn_drive d,
unsigned char **  text_packs,
int *  alloc_len,
int  flag 
)
static

◆ mmc_get_media_product_id()

int mmc_get_media_product_id ( struct burn_drive d,
char **  product_id,
char **  media_code1,
char **  media_code2,
char **  book_type,
int  flag 
)

◆ mmc_get_nwa()

◆ mmc_get_performance()

int mmc_get_performance ( struct burn_drive d,
int  descr_type,
int  flag 
)

◆ mmc_get_performance_al()

◆ mmc_get_phys_format_info()

int mmc_get_phys_format_info ( struct burn_drive d,
int *  disk_category,
char **  book_name,
int *  part_version,
int *  num_layers,
int *  num_blocks,
int  flag 
)

◆ mmc_get_write_performance()

int mmc_get_write_performance ( struct burn_drive d)

Definition at line 4593 of file mmc.c.

References mmc_get_performance().

Referenced by spc_try_get_performance().

◆ mmc_guess_profile()

◆ mmc_int_to_four_char()

int mmc_int_to_four_char ( unsigned char *  data,
int  num 
)

◆ mmc_obtain_profile_name()

char* mmc_obtain_profile_name ( int  profile_number)

Definition at line 1868 of file mmc.c.

Referenced by burn_obtain_profile_name(), mmc_get_configuration_al(), and mmc_guess_profile().

◆ mmc_perform_opc()

◆ mmc_read_10()

◆ mmc_read_atip()

◆ mmc_read_buffer_capacity()

◆ mmc_read_capacity()

◆ mmc_read_cd()

◆ mmc_read_cd_msf()

int mmc_read_cd_msf ( struct burn_drive d,
int  start_m,
int  start_s,
int  start_f,
int  end_m,
int  end_s,
int  end_f,
int  sec_type,
int  main_ch,
const struct burn_read_opts o,
struct buffer buf,
int  flag 
)

◆ mmc_read_disc_info()

void mmc_read_disc_info ( struct burn_drive d)

Definition at line 2229 of file mmc.c.

References mmc_function_spy(), mmc_read_disc_info_al(), and mmc_start_if_needed().

Referenced by spc_sense_write_params().

◆ mmc_read_disc_info_al()

static int mmc_read_disc_info_al ( struct burn_drive d,
int *  alloc_len 
)
static

Definition at line 1936 of file mmc.c.

References burn_drive::bg_format_status, BURN_ALLOC_MEM, BURN_DISC_APPENDABLE, BURN_DISC_BLANK, BURN_DISC_EMPTY, BURN_DISC_FULL, BURN_DISC_UNREADY, BURN_DISC_UNSUITABLE, BURN_DRIVE_IDLE, BURN_FREE_MEM, burn_msf_to_lba(), burn_drive::busy, buffer::bytes, burn_drive::complete_sessions, burn_drive::current_is_guessed_profile, burn_drive::current_is_supported_profile, burn_drive::current_profile, burn_drive::current_profile_text, buffer::data, command::dir, burn_drive::disc_app_code, burn_drive::disc_bar_code, burn_drive::disc_id, burn_drive::disc_info_valid, burn_drive::disc_type, command::dxfer_len, burn_drive::end_lba, burn_drive::erasable, command::error, FROM_DRIVE, burn_drive::global_index, burn_drive::incomplete_sessions, burn_drive::issue_command, burn_drive::last_lead_in, burn_drive::last_lead_out, burn_drive::last_track_no, libdax_messenger, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_SEV_WARNING, libdax_msgs_submit(), burn_drive::media_capacity_remaining, burn_drive::media_lba_limit, burn_drive::media_read_capacity, mmc_four_char_to_int(), mmc_get_configuration(), MMC_GET_DISC_INFO, mmc_guess_profile(), mmc_read_capacity(), mmc_read_toc(), mmc_read_toc_fmt0(), burn_drive::mr_capacity_trusted, burn_drive::num_opc_tables, command::opcode, command::page, command::retry, scsi_init_command(), buffer::sectors, command::sense, burn_drive::sent_default_page_05, burn_drive::silent_on_scsi_error, spc_decode_sense(), burn_drive::start_lba, burn_drive::state_of_last_session, burn_drive::status, and burn_drive::toc_entries.

Referenced by mmc_read_disc_info().

◆ mmc_read_disc_structure()

int mmc_read_disc_structure ( struct burn_drive d,
int  media_type,
int  layer_number,
int  format,
int  min_len,
char **  reply,
int *  reply_len,
int  flag 
)

◆ mmc_read_disc_structure_al()

static int mmc_read_disc_structure_al ( struct burn_drive d,
int *  alloc_len,
int  media_type,
int  layer_number,
int  format,
int  min_len,
char **  reply,
int *  reply_len,
int  flag 
)
static

◆ mmc_read_format_capacities()

int mmc_read_format_capacities ( struct burn_drive d,
int  top_wanted 
)

◆ mmc_read_format_capacities_al()

◆ mmc_read_lead_in()

◆ mmc_read_multi_session_c1()

◆ mmc_read_toc()

void mmc_read_toc ( struct burn_drive d)

Definition at line 1764 of file mmc.c.

References mmc_function_spy(), mmc_read_toc_al(), and mmc_start_if_needed().

Referenced by mmc_read_disc_info_al(), and mmc_setup_drive().

◆ mmc_read_toc_al()

static int mmc_read_toc_al ( struct burn_drive d,
int *  alloc_len 
)
static

Definition at line 1519 of file mmc.c.

References burn_toc_entry::adr, BURN_ALLOC_MEM, burn_disc_add_session(), burn_disc_cd_toc_extensions(), burn_disc_create(), BURN_DISC_FULL, burn_disc_remove_session(), BURN_DISC_UNREADY, BURN_DISC_UNSUITABLE, BURN_FREE_MEM, burn_msf_to_lba(), BURN_POS_END, burn_session_add_track(), burn_session_create(), burn_session_free(), burn_track_create(), burn_track_free(), buffer::bytes, scsi_mode_data::cdrw_write, burn_toc_entry::control, burn_drive::current_is_cd_profile, burn_drive::current_profile, buffer::data, command::dir, burn_drive::disc, command::dxfer_len, burn_track::entry, command::error, burn_session::firsttrack, burn_toc_entry::frame, FROM_DRIVE, burn_drive::global_index, burn_session::hidefirst, burn_drive::issue_command, burn_session::lasttrack, burn_session::leadout_entry, libdax_messenger, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_PRIO_ZERO, LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_SEV_WARNING, libdax_msgs_submit(), burn_drive::mdata, burn_drive::media_read_capacity, burn_toc_entry::min, mmc_fake_toc(), MMC_GET_TOC, mmc_read_toc_fmt0(), mmc_register_leadout(), burn_drive::mr_capacity_trusted, command::opcode, scsi_mode_data::p2a_valid, command::page, burn_toc_entry::pframe, burn_toc_entry::pmin, burn_toc_entry::point, burn_toc_entry::psec, command::retry, scsi_init_command(), burn_toc_entry::sec, buffer::sectors, burn_toc_entry::session, burn_disc::session, burn_disc::sessions, burn_drive::status, burn_toc_entry::tno, burn_drive::toc_entries, burn_drive::toc_entry, toc_find_modes(), burn_session::track, burn_session::tracks, and burn_toc_entry::zero.

Referenced by mmc_read_toc().

◆ mmc_read_toc_fmt0()

static int mmc_read_toc_fmt0 ( struct burn_drive d)
static

◆ mmc_read_toc_fmt0_al()

◆ mmc_read_track_info()

◆ mmc_register_leadout()

static int mmc_register_leadout ( struct burn_drive d,
int *  highest_leadout,
int  toc_idx 
)
static

◆ mmc_reserve_track()

◆ mmc_send_cue_sheet()

◆ mmc_set_product_id()

static int mmc_set_product_id ( char *  reply,
int  manuf_idx,
int  type_idx,
int  rev_idx,
char **  product_id,
char **  media_code1,
char **  media_code2,
int  flag 
)
static

Definition at line 5078 of file mmc.c.

References burn_util_make_printable_word().

Referenced by mmc_get_media_product_id().

◆ mmc_set_speed()

◆ mmc_set_streaming()

◆ mmc_setup_drive()

int mmc_setup_drive ( struct burn_drive d)

Definition at line 5378 of file mmc.c.

References burn_drive::all_profiles, burn_drive::bg_format_status, burn_drive::close_disc, burn_drive::close_session, burn_drive::close_track_session, burn_drive::complete_sessions, burn_drive::current_feat21h_link_size, burn_drive::current_feat23h_byte4, burn_drive::current_feat23h_byte8, burn_drive::current_feat2fh_byte4, burn_drive::current_has_feat21h, burn_drive::current_is_cd_profile, burn_drive::current_is_guessed_profile, burn_drive::current_is_supported_profile, burn_drive::current_profile, burn_drive::current_profile_text, burn_drive::disc_app_code, burn_drive::disc_bar_code, burn_drive::disc_id, burn_drive::disc_info_valid, burn_drive::disc_type, burn_drive::do_simulate, burn_drive::end_lba, burn_drive::erasable, burn_drive::erase, burn_drive::format_unit, burn_drive::get_nwa, burn_drive::incomplete_sessions, burn_drive::last_lead_in, burn_drive::last_lead_out, burn_drive::last_track_no, Libburn_wait_for_buffer_freE, Libburn_wait_for_buffer_max_perC, Libburn_wait_for_buffer_max_useC, Libburn_wait_for_buffer_min_perC, Libburn_wait_for_buffer_min_useC, Libburn_wait_for_buffer_tio_seC, burn_drive::media_capacity_remaining, burn_drive::media_lba_limit, burn_drive::media_read_capacity, mmc_close(), mmc_close_disc(), mmc_close_session(), mmc_erase(), mmc_format_unit(), mmc_get_nwa(), mmc_perform_opc(), mmc_read_10(), mmc_read_atip(), mmc_read_buffer_capacity(), mmc_read_cd(), mmc_read_format_capacities(), mmc_read_multi_session_c1(), mmc_read_toc(), mmc_reserve_track(), mmc_send_cue_sheet(), mmc_set_speed(), mmc_sync_cache(), mmc_write(), burn_drive::mr_capacity_trusted, burn_drive::needs_close_session, burn_drive::needs_sync_cache, burn_drive::next_track_damaged, burn_drive::nominal_write_speed, burn_drive::num_format_descr, burn_drive::num_opc_tables, burn_drive::num_profiles, burn_drive::pbf_altered, burn_drive::perform_opc, burn_drive::pessimistic_buffer_free, burn_drive::pessimistic_writes, burn_drive::phys_if_name, burn_drive::phys_if_std, burn_drive::read_10, burn_drive::read_atip, burn_drive::read_buffer_capacity, burn_drive::read_cd, burn_drive::read_format_capacities, burn_drive::read_multi_session_c1, burn_drive::read_toc, burn_drive::reserve_track, burn_drive::send_cue_sheet, burn_drive::sent_default_page_05, burn_drive::set_speed, burn_drive::start_lba, burn_drive::state_of_last_session, burn_drive::sync_cache, burn_drive::wait_for_buffer_free, burn_drive::waited_tries, burn_drive::waited_usec, burn_drive::waited_writes, burn_drive::wfb_max_percent, burn_drive::wfb_max_usec, burn_drive::wfb_min_percent, burn_drive::wfb_min_usec, burn_drive::wfb_timeout_sec, and burn_drive::write.

Referenced by burn_scsi_setup_drive().

◆ mmc_start_if_needed()

◆ mmc_sync_cache()

◆ mmc_wait_for_buffer_free()

◆ mmc_write()

◆ mmc_write_12()

◆ new_burn_speed_descr()

static int new_burn_speed_descr ( struct burn_drive d,
int  sd_source,
struct burn_speed_descriptor **  sd,
int  flag 
)
static

Variable Documentation

◆ burn_support_untested_profiles

int burn_support_untested_profiles
extern

Definition at line 102 of file init.c.

Referenced by burn_allow_untested_profiles(), and burn_initialize().

◆ libdax_messenger

◆ MMC_BLANK

unsigned char MMC_BLANK[] = { 0xA1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
static

Definition at line 202 of file mmc.c.

Referenced by mmc_erase().

◆ MMC_CLOSE

unsigned char MMC_CLOSE[] = { 0x5B, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
static

Definition at line 216 of file mmc.c.

Referenced by mmc_close().

◆ MMC_FORMAT_UNIT

unsigned char MMC_FORMAT_UNIT[] = { 0x04, 0x11, 0, 0, 0, 0 }
static

Definition at line 227 of file mmc.c.

Referenced by mmc_format_unit().

◆ mmc_function_spy_do_tell

int mmc_function_spy_do_tell = 0
static

Definition at line 265 of file mmc.c.

Referenced by mmc_function_spy(), and mmc_function_spy_ctrl().

◆ MMC_GET_ATIP

unsigned char MMC_GET_ATIP[] = { 0x43, 2, 4, 0, 0, 0, 0, 16, 0, 0 }
static

Definition at line 197 of file mmc.c.

Referenced by mmc_read_atip().

◆ MMC_GET_CONFIGURATION

unsigned char MMC_GET_CONFIGURATION[]
static
Initial value:
=
{ 0x46, 0, 0, 0, 0, 0, 0, 16, 0, 0 }

Definition at line 211 of file mmc.c.

Referenced by mmc_get_configuration_al().

◆ MMC_GET_DISC_INFO

unsigned char MMC_GET_DISC_INFO[]
static
Initial value:
=
{ 0x51, 0, 0, 0, 0, 0, 0, 16, 0, 0 }

Definition at line 199 of file mmc.c.

Referenced by mmc_read_disc_info_al().

◆ MMC_GET_EVENT

unsigned char MMC_GET_EVENT[] = { 0x4A, 1, 0, 0, 0x7e, 0, 0, 0, 8, 0 }
static

Definition at line 215 of file mmc.c.

Referenced by mmc_get_event().

◆ MMC_GET_LEADTEXT

unsigned char MMC_GET_LEADTEXT[] = { 0x43, 2, 5, 0, 0, 0, 0, 4, 0, 0 }
static

Definition at line 198 of file mmc.c.

Referenced by mmc_get_leadin_text_al().

◆ MMC_GET_MSINFO

unsigned char MMC_GET_MSINFO[]
static
Initial value:
=
{ 0x43, 0, 1, 0, 0, 0, 0, 16, 0, 0 }

Definition at line 193 of file mmc.c.

Referenced by mmc_read_multi_session_c1().

◆ MMC_GET_PERFORMANCE

unsigned char MMC_GET_PERFORMANCE[]
static
Initial value:
=
{ 0xAC, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 236 of file mmc.c.

Referenced by mmc_get_performance_al().

◆ MMC_GET_TOC

unsigned char MMC_GET_TOC[] = { 0x43, 2, 2, 0, 0, 0, 0, 16, 0, 0 }
static

Definition at line 195 of file mmc.c.

Referenced by mmc_read_toc_al().

◆ MMC_GET_TOC_FMT0

unsigned char MMC_GET_TOC_FMT0[] = { 0x43, 0, 0, 0, 0, 0, 0, 16, 0, 0 }
static

Definition at line 196 of file mmc.c.

Referenced by mmc_read_toc_fmt0_al().

◆ MMC_READ_10

unsigned char MMC_READ_10[]
static
Initial value:
=
{ 0x28, 0, 0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 248 of file mmc.c.

Referenced by mmc_read_10().

◆ MMC_READ_BUFFER_CAPACITY

unsigned char MMC_READ_BUFFER_CAPACITY[]
static
Initial value:
=
{ 0x5C, 0, 0, 0, 0, 0, 0, 16, 0, 0 }

Definition at line 223 of file mmc.c.

Referenced by mmc_read_buffer_capacity().

◆ MMC_READ_CAPACITY

unsigned char MMC_READ_CAPACITY[]
static
Initial value:
=
{ 0x25, 0, 0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 252 of file mmc.c.

Referenced by mmc_read_capacity().

◆ MMC_READ_CD

unsigned char MMC_READ_CD[] = { 0xBE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
static

Definition at line 201 of file mmc.c.

Referenced by mmc_read_cd(), and mmc_read_lead_in().

◆ MMC_READ_CD_MSF

unsigned char MMC_READ_CD_MSF[]
static
Initial value:
=
{ 0xB9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }

Definition at line 262 of file mmc.c.

Referenced by mmc_read_cd_msf().

◆ MMC_READ_DISC_STRUCTURE

unsigned char MMC_READ_DISC_STRUCTURE[]
static
Initial value:
=
{ 0xAD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 257 of file mmc.c.

Referenced by mmc_read_disc_structure_al().

◆ MMC_READ_FORMAT_CAPACITIES

unsigned char MMC_READ_FORMAT_CAPACITIES[]
static
Initial value:
=
{ 0x23, 0, 0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 240 of file mmc.c.

Referenced by mmc_read_format_capacities_al().

◆ MMC_RESERVE_TRACK

unsigned char MMC_RESERVE_TRACK[]
static
Initial value:
=
{ 0x53, 0, 0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 244 of file mmc.c.

Referenced by mmc_reserve_track().

◆ MMC_SEND_CUE_SHEET

unsigned char MMC_SEND_CUE_SHEET[]
static
Initial value:
=
{ 0x5D, 0, 0, 0, 0, 0, 0, 0, 0, 0 }

Definition at line 219 of file mmc.c.

Referenced by mmc_send_cue_sheet().

◆ MMC_SEND_OPC

unsigned char MMC_SEND_OPC[] = { 0x54, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
static

Definition at line 203 of file mmc.c.

Referenced by mmc_perform_opc().

◆ MMC_SET_SPEED

unsigned char MMC_SET_SPEED[]
static
Initial value:
=
{ 0xBB, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }

Definition at line 204 of file mmc.c.

Referenced by mmc_set_speed().

◆ MMC_SET_STREAMING

unsigned char MMC_SET_STREAMING[]
static
Initial value:
=
{ 0xB6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 231 of file mmc.c.

Referenced by mmc_set_streaming().

◆ mmc_start_for_bit0

int mmc_start_for_bit0 = 0
static

Definition at line 314 of file mmc.c.

Referenced by mmc_start_if_needed().

◆ MMC_SYNC_CACHE

unsigned char MMC_SYNC_CACHE[] = { 0x35, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
static

Definition at line 214 of file mmc.c.

Referenced by mmc_sync_cache().

◆ MMC_TRACK_INFO

unsigned char MMC_TRACK_INFO[] = { 0x52, 0, 0, 0, 0, 0, 0, 16, 0, 0 }
static

Definition at line 217 of file mmc.c.

Referenced by mmc_read_track_info().

◆ MMC_WRITE_10

unsigned char MMC_WRITE_10[] = { 0x2A, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
static

Definition at line 208 of file mmc.c.

Referenced by mmc_write().

◆ MMC_WRITE_12

unsigned char MMC_WRITE_12[]
static
Initial value:
=
{ 0xAA, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }

Definition at line 206 of file mmc.c.

Referenced by mmc_write(), and mmc_write_12().