GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Take an intel pentiom III machine with 256MG SDRAM, and imagine it is barely able to play decently audio-CDs. While on the other hand a cheap standalone player does a fine job with CDs. All that power (even for an old machine like that, as an electronic device it is millions of times more powerful than the CD player). Well, that's my situation and won't ever be able to understand why.
That old machine probably has the CD drive on an IDE connection. DMA mode for IDE devices usually defaults to off and needs to be explictly turned on. In both Linux and in Windows.
That old machine probably has the CD drive on an IDE connection. DMA mode for IDE devices usually defaults to off and needs to be explictly turned on. In both Linux and in Windows.
You have made me remember I in effect have DMA mode off! But I have had it (yes, it's on an IDE connection) on before and the result was exactly the same. Should I turn DMA mode for my optical drive on at the BIOS level (BIOS setup menu) or with some linux command, if you are so kind to tell me? For I allthesame want to turn it on.
When CDROM drives were first available for computers there was an analog audio output and all of the decoding was accomplished in hardware. The audio output was connected to an input on the sound card. CD player programs only sent control signals i.e. play, pause, stop etc.
My first computer CDROM drive (w/caddies) actually had push button controls for playing audio CDs. DMA was not a factor. With digital audio extraction all of the audio data is via the data bus i.e. PATA/SATA etc. which makes ripping and playing audio without an audio cable possible but now uses CPU and i/o resources.
Is the CD drive on the same IDE channel as the hard drive? Switching it to its own channel might help.
No, I have two optical drives in IDE 2 with IDE 1 reserved for my hard disk drives. But one of the optical drives is a CD-ROM reader with jack for headphones and volume control on its front and an analog output on the rear, where I have always pluged a three wire cable to the sound card and I have always been able to listen to CDs that way with programs that instruct the sound card to use the analog signal input.
I'm speaking here of a problem different than that of post #1. And the problem is that I have no audio if I do not use digital extraction. One such program is workbone, included in slackware up to the current version. But I could never solve a particular problem I have with it. Another one is lazy, a third party program, also for the CLI, and this has always worked without the need to use digital extraction, but now it does not. However nothing else has changed as far as I know.
I have tried three different audio cables (drive to sound card) and still won't work. Honestly I don't understand. Your remark about the decoding being made in hardware in the old times was very informative. Thanks.
root@darkstar:~# hdparm -I /dev/hdd
/dev/hdd:
ATAPI CD-ROM, with removable media
Model Number: ATAPI CDROM 48X
Serial Number:
Firmware Revision: V130Y
Standards:
Likely used CD-ROM ATAPI-1
Configuration:
DRQ response: 50us.
Packet size: 12 bytes
Capabilities:
LBA, IORDY(cannot be disabled)
DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2
Cycle time: min=120ns recommended=150ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=227ns IORDY flow control=120ns
root@darkstar:~#
and you see what I got: an asterisk signaling, I suppose, that the drive DMA mode is set to Ultra DMA 2 mode. The manual does not talk about asterisks, which I consider a fault.
That's why I don't like old machines, they were hard to deal with back then and even harder nowadays. Donate them or recycle them and get yourself a real computer.
I've played CDs on everything from 386s to Pentium III/Athlon level computers. The early systems (all the 386/486 machines) were using the CD drive to decode to signals, hooked up to the sound card with a analog audio cable.
I have played CDs on pentium level systems over IDE. It works, but if I recall correctly if the system was doing anything else taxing and sometimes if it wasnt the CD would pause and skip at times.
A Pentium III should have a lot more CPU power than old pentium level system, but if the CPU and/or IDE bus is loaded it could still cause skipping. If you are using dodgy onboad sound, paticularly AC97 the CPU requirements are higher than if you are using a standalone sound card. Even some standalone sound cards can cause high CPU loading, e.g. sound blaster live cards (as they have an internal fixed sample rate of 48KHz, and CD 44.1KHz signals need to be processed to 48KHz).
'Optical drives on one IDE channel and HDDs on the other channel' dates back to the days of PIO. With old PIO drives and ancient IDE controllers, putting different speed devices on the ID channel made all devices run at the slwoest speed. DMA optical drives and HDDs (late pentium and newer) dont have that problem, and can be run with different speed devices on the same channel at very little or zero speed inpact.
The manual for CD/DVD/HDD drives and all the motherboard manuals I've seen wont mention the asterix marking for active control mode.
A Pentium III should have a lot more CPU power than old pentium level system, but if the CPU and/or IDE bus is loaded it could still cause skipping. If you are using dodgy onboad sound, paticularly AC97 the CPU requirements are higher than if you are using a standalone sound card. [...]
Alsamixer identifies my sound system thus:
Card: SiS SI7018
Chip: C-Media Electronics, CMI9738, Sylicon Laboratory Si3036,8 rev 1.
Is this AC97?
Quote:
'Optical drives on one IDE channel and HDDs on the other channel' dates back to the days of PIO. With old PIO drives and ancient IDE controllers, putting different speed devices on the ID channel made all devices run at the slwoest speed. DMA optical drives and HDDs (late pentium and newer) dont have that problem, and can be run with different speed devices on the same channel at very little or zero speed inpact.
Code:
root@darkstar:~# hdparm -I /dev/hdd
/dev/hdd:
ATAPI CD-ROM, with removable media
Model Number: ATAPI CDROM 48X
Serial Number:
Firmware Revision: V130Y
Standards:
Likely used CD-ROM ATAPI-1
Configuration:
DRQ response: 50us.
Packet size: 12 bytes
Capabilities:
LBA, IORDY(cannot be disabled)
DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2
Cycle time: min=120ns recommended=150ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=227ns IORDY flow control=120ns
root@darkstar:~#
This is my oldest optical drive. I think hdparm is saying it is DMA capable. Isn't it? Let's assume it is. So as my Pentium is not late Pentium or later I could have the problem discribed by you above?
Quote:
The manual for CD/DVD/HDD drives and all the motherboard manuals I've seen wont mention the asterix marking for active control mode.
I have the same doubt, but for some commands the man pages do not describe the console output format.
Now, I have a tiny cli CD player which a program _dedicated_ to CD reproduction, and this program only once in a while skips, depending on the quality of the burned CD (I should test with pressed CDs). Instead the monster program mplayer, in fact thought to play movies but able to play almost anything that exists and allowing for hundreds of control over the playback, that is to say, unbelievable amount of manual control, miserably fails when playing CDs, skipping all the time in this as in another machine very similar to this. Whereas mplayer in the same machine I am speaking about in the thread plays movies wonderfully well, with audio perfectly synchronized to video, only a slight effect of slow motion. I don't get it. DVDs: easy, CDs difficult, the world put upside down!
Alsamixer identifies my sound system thus:
Card: SiS SI7018
Chip: C-Media Electronics, CMI9738, Sylicon Laboratory Si3036,8 rev 1.
Is this AC97?
As far as I can tell its AC-97.
Quote:
Originally Posted by stf92
This is my oldest optical drive. I think hdparm is saying it is DMA capable. Isn't it? Let's assume it is. So as my Pentium is not late Pentium or later I could have the problem discribed by you above?
I dont know what system you are running that drive on. I'd assume that its late pentium or later.
Quote:
Originally Posted by stf92
Now, I have a tiny cli CD player which a program _dedicated_ to CD reproduction, and this program only once in a while skips, depending on the quality of the burned CD (I should test with pressed CDs). Instead the monster program mplayer, in fact thought to play movies but able to play almost anything that exists and allowing for hundreds of control over the playback, that is to say, unbelievable amount of manual control, miserably fails when playing CDs, skipping all the time in this as in another machine very similar to this. Whereas mplayer in the same machine I am speaking about in the thread plays movies wonderfully well, with audio perfectly synchronized to video, only a slight effect of slow motion. I don't get it. DVDs: easy, CDs difficult, the world put upside down!
There are lots of possible reason for this, sorry.
I'm not really up on playing CDs on computers anymore. I rip CDs to flac to play audio, if only to avoid the sound of the CD drive spinning.
Are you sure the CDs are good? Can you play them on another machine without problem? How old is the CD drive? Maybe the drive is failing. I have a pentium 3 and had Slack 10.2/12.0 on it and never had any problem with audio CDs/DVDs/avi playing/burning. The only difference is that I had a Soundblaster card.
Now, I have a tiny cli CD player which is a program _dedicated_ to CD reproduction, and this program only once in a while skips, depending on the quality of the burned CD (I should test with pressed CDs). Instead the monster program mplayer, in fact thought to play movies but able to play almost anything that exists and allowing for hundreds of controls over the playback, that is to say, unbelievable amount of manual control, miserably fails when playing CDs, skipping all the time in this as in another machine very similar to this. Whereas mplayer in the same machine I am speaking about in the thread plays movies wonderfully well, with audio perfectly synchronized to video, only a slight effect of slow motion. I don't get it. DVDs: easy, CDs difficult, the world put upside down!
But given your post I think you already read this. The tiny program I speak of is lazy. You ask about the quality of the CDs. But take any CD and let's consider it fix. That is, we'll always use this CD. If you see lazy plays it decently well (decently = skips once or twice through all of the CD playback) but mplayer, the Movie Player, is causing skipping all the time, what can your conclusions be? I know, there can be a lot of them. But you can eliminate several ones. For example, as the CD and the drive are always the same, they _cannot_ be a part of the explanation.
Anyways you asked. So I tell you: CDs, top quality stamped CDs (i.e., those made by a record company as opposed to those burned by you. The record company do not burn the CDs. They mold them or stamp them). Optical drive: Philips SPD2417T, not precisely a high-end product.
The sound card is low end (suffice it to say it is an onboard card on a motherboard which is also a low-end product). But I have installed, only because I wanted to compare, a Yamaha OPL3-SA card, much better than the onboard card, and the result, in what touches mplayer is _exactly_ the same.
Now, mplayer is the only _cli_ program I know that I could use to play CDs, because none of the other cli (and graphical) programs nearly approaches the wonderful flexibility of that program. Imagine I want to play track 3, but from 3m14s from the track start until 5m02s after. Nothing more easy for mplayer. But the thing is that I can instruct the player to do so with a great precission, not moving some slider. Thus
mplayer cdda://3 ss 3:14 ff 5:02
So that the initial question was: why the tipical cli cd player fails (skips here and there) when the worst stand alone does so well (dedicated hardware, as opposed to general purpose, always does it well could be an answer). And now it has become "Why the powerful mplayer does it so bad in my machines/OSs". I have now a Pentium G620 machine and, when I finish installing 14.0, I'll test mplayer on it to see what happens. Of course, I'll let you know the result.
Yes, I am familiar with both mplayer and the CD production system. So, industrial printed CDs somewhat rule out the bad disk hypothesis. Now, if the same disk on the same drive plays ok with one program and not ok with another, it is either bad decoding software or too much resource intensive software. As far as the hardware player, it's just that. The hardware is designed to do this one job, and do it well. You can't beat that. Your system probably has some bottleneck which causes mplayer to lag, but I can't tell why lazy is more efficient. But I seriously doubt it is the processor's fault. That processor is capable of DVD playback; it shouldn't have any problem with audio CDs, where there isn't even decompression stage.
Edit: Just remembered. Keep in mind that drives use different laser for CD and DVD. Maybe the CD laser is failing and the DVD laser is fine. I insist it's the drive's fault
Just out of curiosity try mplayer with a ridiculously lagre cache and cache-min
Last edited by segmentation_fault; 11-14-2012 at 03:55 AM.
Yes, I am familiar with both mplayer and the CD production system. So, industrial printed CDs somewhat rule out the bad disk hypothesis. Now, if the same disk on the same drive plays ok with one program and not ok with another, it is either bad decoding software or too much resource intensive software. As far as the hardware player, it's just that. The hardware is designed to do this one job, and do it well. You can't beat that. Your system probably has some bottleneck which causes mplayer to lag, but I can't tell why lazy is more efficient. But I seriously doubt it is the processor's fault. That processor is capable of DVD playback; it shouldn't have any problem with audio CDs, where there isn't even decompression stage.
Edit: Just remembered. Keep in mind that drives use different laser for CD and DVD. Maybe the CD laser is failing and the DVD laser is fine. I insist it's the drive's fault
Just out of curiosity try mplayer with a ridiculously lagre cache and cache-min
Well, the fact that your words corroborate mine at least leaves me with a sense of relief. It means I was correct in my reasoning. Now with lazy, we could again speak, although this time it is not hardware, about dedicated vs general purpose. Lazy does just that, play CDs, and does it with a minimal degree of sophistication.
I say your remark about "too much resource intensive software" is what applies here, specifically to mplayer. That is, I would blame mplayer. Of course, if more hardware or software resources were available, e.g. a new generation machine, it's likely mplayer would perform well. About it being the drive's fault, as you say above, I have tested both programs on at least three different drives, and lazy always behaves correctly: no skipping, except with some burned disks.
Also, I have run mplayer with very high values for cache and chache-min=80 and the thing has improved, but still skipping.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.