From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 3 10:41:31 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB3FD16A52E for ; Tue, 3 Oct 2006 10:41:31 +0000 (UTC) (envelope-from ekkehard.morgenstern@onlinehome.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id A598843D55 for ; Tue, 3 Oct 2006 10:41:30 +0000 (GMT) (envelope-from ekkehard.morgenstern@onlinehome.de) Received: from [84.173.204.231] (helo=[192.168.0.136]) by mrelayeu.kundenserver.de (node=mrelayeu1) with ESMTP (Nemesis), id 0MKwpI-1GUhi61GP9-0004Uo; Tue, 03 Oct 2006 12:41:15 +0200 From: Ekkehard Morgenstern To: Sean Bryant Date: Tue, 3 Oct 2006 12:40:01 +0200 User-Agent: KMail/1.9.1 References: <200610021121.57756.ekkehard.morgenstern@onlinehome.de> <200610021254.37808.ekkehard.morgenstern@onlinehome.de> <45213239.5050004@cyberwang.net> In-Reply-To: <45213239.5050004@cyberwang.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610031240.02386.ekkehard.morgenstern@onlinehome.de> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:9985dda5cbe98f4670734048a5dbacd9 Cc: freebsd-hackers@freebsd.org, John-Mark Gurney Subject: Re: Systems programming on FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Oct 2006 10:41:31 -0000 On Monday 02 October 2006 17:37, Sean Bryant wrote: > If you're trying to get to the cam interface you can do that without the > ioctl interface and just use the cam interface. man cam to get that. OK, I will have a look at that, thank you. > But > note that only works for the cam devices (cd, xpt, pass, da). Things > like acd and ada are not supported with the cam interface and you're > pretty much stuck with using the ioctl interface but the sys/cdio.h and > sys/cdrio.h list the ioctls for you to use. Actually, at least the 6.1 Release kernel does create xpt0/pass0 for acd0 when the CAM driver is present. That's how I got K3B to work! ;-) So, CAM might be a viable choice for me. > You can just open the cdrom device with open and start reading from it. Unfortunately, that doesn't give me the subchannel info that I'm looking for. I have to use some kind of ioctl() for that case, but I don't know how to do that yet. I wish to implement the error correction for audio CDs using the subchannel information (or not; the error correction bits aren't in the subchannel, right?). Whatever. Someone told me that both ATAPI and SCSI cannot deliver the raw data on an audio CD (except the audio data itself). When you're reading over a series of defective sectors, the only thing you can do is re-read them and hope to fix up some data. I wish there was any other way. > Right now there seems to be a bug with the cdrom ioctl stuff. If you do > certain operations too fast the thing will stop responding to request > for a while. Not sure when this will be cleared up. > But good luck to you. For examples take a look at the burncd source it > uses the cdio and cdrio ioctls quite a bit. Thanks. Will do.