Using cdemu-daemon 3.0.0 and vhba 20140629, I loaded a blank into the slot using the commands listed in the manpage.
$ cdemu create-blank --writer-id=WRITER-TOC --medium-type=dvd+r --param="writer.write_raw=1" --param="writer.write_subchannel=1" 0 x.toc
Then, executing cdrecord shows:
# cdrecord -dev=/dev/sr0 -atip 23:38 wrgstfl:~ # cdrecord -dev=/dev/sr0 -atip Cdrecord-ProDVD-ProBD-Clone 3.01a24 (x86_64-unknown-linux-gnu) Copyright (C) 1995-2014 Joerg Schilling scsidev: '/dev/sr0' devname: '/dev/sr0' scsibus: -2 target: -2 lun: -2 Warning: Open by 'devname' is unintentional and not supported. Linux sg driver version: 3.5.27 Using libscg version 'schily-0.9'. Device type : Removable CD-ROM Version : 0 Response Format: 2 Capabilities : Vendor_info : 'CDEmu ' Identifikation : 'Virt. CD/DVD-ROM' Revision : '1.10' Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM. Using generic SCSI-3/mmc-3 DVD+R driver (mmc_dvdplusr). Driver flags : NO-CD DVD MMC-3 SWABAUDIO Supported modes: SAO cdrecord: Warning: Cannot read drive buffer. cdrecord: Warning: The DMA speed test has been skipped. rzone size: 48 rzone number: 1 border number: 1 ljrs: 0 track mode: 7 copy: 0 damage: 0 reserved track: 0 blank: 1 incremental: 0 fp: 0 data mode: 1 lra valid: 0 nwa valid: 1 rzone start: 0 next wr addr: 0 free blocks: 2294954 blocking factor: 0 rzone size: 2294954 last recorded addr: 0 read compat lba: 0 next layerjmp addr: 0 last layerjmp addr: 0
Meanwhile, cdemu-daemon emits this:
cdemu0: Recording: unhandled recording mode: 4; resetting to TAO!
But the drive did not even advertise TAO to begin with, leaving writer programs in a confused state, leading to more errors down the road:
# cdrecord -dev=/dev/sr0 blabla.mp4 [...] Starting to write CD/DVD/BD at speed 16 in real SAO mode for single session. Last chance to quit, starting real write 0 seconds. Operation starts. cdrecord: Input/output error. write_g1: scsi sendcmd: no error CDB: 2A 00 00 00 00 00 00 00 10 00 status: 0x2 (CHECK CONDITION) Sense Bytes: 70 00 00 00 00 00 00 0A 00 00 00 00 00 15 00 00 Sense Key: 0x0 No Additional Sense, Segment 0 Sense Code: 0x00 Qual 0x15 (no current audio status to return) Fru 0x0 Sense flags: Blk 0 (not valid) cmd finished after 0.000s timeout 200s write track data: error after 0 bytes cdrecord: A write error occured. cdrecord: Please properly read the error message above.
cdemu emits:
cdemu0: DAO recording: no open track; there should be one opened by a call to RESERVE TRACK!
For a cdr74 + SAO, it goes a bit different.
The create command:
Messages that appear repeatedly during track write:
cdrecord seems to have completed ok:
But the tracks are empty (and the original files certainly aren't):
Thanks for testing the recording! As you can see, it is still in experimental state...
SAO mode with CD-R was failing due to an oversight in the check that determined whether RAW SAO or (cooked) SAO was being used, which caused the mode to be mis-identified as RAW SAO - hence the warning message about raw data, and failure to write sector's data.
For DVD+R, the code was expecting a RESERVE TRACK command before any WRITE - this is the way it is done by cdrkit's cdrecord/wodim (which is what I was testing against), but not by cdrtools' cdrecord (nor by Alchohol 120%). I have changed that bit of code to open the track as necessary instead.
Both fixes have been pushed to git, so you can give them a try.
PS: TOC writer should probably not be used for DVD+R, since cdrdao supports only CDs, and same goes for write_raw and wrute_subchannel options - at some point, writers' parameter validation code will need to be expanded to verify the medium type as well
Does the absence of the RESERVE TRACK command for DVDs as issued by cdrecord may simply be due to the fact that DVDs, broadly speaking, only permit one track (and that's data) per session anyway?
Do also note that cdrkit has not seen an update for 3.7 years, so there may be additional bugs.
It could be, although RESERVE TRACK is valid for DVDs as well. It is just that recording software does not need to use it (neither for DVDs, nor CDs), and in fact so far I have only seen it used by wodim with DVD+R; meaning that, for example, we currently do not implement support for it in CD TAO recording, although according to specs, it should be allowed as well.
Indeed, cdrkit and cdrtools do behave differently. And as long as they both produce valid media on real hardware, it means we have two test cases...