# Burning CD's with ATAPI (Once and for all)

## helba

OK, I'm getting sick of this burning cds crap. Having to use scsi-emulation, passing kernel parameters, loading modules with 20 options.....

I heard some time ago that apparently there was some new way to burn cds using ATAPI without having to touch SCSI, but is this true? Here's my system config:

/dev/hda: 60GB Maxtor

/dev/hdb: doesn't exit

/dev/hdc: Pioneer CD/DVD drive

/dev/hdd: CDRW

I've searched on google, but all the docs seem outdated (c. 2000). The forums only touch the subject. So could someone here enlighten me (and others), and solve this problem, once and for all?

----------

## crimson

the forums explain it perfectly.  Basically if you have the newest version of cdrecord you can use atapi burning.  

```
So do an ACCEPT="~x86" emerge cdrecord
```

 and thats all I really had to do.

Then try this:

cdrecord dev=ATAPI:/dev/hdd -scanbus

For me it detects devices.  Of course replace /dev/hdd with your cdrw.

Personally I"m going to try and NOT use atapi  :Smile:  since more linux programs support the scsi mode and I want to try out cdrdao and maybe some better gui frontends than XCDroast which is the only so far I've found that supports ATAPI burning.

----------

## helba

OK, thanks I've got CD burning up and running with cdrecord. But from what you're saying, I'm gonna have to wait a while before the GUI frontends like arson start supporting ATAPI it so I miight as well stick with the SCSI hack for a bit longer, no?

----------

## crimson

XCDroast is the only gui front end I got to work right off the bat with ATAPI.  I just set up scsi emulation today so that I could test out cdrdao and try and burn a game I bought that you can't burn because of safedisc protection.  Also I'd like to try running nero with wine, because supposedly that works with scsi emulation too.  

Should you switch?  I don't know..  I'd suggest trying both.

    The ATAPI mode worked great for me for awhile, although it makes XCDroast run slower than hell unless you have cds in both drives.

----------

## helba

wha... how did you get it to work with xcdroast? I start it up and it doesnt detect anything...... but I know my system should be ok cos cdrecord dev=ATAPI:0,1,0 -data test.iso workerd...... Am I missing something?

----------

## crimson

I didn't do anything special.  I'm using the newest version of xcdroast as well.  It just autodetected it.

----------

## puddpunk

Support is being put in for K3b. I think it's beta in CVS. Try it out with Dan Armak's KDE-CVS ebuilds.

----------

## crimson

I'd like to try k3b out, I just got the kde-libs for some program, but until now I'd been hesitant to get them.  I like atapi, but cdrdao doesn't support it and now I can finally try out the many other burning front ends out there.

----------

## garion911

Ok, I've been trying to get ATAPI burning working for a few couple weeks now..

I'm running linus-2.5.69.. I have ide-cd turned on, and ide-scsi off..

here's what I get when I do cdrecord dev=ATAPI: -scanbus

```

cherek CD1 # cdrecord dev=ATAPI: -scanbus

Cdrecord 2.01a14 (i686-pc-linux-gnu) Copyright (C) 1995-2003 Jörg Schilling

scsidev: 'ATAPI:'

devname: 'ATAPI'

scsibus: -1 target: -1 lun: -1

Warning: Using ATA Packet interface.

Warning: The related libscg interface code is in pre alpha.

Warning: There may be fatal problems.

Using libscg version 'schily-0.7'

scsibus0:

        0,0,0     0) 'ADAPTEC ' 'ACB-5500        ' 'FAKE' NON CCS Disk

        0,1,0     1) *

        0,2,0     2) *

        0,3,0     3) *

        0,4,0     4) *

        0,5,0     5) *

        0,6,0     6) *

        0,7,0     7) *

```

Which is not what my drive really is (Samsung SW-232B)..

cdrecord will detech my drive correctly with  cdrecord dev=/dev/hdc -inq

```

cherek CD1 # cdrecord dev=/dev/hdc -inq

Cdrecord 2.01a14 (i686-pc-linux-gnu) Copyright (C) 1995-2003 Jörg Schilling

scsidev: '/dev/hdc'

devname: '/dev/hdc'

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.7'

Device type    : Removable CD-ROM

Version        : 2

Response Format: 2

Capabilities   : 

Vendor_info    : 'SAMSUNG '

Identifikation : 'CD-R/RW SW-232B '

Revision       : 'R300'

Device seems to be: Generic mmc CD-RW

```

But if I try to use dev=/dev/hdc to burn, it does not work.. I get all sorts of delays, and end up with a drive not ready error..

```

cherek CD1 # cdrecord dev=/dev/hdc -v -dao cuefile=blah.cue 

Cdrecord 2.01a14 (i686-pc-linux-gnu) Copyright (C) 1995-2003 Jörg Schilling

TOC Type: 1 = CD-ROM

scsidev: '/dev/hdc'

devname: '/dev/hdc'

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.7'

atapi: 1

Device type    : Removable CD-ROM

Version        : 2

Response Format: 2

Capabilities   : 

Vendor_info    : 'SAMSUNG '

Identifikation : 'CD-R/RW SW-232B '

Revision       : 'R300'

Device seems to be: Generic mmc CD-RW.

<------- long delay ---------->

Current: 0x0000

Profile: 0x0008 

Profile: 0x0009 

Profile: 0x000A 

Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).

Driver flags   : MMC-2 SWABAUDIO BURNFREE FORCESPEED 

Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R96R

Track 01: data     1 MB        

Track 02: data   729 MB        

Total size:      730 MB (72:22.38) = 325679 sectors

Lout start:      730 MB (72:24/29) = 325679 sectors

<------- long delay ---------->

cdrecord: CD/DVD-Recorder not ready.

cherek CD1 #

```

Same thing happens with regular ISO's. 

I have also tried burning with dev=ATAPI:0,0,0 and dev=ATAPI:/dev/hdc.. None of them work either.

ANy ideas? Could it be the kernel version?

--Garion

----------

## pens

I have a similar problem with 2.5.69-mm* . I've tried everything from scsi emulation, to non scsi emulation. and everytime i get that FAKE NON CCS DISK stuff. May be a bug in 2.5.x?

--Kevin

----------

## garion911

When I set things up for SCSI emulation, I can start recording withough a problem.. But it never finishes, just locks up.. Usually before I get 100Megs written.. ANd I have to reboot before I can use the CD again.. 

Thats why I was starting to head down the ATAPI trail, hoping that would fix it.. 

Is it me, or has it been a while since linus+crew have come out with a fresh kernel?

--Garion

----------

## neenee

i have the 'FAKE' NON CCS Disk problem as well; it used to work before

though.. before a reboot even i think. *hunts for a solution on google*

----------

## drekka

um, haven't read this posting is detail, but I use Xcdroast which is quite able to use atapi cd burners without any scsi emulation, etc installed. Not sure if thats what you are looking for, but it works.

cio,

Derek.

----------

## neenee

even after a lot of reading in these forums, the linuxquestions forums

find hunting google, i could not find a solution; i did 'discover' that atapi

does not allow dma (yet) because of the pre-alpha stage.

so i reverted to scsi emulation which works like a charm; i will keep

tabs on atapi developement and return to it once it has matured a bit.

----------

## anfpunk

The package is now cdrtools btw, not cdrecord.  Just thought I'd throw that out there. 

Whenever I put the ATAPI:dev in it would come up with the fake device.  If you use:

cdrecord dev=/dev/hdc -scanbus  

It comes up correctly for me.  To burn I used:

cdrecord dev=/dev/hdc speed=24 cuefile=file.cue -dao 

This was a bin/cue setup so disregard the cuefile stuff, just use /dev/hdx  

Anyways, works fine for me like this.

----------

## Luke-Jr

 *neenee wrote:*   

> even after a lot of reading in these forums, the linuxquestions forums
> 
> find hunting google, i could not find a solution; i did 'discover' that atapi
> 
> does not allow dma (yet) because of the pre-alpha stage.
> ...

 

You might want to note that SCSI emulation does not support DMA at all, not even for reading CDs.

----------

## rowi

AFAIR you have to set the DMA-mode for the IDE-Device, not for the virtual SCSI-device

----------

## manny15

 *Quote:*   

> AFAIR you have to set the DMA-mode for the IDE-Device, not for the virtual SCSI-device

 

That's what I  thought. I'm not sure how to set it up though. I don't need ATAPI for burning because U use the Iomaga's USB Predator, but I would like to use my IDE DVD-ROM to rip CDs. I tried using hdparm to enable DMA but since it's a "scsi" device, hdparm won't work. What I have done is unloaded ide-scsi, sr_mod and (I think) cdrom modules, then loaded ide-cd. This "removed" scsi emulation and activated ATAPI! Then hdparm worked on /dev/cdroms/cdrom0. Is this how it should be done. I'm not even sure DMA is really working. Here are the settings:

```

name                    value           min             max             mode

----                    -----           ---             ---             ----

breada_readahead        0               0               0               rw

current_speed           66              0               69              rw

dsc_overlap             1               0               1               rw

file_readahead          0               0               2097151         rw

ide_scsi                0               0               1               rw

init_speed              66              0               69              rw

io_32bit                3               0               3               rw

keepsettings            0               0               1               rw

max_kb_per_request      64              1               127             rw

nice1                   1               0               1               rw

number                  3               0               3               rw

pio_mode                write-only      0               255             w

slow                    0               0               1               rw

unmaskirq               0               0               1               rw

using_dma               1               0               1               rw

```

Although it says it's using DMA, pio seems to be enabled also. Actually, dma was already enabled when ide-scsi was loaded. I actually set io_32bit to 3 like my HD hoping for a speed increase. Is this correct?

----------

