Date: Tue, 14 Apr 2009 00:35:47 +0900 From: WATANABE Kazuhiro <CQG00620@nifty.ne.jp> To: freebsd-current <freebsd-current@freebsd.org> Cc: Jean-S?bastien P?dron <dumbbell@FreeBSD.org> Subject: Re: New ioctl to support Enhanced CD (or Extra CD) Message-ID: <20090413153547.6788170220@mail1.asahi-net.or.jp> In-Reply-To: <49DDF942.9040808@FreeBSD.org> References: <49DDF942.9040808@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi. I've tested your patch, and found some problems. (1) Cannot mount a data part. capricorn# cdcontrol info Starting track =3D 1, ending track =3D 12, TOC size =3D 106 bytes track start duration block length type ------------------------------------------------- 1 0:02.00 6:18.00 0 28350 audio 2 6:20.00 6:03.10 28350 27235 audio 3 12:23.10 5:32.37 55585 24937 audio 4 17:55.47 3:35.65 80522 16190 audio 5 21:31.37 5:28.33 96712 24633 audio 6 26:59.70 3:58.15 121345 17865 audio 7 30:58.10 4:57.62 139210 22337 audio 8 35:55.72 4:58.55 161547 22405 audio 9 40:54.52 6:28.68 183952 29168 audio 10 47:23.45 5:01.50 213120 22625 audio 11 52:25.20 6:48.32 235745 30632 audio 12 61:45.52 8:10.74 277777 36824 data 170 69:56.51 - 314601 - - capricorn# mount_cd9660 /dev/acd0 /cdrom mount_cd9660: /dev/acd0: Invalid argument capricorn#=20 (2) When I read the last audio track via /dev/acd0tXX, the output data has wrong length. capricorn# dd if=3D/dev/acd0t10 bs=3D2352 > /dev/null 22625+0 records in 22625+0 records out # correct length 53214000 bytes transferred in 19.750258 secs (2694345 bytes/sec) capricorn# dd if=3D/dev/acd0t11 bs=3D2352 > /dev/null dd: /dev/acd0t11: Input/output error 41883+0 records in 41883+0 records out # wrong length (!=3D 30632) 98508816 bytes transferred in 35.804241 secs (2751317 bytes/sec) capricorn#=20 (3) When I play the last audio track with cdcontrol(1), the "next" command doesn't work (the drive stops playing). capricorn# cdcontrol play 11 capricorn# cdcontrol status Audio status =3D 17<playing>, current track =3D 11, current position =3D 0:= 13.68 No media catalog info available Left volume =3D 255, right volume =3D 255 capricorn# cdcontrol next acd0: FAILURE - PLAY_MSF ILLEGAL REQUEST asc=3D0x64 ascq=3D0x00 capricorn# cdcontrol status Audio status =3D 0<invalid>, current track =3D 11, current position =3D 0:2= 6.57 Media catalog is inactive Left volume =3D 255, right volume =3D 255 capricorn#=20 (These tests are done with Noriyuki Makihara's "Such a Lovely Place" (Sony Records, 1997).) By the way, I have an another patch that solves problems that you have pointed out and described above. http://homepage2.nifty.com/dumb_show/unix/work/ata.releng71.diff http://homepage2.nifty.com/dumb_show/unix/work/cdcontrol.releng71.diff I've tested the patch on FreeBSD 7.1-RELEASE and 8-current. This patch is not my original. The original patch was written by Chiharu Shibata for FreeBSD 4.4-RELEASE. http://www32.ocn.ne.jp/~chi/myprog/FreeBSD/atapi-cd.html One year later he rewrote the patch for FreeBSD 4.7-RELEASE. It also includes some quirks for old CD-ROM drives which are generally used with NEC PC-98 series. http://home.jp.freebsd.org/cgi-bin/showmail/FreeBSD-users-jp/74432 I rewrote the latter patch for FreeBSD 5.x, 6.x, and 7.x. At Thu, 09 Apr 2009 15:33:54 +0200, Jean-S?bastien P?dron wrote: > Hello, >=20 > 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. >=20 > 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 >=20 > 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 >=20 > 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. >=20 > 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). >=20 > 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. >=20 > 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. >=20 > 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! :) >=20 > [1] This was tested with Avishai Cohen's last album, "Aurora". >=20 > -- > Jean-S=E9bastien P=E9dron > http://www.dumbbell.fr/ (snip) --- WATANABE Kazuhiro (CQG00620@nifty.ne.jp)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090413153547.6788170220>