Compact discs (CD's) ain't dead yet but there easy straigh use on free operating systems Linux / FreeBSD / OpenBSD is starting to deteriorate. That is quite normal I guess, as CDs are no longer officially produced or sold for few years in America and there is no Audio CD bookstores, neither in europe and perhaps there are just few in europe, perhaps CD are used somewhere in Africa and Asia, but most modern world has officially buried them.
However as I love old stuff and I had the opportunity, I bought an old Audio CD (fake copy one 🙂 of Judas Priest Screaming for Vengence and the famous Jimi Hendrix (Best Complilation) Experience an improvised shelf-book store selling books by a half deaf aging guy who sells books for years in Dobrich in the center.
And to remember the young years of Rock Roll wanted to play it on my very old but still kicking Lenovo Thinkpad R61 notebook (that is now 16 years old but thanksfully it still works and kicks ass with a Debian GNU / Linux 10 Buster.)
The task is very easy and as I have a Window Maker (Wmaker) on it in order to save myself an extra loading of this a kind of "archaic machine" and tried to play my CDs with everything at hand thus I tried first to play the CD in console with the good old but gold cdplay with which I have played a dozens of Audio CDs back in the days …
# cdplay
just to find out the CD got red and started to roll but I get no sound via the Sound Card 🙁
Next thing, i assumed was the problem might be the pulseaudio process blocking the sound card to be used, preventing cdplay to be able to properly channel the sound to the sound card, that used to be quite of classical problem, if you remember, thus I tried to run the cdplay via the aoss (Wrapper script to facilitate use of alsa oss compatibility library.)
Before using oss of course i've loaded the snd-pcm-oss kernel module, to make the sound blaster be able to use the old obsolete Open Sound System.
# modprobe snd-pcm-oss
# aoss cdplay
Though that aoss trick worked for some programs that used old Open Sound System scheme to output sound, it doesn't unfortunately, at that case.
Strange enough my sound card is properly identified by the Debian Linux and I can play MP3 songs, as well browse videos in youtube and other Internet resources in Firefox and even the pulseaudio process that is running in the background is spitting sounds out of the Notebook Speakers.
The laptop doesn't seem to have any sound driver or Sound Card issues, as I can normally play my old .XM and .MOD sound extension files with the good old mikmod
# mikmod
as well as I can even normally play MIDI audio files by using the timidity tool as well as with playmidi
# timidity HitTheLights.mid
# playmidi HitTheLights.mid
Just to proove the MIDIs can be played normally via the Sound Blaster (for a more on the topic check my previous article talking in depth about Linux and MIDI – Play Midis on Linux / Make Linux MIDI Ready for the Future – Enable embedded MIDI music to play in a Browser, Play MIDIs with VLC and howto enjoy Midis in Text Console.
Next logically to make sure, something is not wrong with audio drivers, I tried to play some music normally with, the standard console players I have played with for years on Linux mpg123 / mpg321 for reference check my Listening music in text mode in Linux console but this was no luck again …
I tried even to install the opencubicplayer ( Linux port) music player and tried to open the CD, but even though the CD can be heard to be rolling in the CD drive no sound was outputed out of the laptop speakers.
Thus to resolve tried everything at power starting from increasing any missing volumes via the aumix command, as often in the past I remember the problem in such situations is the sound volume is decreased to zero percentage or completely muted.
# aumix
as well as with
# alsamixer
Nevertheless, every possible volume up volume was raised and everything looked cool as I could play normally music on machine or in a browser, the AUDIO CD Music refused to play out of the Speakers.
Playing the Audio CD via success with mplayer
The work around to make it play was up to a one liner with mplayer
# mplayer -cdrom-device /dev/cdrom cdda://
To easify the play of CDs I've created for my self a tiny one liner script to run it.
#!/bin/bash
mplayer -cdrom-device /dev/cdrom cdda://
I've called the script playcd.sh, made it executable and placed it under /usr/local/bin
# vim /usr/local/bin/playcd.sh
#!/bin/bash
mplayer -cdrom-device /dev/cdrom cdda://
# chmod +x /usr/local/bin/playcd.sh
Playing Audio CDs with VLC (VideoLAN Media Player)
I've vlc client installed on my Linux box, if you don't have it, do:
# apt install –yes vlc
Then roll on the CD with vlc with passing it the location to the CD, usually one of the down two pointers should work:
# vlc vcd:///dev/sr0
# vlc vcd:///dev/cdrom
If you want to loop the Tracks to play forever
# vlc –loop vcd:///dev/cdrom
By the way vlc can do much more than you think as you can even play youtube with it, for example you can try it with the Axel Folly classics Mod file, by running it like this.
# vlc https://www.youtube.com/watch?v=SlyK_elUmIw
Cheers and Enjoy CD audio on Linux ! 🙂