How to use a Linux box as CD player
This might sound like a stupid title. But there are some real gotchas that many might know.
I used to listen CDs using the usual preinstalled setup, namely Rhythmbox and the usual Gnome tools. This has a couple of disadvantages:
- The output volume never seems to be correct. Either it is too low, making the music sound thin, or it is too high, driving the amp and/or soundcard into clipping and distortion.
- The CD drive spins up like mad, using the maximum drive speed. This is annoying because of the noise, and not necessary at all, 1x speed is enough for CD audio playback.
- There is a small pause between every song, this is disturbing in live recordings, or when songs of a CD are mastered together like on The Beatles’ Abbey Road album.
- This might not be as important, but is a side effect of how all this is implemented. Instead of playing the digital data directly from the CD into the soundcard, it gets pulled over the bus via libcdparanoia and pumped into the PCM (!) input of the soundcard. This is certainly overkill, because all modern soundcards have a direct connection with the CD drive, and can play directly from CD.
The solution to the first problem is to use alsamixer, a command line tool to adjust the mixer settings. Here you can see for each channel the effective dB gain. Set this to 0.0 for all channels.
The solution to the other problems is to avoid Rhythmbox (or, for that matter, all of the other CD playing tools in Gnome, like gnome-cd, soundjuicer, and whatnot) and use another set of command line tools, cdplay, cdstop, etc. These are found in the Ubuntu/Debian package cdtool. These tools do not use gstreamer, but instead play directly from CD to soundcard.
If anybody knows of programs that accomplish this in a GUIish fashion and integrate nicely with Gnome, please comment. Yes, I know, Amarok is a little better here, but frankly, I don’t like the thing either.
February 6th, 2008 at 3:58 pm
new rhythmbox has gapless playback, use the crossfade plugin and set crossfade time = 0.
February 6th, 2008 at 4:54 pm
There are several reasons why the CD audio data gets fed as PCM into the soundcard:
- while most soundcards/mainboards could be connected to the CD drive, in many computer it is not
- the DA converters of CD drives tended to be of rather mediocre quality
- the connection is prone to high frequency noise thanks to the electromagnetic chaos a computer usually is (no, you don’t want bus noise in your audio). Soundcards used to struggle for a long time, too, but by now are usually designed well enough for this environment
Having gaps between tracks for sure is annoying - but gapless playback “just” has to be implemented properly (it is not in the Gnome audio players I know).
February 9th, 2008 at 1:32 am
>man eject
-x
With this option the drive is given a CD-ROM select speed command.
The speed argument is a number indicating the desired speed (e.g.
8 for 8X speed), or 0 for maximum data rate. Not all devices sup-
port this command and you can only specify speeds that the drive
is capable of. Every time the media is changed this option is
cleared. This option can be used alone, or with the -t and -c
options.
February 11th, 2008 at 5:29 pm
Markku: Thanks. Will look into it as soon as it’s released.
Maik: I just did a quick comparison, and indeed, playing over PCM using RB seems to be better, at least when I force drive speed to 1x.
Anonymous: Cool, this sounds slightly better than sudo hdparm -E