From owner-freebsd-current@FreeBSD.ORG Sat Apr 11 00:04:09 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ED9C1065670 for ; Sat, 11 Apr 2009 00:04:09 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.237]) by mx1.freebsd.org (Postfix) with ESMTP id 4C7A38FC0C for ; Sat, 11 Apr 2009 00:04:09 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id l9so1176211rvb.43 for ; Fri, 10 Apr 2009 17:04:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=chDhLTX574vstD/PzomjPHJz8N5O8uKxg/OpHdMsV+s=; b=Mkexp1M9C4fRmul3UUB6J+jx/9f0Xgi5oBHM3j0oVqP3sEtyfU6mFO2hbJvdtQODaA l55Z+dmjatsn8dqHwGE6tJ7jud23QItwz7TkI4x/RiKP0Sdf74soI8ENpKIBs6ZQD2K9 qLbywJ0yMGdPRpMy1yemS6gpNY6MI/4yeN9yU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=WswYpnL04m/WB51IBUO48hn+4CZB13KGcNIXK6ovFZS9faL0KKXgbps61CJM6/0zU6 EubY8zXLhVLTwD6WOEcMKNuzkurnWWhqQ5iECTl/6Q4uh0EDTkhMib5MLCgfRu8Ibi6B Ddl9gi0l5/1oc3lYHQSHVD93jI/fh4wC/XkKU= MIME-Version: 1.0 Received: by 10.141.107.13 with SMTP id j13mr1667681rvm.65.1239408248877; Fri, 10 Apr 2009 17:04:08 -0700 (PDT) In-Reply-To: <49DDF942.9040808@FreeBSD.org> References: <49DDF942.9040808@FreeBSD.org> Date: Fri, 10 Apr 2009 17:04:08 -0700 Message-ID: <7d6fde3d0904101704l57e86d69uf7f8297cea14a439@mail.gmail.com> From: Garrett Cooper To: =?ISO-8859-1?Q?Jean=2DS=E9bastien_P=E9dron?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: New ioctl to support Enhanced CD (or Extra CD) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2009 00:04:09 -0000 On Thu, Apr 9, 2009 at 6:33 AM, Jean-S=E9bastien P=E9dron wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > Enhanced CD (or Extra CA) is an Audio CD with an additionnal data track > at the end. Audio tracks belong to the first session while the data > track belongs to the second session. Therefore the last audio track ends > way before the data track start. > > The first consequence is that the duration of the last audio track isn't > reported correctly. Here is the output of cdcontrol(1) with such a CD[1]: > =A0 =A0$ cdcontrol info > =A0 =A0... > =A0 =A012 =A046:03.67 =A0 9:54.43 =A0207142 =A0 44593 =A0audio > =A0 =A013 =A055:58.35 =A0 6:38.51 =A0251735 =A0 29901 =A0 data > > The expected output is: > =A0 =A0$ cdcontrol info > =A0 =A0... > =A0 =A012 =A046:03.67 =A0 7:22.43 =A0207142 =A0 33193 =A0audio > =A0 =A013 =A055:58.35 =A0 6:38.51 =A0251735 =A0 29901 =A0 data > > A more "audible" consequence is that cdparanoia(1) copies 9'54" of data > instead of 7'22". The end of the ripped file is full of garbage. > > I made a patch (attached) that adds a new ioctl to query the start > address of the last session. This new ioctl is named > CDIOREADLASTSESSIONADDR. The patch also includes changes to cdcontrol(1). > > I added a new member at the end of struct acd_softc to store the last > session address. I don't know if this causes ABI breakage. > > Linux' corresponding ioctl is CDROMMULTISESSION. Beside this address, it > returns a flag named "xa_flag". Currently, I don't understand what it is > but it may be useful to add it to our ioctl too if someone knows its > purpose. > > Before I spend some time to teach cdparanoia(1) about this new ioctl, > I'd like some feedback on this patch, especially the name and the struct > ioc_read_last_session_addr. I would appreciate some test reports too! :) > > [1] This was tested with Avishai Cohen's last album, "Aurora". Cool! I'll give this a shot with some CD's I have kicking around my room this weekend -- thanks! -Garrett