2006-08-15 20:37:04 +00:00
|
|
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
|
|
|
|
2010-02-14 08:45:14 +00:00
|
|
|
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
2013-06-09 15:26:32 +00:00
|
|
|
Copyright (c) 2006 - 2013 Thomas Schmitt <scdbackup@gmx.net>
|
2010-02-14 08:45:14 +00:00
|
|
|
Provided under GPL version 2 or later.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
#ifndef __TRANSPORT
|
|
|
|
#define __TRANSPORT
|
|
|
|
|
|
|
|
#include "libburn.h"
|
2006-11-16 11:17:55 +00:00
|
|
|
#include "os.h"
|
2006-08-15 20:37:04 +00:00
|
|
|
|
|
|
|
#include <pthread.h>
|
|
|
|
/* sg data structures */
|
|
|
|
#include <sys/types.h>
|
2006-10-13 10:22:21 +00:00
|
|
|
|
|
|
|
|
2006-11-16 11:17:55 +00:00
|
|
|
/* see os.h for name of particular os-*.h where this is defined */
|
|
|
|
#define BUFFER_SIZE BURN_OS_TRANSPORT_BUFFER_SIZE
|
2006-10-13 10:22:21 +00:00
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
|
|
|
|
enum transfer_direction
|
|
|
|
{ TO_DRIVE, FROM_DRIVE, NO_TRANSFER };
|
|
|
|
|
|
|
|
/* end of sg data structures */
|
|
|
|
|
|
|
|
/* generic 'drive' data structures */
|
|
|
|
|
|
|
|
struct cue_sheet
|
|
|
|
{
|
|
|
|
int count;
|
|
|
|
unsigned char *data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct params
|
|
|
|
{
|
|
|
|
int speed;
|
|
|
|
int retries;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct buffer
|
|
|
|
{
|
2006-12-20 11:20:08 +00:00
|
|
|
/* ts A61219:
|
|
|
|
Added 4096 bytes reserve against possible buffer overflows.
|
|
|
|
(Changed in sector.c buffer flush test from >= to > BUFFER_SIZE .
|
|
|
|
This can at most cause a 1 sector overlap. Sometimes an offset
|
2009-09-11 11:53:36 +00:00
|
|
|
of 16 byte is applied to the output data (in some RAW mode). )
|
|
|
|
burn_write_opts.cdxa_conversion can imply an offset of 8 bytes.
|
|
|
|
*/
|
2006-12-20 11:20:08 +00:00
|
|
|
unsigned char data[BUFFER_SIZE + 4096];
|
2006-08-15 20:37:04 +00:00
|
|
|
int sectors;
|
|
|
|
int bytes;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct command
|
|
|
|
{
|
|
|
|
unsigned char opcode[16];
|
|
|
|
int oplen;
|
|
|
|
int dir;
|
2007-05-21 18:57:09 +00:00
|
|
|
int dxfer_len;
|
2006-08-15 20:37:04 +00:00
|
|
|
unsigned char sense[128];
|
|
|
|
int error;
|
|
|
|
int retry;
|
|
|
|
struct buffer *page;
|
2011-11-30 08:11:52 +00:00
|
|
|
int timeout; /* milliseconds */
|
2013-06-09 15:26:32 +00:00
|
|
|
|
|
|
|
double start_time;
|
|
|
|
double end_time;
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
};
|
|
|
|
|
2006-10-12 17:35:06 +00:00
|
|
|
struct burn_scsi_inquiry_data
|
2006-08-15 20:37:04 +00:00
|
|
|
{
|
|
|
|
char vendor[9];
|
|
|
|
char product[17];
|
|
|
|
char revision[5];
|
|
|
|
int valid;
|
|
|
|
};
|
|
|
|
|
2006-12-26 17:07:53 +00:00
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
struct scsi_mode_data
|
|
|
|
{
|
|
|
|
int buffer_size;
|
|
|
|
int dvdram_read;
|
|
|
|
int dvdram_write;
|
|
|
|
int dvdr_read;
|
|
|
|
int dvdr_write;
|
|
|
|
int dvdrom_read;
|
|
|
|
int cdrw_read;
|
|
|
|
int cdrw_write;
|
|
|
|
int cdr_read;
|
|
|
|
int cdr_write;
|
|
|
|
int simulate;
|
|
|
|
int max_read_speed;
|
|
|
|
int max_write_speed;
|
2006-10-21 10:34:15 +00:00
|
|
|
|
|
|
|
/* ts A61021 */
|
|
|
|
int min_write_speed;
|
|
|
|
|
2006-12-25 19:07:43 +00:00
|
|
|
/* ts A61225 : Results from ACh GET PERFORMANCE, Type 03h
|
|
|
|
Speed values go into *_*_speed */
|
|
|
|
int min_end_lba;
|
|
|
|
int max_end_lba;
|
2006-12-26 17:07:53 +00:00
|
|
|
struct burn_speed_descriptor *speed_descriptors;
|
2006-12-25 19:07:43 +00:00
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
int cur_read_speed;
|
|
|
|
int cur_write_speed;
|
|
|
|
int retry_page_length;
|
|
|
|
int retry_page_valid;
|
|
|
|
int write_page_length;
|
|
|
|
int write_page_valid;
|
|
|
|
int c2_pointers;
|
|
|
|
int valid;
|
|
|
|
int underrun_proof;
|
|
|
|
};
|
|
|
|
|
2006-09-04 19:11:04 +00:00
|
|
|
|
2007-01-13 21:16:04 +00:00
|
|
|
/* ts A70112 : represents a single Formattable Capacity Descriptor as of
|
|
|
|
mmc5r03c.pdf 6.24.3.3 . There can at most be 32 of them. */
|
|
|
|
struct burn_format_descr {
|
|
|
|
/* format type: e.g 0x00 is "Full", 0x15 is "Quick" */
|
|
|
|
int type;
|
|
|
|
|
|
|
|
/* the size in bytes derived from Number of Blocks */
|
|
|
|
off_t size;
|
|
|
|
|
|
|
|
/* the Type Dependent Parameter (usually the write alignment size) */
|
2007-08-17 08:19:30 +00:00
|
|
|
unsigned int tdp;
|
2007-01-13 21:16:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-09-04 19:11:04 +00:00
|
|
|
/** Gets initialized in enumerate_common() and burn_drive_register() */
|
2006-08-15 20:37:04 +00:00
|
|
|
struct burn_drive
|
|
|
|
{
|
2007-09-24 13:54:52 +00:00
|
|
|
/* ts A70902:
|
|
|
|
0=null-emulation
|
|
|
|
1=MMC drive ,
|
|
|
|
2=stdio random read-write
|
|
|
|
3=stdio sequential write-only
|
2011-03-18 09:33:54 +00:00
|
|
|
4=stdio random read-only
|
|
|
|
5=stdio random write-only
|
2007-09-24 13:54:52 +00:00
|
|
|
*/
|
2007-09-04 22:50:04 +00:00
|
|
|
int drive_role;
|
|
|
|
|
2006-10-05 14:21:34 +00:00
|
|
|
int bus_no;
|
2006-08-15 20:37:04 +00:00
|
|
|
int host;
|
|
|
|
int id;
|
|
|
|
int channel;
|
|
|
|
int lun;
|
|
|
|
char *devname;
|
2006-10-13 10:22:21 +00:00
|
|
|
|
2007-03-03 14:09:46 +00:00
|
|
|
/* ts A70302: mmc5r03c.pdf 5.3.2 Physical Interface Standard */
|
|
|
|
int phys_if_std; /* 1=SCSI, 2=ATAPI, 3,4,6=FireWire, 7=SATA, 8=USB */
|
|
|
|
char phys_if_name[80]; /* MMC-5 5.3.2 table 91 , e.g. "SCSI Family" */
|
2006-08-15 20:37:04 +00:00
|
|
|
|
2006-11-16 11:17:55 +00:00
|
|
|
/* see os.h for name of particular os-*.h where this is defined */
|
|
|
|
BURN_OS_TRANSPORT_DRIVE_ELEMENTS
|
|
|
|
|
2006-09-27 12:04:53 +00:00
|
|
|
|
2006-09-04 19:11:04 +00:00
|
|
|
/* ts A60904 : ticket 62, contribution by elmom */
|
|
|
|
/**
|
|
|
|
Tells the index in scanned burn_drive_info array.
|
|
|
|
-1 if fallen victim to burn_drive_info_forget()
|
|
|
|
*/
|
|
|
|
int global_index;
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
pthread_mutex_t access_lock;
|
|
|
|
|
|
|
|
enum burn_disc_status status;
|
|
|
|
int erasable;
|
2006-12-01 21:38:34 +00:00
|
|
|
|
|
|
|
/* ts A61201 from 46h GET CONFIGURATION */
|
|
|
|
int current_profile;
|
|
|
|
char current_profile_text[80];
|
|
|
|
int current_is_cd_profile;
|
2006-12-20 11:20:08 +00:00
|
|
|
int current_is_supported_profile;
|
2009-06-03 18:53:57 +00:00
|
|
|
/* ts A90603 */
|
|
|
|
int current_is_guessed_profile;
|
2009-08-15 13:32:56 +00:00
|
|
|
/* ts A90815 */
|
|
|
|
unsigned char all_profiles[256];
|
|
|
|
int num_profiles;
|
2006-12-20 11:20:08 +00:00
|
|
|
|
2007-01-29 17:57:31 +00:00
|
|
|
/* ts A70128 : MMC-to-MMC feature info from 46h for DVD-RW.
|
|
|
|
Quite internal. Regard as opaque :)
|
|
|
|
*/
|
|
|
|
/* 1 = incremental recording available, 0 = not available */
|
|
|
|
int current_has_feat21h;
|
|
|
|
|
|
|
|
/* Link Size item number 0 from feature 0021h descriptor */
|
|
|
|
int current_feat21h_link_size;
|
|
|
|
|
2008-12-12 21:40:34 +00:00
|
|
|
/* Flags from feature 0023h for formatting BD mmc5r03c.pdf 5.3.13
|
|
|
|
Byte 4 BD-RE:
|
|
|
|
bit0= Cert format 30h sub-type 10b
|
|
|
|
bit1= QCert format 30h sub-type 11b
|
|
|
|
bit2= Expand format 01h
|
|
|
|
bit3= RENoSA format 31h
|
|
|
|
Byte 8 BD-R:
|
|
|
|
bit0= RRM format 32h sub-type 10b
|
|
|
|
*/
|
|
|
|
int current_feat23h_byte4;
|
|
|
|
int current_feat23h_byte8;
|
|
|
|
|
|
|
|
|
2007-01-29 17:57:31 +00:00
|
|
|
/* Flags from feature 002Fh feature descriptor mmc5r03c.pdf 5.3.25 :
|
2007-02-05 13:28:57 +00:00
|
|
|
bit1= DVD-RW supported
|
|
|
|
bit2= Test Write available
|
|
|
|
bit3= DVD-R DL supported
|
|
|
|
bit6= Buffer Under-run Free recording available (page 05h BUFE)
|
|
|
|
Value -1 indicates that no 002Fh was current in the features list.
|
2007-01-29 17:57:31 +00:00
|
|
|
*/
|
|
|
|
int current_feat2fh_byte4;
|
|
|
|
|
2011-05-26 14:58:10 +00:00
|
|
|
/* ts B10524 : whether the damage bit was set for the future track.
|
|
|
|
bit0= damage bit , bit1= nwa valid bit
|
|
|
|
*/
|
|
|
|
int next_track_damaged;
|
|
|
|
|
2007-10-03 11:24:41 +00:00
|
|
|
/* ts A70114 : whether a DVD-RW media holds an incomplete session
|
2007-01-14 13:41:19 +00:00
|
|
|
(which could need closing after write) */
|
2007-01-18 21:18:03 +00:00
|
|
|
int needs_close_session;
|
2007-10-03 11:24:41 +00:00
|
|
|
/* ts A71003 : whether a random write operation was done and no
|
|
|
|
synchronize chache has happened yet */
|
|
|
|
int needs_sync_cache;
|
2007-01-14 13:41:19 +00:00
|
|
|
|
2008-04-12 16:42:45 +00:00
|
|
|
/* ts A80412 : whether to use WRITE12 with Streaming bit set
|
|
|
|
rather than WRITE10. Speeds up DVD-RAM. Might help
|
|
|
|
with BD-RE */
|
|
|
|
int do_stream_recording;
|
|
|
|
|
2009-02-27 14:30:57 +00:00
|
|
|
/* ts A90227 : the LBA where stream recording shall start.
|
|
|
|
Writing to lower LBA will be done without streaming.
|
|
|
|
*/
|
|
|
|
int stream_recording_start;
|
|
|
|
|
2007-01-29 17:57:31 +00:00
|
|
|
/* ts A61218 from 51h READ DISC INFORMATION */
|
2009-09-09 12:52:07 +00:00
|
|
|
int last_lead_in;
|
|
|
|
int last_lead_out;
|
2009-11-05 17:03:01 +00:00
|
|
|
int num_opc_tables; /* ts A91104: -1= not yet known */
|
2006-12-20 11:20:08 +00:00
|
|
|
int bg_format_status; /* 0=needs format start, 1=needs format restart*/
|
2009-09-09 12:52:07 +00:00
|
|
|
int disc_type; /* 0="CD-DA or CD-ROM", 0x10="CD-I", 0x20="CD-ROM XA" */
|
|
|
|
unsigned int disc_id; /* a "32 bit binary integer" */
|
|
|
|
char disc_bar_code[9];
|
|
|
|
int disc_app_code;
|
|
|
|
int disc_info_valid; /* bit0= disc_type , bit1= disc_id ,
|
|
|
|
bit2= disc_bar_code , bit3= disc_app_code
|
|
|
|
bit4= URU bit is set (= unrestricted use)
|
2009-09-09 13:39:27 +00:00
|
|
|
bit5= Erasable bit was set in reply
|
2009-09-09 12:52:07 +00:00
|
|
|
*/
|
2006-12-20 11:20:08 +00:00
|
|
|
|
2007-01-09 21:06:55 +00:00
|
|
|
/* ts A70108 from 23h READ FORMAT CAPACITY mmc5r03c.pdf 6.24 */
|
|
|
|
int format_descr_type; /* 1=unformatted, 2=formatted, 3=unclear */
|
|
|
|
off_t format_curr_max_size; /* meaning depends on format_descr_type */
|
2007-08-09 13:30:52 +00:00
|
|
|
unsigned int format_curr_blsas; /* dito */
|
2007-01-09 21:06:55 +00:00
|
|
|
int best_format_type;
|
|
|
|
off_t best_format_size;
|
2006-12-01 21:38:34 +00:00
|
|
|
|
2007-01-13 21:16:04 +00:00
|
|
|
/* The complete list of format descriptors as read with 23h */
|
|
|
|
int num_format_descr;
|
|
|
|
struct burn_format_descr format_descriptors[32];
|
|
|
|
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
volatile int released;
|
2006-11-06 19:58:24 +00:00
|
|
|
|
|
|
|
/* ts A61106 */
|
2012-10-25 12:39:50 +00:00
|
|
|
/* 0= report errors
|
|
|
|
1= do not report errors
|
|
|
|
2= do not report errors which the libburn function indicates in
|
|
|
|
member .had_particular_error
|
|
|
|
*/
|
2006-11-06 19:58:24 +00:00
|
|
|
int silent_on_scsi_error;
|
|
|
|
|
2012-10-25 12:39:50 +00:00
|
|
|
/* ts B21023 */
|
|
|
|
/* bit0= 5 64 00 occured with READ10 in mmc_read_10()
|
|
|
|
*/
|
|
|
|
int had_particular_error;
|
|
|
|
|
2007-09-12 10:45:34 +00:00
|
|
|
int stdio_fd;
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
int nwa; /* next writeable address */
|
|
|
|
int alba; /* absolute lba */
|
|
|
|
int rlba; /* relative lba in section */
|
|
|
|
int start_lba;
|
|
|
|
int end_lba;
|
2007-01-29 17:57:31 +00:00
|
|
|
|
2007-02-01 16:15:09 +00:00
|
|
|
|
|
|
|
/* ts A70131 : from 51h READ DISC INFORMATION Number of Sessions (-1)*/
|
|
|
|
int complete_sessions;
|
2009-01-09 09:59:59 +00:00
|
|
|
/* ts A90107 */
|
|
|
|
int state_of_last_session;
|
|
|
|
|
2013-01-12 19:51:21 +00:00
|
|
|
#ifdef Libburn_disc_with_incomplete_sessioN
|
|
|
|
/* ts B30112 */
|
|
|
|
int incomplete_sessions;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2007-01-29 17:57:31 +00:00
|
|
|
/* ts A70129 :
|
|
|
|
from 51h READ DISC INFORMATION Last Track Number in Last Session */
|
|
|
|
int last_track_no;
|
2011-07-31 08:03:51 +00:00
|
|
|
|
|
|
|
/* ts B10730 : whether a default mode page 05 was already sent.
|
|
|
|
*/
|
|
|
|
int sent_default_page_05;
|
2007-02-13 14:37:25 +00:00
|
|
|
/* ts A70212 : from various sources : free space on media (in bytes)
|
|
|
|
With CD this might change after particular write
|
|
|
|
parameters have been set and nwa has been inquired.
|
|
|
|
(e.g. by d->send_write_parameters() ; d->get_nwa()).
|
|
|
|
*/
|
|
|
|
off_t media_capacity_remaining;
|
2007-02-15 20:18:07 +00:00
|
|
|
/* ts A70215 : if > 0 : first lba on media that is too high for write*/
|
|
|
|
int media_lba_limit;
|
2007-01-29 17:57:31 +00:00
|
|
|
|
2008-12-10 09:26:09 +00:00
|
|
|
/* ts A81210 : Upper limit of readable data size,
|
2011-08-17 16:09:05 +00:00
|
|
|
0x7fffffff = unknown
|
|
|
|
0x7ffffff0 = 32 bit overflow, or unknown stdio size
|
|
|
|
*/
|
2008-12-10 09:26:09 +00:00
|
|
|
int media_read_capacity;
|
2007-02-01 16:15:09 +00:00
|
|
|
|
2011-03-18 09:33:54 +00:00
|
|
|
/* ts B10314 : Next Writeable Adress for drive_role == 5 */
|
|
|
|
int role_5_nwa;
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
int toc_temp;
|
|
|
|
struct burn_disc *disc; /* disc structure */
|
|
|
|
int block_types[4];
|
|
|
|
struct buffer *buffer;
|
|
|
|
struct burn_progress progress;
|
|
|
|
|
2011-06-07 14:40:31 +00:00
|
|
|
/* To be used by mmc.c, sbc.c, spc.c for SCSI commands where the struct
|
|
|
|
content surely does not have to persist while another command gets
|
|
|
|
composed and executed.
|
|
|
|
(Inherently, sending SCSI commands to the same drive cannot be
|
|
|
|
thread-safe. But there are functions which send SCSI commands
|
|
|
|
and also call other such functions. These shall use own allocated
|
|
|
|
command structs and not this struct here.)
|
|
|
|
*/
|
|
|
|
struct command casual_command;
|
|
|
|
|
2007-07-12 16:29:29 +00:00
|
|
|
/* ts A70711 : keeping an eye on the drive buffer */
|
|
|
|
off_t pessimistic_buffer_free;
|
|
|
|
int pbf_altered;
|
|
|
|
int wait_for_buffer_free;
|
|
|
|
int nominal_write_speed;
|
2007-08-17 08:19:30 +00:00
|
|
|
unsigned int wfb_min_usec;
|
|
|
|
unsigned int wfb_max_usec;
|
|
|
|
unsigned int wfb_timeout_sec;
|
|
|
|
unsigned int wfb_min_percent;
|
|
|
|
unsigned int wfb_max_percent;
|
|
|
|
unsigned int pessimistic_writes;
|
|
|
|
unsigned int waited_writes;
|
|
|
|
unsigned int waited_tries;
|
|
|
|
unsigned int waited_usec;
|
2007-07-12 16:29:29 +00:00
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
volatile int cancel;
|
|
|
|
volatile enum burn_drive_status busy;
|
2007-09-29 18:50:19 +00:00
|
|
|
|
|
|
|
/* ts A70929 */
|
|
|
|
pid_t thread_pid;
|
|
|
|
int thread_pid_valid;
|
2010-03-05 09:08:16 +00:00
|
|
|
/* ts B00225 */
|
|
|
|
pthread_t thread_tid;
|
2007-09-29 18:50:19 +00:00
|
|
|
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
/* transport functions */
|
|
|
|
int (*grab) (struct burn_drive *);
|
|
|
|
int (*release) (struct burn_drive *);
|
2006-10-21 18:51:35 +00:00
|
|
|
|
|
|
|
/* ts A61021 */
|
|
|
|
int (*drive_is_open) (struct burn_drive *);
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
int (*issue_command) (struct burn_drive *, struct command *);
|
|
|
|
|
|
|
|
/* lower level functions */
|
|
|
|
void (*erase) (struct burn_drive *, int);
|
|
|
|
void (*getcaps) (struct burn_drive *);
|
2006-10-21 10:34:15 +00:00
|
|
|
|
|
|
|
/* ts A61021 */
|
|
|
|
void (*read_atip) (struct burn_drive *);
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
int (*write) (struct burn_drive *, int, struct buffer *);
|
|
|
|
void (*read_toc) (struct burn_drive *);
|
|
|
|
void (*lock) (struct burn_drive *);
|
|
|
|
void (*unlock) (struct burn_drive *);
|
|
|
|
void (*eject) (struct burn_drive *);
|
|
|
|
void (*load) (struct burn_drive *);
|
2006-11-18 19:49:18 +00:00
|
|
|
int (*start_unit) (struct burn_drive *);
|
2009-08-24 20:24:39 +00:00
|
|
|
|
|
|
|
/* ts A90824 : Calming down noisy drives */
|
2009-08-24 13:10:53 +00:00
|
|
|
int (*stop_unit) (struct burn_drive *);
|
2009-08-24 20:24:39 +00:00
|
|
|
int is_stopped;
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
void (*read_disc_info) (struct burn_drive *);
|
2012-11-29 11:14:33 +00:00
|
|
|
int (*read_cd) (struct burn_drive *, int start, int len,
|
|
|
|
int sec_type, int main_ch,
|
|
|
|
const struct burn_read_opts *, struct buffer *,
|
|
|
|
int flag);
|
2006-08-15 20:37:04 +00:00
|
|
|
void (*perform_opc) (struct burn_drive *);
|
|
|
|
void (*set_speed) (struct burn_drive *, int, int);
|
|
|
|
void (*send_parameters) (struct burn_drive *,
|
|
|
|
const struct burn_read_opts *);
|
|
|
|
void (*send_write_parameters) (struct burn_drive *,
|
2011-12-28 10:41:05 +00:00
|
|
|
struct burn_session *, int tno,
|
2006-08-15 20:37:04 +00:00
|
|
|
const struct burn_write_opts *);
|
2011-12-28 15:23:24 +00:00
|
|
|
int (*send_cue_sheet) (struct burn_drive *, struct cue_sheet *);
|
2007-02-05 13:28:57 +00:00
|
|
|
|
|
|
|
/* ts A70205 : Announce size of a DVD-R[W] DAO session. */
|
|
|
|
int (*reserve_track) (struct burn_drive *d, off_t size);
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
void (*sync_cache) (struct burn_drive *);
|
|
|
|
int (*get_erase_progress) (struct burn_drive *);
|
2006-11-11 12:22:53 +00:00
|
|
|
int (*get_nwa) (struct burn_drive *, int trackno, int *lba, int *nwa);
|
2006-10-09 12:49:08 +00:00
|
|
|
|
2007-01-31 17:34:49 +00:00
|
|
|
/* ts A70131 : obtain (possibly fake) TOC number and start lba of
|
|
|
|
first track in last complete session */
|
|
|
|
int (*read_multi_session_c1)(struct burn_drive *d,
|
|
|
|
int *trackno, int *start);
|
|
|
|
|
2006-10-09 12:49:08 +00:00
|
|
|
/* ts A61009 : removed d in favor of o->drive */
|
|
|
|
/* void (*close_disc) (struct burn_drive * d,
|
|
|
|
struct burn_write_opts * o);
|
|
|
|
void (*close_session) (struct burn_drive * d,
|
2006-08-15 20:37:04 +00:00
|
|
|
struct burn_write_opts * o);
|
2006-10-09 12:49:08 +00:00
|
|
|
*/
|
|
|
|
void (*close_disc) (struct burn_write_opts * o);
|
|
|
|
void (*close_session) ( struct burn_write_opts * o);
|
|
|
|
|
2006-10-30 11:18:36 +00:00
|
|
|
/* ts A61029 */
|
2006-10-31 11:55:51 +00:00
|
|
|
void (*close_track_session) ( struct burn_drive *d,
|
2006-10-30 11:18:36 +00:00
|
|
|
int session, int track);
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
int (*test_unit_ready) (struct burn_drive * d);
|
|
|
|
void (*probe_write_modes) (struct burn_drive * d);
|
|
|
|
struct params params;
|
2006-10-12 17:35:06 +00:00
|
|
|
struct burn_scsi_inquiry_data *idata;
|
2006-08-15 20:37:04 +00:00
|
|
|
struct scsi_mode_data *mdata;
|
|
|
|
int toc_entries;
|
|
|
|
struct burn_toc_entry *toc_entry;
|
2006-10-23 11:31:37 +00:00
|
|
|
|
|
|
|
/* ts A61023 : get size and free space of drive buffer */
|
|
|
|
int (*read_buffer_capacity) (struct burn_drive *d);
|
|
|
|
|
2006-12-20 11:20:08 +00:00
|
|
|
/* ts A61220 : format media (e.g. DVD+RW) */
|
2007-01-06 12:08:57 +00:00
|
|
|
int (*format_unit) (struct burn_drive *d, off_t size, int flag);
|
2006-12-20 11:20:08 +00:00
|
|
|
|
2007-01-13 21:16:04 +00:00
|
|
|
/* ts A70108 */
|
|
|
|
/* mmc5r03c.pdf 6.24 : get list of available formats */
|
|
|
|
int (*read_format_capacities) (struct burn_drive *d, int top_wanted);
|
|
|
|
|
2007-08-12 15:25:56 +00:00
|
|
|
/* ts A70812 */
|
|
|
|
/* mmc5r03c.pdf 6.15 : read data sectors (start and amount in LBA) */
|
|
|
|
int (*read_10) (struct burn_drive *d, int start, int amount,
|
|
|
|
struct buffer *buf);
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* end of generic 'drive' data structures */
|
|
|
|
|
2008-04-22 16:13:05 +00:00
|
|
|
/* ts A80422 : centralizing this setting for debugging purposes
|
|
|
|
*/
|
|
|
|
int burn_drive_set_media_capacity_remaining(struct burn_drive *d, off_t value);
|
|
|
|
|
|
|
|
|
2006-08-15 20:37:04 +00:00
|
|
|
#endif /* __TRANSPORT */
|