*BSD News Article 82450


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.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!uunet!in2.uu.net!quack!quack.kfu.com!nsayer
From: nsayer@quack.kfu.com (Nick Sayer)
Subject: Re: Reading/Writing Audio-CD's
Message-ID: <nD0sNpo@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.
References: <55mu8q$ci7@isoit109.bbn.hp.com>
Date: Thu, 7 Nov 1996 08:10:51 UTC
Lines: 92

Michael Class wrote:

>Hello all,

>just a question. I am using FreeBSD 2.2-current for write data-CD's
>with a HP4020i-writer very successfully (not a single failure up to
>now).
>I can even copy a whole CD from a CD-Reader (Toshiba 6,7x speed, SCSI)
>that is connected to the same SCSI-Controller (NCR 810) directly to the
>writer without usig the disc. 

>But I want to do some audio stuff too. Up to now I have to use Windoze95
>for this task. I really would love to do that under FreeBSD, because the
>SCSI-Stuff in Windoze seems to be a little bit unreliable to me (I have
>already damaged some CD's :-( )

Anyone other than me notice that this guy works for HP? :-)

>Question 1: Can I read audio-CD's into .WAV-Files somehow under FreeBSD?
>           (This would help me to some extend)

No. The worm driver doesn't support reading from the device at the
moment at all. I just use lose95 to read the tracks, then byte-flip them
and massage them with sox (sox -x foo.wav foo.cdr works for me) and burn
them under Unix.

Also: Go get the latest flash image for the burner.

% dmesg | grep HP
(ahc0:3:0): "HP C4324/C4325 1.25" type 5 removable SCSI 2

The "1.25" is the ROM rev. 1.25 is the latest I know of.

>Question 2: Can I burn audio-CD's under FreeBSD?

Yes. The driver as of 2.2-9610xx-SNAP has a couple of bugs that prevent
audio from working, but this patch clears it up. Track-at-a-time mode
is all that's supported at the present.

This patch also _removes_ a check that ordinarily prevents making
multi-track yellow book CDs. The old Sun Catalyst CDs used to have
a data track and a couple of audio tracks, so as long as your CD player
skiped the first one, it looked like an ordinary redbook CD. The
computer would only care about the first track, which was yellow.
Everybody won.

*** worm.c.orig	Sun Jul 14 03:46:56 1996
--- worm.c	Thu Oct  3 16:20:13 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>  | I am Pentium of Borg.
N6QQQ @ N0ARY.#NORCAL.CA.USA.NOAM  | You will be approximated.
+1 408 249 9630, log in as 'guest' | 
URL: http://www.kfu.com/~nsayer/   |      -- The Usenet Oracle