Return to BSD News archive
Newsgroups: comp.unix.bsd.freebsd.misc Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!asstdc.scgt.oz.au!nsw.news.telstra.net!act.news.telstra.net!psgrain!quack!quack.kfu.com!nsayer From: nsayer@quack.kfu.com (Nick Sayer) Subject: worm driver patch for audio disks Message-ID: <nA22HOo@quack.kfu.com> Sender: news@quack.kfu.com (0000-News(0000)) Organization: The Duck Pond public unix, +1 408 249 9630, log in as guest. Date: Wed, 2 Oct 1996 21:14:47 UTC Lines: 95 With this patch in place, I have successfully used the 2.2-960801-SNAP worm driver to make a 14 track 57 minute "Red Book" audio CD with an HP 4020i. To make an audio track suitable for burning (again, this is for the HP drive. I don't know about others), use sox and convert the audio to the .cdr type. Then run that file through 'dd conv=swab bs=2352'. sox by default generates NUXI (little endian instead of big) samples. The HP requires them to be big endian (big endian, 16 bit, 2's comp signed, linear, 2 channel left first, 44.1 kHz, block size 2352 bytes to be exact). The example in the wormcontrol man page is pretty close to how you burn audio disks. here's an example: wormcontrol prepdisk double wormcontrol track audio rtprio 5 team -v 1m 5 < t1.cdr | rtprio 5 dd of=/dev/rworm0 obs=23520 wormcontrol track audio rtprio 5 team -v 1m 5 < t2.cdr | rtprio 5 dd of=/dev/rworm0 obs=23520 wormcontrol track audio rtprio 5 team -v 1m 5 < t3.cdr | rtprio 5 dd of=/dev/rworm0 obs=23520 wormcontrol fixate 0 Note that the obs has been changed to a multiple of 2352. Oh, one more thing: The HP probes like a CD (device type is 5), so the only way to get the worm driver to find the drive is to 'wire down' the scsi bus devices: controller ahc0 options AHC_TAGENABLE controller scbus0 at ahc0 disk sd0 at scbus0 target 0 disk sd1 at scbus0 target 1 disk sd2 at scbus0 target 2 device worm0 at scbus0 target 3 tape st0 at scbus0 target 4 tape st1 at scbus0 target 5 device cd0 at scbus0 target 6 Be sure you chuck the controller that comes with the drive. It's not supported under FreeBSD. Get a good bus-master controller, like the aic78xx based Adaptec ones (284x for VLB, 294x for PCI). This patch is to /sys/scsi/worm.c: *** worm.c.orig Wed Oct 2 11:14:23 1996 --- worm.c Wed Oct 2 11:15:45 1996 *************** *** 215,223 **** worm->n_blks = scsi_read_capacity(sc_link, &worm->blk_size, flags); ! if(worm->blk_size == 0) ! /* XXX */ ! worm->blk_size = 2048; if (worm->n_blks) { sc_link->flags |= SDEV_MEDIA_LOADED; --- 215,222 ---- worm->n_blks = scsi_read_capacity(sc_link, &worm->blk_size, flags); ! worm->blk_size = (worm->audio?2352:2048); ! if (worm->n_blks) { sc_link->flags |= SDEV_MEDIA_LOADED; *************** *** 579,586 **** error = EINVAL; else if (w->audio == 0 && w->preemp) error = EINVAL; ! else if ((worm->worm_flags & WORMFL_DISK_PREPED)==0 || ! (worm->worm_flags & WORMFL_WRITTEN) != 0) error = EINVAL; else { worm->audio = w->audio; --- 578,584 ---- error = EINVAL; else if (w->audio == 0 && w->preemp) error = EINVAL; ! else if ((worm->worm_flags & WORMFL_DISK_PREPED)==0) error = EINVAL; else { worm->audio = w->audio; -- Nick Sayer <nsayer@quack.kfu.com> | TRUE GIANTS OF HISTORY #103 N6QQQ @ N0ARY.#NORCAL.CA.USA.NOAM | +1 408 249 9630, log in as 'guest' | Heinrich Otto URL: http://www.kfu.com/~nsayer/ | Developer of internal combustion