# DVD - CD-RW Drive problems with CD-audio

## zuiko

I have recently setup my Sony Vaio Laptop that has a combo CD-RW/DVD drive: [/b]Sony CRX 820E with Gentoo Linux 1.4 to load with the ide-scsi.o module so that I can burn CD's with it. This works like a charm and is described fully in other posts (by kerframil).

However I was disappointed to find that I am unable to get any audio from the CD-RW/DVD drive. Programs are able to find the drive and it starts up normally when I place an audio CD into the drive. However no sound is available.

I have setup ALSA and all other applications are able to produce sound. I have set the ALSA mixer so that CD volume is maximal and unmuted.

This is my lsmod output:

Module                  Size  Used by    Not tainted

snd-pcm-oss            40292   0  (autoclean)

snd-mixer-oss          13880   0  (autoclean) [snd-pcm-oss]

sr_mod                 14456   2  (autoclean)

ide-scsi                9552   1

ide-cd                 32184   0  (autoclean)

cdrom                  29664   0  (autoclean) [sr_mod ide-cd]

radeon                109156  14

snd-intel8x0           20260   0

snd-pcm                65504   0  [snd-pcm-oss snd-intel8x0]

snd-timer              16392   0  [snd-pcm]

snd-ac97-codec         38144   0  [snd-intel8x0]

snd-page-alloc          5040   0  [snd-intel8x0 snd-pcm]

snd-mpu401-uart         4016   0  [snd-intel8x0]

snd-rawmidi            14560   0  [snd-mpu401-uart]

snd-seq-device          4340   0  [snd-rawmidi]

snd                    32676   0  [snd-pcm-oss snd-mixer-oss snd-intel8x0 snd-pcm snd-timer snd-ac97-codec snd-mpu401-uart snd-rawmidi snd-seq-device]

soundcore               4132   3  [snd]

usb-storage            24504   0  (unused)

usbmouse                2300   0  (unused)

usbcore                66528   0  [usb-storage usbmouse]

button                  2732   0  (unused)

ac                      2176   0  (unused)

battery                 6752   0  (unused)

fan                     1984   0  (unused)

thermal                 8064   0  (unused)

processor              10284   0  [thermal]

sonypi                  9320   0

usb-uhci               25548   0  (unused)

hid                    14152   0  (unused)

e100                   60948   1

This is what cdrecord -scanbus outputs:

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

Linux sg driver version: 3.1.24

Using libscg version 'schily-0.7'

scsibus0:

        0,0,0     0) 'SONY    ' 'CD-RW  CRX820E  ' '1.5k' Removable CD-ROM

        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) *

Is there a problem I am not aware of with setting up the CD-RW/DVD drive with ide-scsi that makes me unable to output sound from CD audio?

Any help appreciated. Any other info needed can be provided.. I didn't want to flood the post with unnecessary info.

Thanks in advance.[/b]

----------

## cyrillic

What software are you using to play the CD ?

```
# cdda2wav -D0,0,0 -e -N -B
```

This should work even if you don't have an audio cable connected.

----------

## zuiko

Yes it indeed works after I changed the permissions of:

/dev/scsi/host0/bus0/target0/lun0/generic

$ cdda2wav -D0,0,0 -e -N -B

Type: ROM, Vendor 'SONY    ' Model 'CD-RW  CRX820E  ' Revision '1.5k' MMC+CDDA

724992 bytes buffer memory requested, 4 buffers, 75 sectors

Read TOC CD Text failed (probably not supported).

#Cdda2wav version 2.01a05_linux_2.4.20-xfs-r3_i686_mobile-intel-r--pentium-r--4---m-cpu-2.00ghz, real time sched., soundcard, libparanoia support

==============

I'm trying to use kscd and gnome-cd to play and all they produce is silence with the drive mechanism working.

Any other things I can do to make the other programs work?

----------

## zuiko

I've found a way to play my audio cd's and hope it will help other people with the same problem as I had. I couldn't find any way to make kscd or gnome-cd work but the command given above by cyrillic and any of its variations ie.

cdda2wav -D /dev/cdrom -t <track no> -eN

works from the command line.

If you want an easier way to do this then there is a fantastic (masked) ebuild plugin to XMMS called:

xmms-cdread-0.14a

in the media-plugins area of your /usr/portage dir.

I built this and XMMS is now my CD player... works really well! I'd still like to know if the other programs can be made to work with some simple setup but I am happy now...

All the major subsystems of the Sony Vaio PCG-GRX5P Laptop are now working with Gentoo Linux... this includes:

1. ATI Mobility Radeon 7500 display with DRI. Glxgears gives ~ 1200 - 1300 FPS.

2. Intel i810 based sound with AC97 48khz coding. ALSA is perfect.

3. USB with trackball and digital camera tested. USBcore is built in. usb-uhci.o and hid.o built as a module. Memory stick also works with USB Mass Storage.

4. IEEE1394 video works with my digital video device (kino used to test)

5. CD RW - burning with SCSI emulation is excellent.

6. Jogdial device works perfectly with the kernel driver and sjog utility.

7. Touchpad device works perfectly with gpm and with tpconfig to disable tapping gestures!

8. ACPI battery monitoring and /proc/acpi filesystem works but doesnt do much. Will wait for better support in future kernels of suspend/hibernate etc.

8. DVD - yet to test.

Gentoo has made the difference between linux being a toy and it being a working day to day system for me... I now use it as my main system and I haven't booted XP for 2 months now for any serious work  :Smile: )))))))

Thanks to all who read and responded.

----------

## Tze_Black_Wizard

Hi, I saw in your last message that you got the ATI Radeon Mobility 7500 working at 1400-1500 fps, wow!

I happen to have the same card in my laptop and the best I can get is about 32fps with glxgears full screen at 1024x768.  And if I try to use any of the GL screen-savers, well they are slow as hell!

Could you show me your XF86Config, I guess I'm missing something.

Thanks!

Tze_Black_Wizard

----------

## zuiko

Sorry if I have created glxgear envy... it took a fair bit of RTFM'ing to get those figures I have to say but here's a sample output with my Radeon Card running at 16 bpp:

bash-2.05b$ glxgears

6418 frames in 5.0 seconds = 1283.600 FPS

7636 frames in 5.0 seconds = 1527.200 FPS

7639 frames in 5.0 seconds = 1527.800 FPS

7641 frames in 5.0 seconds = 1528.200 FPS

7629 frames in 5.0 seconds = 1525.800 FPS

5661 frames in 5.0 seconds = 1132.200 FPS

7167 frames in 5.0 seconds = 1433.400 FPS

7645 frames in 5.0 seconds = 1529.000 FPS

7610 frames in 5.0 seconds = 1522.000 FPS

7523 frames in 5.0 seconds = 1504.600 FPS

7616 frames in 5.0 seconds = 1523.200 FPS

7341 frames in 5.0 seconds = 1468.200 FPS

7543 frames in 5.0 seconds = 1508.600 FPS

7608 frames in 5.0 seconds = 1521.600 FPS

7616 frames in 5.0 seconds = 1523.200 FPS

7308 frames in 5.0 seconds = 1461.600 FPS

7521 frames in 5.0 seconds = 1504.200 FPS

7339 frames in 5.0 seconds = 1467.800 FPS

At 24 bpp it is slower at ~1100-1300 frames depending on what I have loaded and how much load the machine is under.

The most important thing in getting those figures is undoubtedly configuring the kernel so that it includes DRI support as a module but not using any of the modules in the kernel source despite the fact they say Radeon drivers. After you have rebuilt your kernel type:

emerge xfree-drm

that should build the correct drivers for your card. Mine is built as radeon.o . In your /etc/modules.autoload include the line 

radeon

so that the radeon drm driver is loaded at bootup. Finally tweak your X config so that it uses the DRI system. My XF86Config-4 file follows:

#XF86Config tweaked OOC. Zuiko 2003.

Section "Files"

  FontPath     "/usr/X11R6/lib/X11/fonts/misc:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/local"

  FontPath     "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/Type1"

  FontPath     "/usr/X11R6/lib/X11/fonts/URW"

  FontPath     "/usr/X11R6/lib/X11/fonts/Speedo"

  FontPath     "/usr/X11R6/lib/X11/fonts/PEX"

  FontPath     "/usr/X11R6/lib/X11/fonts/cyrillic"

  FontPath     "/usr/X11R6/lib/X11/fonts/latin2/misc:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/latin2/75dpi:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/latin2/100dpi:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/latin2/Type1"

  FontPath     "/usr/X11R6/lib/X11/fonts/latin7/75dpi:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/baekmuk:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/japanese:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/kwintv"

  FontPath     "/usr/X11R6/lib/X11/fonts/truetype"

  FontPath     "/usr/X11R6/lib/X11/fonts/uni"

  FontPath     "/usr/X11R6/lib/X11/fonts/CID"

  FontPath     "/usr/X11R6/lib/X11/fonts/ucs/misc"

  FontPath     "/usr/X11R6/lib/X11/fonts/ucs/75dpi:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/ucs/100dpi:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/hellas/misc:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/hellas/75dpi:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/hellas/100dpi:unscaled"

  FontPath     "/usr/X11R6/lib/X11/fonts/hellas/Type1"

  FontPath     "/usr/X11R6/lib/X11/fonts/misc/sgi"

  FontPath     "/usr/X11R6/lib/X11/fonts/xtest"

  InputDevices "/dev/ttyS0"

  InputDevices "/dev/ttyS1"

  InputDevices "/dev/ttyS2"

  InputDevices "/dev/ttyS3"

  InputDevices "/dev/ttyS4"

  InputDevices "/dev/ttyS5"

  InputDevices "/dev/ttyS6"

  InputDevices "/dev/ttyS7"

  InputDevices "/dev/ttyS8"

  InputDevices "/dev/psaux"

  InputDevices "/dev/logibm"

  InputDevices "/dev/sunmouse"

  InputDevices "/dev/atibm"

  InputDevices "/dev/amigamouse"

  InputDevices "/dev/atarimouse"

  InputDevices "/dev/inportbm"

  InputDevices "/dev/gpmdata"

  InputDevices "/dev/mouse"

  InputDevices "/dev/usbmouse"

  InputDevices "/dev/adbmouse"

  InputDevices "/dev/input/mice"

  InputDevices "/dev/input/event0"

  InputDevices "/dev/pointer0"

  InputDevices "/dev/pointer1"

  InputDevices "/dev/pointer2"

  InputDevices "/dev/pointer3"

EndSection

Section "ServerFlags"

  Option       "AllowMouseOpenFail"

EndSection

Section "ServerFlags"

  Option       "AllowMouseOpenFail"

EndSection

Section "Module"

  Load         "type1"

  Load         "freetype"

  Load         "dri"

  Load         "extmod"

  Load         "glx"

  Load         "dbe"

  Load         "speedo"

  Load         "v4l"

EndSection

Section "InputDevice"

  Driver       "Keyboard"

  Identifier   "Keyboard[0]"

  Option       "MapName" "Generic keyboard [ pc101 ]"

  Option       "Protocol" "Standard"

  Option       "XkbLayout" "us"

  Option       "XkbModel" "pc101"

  Option       "XkbRules" "xfree86"

EndSection

Section "InputDevice"

  Driver       "mouse"

  Identifier   "Mouse[1]"

  Option       "Device" "/dev/psaux"

  Option       "InputFashion" "Mouse"

  Option       "Name" "PS/2-Mouse"

  Option       "Protocol" "PS/2"

  Option       "Emulate3Buttons" "on"

EndSection

Section "InputDevice"

  Driver       "mouse"

  Identifier   "Mouse[3]"

  Option       "Device" "/dev/input/mice"

  Option       "InputFashion" "Mouse"

  Option       "Name" "USB-Mouse"

  Option       "Protocol" "imps/2"

  Option       "ZAxisMapping" "4 5"

EndSection

Section "Monitor"

  Option       "CalcAlgorithm" "CheckDesktopGeometry"

  HorizSync    28-95

  Identifier   "Monitor[0]"

  ModelName    "1600X1200@75HZ"

  VendorName   "--> LCD"

  VertRefresh  55-82

  UseModes     "Modes[0]"

EndSection

Section "Modes"

  Identifier   "Modes[0]"

  Modeline      "800x600" 38.69 800 816 928 1072 600 600 605 626

  Modeline      "800x600" 44.93 800 816 928 1072 600 600 606 626

  Modeline      "800x600" 51.17 800 816 928 1072 600 600 607 626

  Modeline      "1600x1200" 154.75 1600 1616 1968 2208 1200 1200 1211 1253

  Modeline      "1600x1200" 179.71 1600 1616 1968 2208 1200 1200 1213 1253

  Modeline      "1600x1200" 204.67 1600 1616 1968 2208 1200 1200 1215 1253

  Modeline      "1280x1024" 105.64 1280 1296 1552 1736 1024 1024 1034 1070

  Modeline      "1280x1024" 122.68 1280 1296 1552 1736 1024 1024 1035 1070

  Modeline      "1280x1024" 139.72 1280 1296 1552 1736 1024 1024 1037 1070

  Modeline      "1024x768" 63.23 1024 1040 1216 1400 768 768 775 802

  Modeline      "1024x768" 73.43 1024 1040 1216 1400 768 768 776 802

  Modeline      "1024x768" 83.63 1024 1040 1216 1400 768 768 778 802

  Modeline      "800x600" 38.69 800 816 928 1072 600 600 605 626

  Modeline      "800x600" 44.93 800 816 928 1072 600 600 606 626

  Modeline      "800x600" 51.17 800 816 928 1072 600 600 607 626

  Modeline      "640x480" 24.76 640 656 720 864 480 480 484 501

  Modeline      "640x480" 28.75 640 656 720 864 480 480 485 501

  Modeline      "640x480" 32.75 640 656 720 864 480 480 486 501

  Modeline      "1600x1200" 154.75 1600 1616 1968 2208 1200 1200 1211 1253

  Modeline      "1600x1200" 179.71 1600 1616 1968 2208 1200 1200 1213 1253

  Modeline      "1600x1200" 204.67 1600 1616 1968 2208 1200 1200 1215 1253

EndSection

Section "Screen"

  DefaultDepth 24

  SubSection "Display"

    Depth      15

    Modes      "1600x1200" 

  EndSubSection

  SubSection "Display"

    Depth      16

    Modes      "1600x1200" 

  EndSubSection

  SubSection "Display"

    Depth      24

    Modes      "1600x1200" "1280x1024" "1024x768" "800x600" "640x480" 

  EndSubSection

  SubSection "Display"

    Depth      16

    Modes      "800x600" 

  EndSubSection

  SubSection "Display"

    Depth      8

    Modes      "800x600" 

  EndSubSection

  Device       "Device[0]"

  Identifier   "Screen[0]"

  Monitor      "Monitor[0]"

EndSection

Section "Device"

  BoardName    "Radeon 7500"

  Driver       "radeon"

  Identifier   "Device[0]"

  Screen       0

#  Option       "Rotate" "off"

  VendorName   "ATI"

  Option "AGPMode" "4"

  Option "AGPFastWrite" "yes"

EndSection

Section "ServerLayout"

  Identifier   "Layout[all]"

  InputDevice  "Keyboard[0]" "CoreKeyboard"

  InputDevice  "Mouse[1]" "CorePointer"

  InputDevice  "Mouse[3]" "SendCoreEvents"

  Option       "Clone" "off"

  Option       "Xinerama" "off"

  Screen       "Screen[0]"

EndSection

Section "DRI"

    Group      "video"

    Mode       0666

EndSection

That last bit is very important as it allows all users to use DRI. I hope it has helped you and let me how you get along with it.

Cheers

----------

## Tze_Black_Wizard

Well it works fine, at 1024x768 24bpp, I get about 1000-1200fps and almost 200fps full screen with glxgears and glxinfo shows that Direct Rendering is enable, wow, what a difference now!  I'll see if I can do better with more tweaks in the XF86Config file, just in case

I just have to get the acpi working now, cause it doesn't do much for now even thought it's sort of working.

Thanks for your help.  That's what I like about Gentoo, it's so customizable and whenever you're stuck, well, you're not, cause there is tons of help available.  I love Gentoo!

Tze_Black_Wizard

----------

## JWU42

followed most of the guide (some of the Font Path, Input devices skipped) but still only getting 500 or so with glxgears.

 Added "dbe" to my modules and "EnablePageFlip" "true" and added 150 - so now at 650.

Update #2: At 16bpp I can hit 1209

Dell 4150 - p4 1.8 - 256 RAM - 24bpp at 1024x768

I guess posting my XF86Config would be a good place to start ?

----------

