Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 2009 17:04:08 -0700
From:      Garrett Cooper <yanefbsd@gmail.com>
To:        =?ISO-8859-1?Q?Jean=2DS=E9bastien_P=E9dron?= <dumbbell@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: New ioctl to support Enhanced CD (or Extra CD)
Message-ID:  <7d6fde3d0904101704l57e86d69uf7f8297cea14a439@mail.gmail.com>
In-Reply-To: <49DDF942.9040808@FreeBSD.org>
References:  <49DDF942.9040808@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Thu, Apr 9, 2009 at 6:33 AM, Jean-Sébastien Pédron
<dumbbell@freebsd.org> 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]:
>    $ cdcontrol info
>    ...
>    12  46:03.67   9:54.43  207142   44593  audio
>    13  55:58.35   6:38.51  251735   29901   data
>
> The expected output is:
>    $ cdcontrol info
>    ...
>    12  46:03.67   7:22.43  207142   33193  audio
>    13  55:58.35   6:38.51  251735   29901   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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7d6fde3d0904101704l57e86d69uf7f8297cea14a439>