# HOWTO: Using EAC (Exact Audio Copy) on Wine (Updated!)

## danomac

<<These are the ide-cd instructions, see the next post for the original ide-scsi post>>

Howto: Using EAC (Exact Audio Copy) on Wine

For those that don't know, Exact Audio Copy is a Windows cd ripping tool. So far I haven't found an equivalent for EAC on linux. From what I've read, cdparanoia messes up on drives that do audio caching. If you have damaged CDs cdparanoia may not be able to rip them properly.

I happen to have a lot of damaged CDs (tip: don't loan them to friends...) so I set out to make it work. I've searched the forums and while EAC is mentioned in some threads there isn't one that simply says "Here is how to get it to work." Hopefully this thread fixes that problem.

Note: This guide assumes that you do not have a Windows partition at all and Wine is working standalone.

Known Issues / Notes

Wine does really oddball things when trying to detect CDROM drives with ide-cd. It does not recognize I am a member of the cdrom group, it seems to only check for ownership of the device file. The only way to get it to work with EAC is for the current user to be the owner of the CDROM device file (/dev/hdc is used in this example.) Before you run Wine, you need to make sure that you are the owner:

```

computer ~ $ ls -l /dev/hdc

brw-rw----  1 danomac cdrom 22, 0 Jan 10 17:57 /dev/hdc

```

To set it manually, use chown as root (danomac is the username used in this example):

```

root@computer ~ $ chown danomac /dev/hdc

```

As I am the single user of this machine, I told udev to always set the owner of cdrom devices to my username. This way I do not need to remember to manually set the ownership before using EAC and it 'just works.'

If you are interested in this solution, open up /etc/udev/rules.d/50-udev.rules and search for a line similar to the following:

```

ENV{ID_CDROM}=="?*",            SYMLINK+="cdrom%e", GROUP="cdrom"

```

and change it to:

```

ENV{ID_CDROM}=="?*",            SYMLINK+="cdrom%e", GROUP="cdrom", OWNER="danomac"

```

Replace 'danomac' with your username. If anyone knows of a better way to do this let me know.  :Razz: 

Prerequisites

These are the items you will need that are not available in portage:

EAC Installer

Download these items and save them somewhere, you will need them later on.

Installing and configuring Wine

Install Wine (build 0.9.5, masked at the time of this article's writing) using portage:

```

echo "app-emulation/wine ~x86" >> /etc/portage/package.keywords

emerge =app-emulation/wine-0.9.5

```

After it finishes compiling, switch to a normal user (if you haven't already) and run the configuration tool:

```

winecfg

```

There are a few items that need to be changed (Disk drives, general configuration and DLL Overrides.)

Applications tab

Under application settings choose a Windows version to emulate. I used Windows XP, although I don't think this selection is that important.

Libraries tab

Nothing needs to be set in this tab.

Drives tab

Add a new drive letter D:, set it to type CDROM and change the path to the cdrom drive. (/mnt/cdrom in my case.)

If you do not change the drive type, wine will likely hang trying to start EAC. If you don't see the Type dropdown, click the Show Advanced tab.

Audio tab

Choose the right audio driver to use.

When finished, click the Apply button then the OK button.

The rest of this guide will assume you have Wine working.

Configuring the kernel and bootloader

You will need to build the ide-cd into the kernel if you haven't already (2.6.x kernel tree shown):

```

Device Drivers-->

    ATA/ATAPI/MFM/RLL support -->

         <*> Include IDE/ATAPI CDROM support

```

Recompile and install your new kernel image, if needed.

Preparing the bootloader

ide-cd doesn't need to be specified as a kernel parameter, skip to the next step.

Installing EAC

Switch to the directory that has the EAC installer and run it:

```

wine <installerfile>

```

NOTE: As per the Known issues section, make sure you check the permissions of the CDROM device file (in this case /dev/hdc.) The current user needs to be the owner of the device file or wine will hang!

Start EAC:

```

computer ~ # wine EAC.exe

```

Cancel any wizard screen that pops up. Go to EAC Options->Interface tab and check Native Win32 interface for Win NT/2000/XP. Exit EAC, check to make sure the current user is the owner of the CDROM device file (in this example, /dev/hdc) and restart EAC.

EAC should load, detecting your CDROM drive.

Insert an audio CD and detect features like you normally would.

Note: In drive options it is important to UNCHECK Drive is capable of retrieving C2 error information! I've read reports elsewhere that this can cause problems, not only on Wine but in Windows as well.

Note 2: You can set up EAC to encode to the format of your choice. Find the windows binaries of the encoders and drop them in the Wine windows directory, then configure EAC like you normally would.

Using EAC

NOTE: As per the Known issues section, make sure you check the permissions of the CDROM device file (in this case /dev/hdc.) The current user needs to be the owner of the device file or wine will hang!

Start EAC: (it no longer requires an audio CD to be in the drive)

```

wine EAC.exe

```

Troubleshooting

Problem: EAC doesn't detect my CD[/DVD] drive!

Possible solution(s): 1. Check the ownership of the CDROM device file. 2. Make sure Native Win32 interface for Win NT/2000/XP is checked under EAC Options->Interface tab, then restart EAC.

Problem:EAC hangs with 'MM' in the titlebar.

Possible solution(s): 1. The current user doesn't have ownership rights to the CDROM device file.

Closing thoughts

I have tried these steps on two PCs and they both run EAC well.

Hopefully someone will find these [new] steps useful.Last edited by danomac on Thu Jan 12, 2006 6:54 am; edited 11 times in total

----------

## danomac

<<This is the original ide-scsi post>>

Howto: Using EAC (Exact Audio Copy) on Wine

For those that don't know, Exact Audio Copy is a Windows cd ripping tool. So far I haven't found an equivalent for EAC on linux. From what I've read, cdparanoia messes up on drives that do audio caching. If you have damaged CDs cdparanoia may not be able to rip them properly.

I happen to have a lot of damaged CDs (tip: don't loan them to friends...) so I set out to make it work. I've searched the forums and while EAC is mentioned in some threads there isn't one that simply says "Here is how to get it to work." Hopefully this thread fixes that problem.

Note: This guide assumes that you do not have a Windows partition at all and Wine is working standalone.

Known Issues / Notes

EAC may not work with ide-cd. I have tried repeatedly to get EAC to work with ide-cd on Gentoo, and so far have had no success. Going to EAC->EAC Options->Interface tab and choosing Native Win32 interface for Win NT/2000/XP with ide-cd causes EAC to lock up for me on Wine versions 0.9.2, 20050830 and 20050930. This bug however may not appear on different distributions.

At the time of this writing, EAC on gentoo requires the native wnaspi32.dll, which needs ide-scsi emulation for it to work. 

WARNING: USING ide-scsi WITH YOUR BURNER MAY MAKE IT UNABLE TO BURN DISCS.

growisofs may not like running in scsi emulation mode, and you may wind up with coasters while burning discs. I only have one optical drive and have set up another entry in my bootloader to enable the emulation that EAC requires. If you only have one optical drive I strongly suggest you do the same. Of course, if you have a CD reader as well as a burner, ide-scsi can be set to use only the reader and not affect the writer at all. 

References: kernel.org.

Prerequisites

These are the items you will need that are not available in portage:

wnaspi32.dll

EAC Installer

Download these items and save them somewhere, you will need them later on.

Installing and configuring Wine

Install Wine (build 20050830, masked at the time of this article's writing) and its installer using portage:

```

echo "app-emulation/wine ~x86" >> /etc/portage/package.keywords

emerge wine

```

After it finishes compiling, switch to a normal user (if you haven't already) and run the configuration tool:

```

winecfg

```

There are a few items that need to be changed (Disk drives, general configuration and DLL Overrides.)

Applications tab

Under application settings choose a Windows version to emulate. I used Windows XP, although I don't think this selection is that important.

Libraries tab

Add wnaspi32.dll to the list. When done, you should see wnaspi32.dll (native, builtin) in the list.

NOTE: Don't forget to copy wnaspi32.dll into your ~/.wine/drive_c/windows/system32 directory!!

Drives tab

Add a new drive letter D:, set it to type CDROM and change the path to the cdrom drive. (/mnt/cdrom in my case.)

Audio tab

Choose the right audio driver to use.

When finished, click the Apply button then the OK button.

The rest of this guide will assume you have Wine working.

Configuring the kernel and bootloader

You will need to build SCSI support and ide-scsi emulation into the kernel if you haven't already (2.6.x kernel tree shown):

```

Device Drivers-->

    SCSI device Support -->

        [*] legacy /proc/scsi/ support

        [*] SCSI CDROM support

        [*] SCSI generic support

    ATA/ATAPI/MFM/RLL support -->

        [*] SCSI emulation support

```

Recompile and install your new kernel image.

Preparing the bootloader

This assumes you are using grub as the bootloader.

Note: As per the Known Issues category above, it is strongly recommended you set up a new entry and boot to it when needed if you only have one optical drive installed in your system.

First, locate your cdrom drive:

```

dmesg | grep ^hd[a-h]:

```

This should give output similar to:

```

hda: ST3120026A, ATA DISK drive

hdb: ST3200822A, ATA DISK drive

hdc: _NEC DVD_RW ND-3500AG, ATAPI CD/DVD-ROM drive

hdd: Maxtor 6Y120P0, ATA DISK drive

hda: max request size: 1024KiB

hda: Host Protected Area detected.

hda: Host Protected Area disabled.

hda: 234441648 sectors (120034 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(100)

hda: cache flushes supported

hdb: max request size: 1024KiB

hdb: 390721968 sectors (200049 MB) w/8192KiB Cache, CHS=24321/255/63, UDMA(100)

hdb: cache flushes supported

hdd: max request size: 128KiB

hdd: 240121728 sectors (122942 MB) w/7936KiB Cache, CHS=65535/16/63, UDMA(133)

hdd: cache flushes supported

hdc: ATAPI 32X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33)

```

In this case the cdrom is /dev/hdc. You will need to know this for editing the grub.conf file below.

Mount your /boot partition if necessary and load grub.conf. This is a sample entry:

```

title Gentoo/2.6.12-r10 (EAC)

root (hd0,0)

kernel /kernel-2.6.12-gentoo-r10 root=/dev/hda3 hdc=ide-scsi

```

Note the hdc=ide-scsi parameter on the kernel line, as it is required! You will need to change this to whatever your cdrom drive is. If you have more than one optical drive only one needs to be specified for EAC to work. In that case, use the non-burning equipped drive.

Don't forget to unmount your /boot partition when done.

Installing EAC

Don't forget to reboot into ide-scsi mode if you haven't already! To check if the driver is loaded use:

```

dmesg | grep ide-scsi

```

and make sure you have output similar to:

```

Kernel command line: root=/dev/hda3 hdc=ide-scsi

ide_setup: hdc=ide-scsi

ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device

```

Switch to the directory that has the EAC installer and run it:

```

wine <installerfile>

```

Once EAC is installed insert an audio CD and start EAC with:

```

wine EAC.exe

```

and go and detect drive features as you normally would.

Note: In drive options it is important to UNCHECK Drive is capable of retrieving C2 error information! I've read reports elsewhere that this can cause problems, not only on Wine but in Windows as well.

Note 2: You can set up EAC to encode to the format of your choice. Find the windows binaries of the encoders and drop them in the Wine windows directory, then configure EAC like you normally would.

Using EAC

Don't forget to reboot into ide-scsi mode if you haven't already!

Note: You always have to insert a CD before starting EAC!

Insert an audio cd in your drive and start EAC:

```

wine EAC.exe

```

Troubleshooting

Problem: EAC doesn't detect my CD[/DVD] drive!

Possible solution(s): 1. There isn't an audio CD in the drive; 2. wnaspi32.dll isn't loading; 3. kernel isn't using ide-scsi.

Closing thoughts

I have tried these steps on two PCs and they both run EAC well. The other program which I set up for tagging/converting is foobar, but I won't bother with that here. This information was originally posted here.

Hopefully someone will find these steps useful.Last edited by danomac on Thu Jan 12, 2006 2:04 am; edited 1 time in total

----------

## Jon Beilin

thanks for the tip!

----------

## Greven

I would love for you to post this on Wine-Wiki.org. We are always looking for new HOWTOs, and you help would be more then welcomed!

----------

## micmac

I know using EAC in Wine sounds charming. And it really is good for CD ripping. But there's a downside.

It pops up (or it can pop up) when you're using your burner to rip. Because there's a possibility you won't be able to burn anymore because the ide-scsi system is just a left-over -> http://bugzilla.kernel.org/show_bug.cgi?id=5290

Fixing cdparanoia'd be a good idea I think  :Smile: 

----------

## danomac

 *micmac wrote:*   

> I know using EAC in Wine sounds charming. And it really is good for CD ripping. But there's a downside.
> 
> It pops up (or it can pop up) when you're using your burner to rip. Because there's a possibility you won't be able to burn anymore because the ide-scsi system is just a left-over -> http://bugzilla.kernel.org/show_bug.cgi?id=5290
> 
> Fixing cdparanoia'd be a good idea I think 

 

I did mention this in the Known Issues section of the first revision of this article. I actually dual boot into ide-scsi as I don't have any version of Windows installed on my PCs.

 *EAC Howto wrote:*   

> 
> 
> EAC requires the native wnaspi32.dll, which needs ide-scsi emulation for it to work. While this isn't a huge problem to correct, growisofs may not like running in scsi emulation mode, and you may wind up with coasters while burning discs. I have set up another entry in my bootloader to enable the emulation that EAC requires and boot into it when I rip CDs. I strongly suggest you do the same. 
> 
> 

 

 :Wink: 

----------

## danomac

 *Greven wrote:*   

> I would love for you to post this on Wine-Wiki.org. We are always looking for new HOWTOs, and you help would be more then welcomed!

 

I looked on wine-wiki, but it is already in the applications database. Maybe I should sign up to be a maintainer.

----------

## danomac

I have clarified the ide-scsi issue in the Known Issues/Notes section. I'm still going to try to get it to work with ide-cd though.

----------

## thoffmeyer

great howto

----------

## danomac

I have now gotten ide-cd working with EAC on my laptop. A few more steps involved, and I need to test this on one of my other PCs before rewriting the howto. Bye-bye ide-scsi!

----------

## danomac

Updated the HOWTO with ide-cd instructions. The original ide-scsi instructions are now in the second post.

----------

## smelialichu

Has anyone else found that EAC will freeze up unless a CD is mounted when it's opened? This means I have to mount a data cd, open EAC, eject it and then swap to an audio CD. Is there a way around this? It's only minor of course. Thanks for the great guide.

----------

## danomac

 *smelialichu wrote:*   

> Has anyone else found that EAC will freeze up unless a CD is mounted when it's opened? This means I have to mount a data cd, open EAC, eject it and then swap to an audio CD. Is there a way around this? It's only minor of course. Thanks for the great guide.

 

Are you using ide-cd to run EAC? If you are, you need to make sure the user running Wine is the owner of the cdrom device file (in my case /dev/hdc.) If you do this, EAC shouldn't freeze and you do not need a CD to be mounted to run EAC.

Edit: Note: This is no longer true, use the mount path (e.g. /mnt/cdrom).Last edited by danomac on Mon May 01, 2006 4:13 pm; edited 1 time in total

----------

## GetCool

Nice Howto.  As a long-time EAC user, I can scratch off one more reason to keep Windows on my hard drive.

I have some feedback and additional tips:

I had no issues getting EAC to detect my drive, without making myself the owner of /dev/hda (my DVD-ROM drive); and I'm not using ide-scsi.  I simply made myself a member of the cdrom group and it worked.  I know that doesn't help, but I thought I'd share my experience.

About your tip regarding disabling the C2 error retrieval option... this is a good idea to ensure an accurate rip, but it may only slow down your ripping process unnecessarily.  If you have a drive that is actually capable of C2 error retrieval (and almost all modern drives are), then it is recommended to enable this option for a faster rip (without sacrificing accuracy).  Do some research on your drive, or purchase a new drive if you're serious about ripping audio, and determine its capabilities.  The CD Freaks forums are an excellent resource for information on optical drives and everything related to optical media.

Also, I've found that EAC's drive feature autodetect function works quite well.  Insert an audio CD and click on "Detect Read Features" in the "Drive Options" screen.

If you're going to be using EAC for serious ripping and want results as accurate as possible, check out this excellent EAC tutorial, which explains in great detail every option of the program and all the recommended settings.

You will also want to find the read offset for your drive (if you're curious, read the "Truth about Offsets" section of the tutorial I linked above for an explanation of what drive offsets are).  One place to find your drive's offset value is the drive offset database at accuraterip.com, or you can search the CD Freaks forums.  This offset value goes into the "Use read sample offset correction" field under the "Offset/Speed" tab of EAC's "Drive Options" screen.  The tutorial explains all of this as well.

I've used EAC to rip hundreds of CDs using many different optical drives, and with proper configuration, it's never failed me.  But, of course, we're running it on Linux now, so our results may be different.  I'll do some more extensive testing and report my results.

----------

## danomac

 *GetCool wrote:*   

> Nice Howto.  As a long-time EAC user, I can scratch off one more reason to keep Windows on my hard drive.

 

That's why I wasted a lot of time trying to get it to work.  :Smile: 

I've already ripped over 200 CDs with EAC and Wine and haven't had any problems. In some cases (on scratched CDs) Wine is noticeably slower than actually running it on Windows. That's about the only thing I've noticed.

----------

## darkless

A few changes for people using an external ripper via USB 2.0 or Firewire:

First, make sure to make an entry in your /etc/fstab file like this:

```
/dev/cdrom1             /mnt/cdrom1     iso9660         noauto,ro,user  0 0
```

where /dev/cdrom1 points to your SCSI emulated CDROM drive device (mine is /dev/sr0). Make sure that you choose the right mount directory in your winecfg (the one referenced in /etc/fstab) and create it if it doesn't already exist.

Second, don't use the wnaspi32.dll and make sure to select EAC->EAC Options->Interface tab and choose Native Win32 interface for Win NT/2000/XP. Otherwise EAC will either fail to detect your drive or it will detect the drive but fail to rip any audio from it, freezing in the process.

That's it for now   :Smile: 

----------

## micmac

Hi,

I had trouble before. EAC would start and freeze at once. I tried to do some magic here and there but it didn't work. I eventually fixed it by changing the perms on the mount point (Gentoo defaults to 700, Ubuntu to 644 for instance), doh!

My drive is /dev/hdc mounted at /mnt/dvd, and I'm not kidding.

```

ls -lh /dev/hdd

brw-rw---- 1 root cdrom 22, 64 15. Apr 19:06 /dev/hdd

ls -lh /mnt/ | grep dvd

drwxrwxrwx 2 root root 4,0K 15. Mär 23:00 dvd

```

Cheers

mic

Edit: 755 is fine, too.

----------

## GetCool

Just another little tip, in case anyone else has this problem...

I was setting up Wine-EAC once again after reinstalling Gentoo, but this time I couldn't for the life of me get EAC to start without freezing.  It would hang and require me to kill the wine processes manually.

It turns out that I had to use the mount point path in winecfg when setting up my CD-ROM drive under the "Drives" tab, not the device path.  As in drive D: had to point to /mnt/cdrom, not /dev/hda (or EAC would freeze).

Doesn't make any sense, but that's the way it works on my system.

----------

## danomac

I've edited that post, the newer versions of Wine don't have that problem - it was also related to udev and permissions. The original howto's already had instructions to use the mountpoint and not the device file.

----------

## GetCool

 *danomac wrote:*   

> I've edited that post, the newer versions of Wine don't have that problem

 

That hasn't been my experience, at least on amd64.  Every version of Wine I tried had the issue.  But anyway...

 *Quote:*   

> The original howto's already had instructions to use the mountpoint and not the device file.

 

Yes, you're right, there's nothing that should be changed in the howto.  I just made that post for the record.

----------

## danomac

I use a plain old AMD Athlon XP3200+, so I haven't had the pleasure of messing around with Wine on amd64. That's likely to be my next PC build though.   :Smile: 

Edit: GetCool, did you try changing the permissions on the wine binary itself? (ie make it member of group cdrom.) I don't know if that'll work, but it just popped into my head just now.

----------

## GetCool

 *danomac wrote:*   

> GetCool, did you try changing the permissions on the wine binary itself? (ie make it member of group cdrom.) I don't know if that'll work, but it just popped into my head just now.

 

No, but since it works using the mount point I think I'll leave it at that for now.  When I use the device file EAC locks and Wine refuses to be killed, so I have to actually zap and restart Xorg.

I've just always been in the habit of giving apps the device file path, for example when I use cdrecord.  Oh well.  Maybe when cdparanoia starts working reliably with audio-caching drives, we won't have to run EAC through Wine anymore.

----------

## micmac

I still don't see why you guys have to chown the device to your user. It's working here without, just had to change gentoo's default mount dir perms (700) to 755. Could this be a PAM issue? Are you using it?

```

sk@section_eight ~ $ ls -lh /mnt/|grep dvd

drwxr-xr-x 2 root root 4,0K 15. Mär 23:00 dvd

drwxr-xr-x 2 root root 4,0K 15. Mär 23:00 dvdrw

sk@section_eight ~ $ ls -lh /dev/hd{c,d}

brw-rw---- 1 root cdrom 22,  0  5. Mai 10:54 /dev/hdc

brw-rw---- 1 root cdrom 22, 64  5. Mai 10:54 /dev/hdd

sk@section_eight ~ $ cat /etc/fstab | grep hdc

/dev/hdc  /mnt/dvdrw   iso9660 noauto,users,ro      0 0

sk@section_eight ~ $ cat /etc/fstab | grep hdd

/dev/hdd  /mnt/dvd     iso9660 noauto,users,ro      0 0

```

mic

----------

## GetCool

 *micmac wrote:*   

> I still don't see why you guys have to chown the device to your user.

 

I don't; it always worked for me without having to do that.  But I'm on amd64, so I have no idea if it's different at all from x86.

----------

## danomac

When I first tried to get it working, changing the owner/permissions on the device file was the only way to get it working without hanging at startup. All I did was copy the suse/fedora/kubuntu perms.

I've updated the system now (twice probably) and haven't tried it with the default settings. It works, and I left it as is.  :Wink: 

Where do you change the mountpoint permissions from 700 to 755?

----------

## Doogman

Nice guide!

You can't use Win98 in winecfg, however,  as you won't be able to select <i>Native Win32 interface for Win NT/2000/XP</i>.  Seems obvious, but I had the wrong box checked the first time I tried the program.

----------

## Burgin

I didn't have to anything special to get it to run lame as long as the path specified in the Compression options was a valid path for a window version of the lame.exe.

Does anybody known how to make EAC run the linux native binary of the lame binary or would it even make a difference?

----------

## danomac

Only the windows binaries will work with EAC... you'd have to use something linux-native to use the native lame binary.

Edit: Corrected a *really* stupid typo.Last edited by danomac on Wed Sep 06, 2006 11:29 pm; edited 1 time in total

----------

## GetCool

 *danomac wrote:*   

> Only the windows binaries will work with EAC... you'd have to use something linux-native to use the native lame.exe binary.

 

Right.  But this shouldn't even matter; I doubt there would be a noticeable difference in performance betwee the Linux and Windows binaries.

----------

## Burgin

After about 5 minutes after my post, I realized that EAC probably uses the WinExec() API to launch the external compression programs.  It probably expects the a win32 binary as its argument.  I guess the wine developers decided to not to make it handle other binary typesl

----------

## Darknight

Just a quick reminder.

I use the windows native support in eac, so I have to mount a data cd and so on. It is mandatory (for me?) to enable the hal use flag when merging wine to be able to swap cds.

Without hal the cd tray stays locked and cds can't be swapped.

----------

## danomac

 *Darknight wrote:*   

> Just a quick reminder.
> 
> I use the windows native support in eac, so I have to mount a data cd and so on. It is mandatory (for me?) to enable the hal use flag when merging wine to be able to swap cds.
> 
> Without hal the cd tray stays locked and cds can't be swapped.

 

Strange, I don't see the hal flag being used for wine at all:

```

okibi danomac # emerge -pv wine

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] app-emulation/wine-0.9.8-r1  USE="X alsa arts cups esd gif jpeg ncurses opengl oss scanner* truetype xml -debug -glut -jack -lcms -ldap -nas" 0 kB

```

----------

## Darknight

I use the ~amd64 version, it's a lot newer so the ebuild may have been modified.

Actually, I added the use flag yesterday when, trying to rip a cd, I was baffled by the eject problem. It proved to be the much needed solution.  :Smile: 

----------

## Darknight

I have to make a change to what I wrote above.

It turns out that I'm dumb  :Laughing: 

Actually the key point is that I have to run wine as user and mount/unmount/eject as root... At least this is what is needed tonight, I hope it's always been like this but I didn't notice. All in all, the use flag may or may not be related.

----------

## yngwin

There actually is a program that does EAC natively on Linux. It's called Rubyripper. You can get an ebuild for 0.2 (the latest version atm) from my overlay: http://berkano.net/files/gentoo/berkano-overlay.tbz2

Edit: actually, I just opened a bug for it: https://bugs.gentoo.org/show_bug.cgi?id=146738

----------

## danomac

 *yngwin wrote:*   

> There actually is a program that does EAC natively on Linux. It's called Rubyripper. You can get an ebuild for 0.2 (the latest version atm) from my overlay: http://berkano.net/files/gentoo/berkano-overlay.tbz2
> 
> Edit: actually, I just opened a bug for it: https://bugs.gentoo.org/show_bug.cgi?id=146738

 

Part of the reason people are using EAC over Wine is cdparanoia's inability to deal with caching drives:

 *Rubyripper wiki wrote:*   

> 
> 
> What is Rubyripper? Rubyripper is a digital audio extraction algorithm that uses cdparanoia or cdda2wav in a sophisticated way to make sure that a CD rip is done succesfully and accurately. It is very similiar to and inspired by EAC. Rubyripper is written in the ruby programming language.

 

Not sure how cdda2wav works (is it reliant on cdparanoia?)

Otherwise, it looks like an interesting project!

----------

## GetCool

 *Darknight wrote:*   

> Actually the key point is that I have to run wine as user and mount/unmount/eject as root... At least this is what is needed tonight, I hope it's always been like this but I didn't notice. All in all, the use flag may or may not be related.

 

You shouldn't have to (un)mount your CD device as root while running Wine.  I've never had to do this.

Verify that your CD device entry in your fstab has the user option, and that the CD drive in winecfg is set up with the mount point as the path (not the device path).  In my experience, this is all that is needed to get everything working under Wine.

Also, I don't think the hal USE flag is necessary, as I run EAC under Wine on ~amd64 without HAL installed.

----------

## TeknoHog

 *danomac wrote:*   

> 
> 
> Where do you change the mountpoint permissions from 700 to 755?

 

```

# chmod 755 /mnt/cdrom

```

I think the default of 700 is there so that you can't see the directory contents unless the drive is mounted. With 755 you can see the empty mountpoint, which is apparently Wine's way of finding the actual device. This is why some people needed to mount a data CD to get it working  :Smile: 

By the way, if you want to experiment  with ide-scsi emulation, there's no need to reboot, you can simply use modules. I once wrote a script to do it while experimenting with cdparanoia, though I've since found it unnecessary.

```

#!/bin/bash

# Tool for switching between direct ATAPI and SCSI emulation

# interfaces for the cdrom drive

# Why do this: Some software work better with SCSI (cdparanoia) and

# some with IDE (xmms-cdaudio). Most software don't care though, and

# the emulation overhead is unnoticeable in my experience.

# by TeknoHog

# modprobe order -- reverse for rmmod

IDE_MODS="ide_cd"

IDE_MODS_REV="ide_cd"

SCSI_MODS="ide_scsi sr_mod sg"

SCSI_MODS_REV="sg sr_mod ide_scsi"

function ide2scsi() {

         for MOD in $IDE_MODS_REV; do

         rmmod $MOD || exit

         done

         for MOD in $SCSI_MODS; do

         modprobe $MOD || exit

         done

}

function scsi2ide() {

         for MOD in $SCSI_MODS_REV; do

         rmmod $MOD || exit

         done

         for MOD in $IDE_MODS; do

         modprobe $MOD || exit

         done

}

case "$1" in

    i)

    scsi2ide

    ;;

    s)

    ide2scsi

    ;;

    *)

    ls -l /dev/cdrom

    ;;

esac

```

----------

## predatorfreak

 *danomac wrote:*   

>  *yngwin wrote:*   There actually is a program that does EAC natively on Linux. It's called Rubyripper. You can get an ebuild for 0.2 (the latest version atm) from my overlay: http://berkano.net/files/gentoo/berkano-overlay.tbz2
> 
> Edit: actually, I just opened a bug for it: https://bugs.gentoo.org/show_bug.cgi?id=146738 
> 
> Part of the reason people are using EAC over Wine is cdparanoia's inability to deal with caching drives:
> ...

 

Cdparanoia was written before FUA bits even existed, which are what EAC uses to deal with caching drives. Cdparanoia uses another method to defeat caching drives, increasing the readahead value significantly to exhaust the cache before you actually read a sector. Supposedly, this is more effective in the real world, but the default value is only for 1MB drives, which isn't useful in the modern world.

Here's a little patch that increases the default value to deal with 8MB drives:

```
diff -Nurp cdparanoia-III-10pre0/paranoia/p_block.c cdparanoia-III-10pre0-larger-readahead/paranoia/p_block.c

--- cdparanoia-III-10pre0/paranoia/p_block.c   2000-04-19 18:41:04.000000000 -0400

+++ cdparanoia-III-10pre0-larger-readahead/paranoia/p_block.c   2007-05-05 08:11:48.000000000 -0400

@@ -310,7 +310,7 @@ cdrom_paranoia *paranoia_init(cdrom_driv

   p->fragments=new_list((void *)&i_vfragment_constructor,

          (void *)&i_v_fragment_destructor);

 

-  p->readahead=150;

+  p->readahead=1200;

   p->sortcache=sort_alloc(p->readahead*CD_FRAMEWORDS);

   p->d=d;

   p->dynoverlap=MAX_SECTOR_OVERLAP*CD_FRAMEWORDS;

```

Also, cdda2wav was the predecessor to cdparanoia, only it did absolutely no error correction. It's great for speed, but horrible for accuracy.

Edit: I'm not entirely sure if this will actually work or not.

----------

## Small_Penguin

 *Quote:*   

> Edit: I'm not entirely sure if this will actually work or not.

 

I guess it won't matter because rubyripper reads each track twice completely (or more, depending on how often you tell it to do it) and compares the two copies. There are docs about this on the rubyripper web page.

 *Quote:*   

> Cdparanoia was written before FUA bits even existed, which are what EAC uses to deal with caching drives.

 

EAC does not use FUA bits if not started with an appropriate command-line option (don't know about the newest version though). FUA bits don't work for all drives. It used to do what you wrote about cdparanoia (using bigger read chunks than fitted the cache) or a similar technique to avoid the drive's cache. That's why ripping is slower when you activate the 'drive does caching' option.

And using c2 error correction is not good at all if your drive doesn't correctly report c2 errors. The drive will just claim everything's ok and errors go by undetected.

Rubyripper is really good actually and supports read offsets. Its ripping process will be much more configurable than eac's too. The only thing I'm missing in linux is support for write offsets. cdrdao can read the toc like eac, but does not seem to have an option for write offsets.

http://www.digital-inn.de/exact-audio-copy-english/31773-plextor-rw-drive-usefua-testing-thread.html

----------

## predatorfreak

 *Small_Penguin wrote:*   

>  *Quote:*   Edit: I'm not entirely sure if this will actually work or not. 
> 
> I guess it won't matter because rubyripper reads each track twice completely (or more, depending on how often you tell it to do it) and compares the two copies. There are docs about this on the rubyripper web page.

 

If the data is cached though, that reread could possibly reproduce the exact same file when that file is STILL wrong.

----------

## Small_Penguin

 *Quote:*   

> If the data is cached though, that reread could possibly reproduce the exact same file when that file is STILL wrong.

 

1) The drive can't cache a complete track because it doesn't fit in the cache.

2) Since audio cds don't have error correction (at least not like data), you can't be 100% sure everything is read correctly. In practice, reading in burst mode twice is pretty safe, though.

3) Rubyripper provides an option to set the number of reads required to be identical. EAC only reads twice (or even only once when c2 feature is used) until an error occurs. I don't know if Rubyripper uses c2 by default (you can change the command line parameters), but if it does, then the data could be incorrect twice because the drive reports the same incorrect c2 value (I had that problem with EAC though it should not happen very often - it depends on the implementation of your drive's error detection capabilities).

I still use EAC for copying because I have used it for a long time and I find it convenient and it works as expected. Rubyripper misses the burning counterpart but is great for ripping.

----------

## iamben

wow, old thread.  anyway, anyone else having issues w/ EAC freezing up when attempting to access freedb?  wine 0.9.40 here.

i tried downgrading to 0.9.33 as i saw someone somewhere suggest, it doesnt freeze up anymore but has a "server error" when attempting to access freedb.

ideas?

----------

## Darknight

There's a huge thread on the eac forum, it's an "official" bug.

Unfortunately attempts to solve it give mixed results, hopefully the upcoming new release will fix the bug...

----------

## Burgin

Does anyone know a workaround with the freedb problem other than manually keying in each track?  Like maybe downloading the file directly from freedb and then importing it somehow?

----------

## polis

As far as I know EAC still doesn't work without mounting data CD or changing dev file privs. Second solution is unacceptable for me. However i found out other solution. For EAC it doesn't matter if there's real mounted CD or any other kind of mount (but bind doesn't work). So we can mount for example any iso file and device should be discovered.

I created a small script. I must warn you that it's probably very dirty. If someone could check and fix it, it would be nice.

```

#!/usr/bin/python                                                                                                                                                                                                   

import os, sys, string

winedevs = os.environ.get("HOME") + "/.wine/dosdevices"

eac_exe = os.environ.get("HOME") + "/windows/programs/eac/EAC.exe"

eacHome = os.environ.get("HOME")+"/.eac"

def makeIso():

    if os.path.exists( eacHome + "/empty_dir"):

        os.removedirs( eacHome + "/empty_dir")

    os.makedirs( eacHome + "/empty_dir")

    os.system("mkisofs -R -o " + eacHome + "/dummy.iso " + eacHome + "/empty_dir")

def removeIso():

    os.remove( eacHome + "/dummy.iso")

    os.removedirs( eacHome + "/empty_dir")

def setDevice(devicePath, deviceLetter):

    mountPoint =  eacHome + "/" + devicePath.replace("/", "_")

    if not os.path.exists(mountPoint):

        print "Creating fake mount point"

        os.makedirs(mountPoint)

    if os.path.exists(winedevs + "/" + deviceLetter + ":"):

        os.remove(winedevs + "/" + deviceLetter + ":")

    if os.path.exists(winedevs + "/" + deviceLetter + "::"):

        os.remove(winedevs + "/" + deviceLetter + "::")

    print "Creating device mount point link"

    os.symlink(mountPoint, winedevs + "/" +  deviceLetter + ":")

    print "Creating device file link"

    os.symlink(devicePath, winedevs + "/" + deviceLetter + "::")

    print "Mounting fake iso"

    os.system("sudo mount -o loop " + eacHome + "/dummy.iso "+ mountPoint + "/")

def unsetDevice(devicePath, deviceLetter):

    mountPoint =  eacHome + "/" + devicePath.replace("/", "_")

    print "Umounting fake iso"

    os.system ("umount " + mountPoint)

if not os.path.exists(eacHome):

    print "Creating $HOME/.eac folder"

    os.makedirs(eacHome)

makeIso()

setDevice("/dev/hdc", "f")

setDevice("/dev/hdd", "g")

print "Running eac: " + eac_exe

os.system ("wine " + eac_exe)

unsetDevice("/dev/hdc")

unsetDevice("/dev/hdd")

removeIso()

```

These are lines you need to change:

eac_exe = os.environ.get("HOME") + "/windows/programs/eac/EAC.exe"

...

setDevice("/dev/hdc", "f")

setDevice("/dev/hdd", "g")

print "Running eac: " + eac_exe

os.system ("wine " + eac_exe)

unsetDevice("/dev/hdc")

unsetDevice("/dev/hdd")

It should be obvious what does they mean.

----------

