Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-06-2008, 07:41 AM
Logan Shaw
 
Posts: n/a
Default cdda2wav to read audio CD w/o TOC?

Hi everyone.

This is not necessarily a Solaris-specific, but it is related to
some software that is commonly used on Solaris, and there doesn't
seem to be a newsgroup that's much better for it than this one.

Let me cut to the chase... Yesterday, I made a recording on
a standalone, rack-mount audio-only CD burner. This particular
unit was designed by monkeys, apparently, because if it is
recording and it hits the end of the disc, it just quits.
It doesn't write a TOC, and for all I know, it may not close
the track that it was in the process of writing. (It sits
there with zero tracks and zero seconds on its display.
If I punch the Finalize button, it ignores me. But if I
eject the CD, it flashes "NOT FINALIZED" on the front panel.
Well, *of* *course* it's not finalized...)

Anyway, it just so happens that this audio CD(-RW) contains
some audio that is fairly important to me. I was using it to
record a live event that I was running sound for. If possible,
I would like to get the audio data back.

I tried using cdda2wav to get the data, but it just complains
that there is no TOC:

# cdda2wav -J -H dev=0,0,0 -v toc
Type: ROM, Vendor 'YAMAHA ' Model 'CRW3200E ' Revision '1.0d' MMC+CDDA
724992 bytes buffer memory requested, 4 buffers, 75 sectors
Read Full TOC MMC failed (probably not supported).
cdda2wav: Input/output error. read toc size: scsi sendcmd: no error
CDB: 43 00 00 00 00 00 01 00 04 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 24 00 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x24 Qual 0x00 (invalid field in cdb) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.000s timeout 300s
Read TOC size failed.

It makes the same complaint when I just try to record (no "-v toc").
And if I run the identical command as above on another (valid) audio
CD, it reads the TOC just fine.

I went through the manual page fairly carefully and was hoping for
an option to specify, instead of a track, a list of sector numbers
(or are they called frame numbers? you get the idea) to read.
But either there is no such option or I did not understand the
documentation correctly.

Am I correct in assuming that what I want to do really is possible?
It seems like cdda2wav probably operates approximately like this:
(1) open CD device
(2) send a command to get the TOC
(3) parse the TOC
(4) give the CD commands, in sectors (not tracks), to read data

If I could somehow bypass steps #2 and #3, it seems that I could
manually supply the same information that normally would have come
from the TOC, and the process could proceed as if the TOC were there.
(This might be especially easy in my case, since the entire CD's
contents is one continuous track; the track has about 80 minutes
of audio data, and I only need about the first 50 or 60 minutes,
so I do not have to give anything like exact numbers.)

So, anyone have a suggestion? I am not above hacking on cdda2wav
source code a little bit if that will do the trick. (Although,
I can't afford to spend days and days making major changes...)

- Logan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-06-2008, 07:42 AM
Joerg Schilling
 
Posts: n/a
Default Re: cdda2wav to read audio CD w/o TOC?

In article <sjrSb.5691$ee6.5299@fe2.texas.rr.com>,
Logan Shaw <lshaw-usenet@austin.rr.com> wrote:

>Let me cut to the chase... Yesterday, I made a recording on
>a standalone, rack-mount audio-only CD burner. This particular
>unit was designed by monkeys, apparently, because if it is
>recording and it hits the end of the disc, it just quits.
>It doesn't write a TOC, and for all I know, it may not close
>the track that it was in the process of writing. (It sits
>there with zero tracks and zero seconds on its display.
>If I punch the Finalize button, it ignores me. But if I
>eject the CD, it flashes "NOT FINALIZED" on the front panel.
>Well, *of* *course* it's not finalized...)


You should know that these audio CD burners write everything
in Track at Once mode which is not that goot for audio.

You could try to run:

cdrecord dev=0,0,0 -fix

If the CD contains a valid PMA (written by the audio writer) and the
CD-R drive in the computer understands the content, this should
work.

>I tried using cdda2wav to get the data, but it just complains
>that there is no TOC:
>
> # cdda2wav -J -H dev=0,0,0 -v toc
> Type: ROM, Vendor 'YAMAHA ' Model 'CRW3200E ' Revision '1.0d' MMC+CDDA
> 724992 bytes buffer memory requested, 4 buffers, 75 sectors
> Read Full TOC MMC failed (probably not supported).
> cdda2wav: Input/output error. read toc size: scsi sendcmd: no error
> CDB: 43 00 00 00 00 00 01 00 04 00
> status: 0x2 (CHECK CONDITION)
> Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 24 00 00 00
> Sense Key: 0x5 Illegal Request, Segment 0
> Sense Code: 0x24 Qual 0x00 (invalid field in cdb) Fru 0x0
> Sense flags: Blk 0 (not valid)
> cmd finished after 0.000s timeout 300s
> Read TOC size failed.


Cdda2wav could run a READ PMA instead of a READ TOC, but this may
cause a complete system hang with some drives.

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni) If you don't have iso-8859-1
schilling@fokus.fraunhofer.de (work) chars I am J"org Schilling
URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-06-2008, 07:42 AM
UNIX admin
 
Posts: n/a
Default Re: cdda2wav to read audio CD w/o TOC?


"Joerg Schilling" <js@cs.tu-berlin.de> schrieb im Newsbeitrag
news:bvdqnj$e9g$1@news.cs.tu-berlin.de...

> You should know that these audio CD burners write everything
> in Track at Once mode which is not that goot for audio.
>
> You could try to run:
>
> cdrecord dev=0,0,0 -fix
>
> If the CD contains a valid PMA (written by the audio writer) and the
> CD-R drive in the computer understands the content, this should
> work.


A quick question: will the scg driver ever be fixed to work on Solaris9
x86??? I wrote to you about this directly, and no response. I'm willing to
help with the troubleshooting to get the scg driver to work. The scg binary
package for x86 fails to load on Solaris9 because the kernel reports there
are some unresolved symbols.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-06-2008, 07:42 AM
Joerg Schilling
 
Posts: n/a
Default Re: cdda2wav to read audio CD w/o TOC?

In article <401a9788$0$729$5402220f@news.sunrise.ch>,
UNIX admin <tripivceta@hotmail.com> wrote:
>
>"Joerg Schilling" <js@cs.tu-berlin.de> schrieb im Newsbeitrag
>news:bvdqnj$e9g$1@news.cs.tu-berlin.de...
>
>> You should know that these audio CD burners write everything
>> in Track at Once mode which is not that goot for audio.
>>
>> You could try to run:
>>
>> cdrecord dev=0,0,0 -fix
>>
>> If the CD contains a valid PMA (written by the audio writer) and the
>> CD-R drive in the computer understands the content, this should
>> work.

>
>A quick question: will the scg driver ever be fixed to work on Solaris9
>x86??? I wrote to you about this directly, and no response. I'm willing to
>help with the troubleshooting to get the scg driver to work. The scg binary
>package for x86 fails to load on Solaris9 because the kernel reports there
>are some unresolved symbols.


What is your problem?

I am using scg on Solaris 9 x96 since late 2000.

ls -l /kernel/drv/scg
-rw-r--r-- 1 root other 19508 Jul 14 2003 /kernel/drv/scg

It seems that I did forget to put out a binary because the people did
send be wrong messages :-( It is now out.

The problem is that Sun did change the interface for an inofficial console
output routine that is the only way to output debug messages while the
driver is attaching. As the have been problems with ATAPI with Solaris-2.6
I needed to add usable debug messages to find the reason for the problem.

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni) If you don't have iso-8859-1
schilling@fokus.fraunhofer.de (work) chars I am J"org Schilling
URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-06-2008, 07:43 AM
Logan Shaw
 
Posts: n/a
Default Re: cdda2wav to read audio CD w/o TOC?

Joerg Schilling wrote:
> You should know that these audio CD burners write everything
> in Track at Once mode which is not that goot for audio.
>
> You could try to run:
>
> cdrecord dev=0,0,0 -fix
>
> If the CD contains a valid PMA (written by the audio writer) and the
> CD-R drive in the computer understands the content, this should
> work.


Hmm, well that was a promising idea, but it didn't do the trick.
The CD seems to be marked as if it's blank. (I guess that
means that PMA indicates it's blank.) Here's the relevant info
from cdrecord's output:

Blocks total: 359849 Blocks current: 359849 Blocks remaining: 359999
Forcespeed is OFF.
Starting to write CD/DVD at speed 4 in real TAO mode for single session.
Last chance to quit, starting real write 0 seconds. Operation starts.
BURN-Free is OFF.
Performing OPC...
Fixating...
cdrecord: Input/output error. close track/session: scsi sendcmd: no error
CDB: 5B 00 02 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 2C 04 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x2C Qual 0x04 (current program area is empty) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.000s timeout 480s
cmd finished after 0.000s timeout 480s
Fixating time: 0.001s

Any other ideas? I'm still thinking the best thing would be to just
issue commands to read, regardless of what the drive thinks is
there. Sort of like reading blocks from a disk once your filesystem
structure is trashed. Of course, I'm not sure whether a CD-ROM drive
will support this or whether its firmware makes it read the TOC
first or something...

- Logan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-06-2008, 07:43 AM
Joerg Schilling
 
Posts: n/a
Default Re: cdda2wav to read audio CD w/o TOC?

In article <u5GSb.23607$eY2.5540@fe2.texas.rr.com>,
Logan Shaw <lshaw-usenet@austin.rr.com> wrote:

>> You could try to run:
>>
>> cdrecord dev=0,0,0 -fix
>>
>> If the CD contains a valid PMA (written by the audio writer) and the
>> CD-R drive in the computer understands the content, this should
>> work.

>
>Hmm, well that was a promising idea, but it didn't do the trick.
>The CD seems to be marked as if it's blank. (I guess that
>means that PMA indicates it's blank.) Here's the relevant info
>from cdrecord's output:


The output below may have two reasons:

- the medium does not have a valid PMA

- The writer does not support to fixate disks that only have a PMA



> cdrecord: Input/output error. close track/session: scsi sendcmd: no error
> CDB: 5B 00 02 00 00 00 00 00 00 00
> status: 0x2 (CHECK CONDITION)
> Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 2C 04 00 00
> Sense Key: 0x5 Illegal Request, Segment 0
> Sense Code: 0x2C Qual 0x04 (current program area is empty) Fru 0x0
> Sense flags: Blk 0 (not valid)
> cmd finished after 0.000s timeout 480s


You could check if this is a writer problem by e.g. using a blank CD-RW
and call

cdrecord dev=0,0,0 -nofix /etc/goup
cdrecord dev=0,0,0 -fix

If this works, then it's most likely a missing PMA.


>Any other ideas? I'm still thinking the best thing would be to just
>issue commands to read, regardless of what the drive thinks is
>there. Sort of like reading blocks from a disk once your filesystem
>structure is trashed. Of course, I'm not sure whether a CD-ROM drive
>will support this or whether its firmware makes it read the TOC
>first or something...


What happens if you call readcd -c2scan?

readcd has a hook that allows you to enter the medium size manually
if there is no valid TOC.

You may need to use the interactive mode.....

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni) If you don't have iso-8859-1
schilling@fokus.fraunhofer.de (work) chars I am J"org Schilling
URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-06-2008, 07:44 AM
Logan Shaw
 
Posts: n/a
Default Re: cdda2wav to read audio CD w/o TOC?

Joerg Schilling wrote:
> You could check if this is a writer problem by e.g. using a blank CD-RW
> and call
>
> cdrecord dev=0,0,0 -nofix /etc/goup
> cdrecord dev=0,0,0 -fix
>
> If this works, then it's most likely a missing PMA.


This works fine. I think then, that probably what has happened
is that the stand-alone audio burner wrote a PMA that says
the disk is blank.

> What happens if you call readcd -c2scan?
>
> readcd has a hook that allows you to enter the medium size manually
> if there is no valid TOC.
>
> You may need to use the interactive mode.....


I tried doing a c2scan in interative mode, manually specifying
sectors 0 through 5000 (instead of letting it choose). I got
an I/O error saying the logical block number was out of range.

So basically, I assume this means the PMA says the CD is blank.
The CD burner's firmware reads the PMA and trusts it, so it
won't let me read the sectors, even though the sectors are there.
(Does that sound like the reasonable explanation?)

Is there some way to write my own valid PMA onto the disk? This
is an 80-minute CD, but I only need the first probably 50 or 60
minutes of audio, so maybe I could dump a PMA from another
CD with 60 minutes total of audio on it, and then write that
PMA to the disk. Or is that something that my burner's firmware
will not allow me to do?

Thanks for all your help so far, by the way!

- Logan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-06-2008, 07:44 AM
Joerg Schilling
 
Posts: n/a
Default Re: cdda2wav to read audio CD w/o TOC?

In article <%_WSb.373$QU1.129@fe2.texas.rr.com>,
Logan Shaw <lshaw-usenet@austin.rr.com> wrote:

>> cdrecord dev=0,0,0 -nofix /etc/goup
>> cdrecord dev=0,0,0 -fix
>>
>> If this works, then it's most likely a missing PMA.

>
>This works fine. I think then, that probably what has happened
>is that the stand-alone audio burner wrote a PMA that says
>the disk is blank.

.....

>I tried doing a c2scan in interative mode, manually specifying
>sectors 0 through 5000 (instead of letting it choose). I got
>an I/O error saying the logical block number was out of range.
>
>So basically, I assume this means the PMA says the CD is blank.
>The CD burner's firmware reads the PMA and trusts it, so it
>won't let me read the sectors, even though the sectors are there.
>(Does that sound like the reasonable explanation?)


If the medium is important, try to read it in a recent enough Plextor
drive.

Around 2002, I could convice Plextor to change the firmware of the
drives to allow reading blocks past the official end, if the sectors
look OK.

Any drive => the 2x writer should do with a recent firmware.

It may be that (with such a drive) even cdda2wav will read
everything into one single track. If you ever like to split this
into different tracks, you would need to analyze the Sub channel data
in the sectors to find the track number.


--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni) If you don't have iso-8859-1
schilling@fokus.fraunhofer.de (work) chars I am J"org Schilling
URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-06-2008, 07:45 AM
Joerg Schilling
 
Posts: n/a
Default Re: cdda2wav to read audio CD w/o TOC?

In article <bvhgsr$r7c$1@news.cs.tu-berlin.de>,
Joerg Schilling <js@cs.tu-berlin.de> wrote:

>>So basically, I assume this means the PMA says the CD is blank.
>>The CD burner's firmware reads the PMA and trusts it, so it
>>won't let me read the sectors, even though the sectors are there.
>>(Does that sound like the reasonable explanation?)

>
>If the medium is important, try to read it in a recent enough Plextor
>drive.
>
>Around 2002, I could convice Plextor to change the firmware of the
>drives to allow reading blocks past the official end, if the sectors
>look OK.
>
>Any drive => the 2x writer should do with a recent firmware.


^^^^
should of course be 12x

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni) If you don't have iso-8859-1
schilling@fokus.fraunhofer.de (work) chars I am J"org Schilling
URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-06-2008, 07:46 AM
UNIX admin
 
Posts: n/a
Default Re: cdda2wav to read audio CD w/o TOC?

"Joerg Schilling" <js@cs.tu-berlin.de> schrieb im Newsbeitrag
news:bvehb2$2vc$1@news.cs.tu-berlin.de...

> What is your problem?
>
> I am using scg on Solaris 9 x96 since late 2000.
>
> ls -l /kernel/drv/scg
> -rw-r--r-- 1 root other 19508 Jul 14 2003 /kernel/drv/scg
>
> It seems that I did forget to put out a binary because the people did
> send be wrong messages :-( It is now out.
>
> The problem is that Sun did change the interface for an inofficial console
> output routine that is the only way to output debug messages while the
> driver is attaching. As the have been problems with ATAPI with Solaris-2.6
> I needed to add usable debug messages to find the reason for the problem.


Well, the problem was that on Solaris9 x86 the scg driver wouldn'l load,
rather, the kernel would report unresolved symbols in the driver and reject
to load it in.
And then, on your site the package SCHILYscg-i386 doesn't specifically state
which version of Solaris it's for, so by the convention I assumed it's meant
for ALL Solaris x86 versions (having no recourse but to assume).

I installed the scg binary, and then I used `pkgadd` to install SCHILYscg,
then answered 'n' to overwrite the existing /kernel/drv/scg. I hope that
was the proper procedure.

Also, I'm using the scg driver on an ATAPI CD-R/RW. It seems that the block
size (60) of the /dev/scg0 driver gives smaller throughput, is this correct?

I'm quite happy though, that I don't have to shut volume management down any
more! (;-D


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:27 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
UnixAdminTalk.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529