...making Linux just a little more fun!
By Jim Dennis, Karl-Heinz Herrmann, Breen, Chris, and... (meet the Gang) ... the Editors of Linux Gazette... and You!
From Ted Kubaska
Answered By: Thomas Adam, Jason Creighton
I'm having some difficulty getting my CD player to play through my speakers. I have a Dell Dimension 2350 running Red Hat 9. I got this Red Hat 9 by downloading the ISOs from the Red Hat site. When I bring up the saw CD player, the screen comes up, I can see the elapsed time tick by, but there is no sound coming from my speakers. I can plug into the headphone jack on the CD drive and get sound.
[Jason] The problem is probably the fact that there's actually two ways to play CDs. One way is for the software to just tell the CD drive to start playing: The sound will play in the little jack on every CD drive in existance that nobody ever uses anyway. There's also supposed to be a cable running from the CD drive to the soundcard inside a computer, which is how things work normally.
[Thomas] While this is true, this is only applicable if you're using a CD-Player that extracts sound using analog. While most do, Windows applications don't (Media-Player being an example). For the case of laptops, sound is extracted using raw audio.
[Jason] So the sound never actually gets to the software. And in this case, the sound never actually gets to the sound card because a connection is obviously missing on your laptop.
The other way to play CDs is read the CD "raw" and then just send the sound to the sound card.
Some software tries to do it one way, some the other.
Try this:
$ play -t cdr /dev/hdc
[Thomas] In more recent versions of play(1), if you're using ALSA, you must tell it so.
[Jason] where /dev/hdc is whatever your CD-ROM drive happens to be.
Thanks. Jason's explanation of the two ways to play CDs clears up a lot of confusion. I have succeeded in getting my CD to play thru my speakers (with xmms, not the CD player that comes up with RED Hat -> Sound & Video -> CD Player).
I have not yet taken the skins off of my Dell Dimension 2350 (this is not a laptop as some thought, but Dell's low end tower, a 2 GHz P4) but will do so after the mail I got. Just to check the cable people have referred to. From what I read so far I think my sound card is integrated on my motherboard and not actually a separate card. The RedHat Hardware browser says 82801DB AC'97 Audio, Mfg Intel, Driver i810_audio.
[Thomas] i810_audio is courtesy of Intel and probably at the time this was written was still quite new. It's certainly not the best soundcard out there (or should I say embedded chip) but it does the job quite well.
I issued a play -t cdr /dev/cdrom and a play -t /mnt/cdrom and got no response at all.
[Thomas] This is because "/mnt/cdrom" in this context doesn't point to anything. One does not mount audio CDs and so the actual device (/dev/cdrom) must be used.
I was pointed to an earlier TAG discussion
https://linuxgazette.net/issue80/tag/4.html
From the information there I downloaded xmms-cdread-0.14a.tar.gz from ftp://mud.stack.nl/pub/OuterSpace/willem, unzipped, untarred, built and installed. I am now listening to CD output thru my speakers!
[Thomas] This method is still using audio-extraction which often makes the CD-ROM drive spin around very fast. This can be quite noisy, especially on laptops.
All is not perfect, however. If I put in a new CD, the default CD player starts up automatically. This player does not work and never has. I have clicked on preferences for this player (the knife and fork icon) in an attempt to not have it load automatically. I specified no action on CD
[Thomas] You don't say what window/desktop manager you're using, but if I recall correctly. RH9 uses GNOME as the default desktop manager. It's possible that the settings were/are not saved until you logged out...
load; but it still comes up and tries to play when I load a new CD. I see the elapsed time tick by and get no sound thru the speakers. I have to kill this player and bring up xmms, click on play, and then all is well.
[Thomas] This comes back to what Jason and I said earlier about how audio is extracted. Since XMMS defaults to using Raw audio, and other players use analog, without the use of such a cable, you just won't hear any sound.