dvd/cd read errors with raspbmc

Hi all. I've just been playing with raspbmc trying to get a dvd drive to play anything back.

Whether dvd or CD, I seem to get read errors logged (the following is for a CD):

13:39:37 T:2929611840 NOTICE: Thread COMXPlayer start, auto delete: false 13:39:37 T:2929611840 NOTICE: Creating InputStream 13:39:37 T:3040628736 DEBUG: ------ Window Init (DialogBusy.xml) ------ 13:39:37 T:2929611840 NOTICE: Creating Demuxer 13:39:38 T:2929611840 ERROR: file cdda: Reading 55 sectors of audio data starting at lsn 109547 failed with error code -1 13:39:38 T:2929611840 ERROR: file cdda: Reading 98 sectors of audio data starting at lsn 109560 failed with error code -1 13:39:39 T:2929611840 ERROR: file cdda: Reading 222 sectors of audio data starting at lsn 109560 failed with error code -1 13:39:39 T:2929611840 ERROR: Open - error probing input format, cdda://local/11.cdda 13:39:39 T:2929611840 ERROR: OpenDemuxStream - Error creating demuxer 13:39:39 T:2929611840 NOTICE: COMXPlayer::OnExit() 13:39:39 T:2929611840 DEBUG: OMXClock::OMXStop 13:39:39 T:2929611840 NOTICE: COMXPlayer::OnExit() deleting input stream 13:39:39 T:2929611840 DEBUG: Thread COMXPlayer 2929611840 terminating 13:39:39 T:3040628736 ERROR: Playlist Player: skipping unplayable item: 10, path [cdda://local/11.cdda] 13:39:39 T:3040628736 DEBUG: Playlist Player: one or more items failed to play... aborting playback

The setup I'm using is a samsung usb dvd reader connected to a belkin powered 4-port usb hub (the psu says 2.5A). The rpi itself is getting power from a USB port on my desktop machine.

The rpi itself seems to work fine - it'll happily play back mp3's from a file server.

The dvd drive seems OK - it's straight off a PC running Mint, where xbmc works well. Also, I've tried plugging the usb hub into my desktop, and again, the dvd drive works fine - so I assume drive and hub are good.

Loading a CD gets as far as a cddb lookup, but after that, the entire rpi gets sluggish or stalls, and errors like the above are logged.

Any thoughts please?

--
Mike Scott (unet2  [deletethis] scottsonline.org.uk) 
Harlow Essex England
Reply to
Mike Scott
Loading thread data ...

What happens if you run the optical drive through the USB hub to the Mint machine?

Reply to
Rob Morley

It works (I obviously wasn't clear enough above; sorry; that's what I tried when I wrote "I've tried plugging the usb hub into my desktop, and again, the dvd drive works fine").

I've been trying to see what 'dd' does - but there seems quite a lot of likely devices - /dev/cdrom, /dev/dvd (I think both with '1' suffixes too), as well as /dev/sr0. The ones I've tried just seem to hang completely. A CD doesn't appear in the mount list when inserted; maybe xbmc does things of its own.

>
--
Mike Scott (unet2  [deletethis] scottsonline.org.uk) 
Harlow Essex England
Reply to
Mike Scott

On 26/07/13 19:01, Mike Scott wrote: ...

OK, I see all points to /dev/sr0. I gave it a bit longer - after a minute or so, I just get

pi@raspbmc:~$ dd if=/dev/sr0 of=/dev/null bs=2048 dd: reading `/dev/sr0': Input/output error

0+0 records in 0+0 records out 0 bytes (0 B) copied, 122.708 s, 0.0 kB/s pi@raspbmc:~$

Noting that: pi@raspbmc:~$ ls -l /dev/sr0 brw-rw---T 1 root cdrom 11, 0 Jul 26 16:01 /dev/sr0 pi@raspbmc:~$ groups pi adm disk lp dialout cdrom audio video pi@raspbmc:~$

Using 'sudo' makes notr difference unsurprisingly. The disk is spinning, and makes occasional odd faint mechanical noises, as if it were seeking.

Messages file contains stuff like:

Jul 26 19:11:39 raspbmc kernel: usb 1-1.2.4: reset high-speed USB device number 6 using dwc_otg Jul 26 19:12:10 raspbmc kernel: usb 1-1.2.4: reset high-speed USB device number 6 using dwc_otg Jul 26 19:12:10 raspbmc kernel: sr 0:0:0:0: [sr0] Unhandled error code Jul 26 19:12:10 raspbmc kernel: sr 0:0:0:0: [sr0] Jul 26 19:12:10 raspbmc kernel: Result: hostbyte=0x05 driverbyte=0x00 Jul 26 19:12:10 raspbmc kernel: sr 0:0:0:0: [sr0] CDB: Jul 26 19:12:10 raspbmc kernel: cdb[0]=0x28: 28 00 00 00 00 00 00 00 08

00 00 00 Jul 26 19:12:10 raspbmc kernel: sr 0:0:0:0: [sr0] Jul 26 19:12:10 raspbmc kernel: Result: hostbyte=0x00 driverbyte=0x08 Jul 26 19:12:10 raspbmc kernel: sr 0:0:0:0: [sr0] Jul 26 19:12:10 raspbmc kernel: Sense Key : 0x5 [current] Jul 26 19:12:10 raspbmc kernel: sr 0:0:0:0: [sr0] Jul 26 19:12:10 raspbmc kernel: ASC=0x64 ASCQ=0x0 Jul 26 19:12:10 raspbmc kernel: sr 0:0:0:0: [sr0] CDB: Jul 26 19:12:10 raspbmc kernel: cdb[0]=0x28: 28 00 00 00 00 00 00 00 02 00 00 00

--
Mike Scott (unet2  [deletethis] scottsonline.org.uk) 
Harlow Essex England
Reply to
Mike Scott

check the PSU is holding up I got simlar errors on an overheating machine with a red hot (fan stopped) PSU. Not a Pi.

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Reply to
The Natural Philosopher

Of course you did - I score zero for reading comprehension. :-(

An easy way to see if an optical drive is hooked up (doesn't need to be mounted) is to run "eject" on it and see if the right drawer opens. Also cats find this extremely amusing, especially if you?re sat some distance from the drive, and open/close the drawer randomly.

Reply to
Rob Morley

Remembers old DOS 'washing machine' funny, to sound effects of draining water floppy srive was slected then spin up to spin dryer sounds :)

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk 
    PC Services 
  Raspberry Pi Add-ons 
 Timing Diagram Font 
  GNU H8 - compiler & Renesas H8/H8S/H8 Tiny 
 For those web sites you hate
Reply to
Paul

I still have a few floppy drives, but I've never felt inclined to plug them in and get nostalgic about the sound effects. Floppy seek was always the first thing to disable in the BIOS of a newly installed machine.

Reply to
Rob Morley

Woosh....

Let me put it this way I was talking about a programme that happened to use the floppy drive, its first output to screen saying

"Water found in drive"

Still not nostalgic about floppy drives or the filing of them, or other earlier media.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk 
    PC Services 
  Raspberry Pi Add-ons 
 Timing Diagram Font 
  GNU H8 - compiler & Renesas H8/H8S/H8 Tiny 
 For those web sites you hate
Reply to
Paul

Who the **** is General Failure and why is he reading Drive A?

Reply to
Rob

Had you written more intelligibly I might have had less difficulty extracting meaning from your post.

Reply to
Rob Morley

Ummm.... I hate to interrupt the nostalgic reflections, but does anyone have ideas on why my pi is having problems reading a cd please?

I can qualify that as being video dvd or audio cd. Data CDs and DVDs seem OK.... I've found it'll happily copy a CDrom(*) to /dev/null, file by file. And dd works too on a data CD. Same for a data DVD. But an audio CD just hangs dd - incidentally locking the drive shut - for about

2 minutes, then exits with a error on nothing copied :-(. Wierd.

(*) My BT Total Broadband CD. I knew I'd find a suitable use for it sooner or later :-)

--
Mike Scott (unet2  [deletethis] scottsonline.org.uk) 
Harlow Essex England
Reply to
Mike Scott

Sorry. :-\

Have you tried powering the R-Pi from the same USB hub as the optical drive? Is some other process trying to access the drive (like an autoplay feature)?

Reply to
Rob Morley

have you got libdvdcss loaded and installed?

Oh you can read a DVD OK??

Hmm.

You cant dd an audio CD can you? Pretty sure the system has to be weird shit to see it as a file system at all.

MM. no dd is not the right tool to use. You have to RIP the CD with a different tool.

Google for examples.

Answer: this is correct and expected behaviour. The problem is thinking Audio CDs are in some way the same as data ones.

:-)

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Reply to
The Natural Philosopher

Can we explain the difference between Data CD and Audio CD?

I understand it in my mind, but, I cannot explain it to save my life.

Bill Garber

formatting link

Reply to
Bill Garber

On Sat, 27 Jul 2013 14:20:30 +0100, Mike Scott declaimed the following:

Audio CDs use a different file system from data CDs, as I recall. Redbook CDs don't have a real file-system

formatting link

formatting link

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

It's just a different file system than data CDs - Red Book for CD-DA and Yellow Book for CD-ROM (Orange book for CD-R,CD-RW). CD-DA files are always two-channel 16 bit 44.1kHz PCM (WAV) audio streams, there can be no more than 99 tracks on a disc. You can have more than one file system on a CD, so it plays like a normal CD-DA in a CD player but has e.g. a book or slide show that can be accessed as a CD-ROM with a PC.

Reply to
Rob Morley

And I'm getting confused and not helping. My memory tells me I've copied a cdrom using dd with a blocksize of 2048; but that clearly can't be the case, as I've just tried this on a vanilla freebsd system where life is uncluttered, and it still fails. Therefore memory is wrong. Oh well, sorry all :-{

Nevertheless, dd-flavoured red herrings aside, read errors are being logged by the raspbmc system for video and audio disks, and I see no way of diagnosing them. Any further thoughts please?

--
Mike Scott (unet2  [deletethis] scottsonline.org.uk) 
Harlow Essex England
Reply to
Mike Scott

I think that will be because they do not contain a file system the pi recognises.

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Reply to
The Natural Philosopher

Not sure why you're getting errors like that.

One thing is that (if I've got this right) CDs actually use a sector size of something like 2560 bytes (not sure about the actual size).

On data CDs 2048 bytes are the data and the rest is error correction as that is very important with data.

On Audio CDs the whole 2560 (or whatever) is used for audio data with minimal (if any) error correction, as early CD players could only just about manage to play discs in real-time and couldn't waste time on checking what they were playing. So audio discs are more prone to errors.

DVDs are very different animals. They have a proper UDF filesystem using the full error correction available, but the track data is usually scrambled and need the right codes to read it (or libdvdcss2, which breaks the code in a few seconds)

Reply to
Dom

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.