Loading ...
Sorry, an error occurred while loading the content.

Re: [linux-dell-laptops] chocking DVDs

Expand Messages
  • Vaibhav Vaidya
    AFAIK, Linux kernel still doesnt include the patch for SATA cdroms... although it supports SATA hard drives all right. I have a 9300 with the same
    Message 1 of 4 , Aug 16, 2005
    • 0 Attachment
      AFAIK, Linux kernel still doesnt include the patch for SATA cdroms... although it supports SATA hard drives all right. I have a 9300 with the same problem(kernel 2.6.9-11), SATA CDROM DMA with hdparm is not supported unless you download a patch and recompile the kernel.
      Anyways, the 9300 is a pretty fast laptop :) so you have a workaround:
      The problem from the cdrom driver's point of view is as follows-
      Buffered read is selected by default, so that read-ahead can cache some dvd scenes before they're played, to reduce chocking. But since DMA is not possible in this case, the processor is required for the read-ahead!! so basically the read 'ahead' becomes read 'on demand' i.e., regularly after a given part of the DVD = read buffer is played, the next part is LOADED and then PLAYED, both tasks by the processor. The processor gets caught up filling the read ahead buffer and this introduces the time lag and choppy playback. Larger the buffer, more the time to fill it, more the lag.
      So the solution (given a fast processor, fast drive and fast fsb) is this: set read ahead buffer to 0, and disable readahead. The system is fast enough to read data and display it in a streaming fashion.
      This can be done as follows:
      hdparm -a0 /dev/<actual device name eg hdc, not a symbolic link like cdrom>
      the 0 specifies 0 sized read buffer. In fact, you can play around with it and actually see cd performance change, increase it to like 1MB and see how the chops are less frequent but longer... anyway, the above hdparm should give you smooth play back.
      But beware:
      Continuous access of the drive might mean reduced lifetime
      You cant run other apps while doing dvd...
      Walter Cazzola <cazzola@...> wrote:
      Dear Linux Experts,

      I've a Mandriva LE 2005 installed on an inspiron 9300.

      I'm trying to play DVDs on my machine by using mplayer, but at the
      moment the result is quite frustrating, every DVD that I've played

      I know it is a FAQ, in fact I have found it on the mplayer's FAQ.

      BTW I'm trying to activate the DMA, with hdparm -d 1 /dev/hdc but the
      answer is:

         setting using_dma to 1 (on)
         HDIO_SET_DMA failed: Operation not permitted
         using_dma    =  0 (off)

      and nothing change.

      What is wrong? Looking at the driver:

      # hdparm -I /dev/hdc


      ATAPI CD-ROM, with removable media
               Model Number:       _NEC DVD+/-RW ND-6500A
               Serial Number:
               Firmware Revision:  202C
               Likely used CD-ROM ATAPI-1
               DRQ response: 3ms.
               Packet size: 12 bytes
               LBA, IORDY(cannot be disabled)
               DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2
                    Cycle time: min=120ns recommended=120ns
               PIO: pio0 pio1 pio2 pio3 pio4
                    Cycle time: no flow control=120ns IORDY flow control=120ns

      it seems that it can use DMA or better is already using it but my DVDs
      are still chocking.

      I've got another weird behavior from my driver, when I try to burn a CD
      with cdrecord I get a "segmentation fault (core dumped)" but if I use
      k3b (that uses cdrecord too) everything go well.

      Do you have some suggestions?

      TIA, Walter

      PS. I'm using the kernel distributed with Madrivia version 2.6.11-6mdk

      Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
      E-mail cazzola@... Ph.: +39 010 353 6637  Fax: +39 010 353 6699
      · · · --------------------------- · · · --------------------------- · · ·
                      ... recursive: adjective, see recursive ...
      · · · --------------------------- · · · --------------------------- · · ·

      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around

    Your message has been successfully submitted and would be delivered to recipients shortly.